AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12

Files changed:

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/operation/execute_scheduled_query/_execute_scheduled_query_input.rs

@@ -27,27 +191,204 @@
   47     47   
    "com.amazonaws.timestreamquery.synthetic",
   48     48   
    "ExecuteScheduledQueryInput",
   49     49   
);
   50     50   
static EXECUTESCHEDULEDQUERYINPUT_MEMBER_SCHEDULED_QUERY_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   51     51   
    ::aws_smithy_schema::ShapeId::from_static(
   52     52   
        "com.amazonaws.timestreamquery.synthetic#ExecuteScheduledQueryInput$ScheduledQueryArn",
   53     53   
        "com.amazonaws.timestreamquery.synthetic",
   54     54   
        "ExecuteScheduledQueryInput",
   55     55   
    ),
   56     56   
    ::aws_smithy_schema::ShapeType::String,
   57         -
    "scheduled_query_arn",
          57  +
    "ScheduledQueryArn",
   58     58   
    0,
   59     59   
);
   60     60   
static EXECUTESCHEDULEDQUERYINPUT_MEMBER_INVOCATION_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   61     61   
    ::aws_smithy_schema::ShapeId::from_static(
   62     62   
        "com.amazonaws.timestreamquery.synthetic#ExecuteScheduledQueryInput$InvocationTime",
   63     63   
        "com.amazonaws.timestreamquery.synthetic",
   64     64   
        "ExecuteScheduledQueryInput",
   65     65   
    ),
   66     66   
    ::aws_smithy_schema::ShapeType::Timestamp,
   67         -
    "invocation_time",
          67  +
    "InvocationTime",
   68     68   
    1,
   69     69   
);
   70     70   
static EXECUTESCHEDULEDQUERYINPUT_MEMBER_CLIENT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "com.amazonaws.timestreamquery.synthetic#ExecuteScheduledQueryInput$ClientToken",
   73     73   
        "com.amazonaws.timestreamquery.synthetic",
   74     74   
        "ExecuteScheduledQueryInput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::String,
   77         -
    "client_token",
          77  +
    "ClientToken",
   78     78   
    2,
   79     79   
);
   80     80   
static EXECUTESCHEDULEDQUERYINPUT_MEMBER_QUERY_INSIGHTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   81     81   
    ::aws_smithy_schema::ShapeId::from_static(
   82     82   
        "com.amazonaws.timestreamquery.synthetic#ExecuteScheduledQueryInput$QueryInsights",
   83     83   
        "com.amazonaws.timestreamquery.synthetic",
   84     84   
        "ExecuteScheduledQueryInput",
   85     85   
    ),
   86     86   
    ::aws_smithy_schema::ShapeType::Structure,
   87         -
    "query_insights",
          87  +
    "QueryInsights",
   88     88   
    3,
   89     89   
);
   90     90   
static EXECUTESCHEDULEDQUERYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   91     91   
    EXECUTESCHEDULEDQUERYINPUT_SCHEMA_ID,
   92     92   
    ::aws_smithy_schema::ShapeType::Structure,
   93     93   
    &[
   94     94   
        &EXECUTESCHEDULEDQUERYINPUT_MEMBER_SCHEDULED_QUERY_ARN,
   95     95   
        &EXECUTESCHEDULEDQUERYINPUT_MEMBER_INVOCATION_TIME,
   96     96   
        &EXECUTESCHEDULEDQUERYINPUT_MEMBER_CLIENT_TOKEN,
   97     97   
        &EXECUTESCHEDULEDQUERYINPUT_MEMBER_QUERY_INSIGHTS,
   98     98   
    ],
   99     99   
);
  100    100   
impl ExecuteScheduledQueryInput {
  101    101   
    /// The schema for this shape.
  102    102   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &EXECUTESCHEDULEDQUERYINPUT_SCHEMA;
  103    103   
}
  104    104   
impl ::aws_smithy_schema::serde::SerializableStruct for ExecuteScheduledQueryInput {
  105    105   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  106    106   
    fn serialize_members(
  107    107   
        &self,
  108    108   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  109    109   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  110    110   
        if let Some(ref val) = self.scheduled_query_arn {
  111    111   
            ser.write_string(&EXECUTESCHEDULEDQUERYINPUT_MEMBER_SCHEDULED_QUERY_ARN, val)?;
  112    112   
        }
  113    113   
        if let Some(ref val) = self.invocation_time {
  114    114   
            ser.write_timestamp(&EXECUTESCHEDULEDQUERYINPUT_MEMBER_INVOCATION_TIME, val)?;
  115    115   
        }
  116    116   
        if let Some(ref val) = self.client_token {
  117    117   
            ser.write_string(&EXECUTESCHEDULEDQUERYINPUT_MEMBER_CLIENT_TOKEN, val)?;
  118    118   
        }
  119    119   
        if let Some(ref val) = self.query_insights {
  120    120   
            ser.write_struct(&EXECUTESCHEDULEDQUERYINPUT_MEMBER_QUERY_INSIGHTS, val)?;
  121    121   
        }
  122    122   
        Ok(())
  123    123   
    }
  124    124   
}
  125    125   
