AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/list_batch_load_tasks/_list_batch_load_tasks_input.rs

@@ -9,9 +156,167 @@
   29     29   
    "com.amazonaws.timestreamwrite.synthetic",
   30     30   
    "ListBatchLoadTasksInput",
   31     31   
);
   32     32   
static LISTBATCHLOADTASKSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   33     33   
    ::aws_smithy_schema::ShapeId::from_static(
   34     34   
        "com.amazonaws.timestreamwrite.synthetic#ListBatchLoadTasksInput$NextToken",
   35     35   
        "com.amazonaws.timestreamwrite.synthetic",
   36     36   
        "ListBatchLoadTasksInput",
   37     37   
    ),
   38     38   
    ::aws_smithy_schema::ShapeType::String,
   39         -
    "next_token",
          39  +
    "NextToken",
   40     40   
    0,
   41     41   
);
   42     42   
static LISTBATCHLOADTASKSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   43     43   
    ::aws_smithy_schema::ShapeId::from_static(
   44     44   
        "com.amazonaws.timestreamwrite.synthetic#ListBatchLoadTasksInput$MaxResults",
   45     45   
        "com.amazonaws.timestreamwrite.synthetic",
   46     46   
        "ListBatchLoadTasksInput",
   47     47   
    ),
   48     48   
    ::aws_smithy_schema::ShapeType::Integer,
   49         -
    "max_results",
          49  +
    "MaxResults",
   50     50   
    1,
   51     51   
);
   52     52   
static LISTBATCHLOADTASKSINPUT_MEMBER_TASK_STATUS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.timestreamwrite.synthetic#ListBatchLoadTasksInput$TaskStatus",
   55     55   
        "com.amazonaws.timestreamwrite.synthetic",
   56     56   
        "ListBatchLoadTasksInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::String,
   59         -
    "task_status",
          59  +
    "TaskStatus",
   60     60   
    2,
   61     61   
);
   62     62   
static LISTBATCHLOADTASKSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   63     63   
    LISTBATCHLOADTASKSINPUT_SCHEMA_ID,
   64     64   
    ::aws_smithy_schema::ShapeType::Structure,
   65     65   
    &[
   66     66   
        &LISTBATCHLOADTASKSINPUT_MEMBER_NEXT_TOKEN,
   67     67   
        &LISTBATCHLOADTASKSINPUT_MEMBER_MAX_RESULTS,
   68     68   
        &LISTBATCHLOADTASKSINPUT_MEMBER_TASK_STATUS,
   69     69   
    ],
   70     70   
);
   71     71   
impl ListBatchLoadTasksInput {
   72     72   
    /// The schema for this shape.
   73     73   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTBATCHLOADTASKSINPUT_SCHEMA;
   74     74   
}
   75     75   
impl ::aws_smithy_schema::serde::SerializableStruct for ListBatchLoadTasksInput {
   76     76   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   77     77   
    fn serialize_members(
   78     78   
        &self,
   79     79   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   80     80   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   81     81   
        if let Some(ref val) = self.next_token {
   82     82   
            ser.write_string(&LISTBATCHLOADTASKSINPUT_MEMBER_NEXT_TOKEN, val)?;
   83     83   
        }
   84     84   
        if let Some(ref val) = self.max_results {
   85     85   
            ser.write_integer(&LISTBATCHLOADTASKSINPUT_MEMBER_MAX_RESULTS, *val)?;
   86     86   
        }
   87     87   
        if let Some(ref val) = self.task_status {
   88     88   
            ser.write_string(&LISTBATCHLOADTASKSINPUT_MEMBER_TASK_STATUS, val.as_str())?;
   89     89   
        }
   90     90   
        Ok(())
   91     91   
    }
   92     92   
}
   93     93   
impl ListBatchLoadTasksInput {
   94     94   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   95         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   96         -
        deserializer: &mut D,
          95  +
    pub fn deserialize(
          96  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   97     97   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   98     98   
        #[allow(unused_variables, unused_mut)]
   99     99   
        let mut builder = Self::builder();
  100    100   
        #[allow(
  101    101   
            unused_variables,
  102    102   
            unreachable_code,
  103    103   
            clippy::single_match,
  104    104   
            clippy::match_single_binding,
  105    105   
            clippy::diverging_sub_expression
  106    106   
        )]
  107         -
        deserializer.read_struct(&LISTBATCHLOADTASKSINPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&LISTBATCHLOADTASKSINPUT_SCHEMA, &mut |member, deser| {
  108    108   
            match member.member_index() {
  109    109   
                Some(0) => {
  110    110   
                    builder.next_token = Some(deser.read_string(member)?);
  111    111   
                }
  112    112   
                Some(1) => {
  113    113   
                    builder.max_results = Some(deser.read_integer(member)?);
  114    114   
                }
  115    115   
                Some(2) => {
  116    116   
                    builder.task_status = Some(crate::types::BatchLoadStatus::from(deser.read_string(member)?.as_str()));
  117    117   
                }
  118    118   
                _ => {}
  119    119   
            }
  120    120   
            Ok(())
  121    121   
        })?;
  122    122   
        builder
  123    123   
            .build()
  124    124   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  125    125   
    }
  126    126   
}
         127  +
impl ListBatchLoadTasksInput {
         128  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         129  +
    pub fn deserialize_with_response(
         130  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         131  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         132  +
        _status: u16,
         133  +
        _body: &[u8],
         134  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         135  +
        Self::deserialize(deserializer)
         136  +
    }
         137  +
}
  127    138   
impl ListBatchLoadTasksInput {
  128    139   
    /// Creates a new builder-style object to manufacture [`ListBatchLoadTasksInput`](crate::operation::list_batch_load_tasks::ListBatchLoadTasksInput).
  129    140   
    pub fn builder() -> crate::operation::list_batch_load_tasks::builders::ListBatchLoadTasksInputBuilder {
  130    141   
        crate::operation::list_batch_load_tasks::builders::ListBatchLoadTasksInputBuilder::default()
  131    142   
    }
  132    143   
}
  133    144   
  134    145   
/// A builder for [`ListBatchLoadTasksInput`](crate::operation::list_batch_load_tasks::ListBatchLoadTasksInput).
  135    146   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  136    147   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/list_batch_load_tasks/_list_batch_load_tasks_output.rs

@@ -6,6 +143,195 @@
   26     26   
    "com.amazonaws.timestreamwrite.synthetic",
   27     27   
    "ListBatchLoadTasksOutput",
   28     28   
);
   29     29   
static LISTBATCHLOADTASKSOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   30     30   
    ::aws_smithy_schema::ShapeId::from_static(
   31     31   
        "com.amazonaws.timestreamwrite.synthetic#ListBatchLoadTasksOutput$NextToken",
   32     32   
        "com.amazonaws.timestreamwrite.synthetic",
   33     33   
        "ListBatchLoadTasksOutput",
   34     34   
    ),
   35     35   
    ::aws_smithy_schema::ShapeType::String,
   36         -
    "next_token",
          36  +
    "NextToken",
   37     37   
    0,
   38     38   
);
   39     39   
static LISTBATCHLOADTASKSOUTPUT_MEMBER_BATCH_LOAD_TASKS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   40     40   
    ::aws_smithy_schema::ShapeId::from_static(
   41     41   
        "com.amazonaws.timestreamwrite.synthetic#ListBatchLoadTasksOutput$BatchLoadTasks",
   42     42   
        "com.amazonaws.timestreamwrite.synthetic",
   43     43   
        "ListBatchLoadTasksOutput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::List,
   46         -
    "batch_load_tasks",
          46  +
    "BatchLoadTasks",
   47     47   
    1,
   48     48   
);
          49  +
static LISTBATCHLOADTASKSOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          50  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          51  +
    ::aws_smithy_schema::ShapeType::String,
          52  +
    "request_id",
          53  +
    2,
          54  +
)
          55  +
.with_http_header("x-amzn-requestid");
   49     56   
static LISTBATCHLOADTASKSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   50     57   
    LISTBATCHLOADTASKSOUTPUT_SCHEMA_ID,
   51     58   
    ::aws_smithy_schema::ShapeType::Structure,
   52     59   
    &[
   53     60   
        &LISTBATCHLOADTASKSOUTPUT_MEMBER_NEXT_TOKEN,
   54     61   
        &LISTBATCHLOADTASKSOUTPUT_MEMBER_BATCH_LOAD_TASKS,
          62  +
        &LISTBATCHLOADTASKSOUTPUT_MEMBER__REQUEST_ID,
   55     63   
    ],
   56     64   
);
   57     65   
impl ListBatchLoadTasksOutput {
   58     66   
    /// The schema for this shape.
   59     67   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTBATCHLOADTASKSOUTPUT_SCHEMA;
   60     68   
}
   61     69   
impl ::aws_smithy_schema::serde::SerializableStruct for ListBatchLoadTasksOutput {
   62     70   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   63     71   
    fn serialize_members(
   64     72   
        &self,
   65     73   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   66     74   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   67     75   
        if let Some(ref val) = self.next_token {
   68     76   
            ser.write_string(&LISTBATCHLOADTASKSOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   69     77   
        }
   70     78   
        if let Some(ref val) = self.batch_load_tasks {
   71     79   
            ser.write_list(
   72     80   
                &LISTBATCHLOADTASKSOUTPUT_MEMBER_BATCH_LOAD_TASKS,
   73     81   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   74     82   
                    for item in val {
   75     83   
                        ser.write_struct(crate::types::BatchLoadTask::SCHEMA, item)?;
   76     84   
                    }
   77     85   
                    Ok(())
   78     86   
                },
   79     87   
            )?;
   80     88   
        }
   81     89   
        Ok(())
   82     90   
    }
   83     91   
}
   84     92   
impl ListBatchLoadTasksOutput {
   85     93   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   86         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   87         -
        deserializer: &mut D,
          94  +
    pub fn deserialize(
          95  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   88     96   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   89     97   
        #[allow(unused_variables, unused_mut)]
   90     98   
        let mut builder = Self::builder();
   91     99   
        #[allow(
   92    100   
            unused_variables,
   93    101   
            unreachable_code,
   94    102   
            clippy::single_match,
   95    103   
            clippy::match_single_binding,
   96    104   
            clippy::diverging_sub_expression
   97    105   
        )]
   98         -
        deserializer.read_struct(&LISTBATCHLOADTASKSOUTPUT_SCHEMA, (), |_, member, deser| {
         106  +
        deserializer.read_struct(&LISTBATCHLOADTASKSOUTPUT_SCHEMA, &mut |member, deser| {
         107  +
            match member.member_index() {
         108  +
                Some(0) => {
         109  +
                    builder.next_token = Some(deser.read_string(member)?);
         110  +
                }
         111  +
                Some(1) => {
         112  +
                    builder.batch_load_tasks = Some({
         113  +
                        let mut container = Vec::new();
         114  +
                        deser.read_list(member, &mut |deser| {
         115  +
                            container.push(crate::types::BatchLoadTask::deserialize(deser)?);
         116  +
                            Ok(())
         117  +
                        })?;
         118  +
                        container
         119  +
                    });
         120  +
                }
         121  +
                Some(2) => {
         122  +
                    builder._request_id = Some(deser.read_string(member)?);
         123  +
                }
         124  +
                _ => {}
         125  +
            }
         126  +
            Ok(())
         127  +
        })?;
         128  +
        Ok(builder.build())
         129  +
    }
         130  +
}
         131  +
impl ListBatchLoadTasksOutput {
         132  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         133  +
    /// Header-bound members are read directly from headers, avoiding runtime
         134  +
    /// member iteration overhead. Body members are read via the deserializer.
         135  +
    pub fn deserialize_with_response(
         136  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         137  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         138  +
        _status: u16,
         139  +
        _body: &[u8],
         140  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         141  +
        #[allow(unused_variables, unused_mut)]
         142  +
        let mut builder = Self::builder();
         143  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         144  +
            builder._request_id = Some(val.to_string());
         145  +
        }
         146  +
        #[allow(
         147  +
            unused_variables,
         148  +
            unreachable_code,
         149  +
            clippy::single_match,
         150  +
            clippy::match_single_binding,
         151  +
            clippy::diverging_sub_expression
         152  +
        )]
         153  +
        deserializer.read_struct(&LISTBATCHLOADTASKSOUTPUT_SCHEMA, &mut |member, deser| {
   99    154   
            match member.member_index() {
  100    155   
                Some(0) => {
  101    156   
                    builder.next_token = Some(deser.read_string(member)?);
  102    157   
                }
  103    158   
                Some(1) => {
  104    159   
                    builder.batch_load_tasks = Some({
  105         -
                        let container = if let Some(cap) = deser.container_size() {
  106         -
                            Vec::with_capacity(cap)
  107         -
                        } else {
  108         -
                            Vec::new()
  109         -
                        };
  110         -
                        deser.read_list(member, container, |mut list, deser| {
  111         -
                            list.push(crate::types::BatchLoadTask::deserialize(deser)?);
  112         -
                            Ok(list)
  113         -
                        })?
         160  +
                        let mut container = Vec::new();
         161  +
                        deser.read_list(member, &mut |deser| {
         162  +
                            container.push(crate::types::BatchLoadTask::deserialize(deser)?);
         163  +
                            Ok(())
         164  +
                        })?;
         165  +
                        container
  114    166   
                    });
  115    167   
                }
  116    168   
                _ => {}
  117    169   
            }
  118    170   
            Ok(())
  119    171   
        })?;
  120    172   
        Ok(builder.build())
  121    173   
    }
  122    174   
}
  123    175   
