AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/types/error/_query_execution_exception.rs

@@ -1,1 +102,113 @@
   13     13   
    "com.amazonaws.timestreamquery",
   14     14   
    "QueryExecutionException",
   15     15   
);
   16     16   
static QUERYEXECUTIONEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   17     17   
    ::aws_smithy_schema::ShapeId::from_static(
   18     18   
        "com.amazonaws.timestreamquery#QueryExecutionException$Message",
   19     19   
        "com.amazonaws.timestreamquery",
   20     20   
        "QueryExecutionException",
   21     21   
    ),
   22     22   
    ::aws_smithy_schema::ShapeType::String,
   23         -
    "message",
          23  +
    "Message",
   24     24   
    0,
   25     25   
);
   26     26   
static QUERYEXECUTIONEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   27     27   
    QUERYEXECUTIONEXCEPTION_SCHEMA_ID,
   28     28   
    ::aws_smithy_schema::ShapeType::Structure,
   29     29   
    &[&QUERYEXECUTIONEXCEPTION_MEMBER_MESSAGE],
   30     30   
);
   31     31   
impl QueryExecutionException {
   32     32   
    /// The schema for this shape.
   33     33   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &QUERYEXECUTIONEXCEPTION_SCHEMA;
   34     34   
}
   35     35   
impl ::aws_smithy_schema::serde::SerializableStruct for QueryExecutionException {
   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(&QUERYEXECUTIONEXCEPTION_MEMBER_MESSAGE, val)?;
   43     43   
        }
   44     44   
        Ok(())
   45     45   
    }
   46     46   
}
   47     47   
