AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/describe_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 `DescribeDatabase`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeDatabase;
    6      6   
impl DescribeDatabase {
    7      7   
    /// Creates a new `DescribeDatabase`
    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::describe_database::DescribeDatabaseInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_database::DescribeDatabaseOutput::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::describe_database::DescribeDatabaseInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::describe_database::DescribeDatabaseOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::describe_database::DescribeDatabaseError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,394 @@
  138    142   
                crate::operation::describe_database::DescribeDatabaseError,
  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 DescribeDatabaseResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeDatabaseResponseDeserializer {
  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_describe_database::de_describe_database_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_describe_database::de_describe_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::describe_database::DescribeDatabaseError::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::describe_database::DescribeDatabaseError::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  +
                "InternalServerException" => crate::operation::describe_database::DescribeDatabaseError::InternalServerException({
         207  +
                    let mut tmp = match protocol
         208  +
                        .deserialize_response(response, crate::types::error::InternalServerException::SCHEMA, _cfg)
         209  +
                        .and_then(|mut deser| {
         210  +
                            crate::types::error::InternalServerException::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  +
                "InvalidEndpointException" => crate::operation::describe_database::DescribeDatabaseError::InvalidEndpointException({
         228  +
                    let mut tmp = match protocol
         229  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         230  +
                        .and_then(|mut deser| {
         231  +
                            crate::types::error::InvalidEndpointException::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  +
                    if tmp.message.is_none() {
         247  +
                        tmp.message = _error_message;
         248  +
                    }
         249  +
                    tmp
         250  +
                }),
         251  +
                "ResourceNotFoundException" => crate::operation::describe_database::DescribeDatabaseError::ResourceNotFoundException({
         252  +
                    let mut tmp = match protocol
         253  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         254  +
                        .and_then(|mut deser| {
         255  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         256  +
                                &mut *deser,
         257  +
                                response.headers(),
         258  +
                                response.status().into(),
         259  +
                                body,
         260  +
                            )
         261  +
                        }) {
         262  +
                        ::std::result::Result::Ok(val) => val,
         263  +
                        ::std::result::Result::Err(e) => {
         264  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         265  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         266  +
                            ))
         267  +
                        }
         268  +
                    };
         269  +
                    tmp.meta = generic;
         270  +
                    if tmp.message.is_none() {
         271  +
                        tmp.message = _error_message;
         272  +
                    }
         273  +
                    tmp
         274  +
                }),
         275  +
                "ThrottlingException" => crate::operation::describe_database::DescribeDatabaseError::ThrottlingException({
         276  +
                    let mut tmp = match protocol
         277  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         278  +
                        .and_then(|mut deser| {
         279  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         280  +
                                &mut *deser,
         281  +
                                response.headers(),
         282  +
                                response.status().into(),
         283  +
                                body,
         284  +
                            )
         285  +
                        }) {
         286  +
                        ::std::result::Result::Ok(val) => val,
         287  +
                        ::std::result::Result::Err(e) => {
         288  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         289  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         290  +
                            ))
         291  +
                        }
  162    292   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         293  +
                    tmp.meta = generic;
         294  +
                    tmp
         295  +
                }),
         296  +
                "ValidationException" => crate::operation::describe_database::DescribeDatabaseError::ValidationException({
         297  +
                    let mut tmp = match protocol
         298  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         299  +
                        .and_then(|mut deser| {
         300  +
                            crate::types::error::ValidationException::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  +
                _ => crate::operation::describe_database::DescribeDatabaseError::generic(generic),
         318  +
            };
         319  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         320  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         321  +
            ))
         322  +
        } else {
         323  +
            let protocol = _cfg
         324  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         325  +
                .expect("a SharedClientProtocol is required");
         326  +
            let mut deser = protocol
         327  +
                .deserialize_response(response, DescribeDatabase::OUTPUT_SCHEMA, _cfg)
         328  +
                .map_err(|e| {
         329  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         330  +
                })?;
         331  +
            let body = response.body().bytes().expect("body loaded");
         332  +
            let output = crate::operation::describe_database::DescribeDatabaseOutput::deserialize_with_response(
         333  +
                &mut *deser,
         334  +
                response.headers(),
         335  +
                response.status().into(),
         336  +
                body,
         337  +
            )
         338  +
            .map_err(|e| {
         339  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         340  +
            })?;
         341  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         342  +
        }
  164    343   
    }
  165    344   
}
  166    345   
#[derive(Debug)]
  167    346   
struct DescribeDatabaseRequestSerializer;
  168    347   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeDatabaseRequestSerializer {
  169    348   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    349   
    fn serialize_input(
  171    350   
        &self,
  172    351   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    352   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    353   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    354   
        let input = input
  176    355   
            .downcast::<crate::operation::describe_database::DescribeDatabaseInput>()
  177    356   
            .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::describe_database::DescribeDatabaseInput,
  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::describe_database::DescribeDatabaseInput,
  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.DescribeDatabase",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_describe_database::ser_describe_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())
         357  +
        let protocol = _cfg
         358  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         359  +
            .expect("a SharedClientProtocol is required");
         360  +
        let mut request = protocol
         361  +
            .serialize_request(&input, DescribeDatabase::INPUT_SCHEMA, "", _cfg)
         362  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         363  +
         364  +
        return ::std::result::Result::Ok(request);
  216    365   
    }
  217    366   
}
  218    367   
#[derive(Debug)]
  219    368   
struct DescribeDatabaseEndpointParamsInterceptor;
  220    369   
  221    370   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeDatabaseEndpointParamsInterceptor {
  222    371   
    fn name(&self) -> &'static str {
  223    372   
        "DescribeDatabaseEndpointParamsInterceptor"
  224    373   
    }
  225    374   

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/describe_database/_describe_database_input.rs

@@ -1,1 +108,120 @@
   17     17   
    "com.amazonaws.timestreamwrite.synthetic",
   18     18   
    "DescribeDatabaseInput",
   19     19   
);
   20     20   