impl ::aws_types::request_id::RequestId for ListBatchLoadTasksOutput {

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/list_databases.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 `ListDatabases`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListDatabases;
    6      6   
impl ListDatabases {
    7      7   
    /// Creates a new `ListDatabases`
    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_databases::ListDatabasesInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_databases::ListDatabasesOutput::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_databases::ListDatabasesInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_databases::ListDatabasesOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_databases::ListDatabasesError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,366 @@
  138    142   
                crate::operation::list_databases::ListDatabasesError,
  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 ListDatabasesResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListDatabasesResponseDeserializer {
  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_list_databases::de_list_databases_http_error(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::list_databases::ListDatabasesError::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::list_databases::ListDatabasesError::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::list_databases::ListDatabasesError::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::list_databases::ListDatabasesError::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  +
                "ThrottlingException" => crate::operation::list_databases::ListDatabasesError::ThrottlingException({
         250  +
                    let mut tmp = match protocol
         251  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         252  +
                        .and_then(|mut deser| {
         253  +
                            crate::types::error::ThrottlingException::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  +
                    tmp
         269  +
                }),
         270  +
                "ValidationException" => crate::operation::list_databases::ListDatabasesError::ValidationException({
         271  +
                    let mut tmp = match protocol
         272  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         273  +
                        .and_then(|mut deser| {
         274  +
                            crate::types::error::ValidationException::deserialize_with_response(
         275  +
                                &mut *deser,
         276  +
                                response.headers(),
         277  +
                                response.status().into(),
         278  +
                                body,
         279  +
                            )
         280  +
                        }) {
         281  +
                        ::std::result::Result::Ok(val) => val,
         282  +
                        ::std::result::Result::Err(e) => {
         283  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         284  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         285  +
                            ))
         286  +
                        }
         287  +
                    };
         288  +
                    tmp.meta = generic;
         289  +
                    tmp
         290  +
                }),
         291  +
                _ => crate::operation::list_databases::ListDatabasesError::generic(generic),
         292  +
            };
         293  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         294  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         295  +
            ))
  160    296   
        } else {
  161         -
            crate::protocol_serde::shape_list_databases::de_list_databases_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         297  +
            let protocol = _cfg
         298  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         299  +
                .expect("a SharedClientProtocol is required");
         300  +
            let mut deser = protocol.deserialize_response(response, ListDatabases::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         301  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         302  +
            })?;
         303  +
            let body = response.body().bytes().expect("body loaded");
         304  +
            let output = crate::operation::list_databases::ListDatabasesOutput::deserialize_with_response(
         305  +
                &mut *deser,
         306  +
                response.headers(),
         307  +
                response.status().into(),
         308  +
                body,
         309  +
            )
         310  +
            .map_err(|e| {
         311  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         312  +
            })?;
         313  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         314  +
        }
  164    315   
    }
  165    316   
}
  166    317   
#[derive(Debug)]
  167    318   
struct ListDatabasesRequestSerializer;
  168    319   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListDatabasesRequestSerializer {
  169    320   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    321   
    fn serialize_input(
  171    322   
        &self,
  172    323   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    324   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    325   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    326   
        let input = input
  176    327   
            .downcast::<crate::operation::list_databases::ListDatabasesInput>()
  177    328   
            .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::list_databases::ListDatabasesInput,
  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::list_databases::ListDatabasesInput,
  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.ListDatabases",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_list_databases::ser_list_databases_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())
         329  +
        let protocol = _cfg
         330  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         331  +
            .expect("a SharedClientProtocol is required");
         332  +
        let mut request = protocol
         333  +
            .serialize_request(&input, ListDatabases::INPUT_SCHEMA, "", _cfg)
         334  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         335  +
         336  +
        return ::std::result::Result::Ok(request);
  216    337   
    }
  217    338   
}
  218    339   
#[derive(Debug)]
  219    340   
struct ListDatabasesEndpointParamsInterceptor;
  220    341   
  221    342   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListDatabasesEndpointParamsInterceptor {
  222    343   
    fn name(&self) -> &'static str {
  223    344   
        "ListDatabasesEndpointParamsInterceptor"
  224    345   
    }
  225    346   

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/list_databases/_list_databases_input.rs

@@ -3,3 +130,141 @@
   23     23   
    "com.amazonaws.timestreamwrite.synthetic",
   24     24   
    "ListDatabasesInput",
   25     25   
);
   26     26   
static LISTDATABASESINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   27     27   
    ::aws_smithy_schema::ShapeId::from_static(
   28     28   
        "com.amazonaws.timestreamwrite.synthetic#ListDatabasesInput$NextToken",
   29     29   
        "com.amazonaws.timestreamwrite.synthetic",
   30     30   
        "ListDatabasesInput",
   31     31   
    ),
   32     32   
    ::aws_smithy_schema::ShapeType::String,
   33         -
    "next_token",
          33  +
    "NextToken",
   34     34   
    0,
   35     35   
);
   36     36   
static LISTDATABASESINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   37     37   
    ::aws_smithy_schema::ShapeId::from_static(
   38     38   
        "com.amazonaws.timestreamwrite.synthetic#ListDatabasesInput$MaxResults",
   39     39   
        "com.amazonaws.timestreamwrite.synthetic",
   40     40   
        "ListDatabasesInput",
   41     41   
    ),
   42     42   
    ::aws_smithy_schema::ShapeType::Integer,
   43         -
    "max_results",
          43  +
    "MaxResults",
   44     44   
    1,
   45     45   
);
   46     46   
static LISTDATABASESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   47     47   
    LISTDATABASESINPUT_SCHEMA_ID,
   48     48   
    ::aws_smithy_schema::ShapeType::Structure,
   49     49   
    &[&LISTDATABASESINPUT_MEMBER_NEXT_TOKEN, &LISTDATABASESINPUT_MEMBER_MAX_RESULTS],
   50     50   
);
   51     51   
impl ListDatabasesInput {
   52     52   
    /// The schema for this shape.
   53     53   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTDATABASESINPUT_SCHEMA;
   54     54   
}
   55     55   