impl QueryExecutionException {
   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(&QUERYEXECUTIONEXCEPTION_SCHEMA, (), |_, member, deser| {
          61  +
        deserializer.read_struct(&QUERYEXECUTIONEXCEPTION_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 QueryExecutionException {
          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 QueryExecutionException {
   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 QueryExecutionException {
   80     91   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   81     92   
        ::std::write!(f, "QueryExecutionException")?;
   82     93   
        if let ::std::option::Option::Some(inner_1) = &self.message {

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/types/error/_resource_not_found_exception.rs

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

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

@@ -1,1 +102,113 @@
   13     13   
    "com.amazonaws.timestreamquery",
   14     14   
    "ServiceQuotaExceededException",
   15     15   
);
   16     16   
static SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   17     17   
    ::aws_smithy_schema::ShapeId::from_static(
   18     18   
        "com.amazonaws.timestreamquery#ServiceQuotaExceededException$Message",
   19     19   
        "com.amazonaws.timestreamquery",
   20     20   
        "ServiceQuotaExceededException",
   21     21   
    ),
   22     22   
    ::aws_smithy_schema::ShapeType::String,
   23         -
    "message",
          23  +
    "Message",
   24     24   
    0,
   25     25   
);
   26     26   
static SERVICEQUOTAEXCEEDEDEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   27     27   
    SERVICEQUOTAEXCEEDEDEXCEPTION_SCHEMA_ID,
   28     28   
    ::aws_smithy_schema::ShapeType::Structure,
   29     29   
    &[&SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_MESSAGE],
   30     30   
);
   31     31   
impl ServiceQuotaExceededException {
   32     32   
    /// The schema for this shape.
   33     33   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &SERVICEQUOTAEXCEEDEDEXCEPTION_SCHEMA;
   34     34   
}
   35     35   
impl ::aws_smithy_schema::serde::SerializableStruct for ServiceQuotaExceededException {
   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(&SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_MESSAGE, val)?;
   43     43   
        }
   44     44   
        Ok(())
   45     45   
    }
   46     46   
}
   47     47   
impl ServiceQuotaExceededException {
   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(&SERVICEQUOTAEXCEEDEDEXCEPTION_SCHEMA, (), |_, member, deser| {
          61  +
        deserializer.read_struct(&SERVICEQUOTAEXCEEDEDEXCEPTION_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 ServiceQuotaExceededException {
          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 ServiceQuotaExceededException {
   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 ServiceQuotaExceededException {
   80     91   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   81     92   
        ::std::write!(f, "ServiceQuotaExceededException")?;
   82     93   
        if let ::std::option::Option::Some(inner_1) = &self.message {

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/types/error/_throttling_exception.rs

@@ -1,1 +102,113 @@
   13     13   
    "com.amazonaws.timestreamquery",
   14     14   
    "ThrottlingException",
   15     15   
);
   16     16   
static THROTTLINGEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   17     17   
    ::aws_smithy_schema::ShapeId::from_static(
   18     18   
        "com.amazonaws.timestreamquery#ThrottlingException$Message",
   19     19   
        "com.amazonaws.timestreamquery",
   20     20   
        "ThrottlingException",
   21     21   
    ),
   22     22   
    ::aws_smithy_schema::ShapeType::String,
   23         -
    "message",
          23  +
    "Message",
   24     24   
    0,
   25     25   
);
   26     26   
static THROTTLINGEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   27     27   
    THROTTLINGEXCEPTION_SCHEMA_ID,
   28     28   
    ::aws_smithy_schema::ShapeType::Structure,
   29     29   
    &[&THROTTLINGEXCEPTION_MEMBER_MESSAGE],
   30     30   
);
   31     31   
impl ThrottlingException {
   32     32   
    /// The schema for this shape.
   33     33   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &THROTTLINGEXCEPTION_SCHEMA;
   34     34   
}
   35     35   
impl ::aws_smithy_schema::serde::SerializableStruct for ThrottlingException {
   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(&THROTTLINGEXCEPTION_MEMBER_MESSAGE, val)?;
   43     43   
        }
   44     44   
        Ok(())
   45     45   
    }
   46     46   
}
   47     47   
impl ThrottlingException {
   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(&THROTTLINGEXCEPTION_SCHEMA, (), |_, member, deser| {
          61  +
        deserializer.read_struct(&THROTTLINGEXCEPTION_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 ThrottlingException {
          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 ThrottlingException {
   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 ThrottlingException {
   80     91   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   81     92   
        ::std::write!(f, "ThrottlingException")?;
   82     93   
        if let ::std::option::Option::Some(inner_1) = &self.message {

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/types/error/_validation_exception.rs

@@ -1,1 +102,113 @@
   13     13   
    "com.amazonaws.timestreamquery",
   14     14   
    "ValidationException",
   15     15   
);
   16     16   
static VALIDATIONEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   17     17   
    ::aws_smithy_schema::ShapeId::from_static(
   18     18   
        "com.amazonaws.timestreamquery#ValidationException$Message",
   19     19   
        "com.amazonaws.timestreamquery",
   20     20   
        "ValidationException",
   21     21   
    ),
   22     22   
    ::aws_smithy_schema::ShapeType::String,
   23         -
    "message",
          23  +
    "Message",
   24     24   
    0,
   25     25   
);
   26     26   
static VALIDATIONEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   27     27   
    VALIDATIONEXCEPTION_SCHEMA_ID,
   28     28   
    ::aws_smithy_schema::ShapeType::Structure,
   29     29   
    &[&VALIDATIONEXCEPTION_MEMBER_MESSAGE],
   30     30   
);
   31     31   
impl ValidationException {
   32     32   
    /// The schema for this shape.
   33     33   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &VALIDATIONEXCEPTION_SCHEMA;
   34     34   
}
   35     35   
impl ::aws_smithy_schema::serde::SerializableStruct for ValidationException {
   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(&VALIDATIONEXCEPTION_MEMBER_MESSAGE, val)?;
   43     43   
        }
   44     44   
        Ok(())
   45     45   
    }
   46     46   
}
   47     47   
impl ValidationException {
   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(&VALIDATIONEXCEPTION_SCHEMA, (), |_, member, deser| {
          61  +
        deserializer.read_struct(&VALIDATIONEXCEPTION_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 ValidationException {
          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 ValidationException {
   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 ValidationException {
   80     91   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   81     92   
        ::std::write!(f, "ValidationException")?;
   82     93   
        if let ::std::option::Option::Some(inner_1) = &self.message {

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

@@ -1,1 +80,80 @@
   14     14   
protocol = "aws.protocols#awsJson1_0"
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20     20   
version = "1.2.14"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24         -
version = "1.7.3"
          24  +
version = "1.7.4"
   25     25   
   26     26   
[dependencies.aws-smithy-async]
   27     27   
path = "../aws-smithy-async"
   28     28   
version = "1.2.14"
   29     29   
   30     30   
[dependencies.aws-smithy-http]
   31     31   
path = "../aws-smithy-http"
   32     32   
version = "0.63.6"
   33     33   
   34     34   
[dependencies.aws-smithy-json]
   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/timestreamwrite/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 +254,277 @@
  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   
    }
  209    216   
    /// Sets the idempotency token provider to use for service calls that require tokens.
  210    217   
    pub fn idempotency_token_provider(
  211    218   
        mut self,
  212    219   
        idempotency_token_provider: impl ::std::convert::Into<crate::idempotency_token::IdempotencyTokenProvider>,
  213    220   
    ) -> Self {
  214    221   
        self.set_idempotency_token_provider(::std::option::Option::Some(idempotency_token_provider.into()));
  215    222   
        self
  216    223   
    }
  217    224   
    /// Sets the idempotency token provider to use for service calls that require tokens.
  218    225   
    pub fn set_idempotency_token_provider(
  219    226   
        &mut self,
  220    227   
        idempotency_token_provider: ::std::option::Option<crate::idempotency_token::IdempotencyTokenProvider>,
  221    228   
    ) -> &mut Self {
  222    229   
        self.config.store_or_unset(idempotency_token_provider);
  223    230   
        self
  224    231   
    }
         232  +
    /// Sets the client protocol to use for serialization and deserialization.
         233  +
    ///
         234  +
    /// This overrides the default protocol determined by the service model,
         235  +
    /// enabling runtime protocol selection.
         236  +
    pub fn protocol(mut self, protocol: impl ::aws_smithy_schema::protocol::ClientProtocol + 'static) -> Self {
         237  +
        self.set_protocol(::std::option::Option::Some(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         238  +
            protocol,
         239  +
        )));
         240  +
        self
         241  +
    }
         242  +
         243  +
    /// Sets the client protocol to use for serialization and deserialization.
         244  +
    pub fn set_protocol(&mut self, protocol: ::std::option::Option<::aws_smithy_schema::protocol::SharedClientProtocol>) -> &mut Self {
         245  +
        self.config.store_or_unset(protocol);
         246  +
        self
         247  +
    }
  225    248   
    /// Sets the HTTP client to use when making requests.
  226    249   
    ///
  227    250   
    /// # Examples
  228    251   
    /// ```no_run
  229    252   
    /// # #[cfg(test)]
  230    253   
    /// # mod tests {
  231    254   
    /// # #[test]
  232    255   
    /// # fn example() {
  233    256   
    /// use std::time::Duration;
  234    257   
    /// use aws_sdk_timestreamwrite::config::Config;
@@ -1290,1313 +1349,1377 @@
 1310   1333   
pub(crate) struct ServiceRuntimePlugin {
 1311   1334   
    config: ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer>,
 1312   1335   
    runtime_components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1313   1336   
}
 1314   1337   
 1315   1338   
impl ServiceRuntimePlugin {
 1316   1339   
    pub fn new(_service_config: crate::config::Config) -> Self {
 1317   1340   
        let config = {
 1318   1341   
            let mut cfg = ::aws_smithy_types::config_bag::Layer::new("Timestream_20181101");
 1319   1342   
            cfg.store_put(crate::idempotency_token::default_provider());
        1343  +
            if _service_config.protocol().is_none() {
        1344  +
                cfg.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
        1345  +
                    ::aws_smithy_json::protocol::aws_json_rpc::AwsJsonRpcProtocol::aws_json_1_0("Timestream_20181101"),
        1346  +
                ));
        1347  +
            }
 1320   1348   
            cfg.store_put(::aws_smithy_runtime::client::orchestrator::AuthSchemeAndEndpointOrchestrationV2);
 1321   1349   
            ::std::option::Option::Some(cfg.freeze())
 1322   1350   
        };
 1323   1351   
        let mut runtime_components = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ServiceRuntimePlugin");
 1324   1352   
        runtime_components.set_auth_scheme_option_resolver(::std::option::Option::Some({
 1325   1353   
            use crate::config::auth::ResolveAuthScheme;
 1326   1354   
            crate::config::auth::DefaultAuthSchemeResolver::default().into_shared_resolver()
 1327   1355   
        }));
 1328   1356   
        runtime_components.set_endpoint_resolver(::std::option::Option::Some({
 1329   1357   
            use crate::config::endpoint::ResolveEndpoint;
@@ -1425,1453 +1484,1515 @@
 1445   1473   
        }
 1446   1474   
        // resiliency
 1447   1475   
        builder.set_retry_config(input.retry_config().cloned());
 1448   1476   
        builder.set_timeout_config(input.timeout_config().cloned());
 1449   1477   
        builder.set_sleep_impl(input.sleep_impl());
 1450   1478   
 1451   1479   
        builder.set_http_client(input.http_client());
 1452   1480   
        builder.set_time_source(input.time_source());
 1453   1481   
        builder.set_behavior_version(input.behavior_version());
 1454   1482   
        builder.set_auth_scheme_preference(input.auth_scheme_preference().cloned());
        1483  +
        if let Some(protocol) = input.protocol() {
        1484  +
            builder.set_protocol(Some(protocol.clone()));
        1485  +
        }
 1455   1486   
        // setting `None` here removes the default
 1456   1487   
        if let Some(config) = input.stalled_stream_protection() {
 1457   1488   
            builder.set_stalled_stream_protection(Some(config));
 1458   1489   
        }
 1459   1490   
 1460   1491   
        if let Some(cache) = input.identity_cache() {
 1461   1492   
            builder.set_identity_cache(cache);
 1462   1493   
        }
 1463   1494   
        builder.set_app_name(input.app_name().cloned());
 1464   1495   

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

@@ -178,178 +219,215 @@
  198    198   
pub mod endpoint_discovery;
  199    199   
  200    200   
mod idempotency_token;
  201    201   
  202    202   
mod observability_feature;
  203    203   
  204    204   
pub(crate) mod protocol_serde;
  205    205   
  206    206   
mod sdk_feature_tracker;
  207    207   
  208         -
mod serialization_settings;
  209         -
  210    208   
mod endpoint_lib;
  211    209   
  212         -
mod lens;
  213         -
  214         -
mod serde_util;
  215         -
  216    210   
mod json_errors;
  217    211   
         212  +
mod lens;
         213  +
  218    214   
#[doc(inline)]
  219    215   
pub use client::Client;

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/create_batch_load_task.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 `CreateBatchLoadTask`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateBatchLoadTask;
    6      6   
impl CreateBatchLoadTask {
    7      7   
    /// Creates a new `CreateBatchLoadTask`
    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_batch_load_task::CreateBatchLoadTaskInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_batch_load_task::CreateBatchLoadTaskOutput::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_batch_load_task::CreateBatchLoadTaskInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_batch_load_task::CreateBatchLoadTaskOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_batch_load_task::CreateBatchLoadTaskError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -131,135 +260,454 @@
  151    155   
                crate::operation::create_batch_load_task::CreateBatchLoadTaskError,
  152    156   
            >::new());
  153    157   
  154    158   
        ::std::borrow::Cow::Owned(rcb)
  155    159   
    }
  156    160   
}
  157    161   
  158    162   
#[derive(Debug)]
  159    163   
struct CreateBatchLoadTaskResponseDeserializer;
  160    164   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateBatchLoadTaskResponseDeserializer {
  161         -
    fn deserialize_nonstreaming(
         165  +
    fn deserialize_nonstreaming_with_config(
  162    166   
        &self,
  163    167   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         168  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  164    169   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  165    170   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  166         -
        let headers = response.headers();
  167         -
        let body = response.body().bytes().expect("body loaded");
  168    171   
        #[allow(unused_mut)]
  169    172   
        let mut force_error = false;
  170    173   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  171         -
        let parse_result = if !success && status != 200 || force_error {
  172         -
            crate::protocol_serde::shape_create_batch_load_task::de_create_batch_load_task_http_error(status, headers, body)
  173         -
        } else {
  174         -
            crate::protocol_serde::shape_create_batch_load_task::de_create_batch_load_task_http_response(status, headers, body)
         174  +
        if !success && status != 200 || force_error {
         175  +
            let headers = response.headers();
         176  +
            let body = response.body().bytes().expect("body loaded");
         177  +
            #[allow(unused_mut)]
         178  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         179  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         180  +
            })?;
         181  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         182  +
            let generic = generic_builder.build();
         183  +
            let error_code = match generic.code() {
         184  +
                ::std::option::Option::Some(code) => code,
         185  +
                ::std::option::Option::None => {
         186  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         187  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         188  +
                            crate::operation::create_batch_load_task::CreateBatchLoadTaskError::unhandled(generic),
         189  +
                        ),
         190  +
                    ))
         191  +
                }
         192  +
            };
         193  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         194  +
            let protocol = _cfg
         195  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         196  +
                .expect("a SharedClientProtocol is required");
         197  +
            let err = match error_code {
         198  +
                "AccessDeniedException" => crate::operation::create_batch_load_task::CreateBatchLoadTaskError::AccessDeniedException({
         199  +
                    let mut tmp = match protocol
         200  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         201  +
                        .and_then(|mut deser| {
         202  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         203  +
                                &mut *deser,
         204  +
                                response.headers(),
         205  +
                                response.status().into(),
         206  +
                                body,
         207  +
                            )
         208  +
                        }) {
         209  +
                        ::std::result::Result::Ok(val) => val,
         210  +
                        ::std::result::Result::Err(e) => {
         211  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         212  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         213  +
                            ))
         214  +
                        }
         215  +
                    };
         216  +
                    tmp.meta = generic;
         217  +
                    tmp
         218  +
                }),
         219  +
                "ConflictException" => crate::operation::create_batch_load_task::CreateBatchLoadTaskError::ConflictException({
         220  +
                    let mut tmp = match protocol
         221  +
                        .deserialize_response(response, crate::types::error::ConflictException::SCHEMA, _cfg)
         222  +
                        .and_then(|mut deser| {
         223  +
                            crate::types::error::ConflictException::deserialize_with_response(
         224  +
                                &mut *deser,
         225  +
                                response.headers(),
         226  +
                                response.status().into(),
         227  +
                                body,
         228  +
                            )
         229  +
                        }) {
         230  +
                        ::std::result::Result::Ok(val) => val,
         231  +
                        ::std::result::Result::Err(e) => {
         232  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         233  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         234  +
                            ))
         235  +
                        }
         236  +
                    };
         237  +
                    tmp.meta = generic;
         238  +
                    tmp
         239  +
                }),
         240  +
                "InternalServerException" => crate::operation::create_batch_load_task::CreateBatchLoadTaskError::InternalServerException({
         241  +
                    let mut tmp = match protocol
         242  +
                        .deserialize_response(response, crate::types::error::InternalServerException::SCHEMA, _cfg)
         243  +
                        .and_then(|mut deser| {
         244  +
                            crate::types::error::InternalServerException::deserialize_with_response(
         245  +
                                &mut *deser,
         246  +
                                response.headers(),
         247  +
                                response.status().into(),
         248  +
                                body,
         249  +
                            )
         250  +
                        }) {
         251  +
                        ::std::result::Result::Ok(val) => val,
         252  +
                        ::std::result::Result::Err(e) => {
         253  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         254  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         255  +
                            ))
         256  +
                        }
         257  +
                    };
         258  +
                    tmp.meta = generic;
         259  +
                    tmp
         260  +
                }),
         261  +
                "InvalidEndpointException" => crate::operation::create_batch_load_task::CreateBatchLoadTaskError::InvalidEndpointException({
         262  +
                    let mut tmp = match protocol
         263  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         264  +
                        .and_then(|mut deser| {
         265  +
                            crate::types::error::InvalidEndpointException::deserialize_with_response(
         266  +
                                &mut *deser,
         267  +
                                response.headers(),
         268  +
                                response.status().into(),
         269  +
                                body,
         270  +
                            )
         271  +
                        }) {
         272  +
                        ::std::result::Result::Ok(val) => val,
         273  +
                        ::std::result::Result::Err(e) => {
         274  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         275  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         276  +
                            ))
         277  +
                        }
         278  +
                    };
         279  +
                    tmp.meta = generic;
         280  +
                    if tmp.message.is_none() {
         281  +
                        tmp.message = _error_message;
         282  +
                    }
         283  +
                    tmp
         284  +
                }),
         285  +
                "ResourceNotFoundException" => crate::operation::create_batch_load_task::CreateBatchLoadTaskError::ResourceNotFoundException({
         286  +
                    let mut tmp = match protocol
         287  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         288  +
                        .and_then(|mut deser| {
         289  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         290  +
                                &mut *deser,
         291  +
                                response.headers(),
         292  +
                                response.status().into(),
         293  +
                                body,
         294  +
                            )
         295  +
                        }) {
         296  +
                        ::std::result::Result::Ok(val) => val,
         297  +
                        ::std::result::Result::Err(e) => {
         298  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         299  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         300  +
                            ))
         301  +
                        }
         302  +
                    };
         303  +
                    tmp.meta = generic;
         304  +
                    if tmp.message.is_none() {
         305  +
                        tmp.message = _error_message;
         306  +
                    }
         307  +
                    tmp
         308  +
                }),
         309  +
                "ServiceQuotaExceededException" => {
         310  +
                    crate::operation::create_batch_load_task::CreateBatchLoadTaskError::ServiceQuotaExceededException({
         311  +
                        let mut tmp = match protocol
         312  +
                            .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         313  +
                            .and_then(|mut deser| {
         314  +
                                crate::types::error::ServiceQuotaExceededException::deserialize_with_response(
         315  +
                                    &mut *deser,
         316  +
                                    response.headers(),
         317  +
                                    response.status().into(),
         318  +
                                    body,
         319  +
                                )
         320  +
                            }) {
         321  +
                            ::std::result::Result::Ok(val) => val,
         322  +
                            ::std::result::Result::Err(e) => {
         323  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         324  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         325  +
                                ))
         326  +
                            }
         327  +
                        };
         328  +
                        tmp.meta = generic;
         329  +
                        if tmp.message.is_none() {
         330  +
                            tmp.message = _error_message;
         331  +
                        }
         332  +
                        tmp
         333  +
                    })
         334  +
                }
         335  +
                "ThrottlingException" => crate::operation::create_batch_load_task::CreateBatchLoadTaskError::ThrottlingException({
         336  +
                    let mut tmp = match protocol
         337  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         338  +
                        .and_then(|mut deser| {
         339  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         340  +
                                &mut *deser,
         341  +
                                response.headers(),
         342  +
                                response.status().into(),
         343  +
                                body,
         344  +
                            )
         345  +
                        }) {
         346  +
                        ::std::result::Result::Ok(val) => val,
         347  +
                        ::std::result::Result::Err(e) => {
         348  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         349  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         350  +
                            ))
         351  +
                        }
         352  +
                    };
         353  +
                    tmp.meta = generic;
         354  +
                    tmp
         355  +
                }),
         356  +
                "ValidationException" => crate::operation::create_batch_load_task::CreateBatchLoadTaskError::ValidationException({
         357  +
                    let mut tmp = match protocol
         358  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         359  +
                        .and_then(|mut deser| {
         360  +
                            crate::types::error::ValidationException::deserialize_with_response(
         361  +
                                &mut *deser,
         362  +
                                response.headers(),
         363  +
                                response.status().into(),
         364  +
                                body,
         365  +
                            )
         366  +
                        }) {
         367  +
                        ::std::result::Result::Ok(val) => val,
         368  +
                        ::std::result::Result::Err(e) => {
         369  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         370  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         371  +
                            ))
         372  +
                        }
  175    373   
                    };
  176         -
        crate::protocol_serde::type_erase_result(parse_result)
         374  +
                    tmp.meta = generic;
         375  +
                    tmp
         376  +
                }),
         377  +
                _ => crate::operation::create_batch_load_task::CreateBatchLoadTaskError::generic(generic),
         378  +
            };
         379  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         380  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         381  +
            ))
         382  +
        } else {
         383  +
            let protocol = _cfg
         384  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         385  +
                .expect("a SharedClientProtocol is required");
         386  +
            let mut deser = protocol
         387  +
                .deserialize_response(response, CreateBatchLoadTask::OUTPUT_SCHEMA, _cfg)
         388  +
                .map_err(|e| {
         389  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         390  +
                })?;
         391  +
            let body = response.body().bytes().expect("body loaded");
         392  +
            let output = crate::operation::create_batch_load_task::CreateBatchLoadTaskOutput::deserialize_with_response(
         393  +
                &mut *deser,
         394  +
                response.headers(),
         395  +
                response.status().into(),
         396  +
                body,
         397  +
            )
         398  +
            .map_err(|e| {
         399  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         400  +
            })?;
         401  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         402  +
        }
  177    403   
    }
  178    404   
}
  179    405   