static DESCRIBEDATABASEINPUT_MEMBER_DATABASE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "com.amazonaws.timestreamwrite.synthetic#DescribeDatabaseInput$DatabaseName",
   23     23   
        "com.amazonaws.timestreamwrite.synthetic",
   24     24   
        "DescribeDatabaseInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "database_name",
          27  +
    "DatabaseName",
   28     28   
    0,
   29     29   
);
   30     30   
static DESCRIBEDATABASEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    DESCRIBEDATABASEINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&DESCRIBEDATABASEINPUT_MEMBER_DATABASE_NAME],
   34     34   
);
   35     35   
impl DescribeDatabaseInput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEDATABASEINPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeDatabaseInput {
   40     40   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     41   
    fn serialize_members(
   42     42   
        &self,
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        if let Some(ref val) = self.database_name {
   46     46   
            ser.write_string(&DESCRIBEDATABASEINPUT_MEMBER_DATABASE_NAME, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl DescribeDatabaseInput {
   52     52   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   53         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   54         -
        deserializer: &mut D,
          53  +
    pub fn deserialize(
          54  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   55     55   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   56     56   
        #[allow(unused_variables, unused_mut)]
   57     57   
        let mut builder = Self::builder();
   58     58   
        #[allow(
   59     59   
            unused_variables,
   60     60   
            unreachable_code,
   61     61   
            clippy::single_match,
   62     62   
            clippy::match_single_binding,
   63     63   
            clippy::diverging_sub_expression
   64     64   
        )]
   65         -
        deserializer.read_struct(&DESCRIBEDATABASEINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&DESCRIBEDATABASEINPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.database_name = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
          74  +
        builder.database_name = builder.database_name.or(Some(String::new()));
   74     75   
        builder
   75     76   
            .build()
   76     77   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   77     78   
    }
   78     79   
}
          80  +
impl DescribeDatabaseInput {
          81  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          82  +
    pub fn deserialize_with_response(
          83  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          84  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          85  +
        _status: u16,
          86  +
        _body: &[u8],
          87  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          88  +
        Self::deserialize(deserializer)
          89  +
    }
          90  +
}
   79     91   
impl DescribeDatabaseInput {
   80     92   
    /// Creates a new builder-style object to manufacture [`DescribeDatabaseInput`](crate::operation::describe_database::DescribeDatabaseInput).
   81     93   
    pub fn builder() -> crate::operation::describe_database::builders::DescribeDatabaseInputBuilder {
   82     94   
        crate::operation::describe_database::builders::DescribeDatabaseInputBuilder::default()
   83     95   
    }
   84     96   
}
   85     97   
   86     98   
/// A builder for [`DescribeDatabaseInput`](crate::operation::describe_database::DescribeDatabaseInput).
   87     99   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   88    100   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/describe_database/_describe_database_output.rs

@@ -1,1 +96,140 @@
   18     18   
    "com.amazonaws.timestreamwrite.synthetic",
   19     19   
    "DescribeDatabaseOutput",
   20     20   
);
   21     21   
static DESCRIBEDATABASEOUTPUT_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#DescribeDatabaseOutput$Database",
   24     24   
        "com.amazonaws.timestreamwrite.synthetic",
   25     25   
        "DescribeDatabaseOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28         -
    "database",
          28  +
    "Database",
   29     29   
    0,
   30     30   
);
          31  +
static DESCRIBEDATABASEOUTPUT_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 DESCRIBEDATABASEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    DESCRIBEDATABASEOUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&DESCRIBEDATABASEOUTPUT_MEMBER_DATABASE],
          41  +
    &[&DESCRIBEDATABASEOUTPUT_MEMBER_DATABASE, &DESCRIBEDATABASEOUTPUT_MEMBER__REQUEST_ID],
   35     42   
);
   36     43   
impl DescribeDatabaseOutput {
   37     44   
    /// The schema for this shape.
   38     45   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEDATABASEOUTPUT_SCHEMA;
   39     46   
}
   40     47   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeDatabaseOutput {
   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(&DESCRIBEDATABASEOUTPUT_MEMBER_DATABASE, val)?;
   48     55   
        }
   49     56   
        Ok(())
   50     57   
    }
   51     58   
}
   52     59   