impl ::aws_smithy_schema::serde::SerializableStruct for ListDatabasesInput {
   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.next_token {
   62     62   
            ser.write_string(&LISTDATABASESINPUT_MEMBER_NEXT_TOKEN, val)?;
   63     63   
        }
   64     64   
        if let Some(ref val) = self.max_results {
   65     65   
            ser.write_integer(&LISTDATABASESINPUT_MEMBER_MAX_RESULTS, *val)?;
   66     66   
        }
   67     67   
        Ok(())
   68     68   
    }
   69     69   
}
   70     70   
impl ListDatabasesInput {
   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(&LISTDATABASESINPUT_SCHEMA, (), |_, member, deser| {
          84  +
        deserializer.read_struct(&LISTDATABASESINPUT_SCHEMA, &mut |member, deser| {
   85     85   
            match member.member_index() {
   86     86   
                Some(0) => {
   87     87   
                    builder.next_token = Some(deser.read_string(member)?);
   88     88   
                }
   89     89   
                Some(1) => {
   90     90   
                    builder.max_results = Some(deser.read_integer(member)?);
   91     91   
                }
   92     92   
                _ => {}
   93     93   
            }
   94     94   
            Ok(())
   95     95   
        })?;
   96     96   
        builder
   97     97   
            .build()
   98     98   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   99     99   
    }
  100    100   
}
         101  +
impl ListDatabasesInput {
         102  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         103  +
    pub fn deserialize_with_response(
         104  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         105  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         106  +
        _status: u16,
         107  +
        _body: &[u8],
         108  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         109  +
        Self::deserialize(deserializer)
         110  +
    }
         111  +
}
  101    112   
impl ListDatabasesInput {
  102    113   
    /// Creates a new builder-style object to manufacture [`ListDatabasesInput`](crate::operation::list_databases::ListDatabasesInput).
  103    114   
    pub fn builder() -> crate::operation::list_databases::builders::ListDatabasesInputBuilder {
  104    115   
        crate::operation::list_databases::builders::ListDatabasesInputBuilder::default()
  105    116   
    }
  106    117   
}
  107    118   
  108    119   
/// A builder for [`ListDatabasesInput`](crate::operation::list_databases::ListDatabasesInput).
  109    120   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  110    121   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/list_databases/_list_databases_output.rs

@@ -6,6 +137,192 @@
   26     26   
    "com.amazonaws.timestreamwrite.synthetic",
   27     27   
    "ListDatabasesOutput",
   28     28   
);
   29     29   
static LISTDATABASESOUTPUT_MEMBER_DATABASES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   30     30   
    ::aws_smithy_schema::ShapeId::from_static(
   31     31   
        "com.amazonaws.timestreamwrite.synthetic#ListDatabasesOutput$Databases",
   32     32   
        "com.amazonaws.timestreamwrite.synthetic",
   33     33   
        "ListDatabasesOutput",
   34     34   
    ),
   35     35   
    ::aws_smithy_schema::ShapeType::List,
   36         -
    "databases",
          36  +
    "Databases",
   37     37   
    0,
   38     38   
);
   39     39   
static LISTDATABASESOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   40     40   
    ::aws_smithy_schema::ShapeId::from_static(
   41     41   
        "com.amazonaws.timestreamwrite.synthetic#ListDatabasesOutput$NextToken",
   42     42   
        "com.amazonaws.timestreamwrite.synthetic",
   43     43   
        "ListDatabasesOutput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::String,
   46         -
    "next_token",
          46  +
    "NextToken",
   47     47   
    1,
   48     48   
);
          49  +
static LISTDATABASESOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          50  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          51  +
    ::aws_smithy_schema::ShapeType::String,
          52  +
    "request_id",
          53  +
    2,
          54  +
)
          55  +
.with_http_header("x-amzn-requestid");
   49     56   
static LISTDATABASESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   50     57   
    LISTDATABASESOUTPUT_SCHEMA_ID,
   51     58   
    ::aws_smithy_schema::ShapeType::Structure,
   52         -
    &[&LISTDATABASESOUTPUT_MEMBER_DATABASES, &LISTDATABASESOUTPUT_MEMBER_NEXT_TOKEN],
          59  +
    &[
          60  +
        &LISTDATABASESOUTPUT_MEMBER_DATABASES,
          61  +
        &LISTDATABASESOUTPUT_MEMBER_NEXT_TOKEN,
          62  +
        &LISTDATABASESOUTPUT_MEMBER__REQUEST_ID,
          63  +
    ],
   53     64   
);
   54     65   
impl ListDatabasesOutput {
   55     66   
    /// The schema for this shape.
   56     67   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTDATABASESOUTPUT_SCHEMA;
   57     68   
}
   58     69   
impl ::aws_smithy_schema::serde::SerializableStruct for ListDatabasesOutput {
   59     70   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   60     71   
    fn serialize_members(
   61     72   
        &self,
   62     73   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   63     74   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   64     75   
        if let Some(ref val) = self.databases {
   65     76   
            ser.write_list(
   66     77   
                &LISTDATABASESOUTPUT_MEMBER_DATABASES,
   67     78   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   68     79   
                    for item in val {
   69     80   
                        ser.write_struct(crate::types::Database::SCHEMA, item)?;
   70     81   
                    }
   71     82   
                    Ok(())
   72     83   
                },
   73     84   
            )?;
   74     85   
        }
   75     86   
        if let Some(ref val) = self.next_token {
   76     87   
            ser.write_string(&LISTDATABASESOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   77     88   
        }
   78     89   
        Ok(())
   79     90   
    }
   80     91   
}
   81     92   
impl ListDatabasesOutput {
   82     93   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   83         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   84         -
        deserializer: &mut D,
          94  +
    pub fn deserialize(
          95  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   85     96   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   86     97   
        #[allow(unused_variables, unused_mut)]
   87     98   
        let mut builder = Self::builder();
   88     99   
        #[allow(
   89    100   
            unused_variables,
   90    101   
            unreachable_code,
   91    102   
            clippy::single_match,
   92    103   
            clippy::match_single_binding,
   93    104   
            clippy::diverging_sub_expression
   94    105   
        )]
   95         -
        deserializer.read_struct(&LISTDATABASESOUTPUT_SCHEMA, (), |_, member, deser| {
         106  +
        deserializer.read_struct(&LISTDATABASESOUTPUT_SCHEMA, &mut |member, deser| {
         107  +
            match member.member_index() {
         108  +
                Some(0) => {
         109  +
                    builder.databases = Some({
         110  +
                        let mut container = Vec::new();
         111  +
                        deser.read_list(member, &mut |deser| {
         112  +
                            container.push(crate::types::Database::deserialize(deser)?);
         113  +
                            Ok(())
         114  +
                        })?;
         115  +
                        container
         116  +
                    });
         117  +
                }
         118  +
                Some(1) => {
         119  +
                    builder.next_token = Some(deser.read_string(member)?);
         120  +
                }
         121  +
                Some(2) => {
         122  +
                    builder._request_id = Some(deser.read_string(member)?);
         123  +
                }
         124  +
                _ => {}
         125  +
            }
         126  +
            Ok(())
         127  +
        })?;
         128  +
        Ok(builder.build())
         129  +
    }
         130  +
}
         131  +