impl ExecuteScheduledQueryInput {
  126    126   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  127         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  128         -
        deserializer: &mut D,
         127  +
    pub fn deserialize(
         128  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  129    129   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  130    130   
        #[allow(unused_variables, unused_mut)]
  131    131   
        let mut builder = Self::builder();
  132    132   
        #[allow(
  133    133   
            unused_variables,
  134    134   
            unreachable_code,
  135    135   
            clippy::single_match,
  136    136   
            clippy::match_single_binding,
  137    137   
            clippy::diverging_sub_expression
  138    138   
        )]
  139         -
        deserializer.read_struct(&EXECUTESCHEDULEDQUERYINPUT_SCHEMA, (), |_, member, deser| {
         139  +
        deserializer.read_struct(&EXECUTESCHEDULEDQUERYINPUT_SCHEMA, &mut |member, deser| {
  140    140   
            match member.member_index() {
  141    141   
                Some(0) => {
  142    142   
                    builder.scheduled_query_arn = Some(deser.read_string(member)?);
  143    143   
                }
  144    144   
                Some(1) => {
  145    145   
                    builder.invocation_time = Some(deser.read_timestamp(member)?);
  146    146   
                }
  147    147   
                Some(2) => {
  148    148   
                    builder.client_token = Some(deser.read_string(member)?);
  149    149   
                }
  150    150   
                Some(3) => {
  151    151   
                    builder.query_insights = Some(crate::types::ScheduledQueryInsights::deserialize(deser)?);
  152    152   
                }
  153    153   
                _ => {}
  154    154   
            }
  155    155   
            Ok(())
  156    156   
        })?;
         157  +
        builder.scheduled_query_arn = builder.scheduled_query_arn.or(Some(String::new()));
         158  +
        builder.invocation_time = builder.invocation_time.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
  157    159   
        builder
  158    160   
            .build()
  159    161   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  160    162   
    }
  161    163   
}
         164  +
impl ExecuteScheduledQueryInput {
         165  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         166  +
    pub fn deserialize_with_response(
         167  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         168  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         169  +
        _status: u16,
         170  +
        _body: &[u8],
         171  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         172  +
        Self::deserialize(deserializer)
         173  +
    }
         174  +
}
  162    175   
impl ExecuteScheduledQueryInput {
  163    176   
    /// Creates a new builder-style object to manufacture [`ExecuteScheduledQueryInput`](crate::operation::execute_scheduled_query::ExecuteScheduledQueryInput).
  164    177   
    pub fn builder() -> crate::operation::execute_scheduled_query::builders::ExecuteScheduledQueryInputBuilder {
  165    178   
        crate::operation::execute_scheduled_query::builders::ExecuteScheduledQueryInputBuilder::default()
  166    179   
    }
  167    180   
}
  168    181   
  169    182   
/// A builder for [`ExecuteScheduledQueryInput`](crate::operation::execute_scheduled_query::ExecuteScheduledQueryInput).
  170    183   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
  171    184   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/operation/execute_scheduled_query/_execute_scheduled_query_output.rs

@@ -1,1 +80,111 @@
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct ExecuteScheduledQueryOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static EXECUTESCHEDULEDQUERYOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.timestreamquery.synthetic#ExecuteScheduledQueryOutput",
   10     10   
    "com.amazonaws.timestreamquery.synthetic",
   11     11   
    "ExecuteScheduledQueryOutput",
   12     12   
);
   13         -
static EXECUTESCHEDULEDQUERYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(EXECUTESCHEDULEDQUERYOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static EXECUTESCHEDULEDQUERYOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          14  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          15  +
    ::aws_smithy_schema::ShapeType::String,
          16  +
    "request_id",
          17  +
    0,
          18  +
)
          19  +
.with_http_header("x-amzn-requestid");
          20  +
static EXECUTESCHEDULEDQUERYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    EXECUTESCHEDULEDQUERYOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&EXECUTESCHEDULEDQUERYOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl ExecuteScheduledQueryOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &EXECUTESCHEDULEDQUERYOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for ExecuteScheduledQueryOutput {
   20     30   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   21     31   
    fn serialize_members(
   22     32   
        &self,
   23     33   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   24     34   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   25     35   
        Ok(())
   26     36   
    }
   27     37   
}
   28     38   