impl DescribeDatabaseOutput {
   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(&DESCRIBEDATABASEOUTPUT_SCHEMA, (), |_, member, deser| {
          73  +
        deserializer.read_struct(&DESCRIBEDATABASEOUTPUT_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 DescribeDatabaseOutput {
          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(&DESCRIBEDATABASEOUTPUT_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/describe_endpoints.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 `DescribeEndpoints`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeEndpoints;
    6      6   
impl DescribeEndpoints {
    7      7   
    /// Creates a new `DescribeEndpoints`
    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::describe_endpoints::DescribeEndpointsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_endpoints::DescribeEndpointsOutput::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::describe_endpoints::DescribeEndpointsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::describe_endpoints::DescribeEndpointsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::describe_endpoints::DescribeEndpointsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -124,128 +248,331 @@
  144    148   
                crate::operation::describe_endpoints::DescribeEndpointsError,
  145    149   
            >::new());
  146    150   
  147    151   
        ::std::borrow::Cow::Owned(rcb)
  148    152   
    }
  149    153   
}
  150    154   
  151    155   
#[derive(Debug)]
  152    156   
struct DescribeEndpointsResponseDeserializer;
  153    157   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeEndpointsResponseDeserializer {
  154         -
    fn deserialize_nonstreaming(
         158  +
    fn deserialize_nonstreaming_with_config(
  155    159   
        &self,
  156    160   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         161  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    162   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    163   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  159         -
        let headers = response.headers();
  160         -
        let body = response.body().bytes().expect("body loaded");
  161    164   
        #[allow(unused_mut)]
  162    165   
        let mut force_error = false;
  163    166   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_describe_endpoints::de_describe_endpoints_http_error(status, headers, body)
  166         -
        } else {
  167         -
            crate::protocol_serde::shape_describe_endpoints::de_describe_endpoints_http_response(status, headers, body)
         167  +
        if !success && status != 200 || force_error {
         168  +
            let headers = response.headers();
         169  +
            let body = response.body().bytes().expect("body loaded");
         170  +
            #[allow(unused_mut)]
         171  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         172  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         173  +
            })?;
         174  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         175  +
            let generic = generic_builder.build();
         176  +
            let error_code = match generic.code() {
         177  +
                ::std::option::Option::Some(code) => code,
         178  +
                ::std::option::Option::None => {
         179  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         180  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::describe_endpoints::DescribeEndpointsError::unhandled(
         181  +
                            generic,
         182  +
                        )),
         183  +
                    ))
         184  +
                }
         185  +
            };
         186  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         187  +
            let protocol = _cfg
         188  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         189  +
                .expect("a SharedClientProtocol is required");
         190  +
            let err = match error_code {
         191  +
                "InternalServerException" => crate::operation::describe_endpoints::DescribeEndpointsError::InternalServerException({
         192  +
                    let mut tmp = match protocol
         193  +
                        .deserialize_response(response, crate::types::error::InternalServerException::SCHEMA, _cfg)
         194  +
                        .and_then(|mut deser| {
         195  +
                            crate::types::error::InternalServerException::deserialize_with_response(
         196  +
                                &mut *deser,
         197  +
                                response.headers(),
         198  +
                                response.status().into(),
         199  +
                                body,
         200  +
                            )
         201  +
                        }) {
         202  +
                        ::std::result::Result::Ok(val) => val,
         203  +
                        ::std::result::Result::Err(e) => {
         204  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         205  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         206  +
                            ))
         207  +
                        }
         208  +
                    };
         209  +
                    tmp.meta = generic;
         210  +
                    tmp
         211  +
                }),
         212  +
                "ThrottlingException" => crate::operation::describe_endpoints::DescribeEndpointsError::ThrottlingException({
         213  +
                    let mut tmp = match protocol
         214  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         215  +
                        .and_then(|mut deser| {
         216  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         217  +
                                &mut *deser,
         218  +
                                response.headers(),
         219  +
                                response.status().into(),
         220  +
                                body,
         221  +
                            )
         222  +
                        }) {
         223  +
                        ::std::result::Result::Ok(val) => val,
         224  +
                        ::std::result::Result::Err(e) => {
         225  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         226  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         227  +
                            ))
         228  +
                        }
         229  +
                    };
         230  +
                    tmp.meta = generic;
         231  +
                    tmp
         232  +
                }),
         233  +
                "ValidationException" => crate::operation::describe_endpoints::DescribeEndpointsError::ValidationException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::ValidationException::deserialize_with_response(
         238  +
                                &mut *deser,
         239  +
                                response.headers(),
         240  +
                                response.status().into(),
         241  +
                                body,
         242  +
                            )
         243  +
                        }) {
         244  +
                        ::std::result::Result::Ok(val) => val,
         245  +
                        ::std::result::Result::Err(e) => {
         246  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         247  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         248  +
                            ))
         249  +
                        }
         250  +
                    };
         251  +
                    tmp.meta = generic;
         252  +
                    tmp
         253  +
                }),
         254  +
                _ => crate::operation::describe_endpoints::DescribeEndpointsError::generic(generic),
  168    255   
            };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         256  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         257  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         258  +
            ))
         259  +
        } else {
         260  +
            let protocol = _cfg
         261  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         262  +
                .expect("a SharedClientProtocol is required");
         263  +
            let mut deser = protocol
         264  +
                .deserialize_response(response, DescribeEndpoints::OUTPUT_SCHEMA, _cfg)
         265  +
                .map_err(|e| {
         266  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         267  +
                })?;
         268  +
            let body = response.body().bytes().expect("body loaded");
         269  +
            let output = crate::operation::describe_endpoints::DescribeEndpointsOutput::deserialize_with_response(
         270  +
                &mut *deser,
         271  +
                response.headers(),
         272  +
                response.status().into(),
         273  +
                body,
         274  +
            )
         275  +
            .map_err(|e| {
         276  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         277  +
            })?;
         278  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         279  +
        }
  170    280   
    }
  171    281   
}
  172    282   
#[derive(Debug)]
  173    283   
struct DescribeEndpointsRequestSerializer;
  174    284   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeEndpointsRequestSerializer {
  175    285   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    286   
    fn serialize_input(
  177    287   
        &self,
  178    288   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    289   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    290   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    291   
        let input = input
  182    292   
            .downcast::<crate::operation::describe_endpoints::DescribeEndpointsInput>()
  183    293   
            .expect("correct type");
  184         -
        let _header_serialization_settings = _cfg
  185         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  186         -
            .cloned()
  187         -
            .unwrap_or_default();
  188         -
        let mut request_builder = {
  189         -
            #[allow(clippy::uninlined_format_args)]
  190         -
            fn uri_base(
  191         -
                _input: &crate::operation::describe_endpoints::DescribeEndpointsInput,
  192         -
                output: &mut ::std::string::String,
  193         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  194         -
                use ::std::fmt::Write as _;
  195         -
                ::std::write!(output, "/").expect("formatting should succeed");
  196         -
                ::std::result::Result::Ok(())
  197         -
            }
  198         -
            #[allow(clippy::unnecessary_wraps)]
  199         -
            fn update_http_builder(
  200         -
                input: &crate::operation::describe_endpoints::DescribeEndpointsInput,
  201         -
                builder: ::http_1x::request::Builder,
  202         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  203         -
                let mut uri = ::std::string::String::new();
  204         -
                uri_base(input, &mut uri)?;
  205         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  206         -
            }
  207         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  208         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  209         -
            builder = _header_serialization_settings.set_default_header(
  210         -
                builder,
  211         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  212         -
                "Timestream_20181101.DescribeEndpoints",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_describe_endpoints::ser_describe_endpoints_input(&input)?);
         294  +
        let protocol = _cfg
         295  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         296  +
            .expect("a SharedClientProtocol is required");
         297  +
        let mut request = protocol
         298  +
            .serialize_request(&input, DescribeEndpoints::INPUT_SCHEMA, "", _cfg)
         299  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
  217    300   
  218         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         301  +
        return ::std::result::Result::Ok(request);
  219    302   
    }
  220    303   
}
  221    304   
#[derive(Debug)]
  222    305   
struct DescribeEndpointsEndpointParamsInterceptor;
  223    306   
  224    307   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeEndpointsEndpointParamsInterceptor {
  225    308   
    fn name(&self) -> &'static str {
  226    309   
        "DescribeEndpointsEndpointParamsInterceptor"
  227    310   
    }
  228    311   

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/describe_endpoints/_describe_endpoints_input.rs

@@ -1,1 +69,82 @@
   18     18   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   19     19   
    fn serialize_members(
   20     20   
        &self,
   21     21   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   22     22   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   23     23   
        Ok(())
   24     24   
    }
   25     25   
}
   26     26   