impl ListDatabasesOutput {
         132  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         133  +
    /// Header-bound members are read directly from headers, avoiding runtime
         134  +
    /// member iteration overhead. Body members are read via the deserializer.
         135  +
    pub fn deserialize_with_response(
         136  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         137  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         138  +
        _status: u16,
         139  +
        _body: &[u8],
         140  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         141  +
        #[allow(unused_variables, unused_mut)]
         142  +
        let mut builder = Self::builder();
         143  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         144  +
            builder._request_id = Some(val.to_string());
         145  +
        }
         146  +
        #[allow(
         147  +
            unused_variables,
         148  +
            unreachable_code,
         149  +
            clippy::single_match,
         150  +
            clippy::match_single_binding,
         151  +
            clippy::diverging_sub_expression
         152  +
        )]
         153  +
        deserializer.read_struct(&LISTDATABASESOUTPUT_SCHEMA, &mut |member, deser| {
   96    154   
            match member.member_index() {
   97    155   
                Some(0) => {
   98    156   
                    builder.databases = Some({
   99         -
                        let container = if let Some(cap) = deser.container_size() {
  100         -
                            Vec::with_capacity(cap)
  101         -
                        } else {
  102         -
                            Vec::new()
  103         -
                        };
  104         -
                        deser.read_list(member, container, |mut list, deser| {
  105         -
                            list.push(crate::types::Database::deserialize(deser)?);
  106         -
                            Ok(list)
  107         -
                        })?
         157  +
                        let mut container = Vec::new();
         158  +
                        deser.read_list(member, &mut |deser| {
         159  +
                            container.push(crate::types::Database::deserialize(deser)?);
         160  +
                            Ok(())
         161  +
                        })?;
         162  +
                        container
  108    163   
                    });
  109    164   
                }
  110    165   
                Some(1) => {
  111    166   
                    builder.next_token = Some(deser.read_string(member)?);
  112    167   
                }
  113    168   
                _ => {}
  114    169   
            }
  115    170   
            Ok(())
  116    171   
        })?;
  117    172   
        Ok(builder.build())

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/list_tables.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 `ListTables`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListTables;
    6      6   
impl ListTables {
    7      7   
    /// Creates a new `ListTables`
    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_tables::ListTablesInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_tables::ListTablesOutput::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_tables::ListTablesInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_tables::ListTablesOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_tables::ListTablesError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +243,388 @@
  138    142   
                crate::operation::list_tables::ListTablesError,
  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 ListTablesResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListTablesResponseDeserializer {
  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_list_tables::de_list_tables_http_error(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::list_tables::ListTablesError::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::list_tables::ListTablesError::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::list_tables::ListTablesError::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::list_tables::ListTablesError::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::list_tables::ListTablesError::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::list_tables::ListTablesError::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  +
                        }
         290  +
                    };
         291  +
                    tmp.meta = generic;
         292  +
                    tmp
         293  +
                }),
         294  +
                "ValidationException" => crate::operation::list_tables::ListTablesError::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::list_tables::ListTablesError::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  +
            ))
  160    320   
        } else {
  161         -
            crate::protocol_serde::shape_list_tables::de_list_tables_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         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, ListTables::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::list_tables::ListTablesOutput::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 ListTablesRequestSerializer;
  168    343   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListTablesRequestSerializer {
  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.downcast::<crate::operation::list_tables::ListTablesInput>().expect("correct type");
  176         -
        let _header_serialization_settings = _cfg
  177         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  178         -
            .cloned()
  179         -
            .unwrap_or_default();
  180         -
        let mut request_builder = {
  181         -
            #[allow(clippy::uninlined_format_args)]
  182         -
            fn uri_base(
  183         -
                _input: &crate::operation::list_tables::ListTablesInput,
  184         -
                output: &mut ::std::string::String,
  185         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  186         -
                use ::std::fmt::Write as _;
  187         -
                ::std::write!(output, "/").expect("formatting should succeed");
  188         -
                ::std::result::Result::Ok(())
  189         -
            }
  190         -
            #[allow(clippy::unnecessary_wraps)]
  191         -
            fn update_http_builder(
  192         -
                input: &crate::operation::list_tables::ListTablesInput,
  193         -
                builder: ::http_1x::request::Builder,
  194         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  195         -
                let mut uri = ::std::string::String::new();
  196         -
                uri_base(input, &mut uri)?;
  197         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  198         -
            }
  199         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  200         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  201         -
            builder = _header_serialization_settings.set_default_header(
  202         -
                builder,
  203         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  204         -
                "Timestream_20181101.ListTables",
  205         -
            );
  206         -
            builder
  207         -
        };
  208         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_list_tables::ser_list_tables_input(&input)?);
  209         -
        if let Some(content_length) = body.content_length() {
  210         -
            let content_length = content_length.to_string();
  211         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  212         -
        }
  213         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         351  +
        let protocol = _cfg
         352  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         353  +
            .expect("a SharedClientProtocol is required");
         354  +
        let mut request = protocol
         355  +
            .serialize_request(&input, ListTables::INPUT_SCHEMA, "", _cfg)
         356  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         357  +
         358  +
        return ::std::result::Result::Ok(request);
  214    359   
    }
  215    360   
}
  216    361   
#[derive(Debug)]
  217    362   
struct ListTablesEndpointParamsInterceptor;
  218    363   
  219    364   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListTablesEndpointParamsInterceptor {
  220    365   
    fn name(&self) -> &'static str {
  221    366   
        "ListTablesEndpointParamsInterceptor"
  222    367   
    }
  223    368   

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/list_tables/_list_tables_input.rs

@@ -9,9 +156,167 @@
   29     29   
    "com.amazonaws.timestreamwrite.synthetic",
   30     30   
    "ListTablesInput",
   31     31   
);
   32     32   
static LISTTABLESINPUT_MEMBER_DATABASE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   33     33   
    ::aws_smithy_schema::ShapeId::from_static(
   34     34   
        "com.amazonaws.timestreamwrite.synthetic#ListTablesInput$DatabaseName",
   35     35   
        "com.amazonaws.timestreamwrite.synthetic",
   36     36   
        "ListTablesInput",
   37     37   
    ),
   38     38   
    ::aws_smithy_schema::ShapeType::String,
   39         -
    "database_name",
          39  +
    "DatabaseName",
   40     40   
    0,
   41     41   
);
   42     42   
static LISTTABLESINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   43     43   
    ::aws_smithy_schema::ShapeId::from_static(
   44     44   
        "com.amazonaws.timestreamwrite.synthetic#ListTablesInput$NextToken",
   45     45   
        "com.amazonaws.timestreamwrite.synthetic",
   46     46   
        "ListTablesInput",
   47     47   
    ),
   48     48   
    ::aws_smithy_schema::ShapeType::String,
   49         -
    "next_token",
          49  +
    "NextToken",
   50     50   
    1,
   51     51   
);
   52     52   
static LISTTABLESINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.timestreamwrite.synthetic#ListTablesInput$MaxResults",
   55     55   
        "com.amazonaws.timestreamwrite.synthetic",
   56     56   
        "ListTablesInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::Integer,
   59         -
    "max_results",
          59  +
    "MaxResults",
   60     60   
    2,
   61     61   
);
   62     62   
static LISTTABLESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   63     63   
    LISTTABLESINPUT_SCHEMA_ID,
   64     64   
    ::aws_smithy_schema::ShapeType::Structure,
   65     65   
    &[
   66     66   
        &LISTTABLESINPUT_MEMBER_DATABASE_NAME,
   67     67   
        &LISTTABLESINPUT_MEMBER_NEXT_TOKEN,
   68     68   
        &LISTTABLESINPUT_MEMBER_MAX_RESULTS,
   69     69   
    ],
   70     70   
);
   71     71   
impl ListTablesInput {
   72     72   
    /// The schema for this shape.
   73     73   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTTABLESINPUT_SCHEMA;
   74     74   
}
   75     75   
impl ::aws_smithy_schema::serde::SerializableStruct for ListTablesInput {
   76     76   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   77     77   
    fn serialize_members(
   78     78   
        &self,
   79     79   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   80     80   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   81     81   
        if let Some(ref val) = self.database_name {
   82     82   
            ser.write_string(&LISTTABLESINPUT_MEMBER_DATABASE_NAME, val)?;
   83     83   
        }
   84     84   
        if let Some(ref val) = self.next_token {
   85     85   
            ser.write_string(&LISTTABLESINPUT_MEMBER_NEXT_TOKEN, val)?;
   86     86   
        }
   87     87   
        if let Some(ref val) = self.max_results {
   88     88   
            ser.write_integer(&LISTTABLESINPUT_MEMBER_MAX_RESULTS, *val)?;
   89     89   
        }
   90     90   
        Ok(())
   91     91   
    }
   92     92   
}
   93     93   
impl ListTablesInput {
   94     94   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   95         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   96         -
        deserializer: &mut D,
          95  +
    pub fn deserialize(
          96  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   97     97   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   98     98   
        #[allow(unused_variables, unused_mut)]
   99     99   
        let mut builder = Self::builder();
  100    100   
        #[allow(
  101    101   
            unused_variables,
  102    102   
            unreachable_code,
  103    103   
            clippy::single_match,
  104    104   
            clippy::match_single_binding,
  105    105   
            clippy::diverging_sub_expression
  106    106   
        )]
  107         -
        deserializer.read_struct(&LISTTABLESINPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&LISTTABLESINPUT_SCHEMA, &mut |member, deser| {
  108    108   
            match member.member_index() {
  109    109   
                Some(0) => {
  110    110   
                    builder.database_name = Some(deser.read_string(member)?);
  111    111   
                }
  112    112   
                Some(1) => {
  113    113   
                    builder.next_token = Some(deser.read_string(member)?);
  114    114   
                }
  115    115   
                Some(2) => {
  116    116   
                    builder.max_results = Some(deser.read_integer(member)?);
  117    117   
                }
  118    118   
                _ => {}
  119    119   
            }
  120    120   
            Ok(())
  121    121   
        })?;
  122    122   
        builder
  123    123   
            .build()
  124    124   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  125    125   
    }
  126    126   
}
         127  +
impl ListTablesInput {
         128  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         129  +
    pub fn deserialize_with_response(
         130  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         131  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         132  +
        _status: u16,
         133  +
        _body: &[u8],
         134  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         135  +
        Self::deserialize(deserializer)
         136  +
    }
         137  +
}
  127    138   
impl ListTablesInput {
  128    139   
    /// Creates a new builder-style object to manufacture [`ListTablesInput`](crate::operation::list_tables::ListTablesInput).
  129    140   
    pub fn builder() -> crate::operation::list_tables::builders::ListTablesInputBuilder {
  130    141   
        crate::operation::list_tables::builders::ListTablesInputBuilder::default()
  131    142   
    }
  132    143   
}
  133    144   
  134    145   
/// A builder for [`ListTablesInput`](crate::operation::list_tables::ListTablesInput).
  135    146   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  136    147   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/list_tables/_list_tables_output.rs

@@ -6,6 +137,192 @@
   26     26   
    "com.amazonaws.timestreamwrite.synthetic",
   27     27   
    "ListTablesOutput",
   28     28   
);
   29     29   
static LISTTABLESOUTPUT_MEMBER_TABLES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   30     30   
    ::aws_smithy_schema::ShapeId::from_static(
   31     31   
        "com.amazonaws.timestreamwrite.synthetic#ListTablesOutput$Tables",
   32     32   
        "com.amazonaws.timestreamwrite.synthetic",
   33     33   
        "ListTablesOutput",
   34     34   
    ),
   35     35   
    ::aws_smithy_schema::ShapeType::List,
   36         -
    "tables",
          36  +
    "Tables",
   37     37   
    0,
   38     38   
);
   39     39   
static LISTTABLESOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   40     40   
    ::aws_smithy_schema::ShapeId::from_static(
   41     41   
        "com.amazonaws.timestreamwrite.synthetic#ListTablesOutput$NextToken",
   42     42   
        "com.amazonaws.timestreamwrite.synthetic",
   43     43   
        "ListTablesOutput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::String,
   46         -
    "next_token",
          46  +
    "NextToken",
   47     47   
    1,
   48     48   
);
          49  +
static LISTTABLESOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          50  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          51  +
    ::aws_smithy_schema::ShapeType::String,
          52  +
    "request_id",
          53  +
    2,
          54  +
)
          55  +
.with_http_header("x-amzn-requestid");
   49     56   
static LISTTABLESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   50     57   
    LISTTABLESOUTPUT_SCHEMA_ID,
   51     58   
    ::aws_smithy_schema::ShapeType::Structure,
   52         -
    &[&LISTTABLESOUTPUT_MEMBER_TABLES, &LISTTABLESOUTPUT_MEMBER_NEXT_TOKEN],
          59  +
    &[
          60  +
        &LISTTABLESOUTPUT_MEMBER_TABLES,
          61  +
        &LISTTABLESOUTPUT_MEMBER_NEXT_TOKEN,
          62  +
        &LISTTABLESOUTPUT_MEMBER__REQUEST_ID,
          63  +
    ],
   53     64   
);
   54     65   
impl ListTablesOutput {
   55     66   
    /// The schema for this shape.
   56     67   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTTABLESOUTPUT_SCHEMA;
   57     68   
}
   58     69   
impl ::aws_smithy_schema::serde::SerializableStruct for ListTablesOutput {
   59     70   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   60     71   
    fn serialize_members(
   61     72   
        &self,
   62     73   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   63     74   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   64     75   
        if let Some(ref val) = self.tables {
   65     76   
            ser.write_list(
   66     77   
                &LISTTABLESOUTPUT_MEMBER_TABLES,
   67     78   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   68     79   
                    for item in val {
   69     80   
                        ser.write_struct(crate::types::Table::SCHEMA, item)?;
   70     81   
                    }
   71     82   
                    Ok(())
   72     83   
                },
   73     84   
            )?;
   74     85   
        }
   75     86   
        if let Some(ref val) = self.next_token {
   76     87   
            ser.write_string(&LISTTABLESOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   77     88   
        }
   78     89   
        Ok(())
   79     90   
    }
   80     91   
}
   81     92   
impl ListTablesOutput {
   82     93   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   83         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   84         -
        deserializer: &mut D,
          94  +
    pub fn deserialize(
          95  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   85     96   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   86     97   
        #[allow(unused_variables, unused_mut)]
   87     98   
        let mut builder = Self::builder();
   88     99   
        #[allow(
   89    100   
            unused_variables,
   90    101   
            unreachable_code,
   91    102   
            clippy::single_match,
   92    103   
            clippy::match_single_binding,
   93    104   
            clippy::diverging_sub_expression
   94    105   
        )]
   95         -
        deserializer.read_struct(&LISTTABLESOUTPUT_SCHEMA, (), |_, member, deser| {
         106  +
        deserializer.read_struct(&LISTTABLESOUTPUT_SCHEMA, &mut |member, deser| {
         107  +
            match member.member_index() {
         108  +
                Some(0) => {
         109  +
                    builder.tables = Some({
         110  +
                        let mut container = Vec::new();
         111  +
                        deser.read_list(member, &mut |deser| {
         112  +
                            container.push(crate::types::Table::deserialize(deser)?);
         113  +
                            Ok(())
         114  +
                        })?;
         115  +
                        container
         116  +
                    });
         117  +
                }
         118  +
                Some(1) => {
         119  +
                    builder.next_token = Some(deser.read_string(member)?);
         120  +
                }
         121  +
                Some(2) => {
         122  +
                    builder._request_id = Some(deser.read_string(member)?);
         123  +
                }
         124  +
                _ => {}
         125  +
            }
         126  +
            Ok(())
         127  +
        })?;
         128  +
        Ok(builder.build())
         129  +
    }
         130  +
}
         131  +
impl ListTablesOutput {
         132  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         133  +
    /// Header-bound members are read directly from headers, avoiding runtime
         134  +
    /// member iteration overhead. Body members are read via the deserializer.
         135  +
    pub fn deserialize_with_response(
         136  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         137  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         138  +
        _status: u16,
         139  +
        _body: &[u8],
         140  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         141  +
        #[allow(unused_variables, unused_mut)]
         142  +
        let mut builder = Self::builder();
         143  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         144  +
            builder._request_id = Some(val.to_string());
         145  +
        }
         146  +
        #[allow(
         147  +
            unused_variables,
         148  +
            unreachable_code,
         149  +
            clippy::single_match,
         150  +
            clippy::match_single_binding,
         151  +
            clippy::diverging_sub_expression
         152  +
        )]
         153  +
        deserializer.read_struct(&LISTTABLESOUTPUT_SCHEMA, &mut |member, deser| {
   96    154   
            match member.member_index() {
   97    155   
                Some(0) => {
   98    156   
                    builder.tables = Some({
   99         -
                        let container = if let Some(cap) = deser.container_size() {
  100         -
                            Vec::with_capacity(cap)
  101         -
                        } else {
  102         -
                            Vec::new()
  103         -
                        };
  104         -
                        deser.read_list(member, container, |mut list, deser| {
  105         -
                            list.push(crate::types::Table::deserialize(deser)?);
  106         -
                            Ok(list)
  107         -
                        })?
         157  +
                        let mut container = Vec::new();
         158  +
                        deser.read_list(member, &mut |deser| {
         159  +
                            container.push(crate::types::Table::deserialize(deser)?);
         160  +
                            Ok(())
         161  +
                        })?;
         162  +
                        container
  108    163   
                    });
  109    164   
                }
  110    165   
                Some(1) => {
  111    166   
                    builder.next_token = Some(deser.read_string(member)?);
  112    167   
                }
  113    168   
                _ => {}
  114    169   
            }
  115    170   
            Ok(())
  116    171   
        })?;
  117    172   
        Ok(builder.build())

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/list_tags_for_resource.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 `ListTagsForResource`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListTagsForResource;
    6      6   