impl ExecuteScheduledQueryOutput {
   29     39   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   30         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   31         -
        deserializer: &mut D,
          40  +
    pub fn deserialize(
          41  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   32     42   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   33     43   
        #[allow(unused_variables, unused_mut)]
   34     44   
        let mut builder = Self::builder();
   35     45   
        #[allow(
   36     46   
            unused_variables,
   37     47   
            unreachable_code,
   38     48   
            clippy::single_match,
   39     49   
            clippy::match_single_binding,
   40     50   
            clippy::diverging_sub_expression
   41     51   
        )]
   42         -
        deserializer.read_struct(&EXECUTESCHEDULEDQUERYOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&EXECUTESCHEDULEDQUERYOUTPUT_SCHEMA, &mut |member, deser| {
   43     53   
            match member.member_index() {
          54  +
                Some(0) => {
          55  +
                    builder._request_id = Some(deser.read_string(member)?);
          56  +
                }
   44     57   
                _ => {}
   45     58   
            }
   46     59   
            Ok(())
   47     60   
        })?;
   48     61   
        Ok(builder.build())
   49     62   
    }
   50     63   
}
          64  +
impl ExecuteScheduledQueryOutput {
          65  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          66  +
    /// Header-bound members are read directly from headers, avoiding runtime
          67  +
    /// member iteration overhead. Body members are read via the deserializer.
          68  +
    pub fn deserialize_with_response(
          69  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        if let Some(val) = headers.get("x-amzn-requestid") {
          77  +
            builder._request_id = Some(val.to_string());
          78  +
        }
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
   51     82   
impl ::aws_types::request_id::RequestId for ExecuteScheduledQueryOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl ExecuteScheduledQueryOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`ExecuteScheduledQueryOutput`](crate::operation::execute_scheduled_query::ExecuteScheduledQueryOutput).
   58     89   
    pub fn builder() -> crate::operation::execute_scheduled_query::builders::ExecuteScheduledQueryOutputBuilder {
   59     90   
        crate::operation::execute_scheduled_query::builders::ExecuteScheduledQueryOutputBuilder::default()
   60     91   
    }

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/operation/list_scheduled_queries.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 `ListScheduledQueries`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListScheduledQueries;
    6      6   
impl ListScheduledQueries {
    7      7   
    /// Creates a new `ListScheduledQueries`
    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_scheduled_queries::ListScheduledQueriesInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_scheduled_queries::ListScheduledQueriesOutput::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_scheduled_queries::ListScheduledQueriesInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_scheduled_queries::ListScheduledQueriesOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_scheduled_queries::ListScheduledQueriesError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -124,128 +253,388 @@
  144    148   
                crate::operation::list_scheduled_queries::ListScheduledQueriesError,
  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 ListScheduledQueriesResponseDeserializer;
  153    157   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListScheduledQueriesResponseDeserializer {
  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_scheduled_queries::de_list_scheduled_queries_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_scheduled_queries::ListScheduledQueriesError::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  +
                "AccessDeniedException" => crate::operation::list_scheduled_queries::ListScheduledQueriesError::AccessDeniedException({
         192  +
                    let mut tmp = match protocol
         193  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         194  +
                        .and_then(|mut deser| {
         195  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         196  +
                                &mut *deser,
         197  +
                                response.headers(),
         198  +
                                response.status().into(),
         199  +
                                body,
         200  +
                            )
         201  +
                        }) {
         202  +
                        ::std::result::Result::Ok(val) => val,
         203  +
                        ::std::result::Result::Err(e) => {
         204  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         205  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         206  +
                            ))
         207  +
                        }
         208  +
                    };
         209  +
                    tmp.meta = generic;
         210  +
                    if tmp.message.is_none() {
         211  +
                        tmp.message = _error_message;
         212  +
                    }
         213  +
                    tmp
         214  +
                }),
         215  +
                "InternalServerException" => crate::operation::list_scheduled_queries::ListScheduledQueriesError::InternalServerException({
         216  +
                    let mut tmp = match protocol
         217  +
                        .deserialize_response(response, crate::types::error::InternalServerException::SCHEMA, _cfg)
         218  +
                        .and_then(|mut deser| {
         219  +
                            crate::types::error::InternalServerException::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  +
                "InvalidEndpointException" => crate::operation::list_scheduled_queries::ListScheduledQueriesError::InvalidEndpointException({
         240  +
                    let mut tmp = match protocol
         241  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         242  +
                        .and_then(|mut deser| {
         243  +
                            crate::types::error::InvalidEndpointException::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  +
                    if tmp.message.is_none() {
         259  +
                        tmp.message = _error_message;
         260  +
                    }
         261  +
                    tmp
         262  +
                }),
         263  +
                "ThrottlingException" => crate::operation::list_scheduled_queries::ListScheduledQueriesError::ThrottlingException({
         264  +
                    let mut tmp = match protocol
         265  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         266  +
                        .and_then(|mut deser| {
         267  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         268  +
                                &mut *deser,
         269  +
                                response.headers(),
         270  +
                                response.status().into(),
         271  +
                                body,
         272  +
                            )
         273  +
                        }) {
         274  +
                        ::std::result::Result::Ok(val) => val,
         275  +
                        ::std::result::Result::Err(e) => {
         276  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         277  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         278  +
                            ))
         279  +
                        }
         280  +
                    };
         281  +
                    tmp.meta = generic;
         282  +
                    if tmp.message.is_none() {
         283  +
                        tmp.message = _error_message;
         284  +
                    }
         285  +
                    tmp
         286  +
                }),
         287  +
                "ValidationException" => crate::operation::list_scheduled_queries::ListScheduledQueriesError::ValidationException({
         288  +
                    let mut tmp = match protocol
         289  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         290  +
                        .and_then(|mut deser| {
         291  +
                            crate::types::error::ValidationException::deserialize_with_response(
         292  +
                                &mut *deser,
         293  +
                                response.headers(),
         294  +
                                response.status().into(),
         295  +
                                body,
         296  +
                            )
         297  +
                        }) {
         298  +
                        ::std::result::Result::Ok(val) => val,
         299  +
                        ::std::result::Result::Err(e) => {
         300  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         301  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         302  +
                            ))
         303  +
                        }
         304  +
                    };
         305  +
                    tmp.meta = generic;
         306  +
                    if tmp.message.is_none() {
         307  +
                        tmp.message = _error_message;
         308  +
                    }
         309  +
                    tmp
         310  +
                }),
         311  +
                _ => crate::operation::list_scheduled_queries::ListScheduledQueriesError::generic(generic),
         312  +
            };
         313  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         314  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         315  +
            ))
  166    316   
        } else {
  167         -
            crate::protocol_serde::shape_list_scheduled_queries::de_list_scheduled_queries_http_response(status, headers, body)
  168         -
        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         317  +
            let protocol = _cfg
         318  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         319  +
                .expect("a SharedClientProtocol is required");
         320  +
            let mut deser = protocol
         321  +
                .deserialize_response(response, ListScheduledQueries::OUTPUT_SCHEMA, _cfg)
         322  +
                .map_err(|e| {
         323  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         324  +
                })?;
         325  +
            let body = response.body().bytes().expect("body loaded");
         326  +
            let output = crate::operation::list_scheduled_queries::ListScheduledQueriesOutput::deserialize_with_response(
         327  +
                &mut *deser,
         328  +
                response.headers(),
         329  +
                response.status().into(),
         330  +
                body,
         331  +
            )
         332  +
            .map_err(|e| {
         333  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         334  +
            })?;
         335  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         336  +
        }
  170    337   
    }
  171    338   
}
  172    339   