impl DescribeEndpointsInput {
   27     27   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   28         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   29         -
        deserializer: &mut D,
          28  +
    pub fn deserialize(
          29  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   30     30   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   31     31   
        #[allow(unused_variables, unused_mut)]
   32     32   
        let mut builder = Self::builder();
   33     33   
        #[allow(
   34     34   
            unused_variables,
   35     35   
            unreachable_code,
   36     36   
            clippy::single_match,
   37     37   
            clippy::match_single_binding,
   38     38   
            clippy::diverging_sub_expression
   39     39   
        )]
   40         -
        deserializer.read_struct(&DESCRIBEENDPOINTSINPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&DESCRIBEENDPOINTSINPUT_SCHEMA, &mut |member, deser| {
   41     41   
            match member.member_index() {
   42     42   
                _ => {}
   43     43   
            }
   44     44   
            Ok(())
   45     45   
        })?;
   46     46   
        builder
   47     47   
            .build()
   48     48   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   49     49   
    }
   50     50   
}
          51  +
impl DescribeEndpointsInput {
          52  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          53  +
    pub fn deserialize_with_response(
          54  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          55  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          56  +
        _status: u16,
          57  +
        _body: &[u8],
          58  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          59  +
        Self::builder()
          60  +
            .build()
          61  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
          62  +
    }
          63  +
}
   51     64   
impl DescribeEndpointsInput {
   52     65   
    /// Creates a new builder-style object to manufacture [`DescribeEndpointsInput`](crate::operation::describe_endpoints::DescribeEndpointsInput).
   53     66   
    pub fn builder() -> crate::operation::describe_endpoints::builders::DescribeEndpointsInputBuilder {
   54     67   
        crate::operation::describe_endpoints::builders::DescribeEndpointsInputBuilder::default()
   55     68   
    }
   56     69   
}
   57     70   
   58     71   
/// A builder for [`DescribeEndpointsInput`](crate::operation::describe_endpoints::DescribeEndpointsInput).
   59     72   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   60     73   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/describe_endpoints/_describe_endpoints_output.rs

@@ -1,1 +119,170 @@
   19     19   
    "com.amazonaws.timestreamwrite.synthetic",
   20     20   
    "DescribeEndpointsOutput",
   21     21   
);
   22     22   
static DESCRIBEENDPOINTSOUTPUT_MEMBER_ENDPOINTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   23     23   
    ::aws_smithy_schema::ShapeId::from_static(
   24     24   
        "com.amazonaws.timestreamwrite.synthetic#DescribeEndpointsOutput$Endpoints",
   25     25   
        "com.amazonaws.timestreamwrite.synthetic",
   26     26   
        "DescribeEndpointsOutput",
   27     27   
    ),
   28     28   
    ::aws_smithy_schema::ShapeType::List,
   29         -
    "endpoints",
          29  +
    "Endpoints",
   30     30   
    0,
   31     31   
);
          32  +
static DESCRIBEENDPOINTSOUTPUT_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 DESCRIBEENDPOINTSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   33     40   
    DESCRIBEENDPOINTSOUTPUT_SCHEMA_ID,
   34     41   
    ::aws_smithy_schema::ShapeType::Structure,
   35         -
    &[&DESCRIBEENDPOINTSOUTPUT_MEMBER_ENDPOINTS],
          42  +
    &[&DESCRIBEENDPOINTSOUTPUT_MEMBER_ENDPOINTS, &DESCRIBEENDPOINTSOUTPUT_MEMBER__REQUEST_ID],
   36     43   
);
   37     44   
impl DescribeEndpointsOutput {
   38     45   
    /// The schema for this shape.
   39     46   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEENDPOINTSOUTPUT_SCHEMA;
   40     47   
}
   41     48   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeEndpointsOutput {
   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.endpoints;
   49     56   
   50     57   
            ser.write_list(
   51     58   
                &DESCRIBEENDPOINTSOUTPUT_MEMBER_ENDPOINTS,
   52     59   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   53     60   
                    for item in val {
   54     61   
                        ser.write_struct(crate::types::Endpoint::SCHEMA, item)?;
   55     62   
                    }
   56     63   
                    Ok(())
   57     64   
                },
   58     65   
            )?;
   59     66   
        }
   60     67   
        Ok(())
   61     68   
    }
   62     69   
}
   63     70   
impl DescribeEndpointsOutput {
   64     71   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   65         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   66         -
        deserializer: &mut D,
          72  +
    pub fn deserialize(
          73  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          74  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          75  +
        #[allow(unused_variables, unused_mut)]
          76  +
        let mut builder = Self::builder();
          77  +
        #[allow(
          78  +
            unused_variables,
          79  +
            unreachable_code,
          80  +
            clippy::single_match,
          81  +
            clippy::match_single_binding,
          82  +
            clippy::diverging_sub_expression
          83  +
        )]
          84  +
        deserializer.read_struct(&DESCRIBEENDPOINTSOUTPUT_SCHEMA, &mut |member, deser| {
          85  +
            match member.member_index() {
          86  +
                Some(0) => {
          87  +
                    builder.endpoints = Some({
          88  +
                        let mut container = Vec::new();
          89  +
                        deser.read_list(member, &mut |deser| {
          90  +
                            container.push(crate::types::Endpoint::deserialize(deser)?);
          91  +
                            Ok(())
          92  +
                        })?;
          93  +
                        container
          94  +
                    });
          95  +
                }
          96  +
                Some(1) => {
          97  +
                    builder._request_id = Some(deser.read_string(member)?);
          98  +
                }
          99  +
                _ => {}
         100  +
            }
         101  +
            Ok(())
         102  +
        })?;
         103  +
        builder.endpoints = builder.endpoints.or(Some(Vec::new()));
         104  +
        builder
         105  +
            .build()
         106  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         107  +
    }
         108  +
}
         109  +