#[derive(Debug)]
  180    406   
struct CreateBatchLoadTaskRequestSerializer;
  181    407   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateBatchLoadTaskRequestSerializer {
  182    408   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  183    409   
    fn serialize_input(
  184    410   
        &self,
  185    411   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  186    412   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  187    413   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  188    414   
        let input = input
  189    415   
            .downcast::<crate::operation::create_batch_load_task::CreateBatchLoadTaskInput>()
  190    416   
            .expect("correct type");
  191         -
        let _header_serialization_settings = _cfg
  192         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  193         -
            .cloned()
  194         -
            .unwrap_or_default();
  195         -
        let mut request_builder = {
  196         -
            #[allow(clippy::uninlined_format_args)]
  197         -
            fn uri_base(
  198         -
                _input: &crate::operation::create_batch_load_task::CreateBatchLoadTaskInput,
  199         -
                output: &mut ::std::string::String,
  200         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  201         -
                use ::std::fmt::Write as _;
  202         -
                ::std::write!(output, "/").expect("formatting should succeed");
  203         -
                ::std::result::Result::Ok(())
  204         -
            }
  205         -
            #[allow(clippy::unnecessary_wraps)]
  206         -
            fn update_http_builder(
  207         -
                input: &crate::operation::create_batch_load_task::CreateBatchLoadTaskInput,
  208         -
                builder: ::http_1x::request::Builder,
  209         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  210         -
                let mut uri = ::std::string::String::new();
  211         -
                uri_base(input, &mut uri)?;
  212         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  213         -
            }
  214         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  215         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  216         -
            builder = _header_serialization_settings.set_default_header(
  217         -
                builder,
  218         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  219         -
                "Timestream_20181101.CreateBatchLoadTask",
  220         -
            );
  221         -
            builder
  222         -
        };
  223         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_batch_load_task::ser_create_batch_load_task_input(
  224         -
            &input,
  225         -
        )?);
  226         -
        if let Some(content_length) = body.content_length() {
  227         -
            let content_length = content_length.to_string();
  228         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  229         -
        }
  230         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         417  +
        let protocol = _cfg
         418  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         419  +
            .expect("a SharedClientProtocol is required");
         420  +
        let mut request = protocol
         421  +
            .serialize_request(&input, CreateBatchLoadTask::INPUT_SCHEMA, "", _cfg)
         422  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         423  +
         424  +
        return ::std::result::Result::Ok(request);
  231    425   
    }
  232    426   
}
  233    427   
#[derive(Debug)]
  234    428   
struct CreateBatchLoadTaskEndpointParamsInterceptor;
  235    429   
  236    430   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateBatchLoadTaskEndpointParamsInterceptor {
  237    431   
    fn name(&self) -> &'static str {
  238    432   
        "CreateBatchLoadTaskEndpointParamsInterceptor"
  239    433   
    }
  240    434   

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/create_batch_load_task/_create_batch_load_task_input.rs