#[derive(Debug)]
  173    340   
struct ListScheduledQueriesRequestSerializer;
  174    341   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListScheduledQueriesRequestSerializer {
  175    342   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    343   
    fn serialize_input(
  177    344   
        &self,
  178    345   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    346   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    347   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    348   
        let input = input
  182    349   
            .downcast::<crate::operation::list_scheduled_queries::ListScheduledQueriesInput>()
  183    350   
            .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_scheduled_queries::ListScheduledQueriesInput,
  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_scheduled_queries::ListScheduledQueriesInput,
  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.ListScheduledQueries",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_list_scheduled_queries::ser_list_scheduled_queries_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())
         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, ListScheduledQueries::INPUT_SCHEMA, "", _cfg)
         356  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         357  +
         358  +
        return ::std::result::Result::Ok(request);
  224    359   
    }
  225    360   
}
  226    361   
#[derive(Debug)]
  227    362   
struct ListScheduledQueriesEndpointParamsInterceptor;
  228    363   
  229    364   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListScheduledQueriesEndpointParamsInterceptor {
  230    365   
    fn name(&self) -> &'static str {
  231    366   
        "ListScheduledQueriesEndpointParamsInterceptor"
  232    367   
    }
  233    368   

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/operation/list_scheduled_queries/_list_scheduled_queries_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/operation/list_scheduled_queries/_list_scheduled_queries_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/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,364 @@
  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  +
                    if tmp.message.is_none() {
         259  +
                        tmp.message = _error_message;
         260  +
                    }
         261  +
                    tmp
         262  +
                }),
         263  +
                "ValidationException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException({
         264  +
                    let mut tmp = match protocol
         265  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         266  +
                        .and_then(|mut deser| {
         267  +
                            crate::types::error::ValidationException::deserialize_with_response(
         268  +
                                &mut *deser,
         269  +
                                response.headers(),
         270  +
                                response.status().into(),
         271  +
                                body,
         272  +
                            )
         273  +
                        }) {
         274  +
                        ::std::result::Result::Ok(val) => val,
         275  +
                        ::std::result::Result::Err(e) => {
         276  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         277  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         278  +
                            ))
         279  +
                        }
         280  +
                    };
         281  +
                    tmp.meta = generic;
         282  +
                    if tmp.message.is_none() {
         283  +
                        tmp.message = _error_message;
         284  +
                    }
         285  +
                    tmp
         286  +
                }),
         287  +
                _ => crate::operation::list_tags_for_resource::ListTagsForResourceError::generic(generic),
         288  +
            };
         289  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         290  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         291  +
            ))
  166    292   
        } 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)
         293  +
            let protocol = _cfg
         294  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         295  +
                .expect("a SharedClientProtocol is required");
         296  +
            let mut deser = protocol
         297  +
                .deserialize_response(response, ListTagsForResource::OUTPUT_SCHEMA, _cfg)
         298  +
                .map_err(|e| {
         299  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         300  +
                })?;
         301  +
            let body = response.body().bytes().expect("body loaded");
         302  +
            let output = crate::operation::list_tags_for_resource::ListTagsForResourceOutput::deserialize_with_response(
         303  +
                &mut *deser,
         304  +
                response.headers(),
         305  +
                response.status().into(),
         306  +
                body,
         307  +
            )
         308  +
            .map_err(|e| {
         309  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         310  +
            })?;
         311  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         312  +
        }
  170    313   
    }
  171    314   
}
  172    315   