impl DescribeEndpointsOutput {
         110  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         111  +
    /// Header-bound members are read directly from headers, avoiding runtime
         112  +
    /// member iteration overhead. Body members are read via the deserializer.
         113  +
    pub fn deserialize_with_response(
         114  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         115  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         116  +
        _status: u16,
         117  +
        _body: &[u8],
   67    118   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   68    119   
        #[allow(unused_variables, unused_mut)]
   69    120   
        let mut builder = Self::builder();
         121  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         122  +
            builder._request_id = Some(val.to_string());
         123  +
        }
   70    124   
        #[allow(
   71    125   
            unused_variables,
   72    126   
            unreachable_code,
   73    127   
            clippy::single_match,
   74    128   
            clippy::match_single_binding,
   75    129   
            clippy::diverging_sub_expression
   76    130   
        )]
   77         -
        deserializer.read_struct(&DESCRIBEENDPOINTSOUTPUT_SCHEMA, (), |_, member, deser| {
         131  +
        deserializer.read_struct(&DESCRIBEENDPOINTSOUTPUT_SCHEMA, &mut |member, deser| {
   78    132   
            match member.member_index() {
   79    133   
                Some(0) => {
   80    134   
                    builder.endpoints = Some({
   81         -
                        let container = if let Some(cap) = deser.container_size() {
   82         -
                            Vec::with_capacity(cap)
   83         -
                        } else {
   84         -
                            Vec::new()
   85         -
                        };
   86         -
                        deser.read_list(member, container, |mut list, deser| {
   87         -
                            list.push(crate::types::Endpoint::deserialize(deser)?);
   88         -
                            Ok(list)
   89         -
                        })?
         135  +
                        let mut container = Vec::new();
         136  +
                        deser.read_list(member, &mut |deser| {
         137  +
                            container.push(crate::types::Endpoint::deserialize(deser)?);
         138  +
                            Ok(())
         139  +
                        })?;
         140  +
                        container
   90    141   
                    });
   91    142   
                }
   92    143   
                _ => {}
   93    144   
            }
   94    145   
            Ok(())
   95    146   
        })?;
   96    147   
        builder
   97    148   
            .build()
   98    149   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   99    150   
    }

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/describe_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 `DescribeTable`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeTable;
    6      6   
impl DescribeTable {
    7      7   
    /// Creates a new `DescribeTable`
    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::describe_table::DescribeTableInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_table::DescribeTableOutput::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::describe_table::DescribeTableInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::describe_table::DescribeTableOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::describe_table::DescribeTableError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,390 @@
  138    142   
                crate::operation::describe_table::DescribeTableError,
  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 DescribeTableResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeTableResponseDeserializer {
  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_describe_table::de_describe_table_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_describe_table::de_describe_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::describe_table::DescribeTableError::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::describe_table::DescribeTableError::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  +
                "InternalServerException" => crate::operation::describe_table::DescribeTableError::InternalServerException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::InternalServerException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::InternalServerException::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  +
                "InvalidEndpointException" => crate::operation::describe_table::DescribeTableError::InvalidEndpointException({
         226  +
                    let mut tmp = match protocol
         227  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         228  +
                        .and_then(|mut deser| {
         229  +
                            crate::types::error::InvalidEndpointException::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  +
                    if tmp.message.is_none() {
         245  +
                        tmp.message = _error_message;
         246  +
                    }
         247  +
                    tmp
         248  +
                }),
         249  +
                "ResourceNotFoundException" => crate::operation::describe_table::DescribeTableError::ResourceNotFoundException({
         250  +
                    let mut tmp = match protocol
         251  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         252  +
                        .and_then(|mut deser| {
         253  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         254  +
                                &mut *deser,
         255  +
                                response.headers(),
         256  +
                                response.status().into(),
         257  +
                                body,
         258  +
                            )
         259  +
                        }) {
         260  +
                        ::std::result::Result::Ok(val) => val,
         261  +
                        ::std::result::Result::Err(e) => {
         262  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         263  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         264  +
                            ))
         265  +
                        }
         266  +
                    };
         267  +
                    tmp.meta = generic;
         268  +
                    if tmp.message.is_none() {
         269  +
                        tmp.message = _error_message;
         270  +
                    }
         271  +
                    tmp
         272  +
                }),
         273  +
                "ThrottlingException" => crate::operation::describe_table::DescribeTableError::ThrottlingException({
         274  +
                    let mut tmp = match protocol
         275  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         276  +
                        .and_then(|mut deser| {
         277  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         278  +
                                &mut *deser,
         279  +
                                response.headers(),
         280  +
                                response.status().into(),
         281  +
                                body,
         282  +
                            )
         283  +
                        }) {
         284  +
                        ::std::result::Result::Ok(val) => val,
         285  +
                        ::std::result::Result::Err(e) => {
         286  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         287  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         288  +
                            ))
         289  +
                        }
  162    290   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         291  +
                    tmp.meta = generic;
         292  +
                    tmp
         293  +
                }),
         294  +
                "ValidationException" => crate::operation::describe_table::DescribeTableError::ValidationException({
         295  +
                    let mut tmp = match protocol
         296  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         297  +
                        .and_then(|mut deser| {
         298  +
                            crate::types::error::ValidationException::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  +
                    tmp
         314  +
                }),
         315  +
                _ => crate::operation::describe_table::DescribeTableError::generic(generic),
         316  +
            };
         317  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         318  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         319  +
            ))
         320  +
        } else {
         321  +
            let protocol = _cfg
         322  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         323  +
                .expect("a SharedClientProtocol is required");
         324  +
            let mut deser = protocol.deserialize_response(response, DescribeTable::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         325  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         326  +
            })?;
         327  +
            let body = response.body().bytes().expect("body loaded");
         328  +
            let output = crate::operation::describe_table::DescribeTableOutput::deserialize_with_response(
         329  +
                &mut *deser,
         330  +
                response.headers(),
         331  +
                response.status().into(),
         332  +
                body,
         333  +
            )
         334  +
            .map_err(|e| {
         335  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         336  +
            })?;
         337  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         338  +
        }
  164    339   
    }
  165    340   
}
  166    341   