@@ -46,46 +261,274 @@
   66     66   
    "com.amazonaws.timestreamwrite.synthetic",
   67     67   
    "CreateBatchLoadTaskInput",
   68     68   
);
   69     69   
static CREATEBATCHLOADTASKINPUT_MEMBER_CLIENT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   70     70   
    ::aws_smithy_schema::ShapeId::from_static(
   71     71   
        "com.amazonaws.timestreamwrite.synthetic#CreateBatchLoadTaskInput$ClientToken",
   72     72   
        "com.amazonaws.timestreamwrite.synthetic",
   73     73   
        "CreateBatchLoadTaskInput",
   74     74   
    ),
   75     75   
    ::aws_smithy_schema::ShapeType::String,
   76         -
    "client_token",
          76  +
    "ClientToken",
   77     77   
    0,
   78     78   
);
   79     79   
static CREATEBATCHLOADTASKINPUT_MEMBER_DATA_MODEL_CONFIGURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   80     80   
    ::aws_smithy_schema::ShapeId::from_static(
   81     81   
        "com.amazonaws.timestreamwrite.synthetic#CreateBatchLoadTaskInput$DataModelConfiguration",
   82     82   
        "com.amazonaws.timestreamwrite.synthetic",
   83     83   
        "CreateBatchLoadTaskInput",
   84     84   
    ),
   85     85   
    ::aws_smithy_schema::ShapeType::Structure,
   86         -
    "data_model_configuration",
          86  +
    "DataModelConfiguration",
   87     87   
    1,
   88     88   
);
   89     89   
static CREATEBATCHLOADTASKINPUT_MEMBER_DATA_SOURCE_CONFIGURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   90     90   
    ::aws_smithy_schema::ShapeId::from_static(
   91     91   
        "com.amazonaws.timestreamwrite.synthetic#CreateBatchLoadTaskInput$DataSourceConfiguration",
   92     92   
        "com.amazonaws.timestreamwrite.synthetic",
   93     93   
        "CreateBatchLoadTaskInput",
   94     94   
    ),
   95     95   
    ::aws_smithy_schema::ShapeType::Structure,
   96         -
    "data_source_configuration",
          96  +
    "DataSourceConfiguration",
   97     97   
    2,
   98     98   
);
   99     99   
static CREATEBATCHLOADTASKINPUT_MEMBER_REPORT_CONFIGURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  100    100   
    ::aws_smithy_schema::ShapeId::from_static(
  101    101   
        "com.amazonaws.timestreamwrite.synthetic#CreateBatchLoadTaskInput$ReportConfiguration",
  102    102   
        "com.amazonaws.timestreamwrite.synthetic",
  103    103   
        "CreateBatchLoadTaskInput",
  104    104   
    ),
  105    105   
    ::aws_smithy_schema::ShapeType::Structure,
  106         -
    "report_configuration",
         106  +
    "ReportConfiguration",
  107    107   
    3,
  108    108   
);
  109    109   
static CREATEBATCHLOADTASKINPUT_MEMBER_TARGET_DATABASE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  110    110   
    ::aws_smithy_schema::ShapeId::from_static(
  111    111   
        "com.amazonaws.timestreamwrite.synthetic#CreateBatchLoadTaskInput$TargetDatabaseName",
  112    112   
        "com.amazonaws.timestreamwrite.synthetic",
  113    113   
        "CreateBatchLoadTaskInput",
  114    114   
    ),
  115    115   
    ::aws_smithy_schema::ShapeType::String,
  116         -
    "target_database_name",
         116  +
    "TargetDatabaseName",
  117    117   
    4,
  118    118   
);
  119    119   
static CREATEBATCHLOADTASKINPUT_MEMBER_TARGET_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  120    120   
    ::aws_smithy_schema::ShapeId::from_static(
  121    121   
        "com.amazonaws.timestreamwrite.synthetic#CreateBatchLoadTaskInput$TargetTableName",
  122    122   
        "com.amazonaws.timestreamwrite.synthetic",
  123    123   
        "CreateBatchLoadTaskInput",
  124    124   
    ),
  125    125   
    ::aws_smithy_schema::ShapeType::String,
  126         -
    "target_table_name",
         126  +
    "TargetTableName",
  127    127   
    5,
  128    128   
);
  129    129   
static CREATEBATCHLOADTASKINPUT_MEMBER_RECORD_VERSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  130    130   
    ::aws_smithy_schema::ShapeId::from_static(
  131    131   
        "com.amazonaws.timestreamwrite.synthetic#CreateBatchLoadTaskInput$RecordVersion",
  132    132   
        "com.amazonaws.timestreamwrite.synthetic",
  133    133   
        "CreateBatchLoadTaskInput",
  134    134   
    ),
  135    135   
    ::aws_smithy_schema::ShapeType::Long,
  136         -
    "record_version",
         136  +
    "RecordVersion",
  137    137   
    6,
  138    138   
);
  139    139   
static CREATEBATCHLOADTASKINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  140    140   
    CREATEBATCHLOADTASKINPUT_SCHEMA_ID,
  141    141   
    ::aws_smithy_schema::ShapeType::Structure,
  142    142   
    &[
  143    143   
        &CREATEBATCHLOADTASKINPUT_MEMBER_CLIENT_TOKEN,
  144    144   
        &CREATEBATCHLOADTASKINPUT_MEMBER_DATA_MODEL_CONFIGURATION,
  145    145   
        &CREATEBATCHLOADTASKINPUT_MEMBER_DATA_SOURCE_CONFIGURATION,
  146    146   
        &CREATEBATCHLOADTASKINPUT_MEMBER_REPORT_CONFIGURATION,
  147    147   
        &CREATEBATCHLOADTASKINPUT_MEMBER_TARGET_DATABASE_NAME,
  148    148   
        &CREATEBATCHLOADTASKINPUT_MEMBER_TARGET_TABLE_NAME,
  149    149   
        &CREATEBATCHLOADTASKINPUT_MEMBER_RECORD_VERSION,
  150    150   
    ],
  151    151   
);
  152    152   
impl CreateBatchLoadTaskInput {
  153    153   
    /// The schema for this shape.
  154    154   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATEBATCHLOADTASKINPUT_SCHEMA;
  155    155   
}
  156    156   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateBatchLoadTaskInput {
  157    157   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  158    158   
    fn serialize_members(
  159    159   
        &self,
  160    160   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  161    161   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  162    162   
        if let Some(ref val) = self.client_token {
  163    163   
            ser.write_string(&CREATEBATCHLOADTASKINPUT_MEMBER_CLIENT_TOKEN, val)?;
  164    164   
        }
  165    165   
        if let Some(ref val) = self.data_model_configuration {
  166    166   
            ser.write_struct(&CREATEBATCHLOADTASKINPUT_MEMBER_DATA_MODEL_CONFIGURATION, val)?;
  167    167   
        }
  168    168   
        if let Some(ref val) = self.data_source_configuration {
  169    169   
            ser.write_struct(&CREATEBATCHLOADTASKINPUT_MEMBER_DATA_SOURCE_CONFIGURATION, val)?;
  170    170   
        }
  171    171   
        if let Some(ref val) = self.report_configuration {
  172    172   
            ser.write_struct(&CREATEBATCHLOADTASKINPUT_MEMBER_REPORT_CONFIGURATION, val)?;
  173    173   
        }
  174    174   
        if let Some(ref val) = self.target_database_name {
  175    175   
            ser.write_string(&CREATEBATCHLOADTASKINPUT_MEMBER_TARGET_DATABASE_NAME, val)?;
  176    176   
        }
  177    177   
        if let Some(ref val) = self.target_table_name {
  178    178   
            ser.write_string(&CREATEBATCHLOADTASKINPUT_MEMBER_TARGET_TABLE_NAME, val)?;
  179    179   
        }
  180    180   
        if let Some(ref val) = self.record_version {
  181    181   
            ser.write_long(&CREATEBATCHLOADTASKINPUT_MEMBER_RECORD_VERSION, *val)?;
  182    182   
        }
  183    183   
        Ok(())
  184    184   
    }
  185    185   
}
  186    186   
impl CreateBatchLoadTaskInput {
  187    187   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  188         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  189         -
        deserializer: &mut D,
         188  +
    pub fn deserialize(
         189  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  190    190   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  191    191   
        #[allow(unused_variables, unused_mut)]
  192    192   
        let mut builder = Self::builder();
  193    193   
        #[allow(
  194    194   
            unused_variables,
  195    195   
            unreachable_code,
  196    196   
            clippy::single_match,
  197    197   
            clippy::match_single_binding,
  198    198   
            clippy::diverging_sub_expression
  199    199   
        )]
  200         -
        deserializer.read_struct(&CREATEBATCHLOADTASKINPUT_SCHEMA, (), |_, member, deser| {
         200  +
        deserializer.read_struct(&CREATEBATCHLOADTASKINPUT_SCHEMA, &mut |member, deser| {
  201    201   
            match member.member_index() {
  202    202   
                Some(0) => {
  203    203   
                    builder.client_token = Some(deser.read_string(member)?);
  204    204   
                }
  205    205   
                Some(1) => {
  206    206   
                    builder.data_model_configuration = Some(crate::types::DataModelConfiguration::deserialize(deser)?);
  207    207   
                }
  208    208   
                Some(2) => {
  209    209   
                    builder.data_source_configuration = Some(crate::types::DataSourceConfiguration::deserialize(deser)?);
  210    210   
                }
  211    211   
                Some(3) => {
  212    212   
                    builder.report_configuration = Some(crate::types::ReportConfiguration::deserialize(deser)?);
  213    213   
                }
  214    214   
                Some(4) => {
  215    215   
                    builder.target_database_name = Some(deser.read_string(member)?);
  216    216   
                }
  217    217   
                Some(5) => {
  218    218   
                    builder.target_table_name = Some(deser.read_string(member)?);
  219    219   
                }
  220    220   
                Some(6) => {
  221    221   
                    builder.record_version = Some(deser.read_long(member)?);
  222    222   
                }
  223    223   
                _ => {}
  224    224   
            }
  225    225   
            Ok(())
  226    226   
        })?;
         227  +
        builder.target_database_name = builder.target_database_name.or(Some(String::new()));
         228  +
        builder.target_table_name = builder.target_table_name.or(Some(String::new()));
  227    229   
        builder
  228    230   
            .build()
  229    231   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  230    232   
    }
  231    233   
}
         234  +