#[derive(Debug)]
  173    316   
struct ListTagsForResourceRequestSerializer;
  174    317   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListTagsForResourceRequestSerializer {
  175    318   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    319   
    fn serialize_input(
  177    320   
        &self,
  178    321   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    322   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    323   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    324   
        let input = input
  182    325   
            .downcast::<crate::operation::list_tags_for_resource::ListTagsForResourceInput>()
  183    326   
            .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())
         327  +
        let protocol = _cfg
         328  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         329  +
            .expect("a SharedClientProtocol is required");
         330  +
        let mut request = protocol
         331  +
            .serialize_request(&input, ListTagsForResource::INPUT_SCHEMA, "", _cfg)
         332  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         333  +
         334  +
        return ::std::result::Result::Ok(request);
  224    335   
    }
  225    336   
}
  226    337   
#[derive(Debug)]
  227    338   
struct ListTagsForResourceEndpointParamsInterceptor;
  228    339   
  229    340   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListTagsForResourceEndpointParamsInterceptor {
  230    341   
    fn name(&self) -> &'static str {
  231    342   
        "ListTagsForResourceEndpointParamsInterceptor"
  232    343   
    }
  233    344   

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

@@ -9,9 +156,168 @@
   29     29   
    "com.amazonaws.timestreamquery.synthetic",
   30     30   
    "ListTagsForResourceInput",
   31     31   
);
   32     32   
static LISTTAGSFORRESOURCEINPUT_MEMBER_RESOURCE_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   33     33   
    ::aws_smithy_schema::ShapeId::from_static(
   34     34   
        "com.amazonaws.timestreamquery.synthetic#ListTagsForResourceInput$ResourceARN",
   35     35   
        "com.amazonaws.timestreamquery.synthetic",
   36     36   
        "ListTagsForResourceInput",
   37     37   
    ),
   38     38   
    ::aws_smithy_schema::ShapeType::String,
   39         -
    "resource_arn",
          39  +
    "ResourceARN",
   40     40   
    0,
   41     41   
);
   42     42   
static LISTTAGSFORRESOURCEINPUT_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.timestreamquery.synthetic#ListTagsForResourceInput$MaxResults",
   45     45   
        "com.amazonaws.timestreamquery.synthetic",
   46     46   
        "ListTagsForResourceInput",
   47     47   
    ),
   48     48   
    ::aws_smithy_schema::ShapeType::Integer,
   49         -
    "max_results",
          49  +
    "MaxResults",
   50     50   
    1,
   51     51   
);
   52     52   
static LISTTAGSFORRESOURCEINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.timestreamquery.synthetic#ListTagsForResourceInput$NextToken",
   55     55   
        "com.amazonaws.timestreamquery.synthetic",
   56     56   
        "ListTagsForResourceInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::String,
   59         -
    "next_token",
          59  +
    "NextToken",
   60     60   
    2,
   61     61   
);
   62     62   
static LISTTAGSFORRESOURCEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   63     63   
    LISTTAGSFORRESOURCEINPUT_SCHEMA_ID,
   64     64   
    ::aws_smithy_schema::ShapeType::Structure,
   65     65   
    &[
   66     66   
        &LISTTAGSFORRESOURCEINPUT_MEMBER_RESOURCE_ARN,
   67     67   
        &LISTTAGSFORRESOURCEINPUT_MEMBER_MAX_RESULTS,
   68     68   
        &LISTTAGSFORRESOURCEINPUT_MEMBER_NEXT_TOKEN,
   69     69   
    ],
   70     70   
);
   71     71   
impl ListTagsForResourceInput {
   72     72   
    /// The schema for this shape.
   73     73   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTTAGSFORRESOURCEINPUT_SCHEMA;
   74     74   
}
   75     75   
impl ::aws_smithy_schema::serde::SerializableStruct for ListTagsForResourceInput {
   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.resource_arn {
   82     82   
            ser.write_string(&LISTTAGSFORRESOURCEINPUT_MEMBER_RESOURCE_ARN, val)?;
   83     83   
        }
   84     84   
        if let Some(ref val) = self.max_results {
   85     85   
            ser.write_integer(&LISTTAGSFORRESOURCEINPUT_MEMBER_MAX_RESULTS, *val)?;
   86     86   
        }
   87     87   
        if let Some(ref val) = self.next_token {
   88     88   
            ser.write_string(&LISTTAGSFORRESOURCEINPUT_MEMBER_NEXT_TOKEN, val)?;
   89     89   
        }
   90     90   
        Ok(())
   91     91   
    }
   92     92   
}
   93     93   
impl ListTagsForResourceInput {
   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(&LISTTAGSFORRESOURCEINPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&LISTTAGSFORRESOURCEINPUT_SCHEMA, &mut |member, deser| {
  108    108   
            match member.member_index() {
  109    109   
                Some(0) => {
  110    110   
                    builder.resource_arn = 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.next_token = Some(deser.read_string(member)?);
  117    117   
                }
  118    118   
                _ => {}
  119    119   
            }
  120    120   
            Ok(())
  121    121   
        })?;
         122  +
        builder.resource_arn = builder.resource_arn.or(Some(String::new()));
  122    123   
        builder
  123    124   
            .build()
  124    125   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  125    126   
    }
  126    127   
}
         128  +
impl ListTagsForResourceInput {
         129  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         130  +
    pub fn deserialize_with_response(
         131  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         132  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         133  +
        _status: u16,
         134  +
        _body: &[u8],
         135  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         136  +
        Self::deserialize(deserializer)
         137  +
    }
         138  +
}
  127    139   
impl ListTagsForResourceInput {
  128    140   
    /// Creates a new builder-style object to manufacture [`ListTagsForResourceInput`](crate::operation::list_tags_for_resource::ListTagsForResourceInput).
  129    141   
    pub fn builder() -> crate::operation::list_tags_for_resource::builders::ListTagsForResourceInputBuilder {
  130    142   
        crate::operation::list_tags_for_resource::builders::ListTagsForResourceInputBuilder::default()
  131    143   
    }
  132    144   
}
  133    145   
  134    146   
/// A builder for [`ListTagsForResourceInput`](crate::operation::list_tags_for_resource::ListTagsForResourceInput).
  135    147   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  136    148   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/operation/list_tags_for_resource/_list_tags_for_resource_output.rs

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

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

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/operation/prepare_query/_prepare_query_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/operation/prepare_query/_prepare_query_output.rs

@@ -23,23 +200,264 @@
   43     43   
    "com.amazonaws.timestreamquery.synthetic",
   44     44   
    "PrepareQueryOutput",
   45     45   
);
   46     46   
static PREPAREQUERYOUTPUT_MEMBER_QUERY_STRING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   47     47   
    ::aws_smithy_schema::ShapeId::from_static(
   48     48   
        "com.amazonaws.timestreamquery.synthetic#PrepareQueryOutput$QueryString",
   49     49   
        "com.amazonaws.timestreamquery.synthetic",
   50     50   
        "PrepareQueryOutput",
   51     51   
    ),
   52     52   
    ::aws_smithy_schema::ShapeType::String,
   53         -
    "query_string",
          53  +
    "QueryString",
   54     54   
    0,
   55     55   
);
   56     56   