#[derive(Debug)]
  167    342   
struct DescribeTableRequestSerializer;
  168    343   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeTableRequestSerializer {
  169    344   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    345   
    fn serialize_input(
  171    346   
        &self,
  172    347   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    348   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    349   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    350   
        let input = input
  176    351   
            .downcast::<crate::operation::describe_table::DescribeTableInput>()
  177    352   
            .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::describe_table::DescribeTableInput,
  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::describe_table::DescribeTableInput,
  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.DescribeTable",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_describe_table::ser_describe_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())
         353  +
        let protocol = _cfg
         354  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         355  +
            .expect("a SharedClientProtocol is required");
         356  +
        let mut request = protocol
         357  +
            .serialize_request(&input, DescribeTable::INPUT_SCHEMA, "", _cfg)
         358  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         359  +
         360  +
        return ::std::result::Result::Ok(request);
  216    361   
    }
  217    362   
}
  218    363   
#[derive(Debug)]
  219    364   
struct DescribeTableEndpointParamsInterceptor;
  220    365   
  221    366   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeTableEndpointParamsInterceptor {
  222    367   
    fn name(&self) -> &'static str {
  223    368   
        "DescribeTableEndpointParamsInterceptor"
  224    369   
    }
  225    370   

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/describe_table/_describe_table_input.rs

@@ -3,3 +130,143 @@
   23     23   
    "com.amazonaws.timestreamwrite.synthetic",
   24     24   
    "DescribeTableInput",
   25     25   
);
   26     26   
static DESCRIBETABLEINPUT_MEMBER_DATABASE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   27     27   
    ::aws_smithy_schema::ShapeId::from_static(
   28     28   
        "com.amazonaws.timestreamwrite.synthetic#DescribeTableInput$DatabaseName",
   29     29   
        "com.amazonaws.timestreamwrite.synthetic",
   30     30   
        "DescribeTableInput",
   31     31   
    ),
   32     32   
    ::aws_smithy_schema::ShapeType::String,
   33         -
    "database_name",
          33  +
    "DatabaseName",
   34     34   
    0,
   35     35   
);
   36     36   
static DESCRIBETABLEINPUT_MEMBER_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   37     37   
    ::aws_smithy_schema::ShapeId::from_static(
   38     38   
        "com.amazonaws.timestreamwrite.synthetic#DescribeTableInput$TableName",
   39     39   
        "com.amazonaws.timestreamwrite.synthetic",
   40     40   
        "DescribeTableInput",
   41     41   
    ),
   42     42   
    ::aws_smithy_schema::ShapeType::String,
   43         -
    "table_name",
          43  +
    "TableName",
   44     44   
    1,
   45     45   
);
   46     46   
static DESCRIBETABLEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   47     47   
    DESCRIBETABLEINPUT_SCHEMA_ID,
   48     48   
    ::aws_smithy_schema::ShapeType::Structure,
   49     49   
    &[&DESCRIBETABLEINPUT_MEMBER_DATABASE_NAME, &DESCRIBETABLEINPUT_MEMBER_TABLE_NAME],
   50     50   
);
   51     51   
impl DescribeTableInput {
   52     52   
    /// The schema for this shape.
   53     53   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBETABLEINPUT_SCHEMA;
   54     54   
}
   55     55   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeTableInput {
   56     56   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   57     57   
    fn serialize_members(
   58     58   
        &self,
   59     59   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   60     60   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   61     61   
        if let Some(ref val) = self.database_name {
   62     62   
            ser.write_string(&DESCRIBETABLEINPUT_MEMBER_DATABASE_NAME, val)?;
   63     63   
        }
   64     64   
        if let Some(ref val) = self.table_name {
   65     65   
            ser.write_string(&DESCRIBETABLEINPUT_MEMBER_TABLE_NAME, val)?;
   66     66   
        }
   67     67   
        Ok(())
   68     68   
    }
   69     69   
}
   70     70   
impl DescribeTableInput {
   71     71   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   72         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   73         -
        deserializer: &mut D,
          72  +
    pub fn deserialize(
          73  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   74     74   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   75     75   
        #[allow(unused_variables, unused_mut)]
   76     76   
        let mut builder = Self::builder();
   77     77   
        #[allow(
   78     78   
            unused_variables,
   79     79   
            unreachable_code,
   80     80   
            clippy::single_match,
   81     81   
            clippy::match_single_binding,
   82     82   
            clippy::diverging_sub_expression
   83     83   
        )]
   84         -
        deserializer.read_struct(&DESCRIBETABLEINPUT_SCHEMA, (), |_, member, deser| {
          84  +
        deserializer.read_struct(&DESCRIBETABLEINPUT_SCHEMA, &mut |member, deser| {
   85     85   
            match member.member_index() {
   86     86   
                Some(0) => {
   87     87   
                    builder.database_name = Some(deser.read_string(member)?);
   88     88   
                }
   89     89   
                Some(1) => {
   90     90   
                    builder.table_name = Some(deser.read_string(member)?);
   91     91   
                }
   92     92   
                _ => {}
   93     93   
            }
   94     94   
            Ok(())
   95     95   
        })?;
          96  +
        builder.database_name = builder.database_name.or(Some(String::new()));
          97  +
        builder.table_name = builder.table_name.or(Some(String::new()));
   96     98   
        builder
   97     99   
            .build()
   98    100   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   99    101   
    }
  100    102   
}
         103  +
impl DescribeTableInput {
         104  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         105  +
    pub fn deserialize_with_response(
         106  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         107  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         108  +
        _status: u16,
         109  +
        _body: &[u8],
         110  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         111  +
        Self::deserialize(deserializer)
         112  +
    }
         113  +
}
  101    114   