impl CreateBatchLoadTaskInput {
         235  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         236  +
    pub fn deserialize_with_response(
         237  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         238  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         239  +
        _status: u16,
         240  +
        _body: &[u8],
         241  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         242  +
        Self::deserialize(deserializer)
         243  +
    }
         244  +
}
  232    245   
impl CreateBatchLoadTaskInput {
  233    246   
    /// Creates a new builder-style object to manufacture [`CreateBatchLoadTaskInput`](crate::operation::create_batch_load_task::CreateBatchLoadTaskInput).
  234    247   
    pub fn builder() -> crate::operation::create_batch_load_task::builders::CreateBatchLoadTaskInputBuilder {
  235    248   
        crate::operation::create_batch_load_task::builders::CreateBatchLoadTaskInputBuilder::default()
  236    249   
    }
  237    250   
}
  238    251   
  239    252   
/// A builder for [`CreateBatchLoadTaskInput`](crate::operation::create_batch_load_task::CreateBatchLoadTaskInput).
  240    253   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
  241    254   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/create_batch_load_task/_create_batch_load_task_output.rs

@@ -1,1 +98,145 @@
   19     19   
    "com.amazonaws.timestreamwrite.synthetic",
   20     20   
    "CreateBatchLoadTaskOutput",
   21     21   
);
   22     22   
static CREATEBATCHLOADTASKOUTPUT_MEMBER_TASK_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   23     23   
    ::aws_smithy_schema::ShapeId::from_static(
   24     24   
        "com.amazonaws.timestreamwrite.synthetic#CreateBatchLoadTaskOutput$TaskId",
   25     25   
        "com.amazonaws.timestreamwrite.synthetic",
   26     26   
        "CreateBatchLoadTaskOutput",
   27     27   
    ),
   28     28   
    ::aws_smithy_schema::ShapeType::String,
   29         -
    "task_id",
          29  +
    "TaskId",
   30     30   
    0,
   31     31   
);
          32  +
static CREATEBATCHLOADTASKOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          33  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          34  +
    ::aws_smithy_schema::ShapeType::String,
          35  +
    "request_id",
          36  +
    1,
          37  +
)
          38  +
.with_http_header("x-amzn-requestid");
   32     39   
static CREATEBATCHLOADTASKOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   33     40   
    CREATEBATCHLOADTASKOUTPUT_SCHEMA_ID,
   34     41   
    ::aws_smithy_schema::ShapeType::Structure,
   35         -
    &[&CREATEBATCHLOADTASKOUTPUT_MEMBER_TASK_ID],
          42  +
    &[&CREATEBATCHLOADTASKOUTPUT_MEMBER_TASK_ID, &CREATEBATCHLOADTASKOUTPUT_MEMBER__REQUEST_ID],
   36     43   
);
   37     44   
impl CreateBatchLoadTaskOutput {
   38     45   
    /// The schema for this shape.
   39     46   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATEBATCHLOADTASKOUTPUT_SCHEMA;
   40     47   
}
   41     48   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateBatchLoadTaskOutput {
   42     49   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   43     50   
    fn serialize_members(
   44     51   
        &self,
   45     52   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   46     53   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   47     54   
        {
   48     55   
            let val = &self.task_id;
   49     56   
            ser.write_string(&CREATEBATCHLOADTASKOUTPUT_MEMBER_TASK_ID, val)?;
   50     57   
        }
   51     58   
        Ok(())
   52     59   
    }
   53     60   
}
   54     61   
impl CreateBatchLoadTaskOutput {
   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,
          65  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          66  +
        #[allow(unused_variables, unused_mut)]
          67  +
        let mut builder = Self::builder();
          68  +
        #[allow(
          69  +
            unused_variables,
          70  +
            unreachable_code,
          71  +
            clippy::single_match,
          72  +
            clippy::match_single_binding,
          73  +
            clippy::diverging_sub_expression
          74  +
        )]
          75  +
        deserializer.read_struct(&CREATEBATCHLOADTASKOUTPUT_SCHEMA, &mut |member, deser| {
          76  +
            match member.member_index() {
          77  +
                Some(0) => {
          78  +
                    builder.task_id = Some(deser.read_string(member)?);
          79  +
                }
          80  +
                Some(1) => {
          81  +
                    builder._request_id = Some(deser.read_string(member)?);
          82  +
                }
          83  +
                _ => {}
          84  +
            }
          85  +
            Ok(())
          86  +
        })?;
          87  +
        builder.task_id = builder.task_id.or(Some(String::new()));
          88  +
        builder
          89  +
            .build()
          90  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
          91  +
    }
          92  +
}
          93  +