static PREPAREQUERYOUTPUT_MEMBER_COLUMNS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   57     57   
    ::aws_smithy_schema::ShapeId::from_static(
   58     58   
        "com.amazonaws.timestreamquery.synthetic#PrepareQueryOutput$Columns",
   59     59   
        "com.amazonaws.timestreamquery.synthetic",
   60     60   
        "PrepareQueryOutput",
   61     61   
    ),
   62     62   
    ::aws_smithy_schema::ShapeType::List,
   63         -
    "columns",
          63  +
    "Columns",
   64     64   
    1,
   65     65   
);
   66     66   
static PREPAREQUERYOUTPUT_MEMBER_PARAMETERS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   67     67   
    ::aws_smithy_schema::ShapeId::from_static(
   68     68   
        "com.amazonaws.timestreamquery.synthetic#PrepareQueryOutput$Parameters",
   69     69   
        "com.amazonaws.timestreamquery.synthetic",
   70     70   
        "PrepareQueryOutput",
   71     71   
    ),
   72     72   
    ::aws_smithy_schema::ShapeType::List,
   73         -
    "parameters",
          73  +
    "Parameters",
   74     74   
    2,
   75     75   
);
          76  +
static PREPAREQUERYOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          77  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          78  +
    ::aws_smithy_schema::ShapeType::String,
          79  +
    "request_id",
          80  +
    3,
          81  +
)
          82  +
.with_http_header("x-amzn-requestid");
   76     83   
static PREPAREQUERYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   77     84   
    PREPAREQUERYOUTPUT_SCHEMA_ID,
   78     85   
    ::aws_smithy_schema::ShapeType::Structure,
   79     86   
    &[
   80     87   
        &PREPAREQUERYOUTPUT_MEMBER_QUERY_STRING,
   81     88   
        &PREPAREQUERYOUTPUT_MEMBER_COLUMNS,
   82     89   
        &PREPAREQUERYOUTPUT_MEMBER_PARAMETERS,
          90  +
        &PREPAREQUERYOUTPUT_MEMBER__REQUEST_ID,
   83     91   
    ],
   84     92   
);
   85     93   
impl PrepareQueryOutput {
   86     94   
    /// The schema for this shape.
   87     95   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PREPAREQUERYOUTPUT_SCHEMA;
   88     96   
}
   89     97   
impl ::aws_smithy_schema::serde::SerializableStruct for PrepareQueryOutput {
   90     98   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   91     99   
    fn serialize_members(
   92    100   
        &self,
   93    101   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   94    102   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   95    103   
        {
   96    104   
            let val = &self.query_string;
   97    105   
            ser.write_string(&PREPAREQUERYOUTPUT_MEMBER_QUERY_STRING, val)?;
   98    106   
        }
   99    107   
        {
  100    108   
            let val = &self.columns;
  101    109   
  102    110   
            ser.write_list(
  103    111   
                &PREPAREQUERYOUTPUT_MEMBER_COLUMNS,
  104    112   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  105    113   
                    for item in val {
  106    114   
                        ser.write_struct(crate::types::SelectColumn::SCHEMA, item)?;
  107    115   
                    }
  108    116   
                    Ok(())
  109    117   
                },
  110    118   
            )?;
  111    119   
        }
  112    120   
        {
  113    121   
            let val = &self.parameters;
  114    122   
  115    123   
            ser.write_list(
  116    124   
                &PREPAREQUERYOUTPUT_MEMBER_PARAMETERS,
  117    125   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  118    126   
                    for item in val {
  119    127   
                        ser.write_struct(crate::types::ParameterMapping::SCHEMA, item)?;
  120    128   
                    }
  121    129   
                    Ok(())
  122    130   
                },
  123    131   
            )?;
  124    132   
        }
  125    133   
        Ok(())
  126    134   
    }
  127    135   
}
  128    136   