impl DescribeTableInput {
  102    115   
    /// Creates a new builder-style object to manufacture [`DescribeTableInput`](crate::operation::describe_table::DescribeTableInput).
  103    116   
    pub fn builder() -> crate::operation::describe_table::builders::DescribeTableInputBuilder {
  104    117   
        crate::operation::describe_table::builders::DescribeTableInputBuilder::default()
  105    118   
    }
  106    119   
}
  107    120   
  108    121   
/// A builder for [`DescribeTableInput`](crate::operation::describe_table::DescribeTableInput).
  109    122   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  110    123   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/describe_table/_describe_table_output.rs

@@ -1,1 +96,140 @@
   18     18   
    "com.amazonaws.timestreamwrite.synthetic",
   19     19   
    "DescribeTableOutput",
   20     20   
);
   21     21   
static DESCRIBETABLEOUTPUT_MEMBER_TABLE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   22     22   
    ::aws_smithy_schema::ShapeId::from_static(
   23     23   
        "com.amazonaws.timestreamwrite.synthetic#DescribeTableOutput$Table",
   24     24   
        "com.amazonaws.timestreamwrite.synthetic",
   25     25   
        "DescribeTableOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28         -
    "table",
          28  +
    "Table",
   29     29   
    0,
   30     30   
);
          31  +
static DESCRIBETABLEOUTPUT_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 DESCRIBETABLEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    DESCRIBETABLEOUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&DESCRIBETABLEOUTPUT_MEMBER_TABLE],
          41  +
    &[&DESCRIBETABLEOUTPUT_MEMBER_TABLE, &DESCRIBETABLEOUTPUT_MEMBER__REQUEST_ID],
   35     42   
);
   36     43   
impl DescribeTableOutput {
   37     44   
    /// The schema for this shape.
   38     45   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBETABLEOUTPUT_SCHEMA;
   39     46   
}
   40     47   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeTableOutput {
   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.table {
   47     54   
            ser.write_struct(&DESCRIBETABLEOUTPUT_MEMBER_TABLE, val)?;
   48     55   
        }
   49     56   
        Ok(())
   50     57   
    }
   51     58   
}
   52     59   
impl DescribeTableOutput {
   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(&DESCRIBETABLEOUTPUT_SCHEMA, (), |_, member, deser| {
          73  +
        deserializer.read_struct(&DESCRIBETABLEOUTPUT_SCHEMA, &mut |member, deser| {
          74  +
            match member.member_index() {
          75  +
                Some(0) => {
          76  +
                    builder.table = Some(crate::types::Table::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 DescribeTableOutput {
          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(&DESCRIBETABLEOUTPUT_SCHEMA, &mut |member, deser| {
   67    111   
            match member.member_index() {
   68    112   
                Some(0) => {
   69    113   
                    builder.table = Some(crate::types::Table::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/list_batch_load_tasks.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 `ListBatchLoadTasks`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListBatchLoadTasks;
    6      6   
impl ListBatchLoadTasks {
    7      7   
    /// Creates a new `ListBatchLoadTasks`
    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::list_batch_load_tasks::ListBatchLoadTasksInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_batch_load_tasks::ListBatchLoadTasksOutput::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::list_batch_load_tasks::ListBatchLoadTasksInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_batch_load_tasks::ListBatchLoadTasksOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_batch_load_tasks::ListBatchLoadTasksError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -124,128 +253,376 @@
  144    148   
                crate::operation::list_batch_load_tasks::ListBatchLoadTasksError,
  145    149   
            >::new());
  146    150   
  147    151   
        ::std::borrow::Cow::Owned(rcb)
  148    152   
    }
  149    153   
}
  150    154   
  151    155   
#[derive(Debug)]
  152    156   
struct ListBatchLoadTasksResponseDeserializer;
  153    157   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListBatchLoadTasksResponseDeserializer {
  154         -
    fn deserialize_nonstreaming(
         158  +
    fn deserialize_nonstreaming_with_config(
  155    159   
        &self,
  156    160   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         161  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    162   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    163   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  159         -
        let headers = response.headers();
  160         -
        let body = response.body().bytes().expect("body loaded");
  161    164   
        #[allow(unused_mut)]
  162    165   
        let mut force_error = false;
  163    166   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_list_batch_load_tasks::de_list_batch_load_tasks_http_error(status, headers, body)
  166         -
        } else {
  167         -
            crate::protocol_serde::shape_list_batch_load_tasks::de_list_batch_load_tasks_http_response(status, headers, body)
         167  +
        if !success && status != 200 || force_error {
         168  +
            let headers = response.headers();
         169  +
            let body = response.body().bytes().expect("body loaded");
         170  +
            #[allow(unused_mut)]
         171  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         172  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         173  +
            })?;
         174  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         175  +
            let generic = generic_builder.build();
         176  +
            let error_code = match generic.code() {
         177  +
                ::std::option::Option::Some(code) => code,
         178  +
                ::std::option::Option::None => {
         179  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         180  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         181  +
                            crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::unhandled(generic),
         182  +
                        ),
         183  +
                    ))
         184  +
                }
  168    185   
            };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         186  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         187  +
            let protocol = _cfg
         188  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         189  +
                .expect("a SharedClientProtocol is required");
         190  +
            let err = match error_code {
         191  +
                "AccessDeniedException" => crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::AccessDeniedException({
         192  +
                    let mut tmp = match protocol
         193  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         194  +
                        .and_then(|mut deser| {
         195  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         196  +
                                &mut *deser,
         197  +
                                response.headers(),
         198  +
                                response.status().into(),
         199  +
                                body,
         200  +
                            )
         201  +
                        }) {
         202  +
                        ::std::result::Result::Ok(val) => val,
         203  +
                        ::std::result::Result::Err(e) => {
         204  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         205  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         206  +
                            ))
         207  +
                        }
         208  +
                    };
         209  +
                    tmp.meta = generic;
         210  +
                    tmp
         211  +
                }),
         212  +
                "InternalServerException" => crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::InternalServerException({
         213  +
                    let mut tmp = match protocol
         214  +
                        .deserialize_response(response, crate::types::error::InternalServerException::SCHEMA, _cfg)
         215  +
                        .and_then(|mut deser| {
         216  +
                            crate::types::error::InternalServerException::deserialize_with_response(
         217  +
                                &mut *deser,
         218  +
                                response.headers(),
         219  +
                                response.status().into(),
         220  +
                                body,
         221  +
                            )
         222  +
                        }) {
         223  +
                        ::std::result::Result::Ok(val) => val,
         224  +
                        ::std::result::Result::Err(e) => {
         225  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         226  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         227  +
                            ))
         228  +
                        }
         229  +
                    };
         230  +
                    tmp.meta = generic;
         231  +
                    tmp
         232  +
                }),
         233  +
                "InvalidEndpointException" => crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::InvalidEndpointException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::InvalidEndpointException::deserialize_with_response(
         238  +
                                &mut *deser,
         239  +
                                response.headers(),
         240  +
                                response.status().into(),
         241  +
                                body,
         242  +
                            )
         243  +
                        }) {
         244  +
                        ::std::result::Result::Ok(val) => val,
         245  +
                        ::std::result::Result::Err(e) => {
         246  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         247  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         248  +
                            ))
         249  +
                        }
         250  +
                    };
         251  +
                    tmp.meta = generic;
         252  +
                    if tmp.message.is_none() {
         253  +
                        tmp.message = _error_message;
         254  +
                    }
         255  +
                    tmp
         256  +
                }),
         257  +
                "ThrottlingException" => crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::ThrottlingException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    tmp
         277  +
                }),
         278  +
                "ValidationException" => crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::ValidationException({
         279  +
                    let mut tmp = match protocol
         280  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         281  +
                        .and_then(|mut deser| {
         282  +
                            crate::types::error::ValidationException::deserialize_with_response(
         283  +
                                &mut *deser,
         284  +
                                response.headers(),
         285  +
                                response.status().into(),
         286  +
                                body,
         287  +
                            )
         288  +
                        }) {
         289  +
                        ::std::result::Result::Ok(val) => val,
         290  +
                        ::std::result::Result::Err(e) => {
         291  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         292  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         293  +
                            ))
         294  +
                        }
         295  +
                    };
         296  +
                    tmp.meta = generic;
         297  +
                    tmp
         298  +
                }),
         299  +
                _ => crate::operation::list_batch_load_tasks::ListBatchLoadTasksError::generic(generic),
         300  +
            };
         301  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         302  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         303  +
            ))
         304  +
        } else {
         305  +
            let protocol = _cfg
         306  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         307  +
                .expect("a SharedClientProtocol is required");
         308  +
            let mut deser = protocol
         309  +
                .deserialize_response(response, ListBatchLoadTasks::OUTPUT_SCHEMA, _cfg)
         310  +
                .map_err(|e| {
         311  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         312  +
                })?;
         313  +
            let body = response.body().bytes().expect("body loaded");
         314  +
            let output = crate::operation::list_batch_load_tasks::ListBatchLoadTasksOutput::deserialize_with_response(
         315  +
                &mut *deser,
         316  +
                response.headers(),
         317  +
                response.status().into(),
         318  +
                body,
         319  +
            )
         320  +
            .map_err(|e| {
         321  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         322  +
            })?;
         323  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         324  +
        }
  170    325   
    }
  171    326   
}
  172    327   