impl CreateBatchLoadTaskOutput {
          94  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          95  +
    /// Header-bound members are read directly from headers, avoiding runtime
          96  +
    /// member iteration overhead. Body members are read via the deserializer.
          97  +
    pub fn deserialize_with_response(
          98  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          99  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         100  +
        _status: u16,
         101  +
        _body: &[u8],
   58    102   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   59    103   
        #[allow(unused_variables, unused_mut)]
   60    104   
        let mut builder = Self::builder();
         105  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         106  +
            builder._request_id = Some(val.to_string());
         107  +
        }
   61    108   
        #[allow(
   62    109   
            unused_variables,
   63    110   
            unreachable_code,
   64    111   
            clippy::single_match,
   65    112   
            clippy::match_single_binding,
   66    113   
            clippy::diverging_sub_expression
   67    114   
        )]
   68         -
        deserializer.read_struct(&CREATEBATCHLOADTASKOUTPUT_SCHEMA, (), |_, member, deser| {
         115  +
        deserializer.read_struct(&CREATEBATCHLOADTASKOUTPUT_SCHEMA, &mut |member, deser| {
   69    116   
            match member.member_index() {
   70    117   
                Some(0) => {
   71    118   
                    builder.task_id = Some(deser.read_string(member)?);
   72    119   
                }
   73    120   
                _ => {}
   74    121   
            }
   75    122   
            Ok(())
   76    123   
        })?;
   77    124   
        builder
   78    125   
            .build()

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/create_database.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 `CreateDatabase`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateDatabase;
    6      6   
impl CreateDatabase {
    7      7   
    /// Creates a new `CreateDatabase`
    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_database::CreateDatabaseInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_database::CreateDatabaseOutput::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_database::CreateDatabaseInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_database::CreateDatabaseOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_database::CreateDatabaseError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,415 @@
  138    142   
                crate::operation::create_database::CreateDatabaseError,
  139    143   
            >::new());
  140    144   
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct CreateDatabaseResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateDatabaseResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_create_database::de_create_database_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_create_database::de_create_database_http_response(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::create_database::CreateDatabaseError::unhandled(
         175  +
                            generic,
         176  +
                        )),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "AccessDeniedException" => crate::operation::create_database::CreateDatabaseError::AccessDeniedException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         190  +
                                &mut *deser,
         191  +
                                response.headers(),
         192  +
                                response.status().into(),
         193  +
                                body,
         194  +
                            )
         195  +
                        }) {
         196  +
                        ::std::result::Result::Ok(val) => val,
         197  +
                        ::std::result::Result::Err(e) => {
         198  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         199  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         200  +
                            ))
         201  +
                        }
         202  +
                    };
         203  +
                    tmp.meta = generic;
         204  +
                    tmp
         205  +
                }),
         206  +
                "ConflictException" => crate::operation::create_database::CreateDatabaseError::ConflictException({
         207  +
                    let mut tmp = match protocol
         208  +
                        .deserialize_response(response, crate::types::error::ConflictException::SCHEMA, _cfg)
         209  +
                        .and_then(|mut deser| {
         210  +
                            crate::types::error::ConflictException::deserialize_with_response(
         211  +
                                &mut *deser,
         212  +
                                response.headers(),
         213  +
                                response.status().into(),
         214  +
                                body,
         215  +
                            )
         216  +
                        }) {
         217  +
                        ::std::result::Result::Ok(val) => val,
         218  +
                        ::std::result::Result::Err(e) => {
         219  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         220  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         221  +
                            ))
         222  +
                        }
         223  +
                    };
         224  +
                    tmp.meta = generic;
         225  +
                    tmp
         226  +
                }),
         227  +
                "InternalServerException" => crate::operation::create_database::CreateDatabaseError::InternalServerException({
         228  +
                    let mut tmp = match protocol
         229  +
                        .deserialize_response(response, crate::types::error::InternalServerException::SCHEMA, _cfg)
         230  +
                        .and_then(|mut deser| {
         231  +
                            crate::types::error::InternalServerException::deserialize_with_response(
         232  +
                                &mut *deser,
         233  +
                                response.headers(),
         234  +
                                response.status().into(),
         235  +
                                body,
         236  +
                            )
         237  +
                        }) {
         238  +
                        ::std::result::Result::Ok(val) => val,
         239  +
                        ::std::result::Result::Err(e) => {
         240  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         241  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         242  +
                            ))
         243  +
                        }
         244  +
                    };
         245  +
                    tmp.meta = generic;
         246  +
                    tmp
         247  +
                }),
         248  +
                "InvalidEndpointException" => crate::operation::create_database::CreateDatabaseError::InvalidEndpointException({
         249  +
                    let mut tmp = match protocol
         250  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         251  +
                        .and_then(|mut deser| {
         252  +
                            crate::types::error::InvalidEndpointException::deserialize_with_response(
         253  +
                                &mut *deser,
         254  +
                                response.headers(),
         255  +
                                response.status().into(),
         256  +
                                body,
         257  +
                            )
         258  +
                        }) {
         259  +
                        ::std::result::Result::Ok(val) => val,
         260  +
                        ::std::result::Result::Err(e) => {
         261  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         262  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         263  +
                            ))
         264  +
                        }
  162    265   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         266  +
                    tmp.meta = generic;
         267  +
                    if tmp.message.is_none() {
         268  +
                        tmp.message = _error_message;
         269  +
                    }
         270  +
                    tmp
         271  +
                }),
         272  +
                "ServiceQuotaExceededException" => crate::operation::create_database::CreateDatabaseError::ServiceQuotaExceededException({
         273  +
                    let mut tmp = match protocol
         274  +
                        .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         275  +
                        .and_then(|mut deser| {
         276  +
                            crate::types::error::ServiceQuotaExceededException::deserialize_with_response(
         277  +
                                &mut *deser,
         278  +
                                response.headers(),
         279  +
                                response.status().into(),
         280  +
                                body,
         281  +
                            )
         282  +
                        }) {
         283  +
                        ::std::result::Result::Ok(val) => val,
         284  +
                        ::std::result::Result::Err(e) => {
         285  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         286  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         287  +
                            ))
         288  +
                        }
         289  +
                    };
         290  +
                    tmp.meta = generic;
         291  +
                    if tmp.message.is_none() {
         292  +
                        tmp.message = _error_message;
         293  +
                    }
         294  +
                    tmp
         295  +
                }),
         296  +
                "ThrottlingException" => crate::operation::create_database::CreateDatabaseError::ThrottlingException({
         297  +
                    let mut tmp = match protocol
         298  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         299  +
                        .and_then(|mut deser| {
         300  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         301  +
                                &mut *deser,
         302  +
                                response.headers(),
         303  +
                                response.status().into(),
         304  +
                                body,
         305  +
                            )
         306  +
                        }) {
         307  +
                        ::std::result::Result::Ok(val) => val,
         308  +
                        ::std::result::Result::Err(e) => {
         309  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         310  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         311  +
                            ))
         312  +
                        }
         313  +
                    };
         314  +
                    tmp.meta = generic;
         315  +
                    tmp
         316  +
                }),
         317  +
                "ValidationException" => crate::operation::create_database::CreateDatabaseError::ValidationException({
         318  +
                    let mut tmp = match protocol
         319  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         320  +
                        .and_then(|mut deser| {
         321  +
                            crate::types::error::ValidationException::deserialize_with_response(
         322  +
                                &mut *deser,
         323  +
                                response.headers(),
         324  +
                                response.status().into(),
         325  +
                                body,
         326  +
                            )
         327  +
                        }) {
         328  +
                        ::std::result::Result::Ok(val) => val,
         329  +
                        ::std::result::Result::Err(e) => {
         330  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         331  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         332  +
                            ))
         333  +
                        }
         334  +
                    };
         335  +
                    tmp.meta = generic;
         336  +
                    tmp
         337  +
                }),
         338  +
                _ => crate::operation::create_database::CreateDatabaseError::generic(generic),
         339  +
            };
         340  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         341  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         342  +
            ))
         343  +
        } else {
         344  +
            let protocol = _cfg
         345  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         346  +
                .expect("a SharedClientProtocol is required");
         347  +
            let mut deser = protocol
         348  +
                .deserialize_response(response, CreateDatabase::OUTPUT_SCHEMA, _cfg)
         349  +
                .map_err(|e| {
         350  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         351  +
                })?;
         352  +
            let body = response.body().bytes().expect("body loaded");
         353  +
            let output = crate::operation::create_database::CreateDatabaseOutput::deserialize_with_response(
         354  +
                &mut *deser,
         355  +
                response.headers(),
         356  +
                response.status().into(),
         357  +
                body,
         358  +
            )
         359  +
            .map_err(|e| {
         360  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         361  +
            })?;
         362  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         363  +
        }
  164    364   
    }
  165    365   
}
  166    366   
#[derive(Debug)]
  167    367   
struct CreateDatabaseRequestSerializer;
  168    368   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateDatabaseRequestSerializer {
  169    369   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    370   
    fn serialize_input(
  171    371   
        &self,
  172    372   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    373   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    374   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    375   
        let input = input
  176    376   
            .downcast::<crate::operation::create_database::CreateDatabaseInput>()
  177    377   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::create_database::CreateDatabaseInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                ::std::write!(output, "/").expect("formatting should succeed");
  190         -
                ::std::result::Result::Ok(())
  191         -
            }
  192         -
            #[allow(clippy::unnecessary_wraps)]
  193         -
            fn update_http_builder(
  194         -
                input: &crate::operation::create_database::CreateDatabaseInput,
  195         -
                builder: ::http_1x::request::Builder,
  196         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  197         -
                let mut uri = ::std::string::String::new();
  198         -
                uri_base(input, &mut uri)?;
  199         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  200         -
            }
  201         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  202         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  203         -
            builder = _header_serialization_settings.set_default_header(
  204         -
                builder,
  205         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  206         -
                "Timestream_20181101.CreateDatabase",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_database::ser_create_database_input(&input)?);
  211         -
        if let Some(content_length) = body.content_length() {
  212         -
            let content_length = content_length.to_string();
  213         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  214         -
        }
  215         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         378  +
        let protocol = _cfg
         379  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         380  +
            .expect("a SharedClientProtocol is required");
         381  +
        let mut request = protocol
         382  +
            .serialize_request(&input, CreateDatabase::INPUT_SCHEMA, "", _cfg)
         383  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         384  +
         385  +
        return ::std::result::Result::Ok(request);
  216    386   
    }
  217    387   
}
  218    388   
#[derive(Debug)]
  219    389   
struct CreateDatabaseEndpointParamsInterceptor;
  220    390   
  221    391   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateDatabaseEndpointParamsInterceptor {
  222    392   
    fn name(&self) -> &'static str {
  223    393   
        "CreateDatabaseEndpointParamsInterceptor"
  224    394   
    }
  225    395   

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/create_database/_create_database_input.rs

@@ -11,11 +176,185 @@
   31     31   
    "com.amazonaws.timestreamwrite.synthetic",
   32     32   
    "CreateDatabaseInput",
   33     33   
);
   34     34   
static CREATEDATABASEINPUT_MEMBER_DATABASE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   35     35   
    ::aws_smithy_schema::ShapeId::from_static(
   36     36   
        "com.amazonaws.timestreamwrite.synthetic#CreateDatabaseInput$DatabaseName",
   37     37   
        "com.amazonaws.timestreamwrite.synthetic",
   38     38   
        "CreateDatabaseInput",
   39     39   
    ),
   40     40   
    ::aws_smithy_schema::ShapeType::String,
   41         -
    "database_name",
          41  +
    "DatabaseName",
   42     42   
    0,
   43     43   
);
   44     44   
static CREATEDATABASEINPUT_MEMBER_KMS_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   45     45   
    ::aws_smithy_schema::ShapeId::from_static(
   46     46   
        "com.amazonaws.timestreamwrite.synthetic#CreateDatabaseInput$KmsKeyId",
   47     47   
        "com.amazonaws.timestreamwrite.synthetic",
   48     48   
        "CreateDatabaseInput",
   49     49   
    ),
   50     50   
    ::aws_smithy_schema::ShapeType::String,
   51         -
    "kms_key_id",
          51  +
    "KmsKeyId",
   52     52   
    1,
   53     53   
);
   54     54   
static CREATEDATABASEINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   55     55   
    ::aws_smithy_schema::ShapeId::from_static(
   56     56   
        "com.amazonaws.timestreamwrite.synthetic#CreateDatabaseInput$Tags",
   57     57   
        "com.amazonaws.timestreamwrite.synthetic",
   58     58   
        "CreateDatabaseInput",
   59     59   
    ),
   60     60   
    ::aws_smithy_schema::ShapeType::List,
   61         -
    "tags",
          61  +
    "Tags",
   62     62   
    2,
   63     63   
);
   64     64   
static CREATEDATABASEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   65     65   
    CREATEDATABASEINPUT_SCHEMA_ID,
   66     66   
    ::aws_smithy_schema::ShapeType::Structure,
   67     67   
    &[
   68     68   
        &CREATEDATABASEINPUT_MEMBER_DATABASE_NAME,
   69     69   
        &CREATEDATABASEINPUT_MEMBER_KMS_KEY_ID,
   70     70   
        &CREATEDATABASEINPUT_MEMBER_TAGS,
   71     71   
    ],
   72     72   
);
   73     73   
impl CreateDatabaseInput {
   74     74   
    /// The schema for this shape.
   75     75   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATEDATABASEINPUT_SCHEMA;
   76     76   
}
   77     77   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateDatabaseInput {
   78     78   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   79     79   
    fn serialize_members(
   80     80   
        &self,
   81     81   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   82     82   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   83     83   
        if let Some(ref val) = self.database_name {
   84     84   
            ser.write_string(&CREATEDATABASEINPUT_MEMBER_DATABASE_NAME, val)?;
   85     85   
        }
   86     86   
        if let Some(ref val) = self.kms_key_id {
   87     87   
            ser.write_string(&CREATEDATABASEINPUT_MEMBER_KMS_KEY_ID, val)?;
   88     88   
        }
   89     89   
        if let Some(ref val) = self.tags {
   90     90   
            ser.write_list(
   91     91   
                &CREATEDATABASEINPUT_MEMBER_TAGS,
   92     92   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   93     93   
                    for item in val {
   94     94   
                        ser.write_struct(crate::types::Tag::SCHEMA, item)?;
   95     95   
                    }
   96     96   
                    Ok(())
   97     97   
                },
   98     98   
            )?;
   99     99   
        }
  100    100   
        Ok(())
  101    101   
    }
  102    102   
}
  103    103   
impl CreateDatabaseInput {
  104    104   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  105         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  106         -
        deserializer: &mut D,
         105  +
    pub fn deserialize(
         106  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  107    107   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  108    108   
        #[allow(unused_variables, unused_mut)]
  109    109   
        let mut builder = Self::builder();
  110    110   
        #[allow(
  111    111   
            unused_variables,
  112    112   
            unreachable_code,
  113    113   
            clippy::single_match,
  114    114   
            clippy::match_single_binding,
  115    115   
            clippy::diverging_sub_expression
  116    116   
        )]
  117         -
        deserializer.read_struct(&CREATEDATABASEINPUT_SCHEMA, (), |_, member, deser| {
         117  +
        deserializer.read_struct(&CREATEDATABASEINPUT_SCHEMA, &mut |member, deser| {
  118    118   
            match member.member_index() {
  119    119   
                Some(0) => {
  120    120   
                    builder.database_name = Some(deser.read_string(member)?);
  121    121   
                }
  122    122   
                Some(1) => {
  123    123   
                    builder.kms_key_id = Some(deser.read_string(member)?);
  124    124   
                }
  125    125   
                Some(2) => {
  126    126   
                    builder.tags = Some({
  127         -
                        let container = if let Some(cap) = deser.container_size() {
  128         -
                            Vec::with_capacity(cap)
  129         -
                        } else {
  130         -
                            Vec::new()
  131         -
                        };
  132         -
                        deser.read_list(member, container, |mut list, deser| {
  133         -
                            list.push(crate::types::Tag::deserialize(deser)?);
  134         -
                            Ok(list)
  135         -
                        })?
         127  +
                        let mut container = Vec::new();
         128  +
                        deser.read_list(member, &mut |deser| {
         129  +
                            container.push(crate::types::Tag::deserialize(deser)?);
         130  +
                            Ok(())
         131  +
                        })?;
         132  +
                        container
  136    133   
                    });
  137    134   
                }
  138    135   
                _ => {}
  139    136   
            }
  140    137   
            Ok(())
  141    138   
        })?;
         139  +
        builder.database_name = builder.database_name.or(Some(String::new()));
  142    140   
        builder
  143    141   
            .build()
  144    142   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  145    143   
    }
  146    144   
}
         145  +
impl CreateDatabaseInput {
         146  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         147  +
    pub fn deserialize_with_response(
         148  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         149  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         150  +
        _status: u16,
         151  +
        _body: &[u8],
         152  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         153  +
        Self::deserialize(deserializer)
         154  +
    }
         155  +
}
  147    156   
impl CreateDatabaseInput {
  148    157   
    /// Creates a new builder-style object to manufacture [`CreateDatabaseInput`](crate::operation::create_database::CreateDatabaseInput).
  149    158   
    pub fn builder() -> crate::operation::create_database::builders::CreateDatabaseInputBuilder {
  150    159   
        crate::operation::create_database::builders::CreateDatabaseInputBuilder::default()
  151    160   
    }
  152    161   
}
  153    162   
  154    163   
/// A builder for [`CreateDatabaseInput`](crate::operation::create_database::CreateDatabaseInput).
  155    164   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  156    165   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/create_database/_create_database_output.rs

@@ -1,1 +96,140 @@
   18     18   
    "com.amazonaws.timestreamwrite.synthetic",
   19     19   
    "CreateDatabaseOutput",
   20     20   
);
   21     21   
static CREATEDATABASEOUTPUT_MEMBER_DATABASE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   22     22   
    ::aws_smithy_schema::ShapeId::from_static(
   23     23   
        "com.amazonaws.timestreamwrite.synthetic#CreateDatabaseOutput$Database",
   24     24   
        "com.amazonaws.timestreamwrite.synthetic",
   25     25   
        "CreateDatabaseOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28         -
    "database",
          28  +
    "Database",
   29     29   
    0,
   30     30   
);
          31  +
static CREATEDATABASEOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          32  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          33  +
    ::aws_smithy_schema::ShapeType::String,
          34  +
    "request_id",
          35  +
    1,
          36  +
)
          37  +
.with_http_header("x-amzn-requestid");
   31     38   
static CREATEDATABASEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    CREATEDATABASEOUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&CREATEDATABASEOUTPUT_MEMBER_DATABASE],
          41  +
    &[&CREATEDATABASEOUTPUT_MEMBER_DATABASE, &CREATEDATABASEOUTPUT_MEMBER__REQUEST_ID],
   35     42   
);
   36     43   
impl CreateDatabaseOutput {
   37     44   
    /// The schema for this shape.
   38     45   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATEDATABASEOUTPUT_SCHEMA;
   39     46   
}
   40     47   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateDatabaseOutput {
   41     48   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   42     49   
    fn serialize_members(
   43     50   
        &self,
   44     51   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   45     52   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   46     53   
        if let Some(ref val) = self.database {
   47     54   
            ser.write_struct(&CREATEDATABASEOUTPUT_MEMBER_DATABASE, val)?;
   48     55   
        }
   49     56   
        Ok(())
   50     57   
    }
   51     58   
}
   52     59   
impl CreateDatabaseOutput {
   53     60   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          61  +
    pub fn deserialize(
          62  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     63   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     64   
        #[allow(unused_variables, unused_mut)]
   58     65   
        let mut builder = Self::builder();
   59     66   
        #[allow(
   60     67   
            unused_variables,
   61     68   
            unreachable_code,
   62     69   
            clippy::single_match,
   63     70   
            clippy::match_single_binding,
   64     71   
            clippy::diverging_sub_expression
   65     72   
        )]
   66         -
        deserializer.read_struct(&CREATEDATABASEOUTPUT_SCHEMA, (), |_, member, deser| {
          73  +
        deserializer.read_struct(&CREATEDATABASEOUTPUT_SCHEMA, &mut |member, deser| {
          74  +
            match member.member_index() {
          75  +
                Some(0) => {
          76  +
                    builder.database = Some(crate::types::Database::deserialize(deser)?);
          77  +
                }
          78  +
                Some(1) => {
          79  +
                    builder._request_id = Some(deser.read_string(member)?);
          80  +
                }
          81  +
                _ => {}
          82  +
            }
          83  +
            Ok(())
          84  +
        })?;
          85  +
        Ok(builder.build())
          86  +
    }
          87  +
}
          88  +
impl CreateDatabaseOutput {
          89  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          90  +
    /// Header-bound members are read directly from headers, avoiding runtime
          91  +
    /// member iteration overhead. Body members are read via the deserializer.
          92  +
    pub fn deserialize_with_response(
          93  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          94  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          95  +
        _status: u16,
          96  +
        _body: &[u8],
          97  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          98  +
        #[allow(unused_variables, unused_mut)]
          99  +
        let mut builder = Self::builder();
         100  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         101  +
            builder._request_id = Some(val.to_string());
         102  +
        }
         103  +
        #[allow(
         104  +
            unused_variables,
         105  +
            unreachable_code,
         106  +
            clippy::single_match,
         107  +
            clippy::match_single_binding,
         108  +
            clippy::diverging_sub_expression
         109  +
        )]
         110  +
        deserializer.read_struct(&CREATEDATABASEOUTPUT_SCHEMA, &mut |member, deser| {
   67    111   
            match member.member_index() {
   68    112   
                Some(0) => {
   69    113   
                    builder.database = Some(crate::types::Database::deserialize(deser)?);
   70    114   
                }
   71    115   
                _ => {}
   72    116   
            }
   73    117   
            Ok(())
   74    118   
        })?;
   75    119   
        Ok(builder.build())
   76    120   
    }

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/create_table.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 `CreateTable`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateTable;
    6      6   