impl PrepareQueryOutput {
  129    137   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  130         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  131         -
        deserializer: &mut D,
         138  +
    pub fn deserialize(
         139  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  132    140   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  133    141   
        #[allow(unused_variables, unused_mut)]
  134    142   
        let mut builder = Self::builder();
  135    143   
        #[allow(
  136    144   
            unused_variables,
  137    145   
            unreachable_code,
  138    146   
            clippy::single_match,
  139    147   
            clippy::match_single_binding,
  140    148   
            clippy::diverging_sub_expression
  141    149   
        )]
  142         -
        deserializer.read_struct(&PREPAREQUERYOUTPUT_SCHEMA, (), |_, member, deser| {
         150  +
        deserializer.read_struct(&PREPAREQUERYOUTPUT_SCHEMA, &mut |member, deser| {
         151  +
            match member.member_index() {
         152  +
                Some(0) => {
         153  +
                    builder.query_string = Some(deser.read_string(member)?);
         154  +
                }
         155  +
                Some(1) => {
         156  +
                    builder.columns = Some({
         157  +
                        let mut container = Vec::new();
         158  +
                        deser.read_list(member, &mut |deser| {
         159  +
                            container.push(crate::types::SelectColumn::deserialize(deser)?);
         160  +
                            Ok(())
         161  +
                        })?;
         162  +
                        container
         163  +
                    });
         164  +
                }
         165  +
                Some(2) => {
         166  +
                    builder.parameters = Some({
         167  +
                        let mut container = Vec::new();
         168  +
                        deser.read_list(member, &mut |deser| {
         169  +
                            container.push(crate::types::ParameterMapping::deserialize(deser)?);
         170  +
                            Ok(())
         171  +
                        })?;
         172  +
                        container
         173  +
                    });
         174  +
                }
         175  +
                Some(3) => {
         176  +
                    builder._request_id = Some(deser.read_string(member)?);
         177  +
                }
         178  +
                _ => {}
         179  +
            }
         180  +
            Ok(())
         181  +
        })?;
         182  +
        builder.query_string = builder.query_string.or(Some(String::new()));
         183  +
        builder.columns = builder.columns.or(Some(Vec::new()));
         184  +
        builder.parameters = builder.parameters.or(Some(Vec::new()));
         185  +
        builder
         186  +
            .build()
         187  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         188  +
    }
         189  +
}
         190  +
impl PrepareQueryOutput {
         191  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         192  +
    /// Header-bound members are read directly from headers, avoiding runtime
         193  +
    /// member iteration overhead. Body members are read via the deserializer.
         194  +
    pub fn deserialize_with_response(
         195  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         196  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         197  +
        _status: u16,
         198  +
        _body: &[u8],
         199  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         200  +
        #[allow(unused_variables, unused_mut)]
         201  +
        let mut builder = Self::builder();
         202  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         203  +
            builder._request_id = Some(val.to_string());
         204  +
        }
         205  +
        #[allow(
         206  +
            unused_variables,
         207  +
            unreachable_code,
         208  +
            clippy::single_match,
         209  +
            clippy::match_single_binding,
         210  +
            clippy::diverging_sub_expression
         211  +
        )]
         212  +
        deserializer.read_struct(&PREPAREQUERYOUTPUT_SCHEMA, &mut |member, deser| {
  143    213   
            match member.member_index() {
  144    214   
                Some(0) => {
  145    215   
                    builder.query_string = Some(deser.read_string(member)?);
  146    216   
                }
  147    217   
                Some(1) => {
  148    218   
                    builder.columns = Some({
  149         -
                        let container = if let Some(cap) = deser.container_size() {
  150         -
                            Vec::with_capacity(cap)
  151         -
                        } else {
  152         -
                            Vec::new()
  153         -
                        };
  154         -
                        deser.read_list(member, container, |mut list, deser| {
  155         -
                            list.push(crate::types::SelectColumn::deserialize(deser)?);
  156         -
                            Ok(list)
  157         -
                        })?
         219  +
                        let mut container = Vec::new();
         220  +
                        deser.read_list(member, &mut |deser| {
         221  +
                            container.push(crate::types::SelectColumn::deserialize(deser)?);
         222  +
                            Ok(())
         223  +
                        })?;
         224  +
                        container
  158    225   
                    });
  159    226   
                }
  160    227   
                Some(2) => {
  161    228   
                    builder.parameters = Some({
  162         -
                        let container = if let Some(cap) = deser.container_size() {
  163         -
                            Vec::with_capacity(cap)
  164         -
                        } else {
  165         -
                            Vec::new()
  166         -
                        };
  167         -
                        deser.read_list(member, container, |mut list, deser| {
  168         -
                            list.push(crate::types::ParameterMapping::deserialize(deser)?);
  169         -
                            Ok(list)
  170         -
                        })?
         229  +
                        let mut container = Vec::new();
         230  +
                        deser.read_list(member, &mut |deser| {
         231  +
                            container.push(crate::types::ParameterMapping::deserialize(deser)?);
         232  +
                            Ok(())
         233  +
                        })?;
         234  +
                        container
  171    235   
                    });
  172    236   
                }
  173    237   
                _ => {}
  174    238   
            }
  175    239   
            Ok(())
  176    240   
        })?;
  177    241   
        builder
  178    242   
            .build()
  179    243   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  180    244   
    }