#[derive(Debug)]
  173    328   
struct ListBatchLoadTasksRequestSerializer;
  174    329   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListBatchLoadTasksRequestSerializer {
  175    330   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    331   
    fn serialize_input(
  177    332   
        &self,
  178    333   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    334   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    335   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    336   
        let input = input
  182    337   
            .downcast::<crate::operation::list_batch_load_tasks::ListBatchLoadTasksInput>()
  183    338   
            .expect("correct type");
  184         -
        let _header_serialization_settings = _cfg
  185         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  186         -
            .cloned()
  187         -
            .unwrap_or_default();
  188         -
        let mut request_builder = {
  189         -
            #[allow(clippy::uninlined_format_args)]
  190         -
            fn uri_base(
  191         -
                _input: &crate::operation::list_batch_load_tasks::ListBatchLoadTasksInput,
  192         -
                output: &mut ::std::string::String,
  193         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  194         -
                use ::std::fmt::Write as _;
  195         -
                ::std::write!(output, "/").expect("formatting should succeed");
  196         -
                ::std::result::Result::Ok(())
  197         -
            }
  198         -
            #[allow(clippy::unnecessary_wraps)]
  199         -
            fn update_http_builder(
  200         -
                input: &crate::operation::list_batch_load_tasks::ListBatchLoadTasksInput,
  201         -
                builder: ::http_1x::request::Builder,
  202         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  203         -
                let mut uri = ::std::string::String::new();
  204         -
                uri_base(input, &mut uri)?;
  205         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  206         -
            }
  207         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  208         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  209         -
            builder = _header_serialization_settings.set_default_header(
  210         -
                builder,
  211         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  212         -
                "Timestream_20181101.ListBatchLoadTasks",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_list_batch_load_tasks::ser_list_batch_load_tasks_input(
  217         -
            &input,
  218         -
        )?);
  219         -
        if let Some(content_length) = body.content_length() {
  220         -
            let content_length = content_length.to_string();
  221         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  222         -
        }
  223         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         339  +
        let protocol = _cfg
         340  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         341  +
            .expect("a SharedClientProtocol is required");
         342  +
        let mut request = protocol
         343  +
            .serialize_request(&input, ListBatchLoadTasks::INPUT_SCHEMA, "", _cfg)
         344  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         345  +
         346  +
        return ::std::result::Result::Ok(request);
  224    347   
    }
  225    348   
}
  226    349   
#[derive(Debug)]
  227    350   
struct ListBatchLoadTasksEndpointParamsInterceptor;
  228    351   
  229    352   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListBatchLoadTasksEndpointParamsInterceptor {
  230    353   
    fn name(&self) -> &'static str {
  231    354   
        "ListBatchLoadTasksEndpointParamsInterceptor"
  232    355   
    }
  233    356