impl CreateTable {
    7      7   
    /// Creates a new `CreateTable`
    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_table::CreateTableInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_table::CreateTableOutput::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_table::CreateTableInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_table::CreateTableOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_table::CreateTableError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,435 @@
  138    142   
                crate::operation::create_table::CreateTableError,
  139    143   
            >::new());
  140    144   
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct CreateTableResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateTableResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_create_table::de_create_table_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_create_table::de_create_table_http_response(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::create_table::CreateTableError::unhandled(generic)),
         175  +
                    ))
         176  +
                }
         177  +
            };
         178  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         179  +
            let protocol = _cfg
         180  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         181  +
                .expect("a SharedClientProtocol is required");
         182  +
            let err = match error_code {
         183  +
                "AccessDeniedException" => crate::operation::create_table::CreateTableError::AccessDeniedException({
         184  +
                    let mut tmp = match protocol
         185  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         186  +
                        .and_then(|mut deser| {
         187  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         188  +
                                &mut *deser,
         189  +
                                response.headers(),
         190  +
                                response.status().into(),
         191  +
                                body,
         192  +
                            )
         193  +
                        }) {
         194  +
                        ::std::result::Result::Ok(val) => val,
         195  +
                        ::std::result::Result::Err(e) => {
         196  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         197  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         198  +
                            ))
         199  +
                        }
         200  +
                    };
         201  +
                    tmp.meta = generic;
         202  +
                    tmp
         203  +
                }),
         204  +
                "ConflictException" => crate::operation::create_table::CreateTableError::ConflictException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::ConflictException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::ConflictException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    tmp
         224  +
                }),
         225  +
                "InternalServerException" => crate::operation::create_table::CreateTableError::InternalServerException({
         226  +
                    let mut tmp = match protocol
         227  +
                        .deserialize_response(response, crate::types::error::InternalServerException::SCHEMA, _cfg)
         228  +
                        .and_then(|mut deser| {
         229  +
                            crate::types::error::InternalServerException::deserialize_with_response(
         230  +
                                &mut *deser,
         231  +
                                response.headers(),
         232  +
                                response.status().into(),
         233  +
                                body,
         234  +
                            )
         235  +
                        }) {
         236  +
                        ::std::result::Result::Ok(val) => val,
         237  +
                        ::std::result::Result::Err(e) => {
         238  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         239  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         240  +
                            ))
         241  +
                        }
         242  +
                    };
         243  +
                    tmp.meta = generic;
         244  +
                    tmp
         245  +
                }),
         246  +
                "InvalidEndpointException" => crate::operation::create_table::CreateTableError::InvalidEndpointException({
         247  +
                    let mut tmp = match protocol
         248  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         249  +
                        .and_then(|mut deser| {
         250  +
                            crate::types::error::InvalidEndpointException::deserialize_with_response(
         251  +
                                &mut *deser,
         252  +
                                response.headers(),
         253  +
                                response.status().into(),
         254  +
                                body,
         255  +
                            )
         256  +
                        }) {
         257  +
                        ::std::result::Result::Ok(val) => val,
         258  +
                        ::std::result::Result::Err(e) => {
         259  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         260  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         261  +
                            ))
         262  +
                        }
         263  +
                    };
         264  +
                    tmp.meta = generic;
         265  +
                    if tmp.message.is_none() {
         266  +
                        tmp.message = _error_message;
         267  +
                    }
         268  +
                    tmp
         269  +
                }),
         270  +
                "ResourceNotFoundException" => crate::operation::create_table::CreateTableError::ResourceNotFoundException({
         271  +
                    let mut tmp = match protocol
         272  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         273  +
                        .and_then(|mut deser| {
         274  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         275  +
                                &mut *deser,
         276  +
                                response.headers(),
         277  +
                                response.status().into(),
         278  +
                                body,
         279  +
                            )
         280  +
                        }) {
         281  +
                        ::std::result::Result::Ok(val) => val,
         282  +
                        ::std::result::Result::Err(e) => {
         283  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         284  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         285  +
                            ))
         286  +
                        }
         287  +
                    };
         288  +
                    tmp.meta = generic;
         289  +
                    if tmp.message.is_none() {
         290  +
                        tmp.message = _error_message;
         291  +
                    }
         292  +
                    tmp
         293  +
                }),
         294  +
                "ServiceQuotaExceededException" => crate::operation::create_table::CreateTableError::ServiceQuotaExceededException({
         295  +
                    let mut tmp = match protocol
         296  +
                        .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         297  +
                        .and_then(|mut deser| {
         298  +
                            crate::types::error::ServiceQuotaExceededException::deserialize_with_response(
         299  +
                                &mut *deser,
         300  +
                                response.headers(),
         301  +
                                response.status().into(),
         302  +
                                body,
         303  +
                            )
         304  +
                        }) {
         305  +
                        ::std::result::Result::Ok(val) => val,
         306  +
                        ::std::result::Result::Err(e) => {
         307  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         308  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         309  +
                            ))
         310  +
                        }
         311  +
                    };
         312  +
                    tmp.meta = generic;
         313  +
                    if tmp.message.is_none() {
         314  +
                        tmp.message = _error_message;
         315  +
                    }
         316  +
                    tmp
         317  +
                }),
         318  +
                "ThrottlingException" => crate::operation::create_table::CreateTableError::ThrottlingException({
         319  +
                    let mut tmp = match protocol
         320  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         321  +
                        .and_then(|mut deser| {
         322  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         323  +
                                &mut *deser,
         324  +
                                response.headers(),
         325  +
                                response.status().into(),
         326  +
                                body,
         327  +
                            )
         328  +
                        }) {
         329  +
                        ::std::result::Result::Ok(val) => val,
         330  +
                        ::std::result::Result::Err(e) => {
         331  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         332  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         333  +
                            ))
         334  +
                        }
  162    335   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         336  +
                    tmp.meta = generic;
         337  +
                    tmp
         338  +
                }),
         339  +
                "ValidationException" => crate::operation::create_table::CreateTableError::ValidationException({
         340  +
                    let mut tmp = match protocol
         341  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         342  +
                        .and_then(|mut deser| {
         343  +
                            crate::types::error::ValidationException::deserialize_with_response(
         344  +
                                &mut *deser,
         345  +
                                response.headers(),
         346  +
                                response.status().into(),
         347  +
                                body,
         348  +
                            )
         349  +
                        }) {
         350  +
                        ::std::result::Result::Ok(val) => val,
         351  +
                        ::std::result::Result::Err(e) => {
         352  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         353  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         354  +
                            ))
         355  +
                        }
         356  +
                    };
         357  +
                    tmp.meta = generic;
         358  +
                    tmp
         359  +
                }),
         360  +
                _ => crate::operation::create_table::CreateTableError::generic(generic),
         361  +
            };
         362  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         363  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         364  +
            ))
         365  +
        } else {
         366  +
            let protocol = _cfg
         367  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         368  +
                .expect("a SharedClientProtocol is required");
         369  +
            let mut deser = protocol.deserialize_response(response, CreateTable::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         370  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         371  +
            })?;
         372  +
            let body = response.body().bytes().expect("body loaded");
         373  +
            let output = crate::operation::create_table::CreateTableOutput::deserialize_with_response(
         374  +
                &mut *deser,
         375  +
                response.headers(),
         376  +
                response.status().into(),
         377  +
                body,
         378  +
            )
         379  +
            .map_err(|e| {
         380  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         381  +
            })?;
         382  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         383  +
        }
  164    384   
    }
  165    385   
}
  166    386   
#[derive(Debug)]
  167    387   
struct CreateTableRequestSerializer;
  168    388   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateTableRequestSerializer {
  169    389   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    390   
    fn serialize_input(
  171    391   
        &self,
  172    392   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    393   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    394   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    395   
        let input = input
  176    396   
            .downcast::<crate::operation::create_table::CreateTableInput>()
  177    397   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::create_table::CreateTableInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                ::std::write!(output, "/").expect("formatting should succeed");
  190         -
                ::std::result::Result::Ok(())
  191         -
            }
  192         -
            #[allow(clippy::unnecessary_wraps)]
  193         -
            fn update_http_builder(
  194         -
                input: &crate::operation::create_table::CreateTableInput,
  195         -
                builder: ::http_1x::request::Builder,
  196         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  197         -
                let mut uri = ::std::string::String::new();
  198         -
                uri_base(input, &mut uri)?;
  199         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  200         -
            }
  201         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  202         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  203         -
            builder = _header_serialization_settings.set_default_header(
  204         -
                builder,
  205         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  206         -
                "Timestream_20181101.CreateTable",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_table::ser_create_table_input(&input)?);
  211         -
        if let Some(content_length) = body.content_length() {
  212         -
            let content_length = content_length.to_string();
  213         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  214         -
        }
  215         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         398  +
        let protocol = _cfg
         399  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         400  +
            .expect("a SharedClientProtocol is required");
         401  +
        let mut request = protocol
         402  +
            .serialize_request(&input, CreateTable::INPUT_SCHEMA, "", _cfg)
         403  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         404  +
         405  +
        return ::std::result::Result::Ok(request);
  216    406   
    }
  217    407   
}
  218    408   
#[derive(Debug)]
  219    409   
struct CreateTableEndpointParamsInterceptor;
  220    410   
  221    411   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateTableEndpointParamsInterceptor {
  222    412   
    fn name(&self) -> &'static str {
  223    413   
        "CreateTableEndpointParamsInterceptor"
  224    414   
    }
  225    415