impl ListTagsForResource {
    7      7   
    /// Creates a new `ListTagsForResource`
    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_tags_for_resource::ListTagsForResourceInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_tags_for_resource::ListTagsForResourceOutput::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_tags_for_resource::ListTagsForResourceInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_tags_for_resource::ListTagsForResourceOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_tags_for_resource::ListTagsForResourceError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -124,128 +253,358 @@
  144    148   
                crate::operation::list_tags_for_resource::ListTagsForResourceError,
  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 ListTagsForResourceResponseDeserializer;
  153    157   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListTagsForResourceResponseDeserializer {
  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_tags_for_resource::de_list_tags_for_resource_http_error(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_tags_for_resource::ListTagsForResourceError::unhandled(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  +
                "InvalidEndpointException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::InvalidEndpointException({
         192  +
                    let mut tmp = match protocol
         193  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         194  +
                        .and_then(|mut deser| {
         195  +
                            crate::types::error::InvalidEndpointException::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  +
                    if tmp.message.is_none() {
         211  +
                        tmp.message = _error_message;
         212  +
                    }
         213  +
                    tmp
         214  +
                }),
         215  +
                "ResourceNotFoundException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException({
         216  +
                    let mut tmp = match protocol
         217  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         218  +
                        .and_then(|mut deser| {
         219  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         220  +
                                &mut *deser,
         221  +
                                response.headers(),
         222  +
                                response.status().into(),
         223  +
                                body,
         224  +
                            )
         225  +
                        }) {
         226  +
                        ::std::result::Result::Ok(val) => val,
         227  +
                        ::std::result::Result::Err(e) => {
         228  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         229  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         230  +
                            ))
         231  +
                        }
         232  +
                    };
         233  +
                    tmp.meta = generic;
         234  +
                    if tmp.message.is_none() {
         235  +
                        tmp.message = _error_message;
         236  +
                    }
         237  +
                    tmp
         238  +
                }),
         239  +
                "ThrottlingException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException({
         240  +
                    let mut tmp = match protocol
         241  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         242  +
                        .and_then(|mut deser| {
         243  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         244  +
                                &mut *deser,
         245  +
                                response.headers(),
         246  +
                                response.status().into(),
         247  +
                                body,
         248  +
                            )
         249  +
                        }) {
         250  +
                        ::std::result::Result::Ok(val) => val,
         251  +
                        ::std::result::Result::Err(e) => {
         252  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         253  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         254  +
                            ))
         255  +
                        }
         256  +
                    };
         257  +
                    tmp.meta = generic;
         258  +
                    tmp
         259  +
                }),
         260  +
                "ValidationException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException({
         261  +
                    let mut tmp = match protocol
         262  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         263  +
                        .and_then(|mut deser| {
         264  +
                            crate::types::error::ValidationException::deserialize_with_response(
         265  +
                                &mut *deser,
         266  +
                                response.headers(),
         267  +
                                response.status().into(),
         268  +
                                body,
         269  +
                            )
         270  +
                        }) {
         271  +
                        ::std::result::Result::Ok(val) => val,
         272  +
                        ::std::result::Result::Err(e) => {
         273  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         274  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         275  +
                            ))
         276  +
                        }
         277  +
                    };
         278  +
                    tmp.meta = generic;
         279  +
                    tmp
         280  +
                }),
         281  +
                _ => crate::operation::list_tags_for_resource::ListTagsForResourceError::generic(generic),
         282  +
            };
         283  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         284  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         285  +
            ))
  166    286   
        } else {
  167         -
            crate::protocol_serde::shape_list_tags_for_resource::de_list_tags_for_resource_http_response(status, headers, body)
  168         -
        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         287  +
            let protocol = _cfg
         288  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         289  +
                .expect("a SharedClientProtocol is required");
         290  +
            let mut deser = protocol
         291  +
                .deserialize_response(response, ListTagsForResource::OUTPUT_SCHEMA, _cfg)
         292  +
                .map_err(|e| {
         293  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         294  +
                })?;
         295  +
            let body = response.body().bytes().expect("body loaded");
         296  +
            let output = crate::operation::list_tags_for_resource::ListTagsForResourceOutput::deserialize_with_response(
         297  +
                &mut *deser,
         298  +
                response.headers(),
         299  +
                response.status().into(),
         300  +
                body,
         301  +
            )
         302  +
            .map_err(|e| {
         303  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         304  +
            })?;
         305  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         306  +
        }
  170    307   
    }
  171    308   
}
  172    309   
#[derive(Debug)]
  173    310   
struct ListTagsForResourceRequestSerializer;
  174    311   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListTagsForResourceRequestSerializer {
  175    312   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    313   
    fn serialize_input(
  177    314   
        &self,
  178    315   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    316   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    317   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    318   
        let input = input
  182    319   
            .downcast::<crate::operation::list_tags_for_resource::ListTagsForResourceInput>()
  183    320   
            .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_tags_for_resource::ListTagsForResourceInput,
  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_tags_for_resource::ListTagsForResourceInput,
  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.ListTagsForResource",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_list_tags_for_resource::ser_list_tags_for_resource_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())
         321  +
        let protocol = _cfg
         322  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         323  +
            .expect("a SharedClientProtocol is required");
         324  +
        let mut request = protocol
         325  +
            .serialize_request(&input, ListTagsForResource::INPUT_SCHEMA, "", _cfg)
         326  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         327  +
         328  +
        return ::std::result::Result::Ok(request);
  224    329   
    }
  225    330   
}
  226    331   
#[derive(Debug)]
  227    332   
struct ListTagsForResourceEndpointParamsInterceptor;
  228    333   
  229    334   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListTagsForResourceEndpointParamsInterceptor {
  230    335   
    fn name(&self) -> &'static str {
  231    336   
        "ListTagsForResourceEndpointParamsInterceptor"
  232    337   
    }
  233    338   

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/list_tags_for_resource/_list_tags_for_resource_input.rs

@@ -1,1 +108,120 @@
   17     17   
    "com.amazonaws.timestreamwrite.synthetic",
   18     18   
    "ListTagsForResourceInput",
   19     19   
);
   20     20   
static LISTTAGSFORRESOURCEINPUT_MEMBER_RESOURCE_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "com.amazonaws.timestreamwrite.synthetic#ListTagsForResourceInput$ResourceARN",
   23     23   
        "com.amazonaws.timestreamwrite.synthetic",
   24     24   
        "ListTagsForResourceInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "resource_arn",
          27  +
    "ResourceARN",
   28     28   
    0,
   29     29   
);
   30     30   
static LISTTAGSFORRESOURCEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    LISTTAGSFORRESOURCEINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&LISTTAGSFORRESOURCEINPUT_MEMBER_RESOURCE_ARN],
   34     34   
);
   35     35   
impl ListTagsForResourceInput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTTAGSFORRESOURCEINPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for ListTagsForResourceInput {
   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.resource_arn {
   46     46   
            ser.write_string(&LISTTAGSFORRESOURCEINPUT_MEMBER_RESOURCE_ARN, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl ListTagsForResourceInput {
   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(&LISTTAGSFORRESOURCEINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&LISTTAGSFORRESOURCEINPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.resource_arn = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
          74  +
        builder.resource_arn = builder.resource_arn.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 ListTagsForResourceInput {
          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 ListTagsForResourceInput {
   80     92   
    /// Creates a new builder-style object to manufacture [`ListTagsForResourceInput`](crate::operation::list_tags_for_resource::ListTagsForResourceInput).
   81     93   
    pub fn builder() -> crate::operation::list_tags_for_resource::builders::ListTagsForResourceInputBuilder {
   82     94   
        crate::operation::list_tags_for_resource::builders::ListTagsForResourceInputBuilder::default()
   83     95   
    }
   84     96   
}
   85     97   
   86     98   
/// A builder for [`ListTagsForResourceInput`](crate::operation::list_tags_for_resource::ListTagsForResourceInput).
   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/list_tags_for_resource/_list_tags_for_resource_output.rs

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