AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/operation/update_account_settings.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 `UpdateAccountSettings`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct UpdateAccountSettings;
    6      6   
impl UpdateAccountSettings {
    7      7   
    /// Creates a new `UpdateAccountSettings`
    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::update_account_settings::UpdateAccountSettingsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_account_settings::UpdateAccountSettingsOutput::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::update_account_settings::UpdateAccountSettingsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::update_account_settings::UpdateAccountSettingsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::update_account_settings::UpdateAccountSettingsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -124,128 +253,388 @@
  144    148   
                crate::operation::update_account_settings::UpdateAccountSettingsError,
  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 UpdateAccountSettingsResponseDeserializer;
  153    157   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateAccountSettingsResponseDeserializer {
  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_update_account_settings::de_update_account_settings_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::update_account_settings::UpdateAccountSettingsError::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::update_account_settings::UpdateAccountSettingsError::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::update_account_settings::UpdateAccountSettingsError::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::update_account_settings::UpdateAccountSettingsError::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::update_account_settings::UpdateAccountSettingsError::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::update_account_settings::UpdateAccountSettingsError::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::update_account_settings::UpdateAccountSettingsError::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_update_account_settings::de_update_account_settings_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, UpdateAccountSettings::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::update_account_settings::UpdateAccountSettingsOutput::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 UpdateAccountSettingsRequestSerializer;
  174    341   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateAccountSettingsRequestSerializer {
  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::update_account_settings::UpdateAccountSettingsInput>()
  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::update_account_settings::UpdateAccountSettingsInput,
  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::update_account_settings::UpdateAccountSettingsInput,
  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.UpdateAccountSettings",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_account_settings::ser_update_account_settings_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, UpdateAccountSettings::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 UpdateAccountSettingsEndpointParamsInterceptor;
  228    363   
  229    364   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateAccountSettingsEndpointParamsInterceptor {
  230    365   
    fn name(&self) -> &'static str {
  231    366   
        "UpdateAccountSettingsEndpointParamsInterceptor"
  232    367   
    }
  233    368   

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/operation/update_account_settings/_update_account_settings_input.rs

@@ -19,19 +166,177 @@
   39     39   
    "com.amazonaws.timestreamquery.synthetic",
   40     40   
    "UpdateAccountSettingsInput",
   41     41   
);
   42     42   
static UPDATEACCOUNTSETTINGSINPUT_MEMBER_MAX_QUERY_TCU: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   43     43   
    ::aws_smithy_schema::ShapeId::from_static(
   44     44   
        "com.amazonaws.timestreamquery.synthetic#UpdateAccountSettingsInput$MaxQueryTCU",
   45     45   
        "com.amazonaws.timestreamquery.synthetic",
   46     46   
        "UpdateAccountSettingsInput",
   47     47   
    ),
   48     48   
    ::aws_smithy_schema::ShapeType::Integer,
   49         -
    "max_query_tcu",
          49  +
    "MaxQueryTCU",
   50     50   
    0,
   51     51   
);
   52     52   
static UPDATEACCOUNTSETTINGSINPUT_MEMBER_QUERY_PRICING_MODEL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.timestreamquery.synthetic#UpdateAccountSettingsInput$QueryPricingModel",
   55     55   
        "com.amazonaws.timestreamquery.synthetic",
   56     56   
        "UpdateAccountSettingsInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::String,
   59         -
    "query_pricing_model",
          59  +
    "QueryPricingModel",
   60     60   
    1,
   61     61   
);
   62     62   
static UPDATEACCOUNTSETTINGSINPUT_MEMBER_QUERY_COMPUTE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   63     63   
    ::aws_smithy_schema::ShapeId::from_static(
   64     64   
        "com.amazonaws.timestreamquery.synthetic#UpdateAccountSettingsInput$QueryCompute",
   65     65   
        "com.amazonaws.timestreamquery.synthetic",
   66     66   
        "UpdateAccountSettingsInput",
   67     67   
    ),
   68     68   
    ::aws_smithy_schema::ShapeType::Structure,
   69         -
    "query_compute",
          69  +
    "QueryCompute",
   70     70   
    2,
   71     71   
);
   72     72   
static UPDATEACCOUNTSETTINGSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   73     73   
    UPDATEACCOUNTSETTINGSINPUT_SCHEMA_ID,
   74     74   
    ::aws_smithy_schema::ShapeType::Structure,
   75     75   
    &[
   76     76   
        &UPDATEACCOUNTSETTINGSINPUT_MEMBER_MAX_QUERY_TCU,
   77     77   
        &UPDATEACCOUNTSETTINGSINPUT_MEMBER_QUERY_PRICING_MODEL,
   78     78   
        &UPDATEACCOUNTSETTINGSINPUT_MEMBER_QUERY_COMPUTE,
   79     79   
    ],
   80     80   
);
   81     81   
impl UpdateAccountSettingsInput {
   82     82   
    /// The schema for this shape.
   83     83   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATEACCOUNTSETTINGSINPUT_SCHEMA;
   84     84   
}
   85     85   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateAccountSettingsInput {
   86     86   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   87     87   
    fn serialize_members(
   88     88   
        &self,
   89     89   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   90     90   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   91     91   
        if let Some(ref val) = self.max_query_tcu {
   92     92   
            ser.write_integer(&UPDATEACCOUNTSETTINGSINPUT_MEMBER_MAX_QUERY_TCU, *val)?;
   93     93   
        }
   94     94   
        if let Some(ref val) = self.query_pricing_model {
   95     95   
            ser.write_string(&UPDATEACCOUNTSETTINGSINPUT_MEMBER_QUERY_PRICING_MODEL, val.as_str())?;
   96     96   
        }
   97     97   
        if let Some(ref val) = self.query_compute {
   98     98   
            ser.write_struct(&UPDATEACCOUNTSETTINGSINPUT_MEMBER_QUERY_COMPUTE, val)?;
   99     99   
        }
  100    100   
        Ok(())
  101    101   
    }
  102    102   
}
  103    103   
impl UpdateAccountSettingsInput {
  104    104   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  105         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  106         -
        deserializer: &mut D,
         105  +
    pub fn deserialize(
         106  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  107    107   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  108    108   
        #[allow(unused_variables, unused_mut)]
  109    109   
        let mut builder = Self::builder();
  110    110   
        #[allow(
  111    111   
            unused_variables,
  112    112   
            unreachable_code,
  113    113   
            clippy::single_match,
  114    114   
            clippy::match_single_binding,
  115    115   
            clippy::diverging_sub_expression
  116    116   
        )]
  117         -
        deserializer.read_struct(&UPDATEACCOUNTSETTINGSINPUT_SCHEMA, (), |_, member, deser| {
         117  +
        deserializer.read_struct(&UPDATEACCOUNTSETTINGSINPUT_SCHEMA, &mut |member, deser| {
  118    118   
            match member.member_index() {
  119    119   
                Some(0) => {
  120    120   
                    builder.max_query_tcu = Some(deser.read_integer(member)?);
  121    121   
                }
  122    122   
                Some(1) => {
  123    123   
                    builder.query_pricing_model = Some(crate::types::QueryPricingModel::from(deser.read_string(member)?.as_str()));
  124    124   
                }
  125    125   
                Some(2) => {
  126    126   
                    builder.query_compute = Some(crate::types::QueryComputeRequest::deserialize(deser)?);
  127    127   
                }
  128    128   
                _ => {}
  129    129   
            }
  130    130   
            Ok(())
  131    131   
        })?;
  132    132   
        builder
  133    133   
            .build()
  134    134   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  135    135   
    }
  136    136   
}
         137  +
impl UpdateAccountSettingsInput {
         138  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         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  +
        Self::deserialize(deserializer)
         146  +
    }
         147  +
}
  137    148   
impl UpdateAccountSettingsInput {
  138    149   
    /// Creates a new builder-style object to manufacture [`UpdateAccountSettingsInput`](crate::operation::update_account_settings::UpdateAccountSettingsInput).
  139    150   
    pub fn builder() -> crate::operation::update_account_settings::builders::UpdateAccountSettingsInputBuilder {
  140    151   
        crate::operation::update_account_settings::builders::UpdateAccountSettingsInputBuilder::default()
  141    152   
    }
  142    153   
}
  143    154   
  144    155   
/// A builder for [`UpdateAccountSettingsInput`](crate::operation::update_account_settings::UpdateAccountSettingsInput).
  145    156   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  146    157   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/operation/update_account_settings/_update_account_settings_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/operation/update_scheduled_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 `UpdateScheduledQuery`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct UpdateScheduledQuery;
    6      6   
impl UpdateScheduledQuery {
    7      7   
    /// Creates a new `UpdateScheduledQuery`
    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::update_scheduled_query::UpdateScheduledQueryInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_scheduled_query::UpdateScheduledQueryOutput::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::update_scheduled_query::UpdateScheduledQueryInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::update_scheduled_query::UpdateScheduledQueryOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::update_scheduled_query::UpdateScheduledQueryError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -124,128 +253,412 @@
  144    148   
                crate::operation::update_scheduled_query::UpdateScheduledQueryError,
  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 UpdateScheduledQueryResponseDeserializer;
  153    157   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateScheduledQueryResponseDeserializer {
  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_update_scheduled_query::de_update_scheduled_query_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::update_scheduled_query::UpdateScheduledQueryError::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::update_scheduled_query::UpdateScheduledQueryError::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::update_scheduled_query::UpdateScheduledQueryError::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::update_scheduled_query::UpdateScheduledQueryError::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  +
                "ResourceNotFoundException" => crate::operation::update_scheduled_query::UpdateScheduledQueryError::ResourceNotFoundException({
         264  +
                    let mut tmp = match protocol
         265  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         266  +
                        .and_then(|mut deser| {
         267  +
                            crate::types::error::ResourceNotFoundException::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  +
                "ThrottlingException" => crate::operation::update_scheduled_query::UpdateScheduledQueryError::ThrottlingException({
         288  +
                    let mut tmp = match protocol
         289  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         290  +
                        .and_then(|mut deser| {
         291  +
                            crate::types::error::ThrottlingException::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  +
                "ValidationException" => crate::operation::update_scheduled_query::UpdateScheduledQueryError::ValidationException({
         312  +
                    let mut tmp = match protocol
         313  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         314  +
                        .and_then(|mut deser| {
         315  +
                            crate::types::error::ValidationException::deserialize_with_response(
         316  +
                                &mut *deser,
         317  +
                                response.headers(),
         318  +
                                response.status().into(),
         319  +
                                body,
         320  +
                            )
         321  +
                        }) {
         322  +
                        ::std::result::Result::Ok(val) => val,
         323  +
                        ::std::result::Result::Err(e) => {
         324  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         325  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         326  +
                            ))
         327  +
                        }
         328  +
                    };
         329  +
                    tmp.meta = generic;
         330  +
                    if tmp.message.is_none() {
         331  +
                        tmp.message = _error_message;
         332  +
                    }
         333  +
                    tmp
         334  +
                }),
         335  +
                _ => crate::operation::update_scheduled_query::UpdateScheduledQueryError::generic(generic),
         336  +
            };
         337  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         338  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         339  +
            ))
  166    340   
        } else {
  167         -
            crate::protocol_serde::shape_update_scheduled_query::de_update_scheduled_query_http_response(status, headers, body)
  168         -
        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         341  +
            let protocol = _cfg
         342  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         343  +
                .expect("a SharedClientProtocol is required");
         344  +
            let mut deser = protocol
         345  +
                .deserialize_response(response, UpdateScheduledQuery::OUTPUT_SCHEMA, _cfg)
         346  +
                .map_err(|e| {
         347  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         348  +
                })?;
         349  +
            let body = response.body().bytes().expect("body loaded");
         350  +
            let output = crate::operation::update_scheduled_query::UpdateScheduledQueryOutput::deserialize_with_response(
         351  +
                &mut *deser,
         352  +
                response.headers(),
         353  +
                response.status().into(),
         354  +
                body,
         355  +
            )
         356  +
            .map_err(|e| {
         357  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         358  +
            })?;
         359  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         360  +
        }
  170    361   
    }
  171    362   
}
  172    363   
#[derive(Debug)]
  173    364   
struct UpdateScheduledQueryRequestSerializer;
  174    365   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateScheduledQueryRequestSerializer {
  175    366   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    367   
    fn serialize_input(
  177    368   
        &self,
  178    369   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    370   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    371   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    372   
        let input = input
  182    373   
            .downcast::<crate::operation::update_scheduled_query::UpdateScheduledQueryInput>()
  183    374   
            .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::update_scheduled_query::UpdateScheduledQueryInput,
  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::update_scheduled_query::UpdateScheduledQueryInput,
  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.UpdateScheduledQuery",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_scheduled_query::ser_update_scheduled_query_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())
         375  +
        let protocol = _cfg
         376  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         377  +
            .expect("a SharedClientProtocol is required");
         378  +
        let mut request = protocol
         379  +
            .serialize_request(&input, UpdateScheduledQuery::INPUT_SCHEMA, "", _cfg)
         380  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         381  +
         382  +
        return ::std::result::Result::Ok(request);
  224    383   
    }
  225    384   
}
  226    385   
#[derive(Debug)]
  227    386   
struct UpdateScheduledQueryEndpointParamsInterceptor;
  228    387   
  229    388   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateScheduledQueryEndpointParamsInterceptor {
  230    389   
    fn name(&self) -> &'static str {
  231    390   
        "UpdateScheduledQueryEndpointParamsInterceptor"
  232    391   
    }
  233    392   

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/operation/update_scheduled_query/_update_scheduled_query_input.rs

@@ -3,3 +133,145 @@
   23     23   
    "com.amazonaws.timestreamquery.synthetic",
   24     24   
    "UpdateScheduledQueryInput",
   25     25   
);
   26     26   
static UPDATESCHEDULEDQUERYINPUT_MEMBER_SCHEDULED_QUERY_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   27     27   
    ::aws_smithy_schema::ShapeId::from_static(
   28     28   
        "com.amazonaws.timestreamquery.synthetic#UpdateScheduledQueryInput$ScheduledQueryArn",
   29     29   
        "com.amazonaws.timestreamquery.synthetic",
   30     30   
        "UpdateScheduledQueryInput",
   31     31   
    ),
   32     32   
    ::aws_smithy_schema::ShapeType::String,
   33         -
    "scheduled_query_arn",
          33  +
    "ScheduledQueryArn",
   34     34   
    0,
   35     35   
);
   36     36   
static UPDATESCHEDULEDQUERYINPUT_MEMBER_STATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   37     37   
    ::aws_smithy_schema::ShapeId::from_static(
   38     38   
        "com.amazonaws.timestreamquery.synthetic#UpdateScheduledQueryInput$State",
   39     39   
        "com.amazonaws.timestreamquery.synthetic",
   40     40   
        "UpdateScheduledQueryInput",
   41     41   
    ),
   42     42   
    ::aws_smithy_schema::ShapeType::String,
   43         -
    "state",
          43  +
    "State",
   44     44   
    1,
   45     45   
);
   46     46   
static UPDATESCHEDULEDQUERYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   47     47   
    UPDATESCHEDULEDQUERYINPUT_SCHEMA_ID,
   48     48   
    ::aws_smithy_schema::ShapeType::Structure,
   49     49   
    &[
   50     50   
        &UPDATESCHEDULEDQUERYINPUT_MEMBER_SCHEDULED_QUERY_ARN,
   51     51   
        &UPDATESCHEDULEDQUERYINPUT_MEMBER_STATE,
   52     52   
    ],
   53     53   
);
   54     54   
impl UpdateScheduledQueryInput {
   55     55   
    /// The schema for this shape.
   56     56   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATESCHEDULEDQUERYINPUT_SCHEMA;
   57     57   
}
   58     58   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateScheduledQueryInput {
   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.scheduled_query_arn {
   65     65   
            ser.write_string(&UPDATESCHEDULEDQUERYINPUT_MEMBER_SCHEDULED_QUERY_ARN, val)?;
   66     66   
        }
   67     67   
        if let Some(ref val) = self.state {
   68     68   
            ser.write_string(&UPDATESCHEDULEDQUERYINPUT_MEMBER_STATE, val.as_str())?;
   69     69   
        }
   70     70   
        Ok(())
   71     71   
    }
   72     72   
}
   73     73   
impl UpdateScheduledQueryInput {
   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(&UPDATESCHEDULEDQUERYINPUT_SCHEMA, (), |_, member, deser| {
          87  +
        deserializer.read_struct(&UPDATESCHEDULEDQUERYINPUT_SCHEMA, &mut |member, deser| {
   88     88   
            match member.member_index() {
   89     89   
                Some(0) => {
   90     90   
                    builder.scheduled_query_arn = Some(deser.read_string(member)?);
   91     91   
                }
   92     92   
                Some(1) => {
   93     93   
                    builder.state = Some(crate::types::ScheduledQueryState::from(deser.read_string(member)?.as_str()));
   94     94   
                }
   95     95   
                _ => {}
   96     96   
            }
   97     97   
            Ok(())
   98     98   
        })?;
          99  +
        builder.scheduled_query_arn = builder.scheduled_query_arn.or(Some(String::new()));
   99    100   
        builder
  100    101   
            .build()
  101    102   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  102    103   
    }
  103    104   
}
         105  +
impl UpdateScheduledQueryInput {
         106  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         107  +
    pub fn deserialize_with_response(
         108  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         109  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         110  +
        _status: u16,
         111  +
        _body: &[u8],
         112  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         113  +
        Self::deserialize(deserializer)
         114  +
    }
         115  +
}
  104    116   
impl UpdateScheduledQueryInput {
  105    117   
    /// Creates a new builder-style object to manufacture [`UpdateScheduledQueryInput`](crate::operation::update_scheduled_query::UpdateScheduledQueryInput).
  106    118   
    pub fn builder() -> crate::operation::update_scheduled_query::builders::UpdateScheduledQueryInputBuilder {
  107    119   
        crate::operation::update_scheduled_query::builders::UpdateScheduledQueryInputBuilder::default()
  108    120   
    }
  109    121   
}
  110    122   
  111    123   
/// A builder for [`UpdateScheduledQueryInput`](crate::operation::update_scheduled_query::UpdateScheduledQueryInput).
  112    124   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  113    125   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/operation/update_scheduled_query/_update_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 UpdateScheduledQueryOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static UPDATESCHEDULEDQUERYOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.timestreamquery.synthetic#UpdateScheduledQueryOutput",
   10     10   
    "com.amazonaws.timestreamquery.synthetic",
   11     11   
    "UpdateScheduledQueryOutput",
   12     12   
);
   13         -
static UPDATESCHEDULEDQUERYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(UPDATESCHEDULEDQUERYOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static UPDATESCHEDULEDQUERYOUTPUT_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 UPDATESCHEDULEDQUERYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    UPDATESCHEDULEDQUERYOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&UPDATESCHEDULEDQUERYOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl UpdateScheduledQueryOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATESCHEDULEDQUERYOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateScheduledQueryOutput {
   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 UpdateScheduledQueryOutput {
   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(&UPDATESCHEDULEDQUERYOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&UPDATESCHEDULEDQUERYOUTPUT_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 UpdateScheduledQueryOutput {
          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 UpdateScheduledQueryOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl UpdateScheduledQueryOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`UpdateScheduledQueryOutput`](crate::operation::update_scheduled_query::UpdateScheduledQueryOutput).
   58     89   
    pub fn builder() -> crate::operation::update_scheduled_query::builders::UpdateScheduledQueryOutputBuilder {
   59     90   
        crate::operation::update_scheduled_query::builders::UpdateScheduledQueryOutputBuilder::default()
   60     91   
    }

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

@@ -1,1 +220,0 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn type_erase_result<O, E>(
    3         -
    result: ::std::result::Result<O, E>,
    4         -
) -> ::std::result::Result<
    5         -
    ::aws_smithy_runtime_api::client::interceptors::context::Output,
    6         -
    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
    7         -
>
    8         -
where
    9         -
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   10         -
    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   11         -
{
   12         -
    result
   13         -
        .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
   14         -
        .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
   15         -
        .map_err(::std::convert::Into::into)
   16         -
}
   17         -
   18      2   
pub fn parse_http_error_metadata(
   19      3   
    _response_status: u16,
   20      4   
    response_headers: &::aws_smithy_runtime_api::http::Headers,
   21      5   
    response_body: &[u8],
   22      6   
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
   23      7   
    crate::json_errors::parse_error_metadata(response_body, response_headers)
   24      8   
}
   25         -
   26         -
pub(crate) mod shape_cancel_query;
   27         -
   28         -
pub(crate) mod shape_create_scheduled_query;
   29         -
   30         -
pub(crate) mod shape_delete_scheduled_query;
   31         -
   32         -
pub(crate) mod shape_describe_account_settings;
   33         -
   34         -
pub(crate) mod shape_describe_endpoints;
   35         -
   36         -
pub(crate) mod shape_describe_scheduled_query;
   37         -
   38         -
pub(crate) mod shape_execute_scheduled_query;
   39         -
   40         -
pub(crate) mod shape_list_scheduled_queries;
   41         -
   42         -
pub(crate) mod shape_list_tags_for_resource;
   43         -
   44         -
pub(crate) mod shape_prepare_query;
   45         -
   46         -
pub(crate) mod shape_query;
   47         -
   48         -
pub(crate) mod shape_tag_resource;
   49         -
   50         -
pub(crate) mod shape_untag_resource;
   51         -
   52         -
pub(crate) mod shape_update_account_settings;
   53         -
   54         -
pub(crate) mod shape_update_scheduled_query;
   55         -
   56         -
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
   57         -
    if data.is_empty() {
   58         -
        b"{}"
   59         -
    } else {
   60         -
        data
   61         -
    }
   62         -
}
   63         -
   64         -
pub(crate) mod shape_access_denied_exception;
   65         -
   66         -
pub(crate) mod shape_cancel_query_input;
   67         -
   68         -
pub(crate) mod shape_conflict_exception;
   69         -
   70         -
pub(crate) mod shape_create_scheduled_query_input;
   71         -
   72         -
pub(crate) mod shape_delete_scheduled_query_input;
   73         -
   74         -
pub(crate) mod shape_describe_scheduled_query_input;
   75         -
   76         -
pub(crate) mod shape_execute_scheduled_query_input;
   77         -
   78         -
pub(crate) mod shape_internal_server_exception;
   79         -
   80         -
pub(crate) mod shape_invalid_endpoint_exception;
   81         -
   82         -
pub(crate) mod shape_list_scheduled_queries_input;
   83         -
   84         -
pub(crate) mod shape_list_tags_for_resource_input;
   85         -
   86         -
pub(crate) mod shape_prepare_query_input;
   87         -
   88         -
pub(crate) mod shape_query_execution_exception;
   89         -
   90         -
pub(crate) mod shape_query_input;
   91         -
   92         -
pub(crate) mod shape_resource_not_found_exception;
   93         -
   94         -
pub(crate) mod shape_service_quota_exceeded_exception;
   95         -
   96         -
pub(crate) mod shape_tag_resource_input;
   97         -
   98         -
pub(crate) mod shape_throttling_exception;
   99         -
  100         -
pub(crate) mod shape_untag_resource_input;
  101         -
  102         -
pub(crate) mod shape_update_account_settings_input;
  103         -
  104         -
pub(crate) mod shape_update_scheduled_query_input;
  105         -
  106         -
pub(crate) mod shape_validation_exception;
  107         -
  108         -
pub(crate) mod shape_column_info_list;
  109         -
  110         -
pub(crate) mod shape_endpoints;
  111         -
  112         -
pub(crate) mod shape_error_report_configuration;
  113         -
  114         -
pub(crate) mod shape_notification_configuration;
  115         -
  116         -
pub(crate) mod shape_parameter_mapping_list;
  117         -
  118         -
pub(crate) mod shape_query_compute_request;
  119         -
  120         -
pub(crate) mod shape_query_compute_response;
  121         -
  122         -
pub(crate) mod shape_query_insights;
  123         -
  124         -
pub(crate) mod shape_query_insights_response;
  125         -
  126         -
pub(crate) mod shape_query_status;
  127         -
  128         -
pub(crate) mod shape_row_list;
  129         -
  130         -
pub(crate) mod shape_schedule_configuration;
  131         -
  132         -
pub(crate) mod shape_scheduled_query_description;
  133         -
  134         -
pub(crate) mod shape_scheduled_query_insights;
  135         -
  136         -
pub(crate) mod shape_scheduled_query_list;
  137         -
  138         -
pub(crate) mod shape_select_column_list;
  139         -
  140         -
pub(crate) mod shape_tag;
  141         -
  142         -
pub(crate) mod shape_tag_list;
  143         -
  144         -
pub(crate) mod shape_target_configuration;
  145         -
  146         -
pub(crate) mod shape_column_info;
  147         -
  148         -
pub(crate) mod shape_endpoint;
  149         -
  150         -
pub(crate) mod shape_parameter_mapping;
  151         -
  152         -
pub(crate) mod shape_provisioned_capacity_request;
  153         -
  154         -
pub(crate) mod shape_provisioned_capacity_response;
  155         -
  156         -
pub(crate) mod shape_query_spatial_coverage;
  157         -
  158         -
pub(crate) mod shape_query_temporal_range;
  159         -
  160         -
pub(crate) mod shape_row;
  161         -
  162         -
pub(crate) mod shape_s3_configuration;
  163         -
  164         -
pub(crate) mod shape_scheduled_query;
  165         -
  166         -
pub(crate) mod shape_scheduled_query_run_summary;
  167         -
  168         -
pub(crate) mod shape_scheduled_query_run_summary_list;
  169         -
  170         -
pub(crate) mod shape_select_column;
  171         -
  172         -
pub(crate) mod shape_sns_configuration;
  173         -
  174         -
pub(crate) mod shape_timestream_configuration;
  175         -
  176         -
pub(crate) mod shape_account_settings_notification_configuration;
  177         -
  178         -
pub(crate) mod shape_datum_list;
  179         -
  180         -
pub(crate) mod shape_dimension_mapping;
  181         -
  182         -
pub(crate) mod shape_error_report_location;
  183         -
  184         -
pub(crate) mod shape_execution_stats;
  185         -
  186         -
pub(crate) mod shape_last_update;
  187         -
  188         -
pub(crate) mod shape_mixed_measure_mapping;
  189         -
  190         -
pub(crate) mod shape_multi_measure_mappings;
  191         -
  192         -
pub(crate) mod shape_query_spatial_coverage_max;
  193         -
  194         -
pub(crate) mod shape_query_temporal_range_max;
  195         -
  196         -
pub(crate) mod shape_scheduled_query_insights_response;
  197         -
  198         -
pub(crate) mod shape_target_destination;
  199         -
  200         -
pub(crate) mod shape_type;
  201         -
  202         -
pub(crate) mod shape_datum;
  203         -
  204         -
pub(crate) mod shape_dimension_mapping_list;
  205         -
  206         -
pub(crate) mod shape_mixed_measure_mapping_list;
  207         -
  208         -
pub(crate) mod shape_multi_measure_attribute_mapping;
  209         -
  210         -
pub(crate) mod shape_partition_key_list;
  211         -
  212         -
pub(crate) mod shape_s3_report_location;
  213         -
  214         -
pub(crate) mod shape_timestream_destination;
  215         -
  216         -
pub(crate) mod shape_multi_measure_attribute_mapping_list;
  217         -
  218         -
pub(crate) mod shape_time_series_data_point_list;
  219         -
  220         -
pub(crate) mod shape_time_series_data_point;

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

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

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/protocol_serde/shape_account_settings_notification_configuration.rs

@@ -1,0 +64,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_account_settings_notification_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::AccountSettingsNotificationConfiguration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.sns_configuration {
    7         -
        #[allow(unused_mut)]
    8         -
        let mut object_2 = object.key("SnsConfiguration").start_object();
    9         -
        crate::protocol_serde::shape_sns_configuration::ser_sns_configuration(&mut object_2, var_1)?;
   10         -
        object_2.finish();
   11         -
    }
   12         -
    {
   13         -
        object.key("RoleArn").string(input.role_arn.as_str());
   14         -
    }
   15         -
    Ok(())
   16         -
}
   17         -
   18         -
pub(crate) fn de_account_settings_notification_configuration<'a, I>(
   19         -
    tokens: &mut ::std::iter::Peekable<I>,
   20         -
    _value: &'a [u8],
   21         -
) -> ::std::result::Result<Option<crate::types::AccountSettingsNotificationConfiguration>, ::aws_smithy_json::deserialize::error::DeserializeError>
   22         -
where
   23         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   24         -
{
   25         -
    match tokens.next().transpose()? {
   26         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   27         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   28         -
            #[allow(unused_mut)]
   29         -
            let mut builder = crate::types::builders::AccountSettingsNotificationConfigurationBuilder::default();
   30         -
            loop {
   31         -
                match tokens.next().transpose()? {
   32         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   33         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   34         -
                        "SnsConfiguration" => {
   35         -
                            builder =
   36         -
                                builder.set_sns_configuration(crate::protocol_serde::shape_sns_configuration::de_sns_configuration(tokens, _value)?);
   37         -
                        }
   38         -
                        "RoleArn" => {
   39         -
                            builder = builder.set_role_arn(
   40         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   41         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   42         -
                                    .transpose()?,
   43         -
                            );
   44         -
                        }
   45         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   46         -
                    },
   47         -
                    other => {
   48         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   49         -
                            "expected object key or end object, found: {other:?}"
   50         -
                        )))
   51         -
                    }
   52         -
                }
   53         -
            }
   54         -
            Ok(Some(
   55         -
                crate::serde_util::account_settings_notification_configuration_correct_errors(builder)
   56         -
                    .build()
   57         -
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
   58         -
            ))
   59         -
        }
   60         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   61         -
            "expected start object or null",
   62         -
        )),
   63         -
    }
   64         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamquery/src/protocol_serde/shape_cancel_query.rs

@@ -1,0 +159,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_cancel_query_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::cancel_query::CancelQueryOutput, crate::operation::cancel_query::CancelQueryError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::cancel_query::CancelQueryError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::cancel_query::CancelQueryError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "AccessDeniedException" => crate::operation::cancel_query::CancelQueryError::AccessDeniedException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::cancel_query::CancelQueryError::unhandled)?;
   27         -
                let output = output.meta(generic);
   28         -
                output.build()
   29         -
            };
   30         -
            if tmp.message.is_none() {
   31         -
                tmp.message = _error_message;
   32         -
            }
   33         -
            tmp
   34         -
        }),
   35         -
        "InternalServerException" => crate::operation::cancel_query::CancelQueryError::InternalServerException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::cancel_query::CancelQueryError::unhandled)?;
   42         -
                let output = output.meta(generic);
   43         -
                output.build()
   44         -
            };
   45         -
            if tmp.message.is_none() {
   46         -
                tmp.message = _error_message;
   47         -
            }
   48         -
            tmp
   49         -
        }),
   50         -
        "InvalidEndpointException" => crate::operation::cancel_query::CancelQueryError::InvalidEndpointException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::InvalidEndpointExceptionBuilder::default();
   55         -
                output = crate::protocol_serde::shape_invalid_endpoint_exception::de_invalid_endpoint_exception_json_err(_response_body, output)
   56         -
                    .map_err(crate::operation::cancel_query::CancelQueryError::unhandled)?;
   57         -
                let output = output.meta(generic);
   58         -
                output.build()
   59         -
            };
   60         -
            if tmp.message.is_none() {
   61         -
                tmp.message = _error_message;
   62         -
            }
   63         -
            tmp
   64         -
        }),
   65         -
        "ThrottlingException" => crate::operation::cancel_query::CancelQueryError::ThrottlingException({
   66         -
            #[allow(unused_mut)]
   67         -
            let mut tmp = {
   68         -
                #[allow(unused_mut)]
   69         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   70         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   71         -
                    .map_err(crate::operation::cancel_query::CancelQueryError::unhandled)?;
   72         -
                let output = output.meta(generic);
   73         -
                output.build()
   74         -
            };
   75         -
            if tmp.message.is_none() {
   76         -
                tmp.message = _error_message;
   77         -
            }
   78         -
            tmp
   79         -
        }),
   80         -
        "ValidationException" => crate::operation::cancel_query::CancelQueryError::ValidationException({
   81         -
            #[allow(unused_mut)]
   82         -
            let mut tmp = {
   83         -
                #[allow(unused_mut)]
   84         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   85         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   86         -
                    .map_err(crate::operation::cancel_query::CancelQueryError::unhandled)?;
   87         -
                let output = output.meta(generic);
   88         -
                output.build()
   89         -
            };
   90         -
            if tmp.message.is_none() {
   91         -
                tmp.message = _error_message;
   92         -
            }
   93         -
            tmp
   94         -
        }),
   95         -
        _ => crate::operation::cancel_query::CancelQueryError::generic(generic),
   96         -
    })
   97         -
}
   98         -
   99         -
#[allow(clippy::unnecessary_wraps)]
  100         -
pub fn de_cancel_query_http_response(
  101         -
    _response_status: u16,
  102         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  103         -
    _response_body: &[u8],
  104         -
) -> std::result::Result<crate::operation::cancel_query::CancelQueryOutput, crate::operation::cancel_query::CancelQueryError> {
  105         -
    Ok({
  106         -
        #[allow(unused_mut)]
  107         -
        let mut output = crate::operation::cancel_query::builders::CancelQueryOutputBuilder::default();
  108         -
        output = crate::protocol_serde::shape_cancel_query::de_cancel_query(_response_body, output)
  109         -
            .map_err(crate::operation::cancel_query::CancelQueryError::unhandled)?;
  110         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  111         -
        output.build()
  112         -
    })
  113         -
}
  114         -
  115         -
pub fn ser_cancel_query_input(
  116         -
    input: &crate::operation::cancel_query::CancelQueryInput,
  117         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  118         -
    let mut out = String::new();
  119         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  120         -
    crate::protocol_serde::shape_cancel_query_input::ser_cancel_query_input_input(&mut object, input)?;
  121         -
    object.finish();
  122         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  123         -
}
  124         -
  125         -
pub(crate) fn de_cancel_query(
  126         -
    _value: &[u8],
  127         -
    mut builder: crate::operation::cancel_query::builders::CancelQueryOutputBuilder,
  128         -
) -> ::std::result::Result<crate::operation::cancel_query::builders::CancelQueryOutputBuilder, ::aws_smithy_json::deserialize::error::DeserializeError>
  129         -
{
  130         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  131         -
    let tokens = &mut tokens_owned;
  132         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  133         -
    loop {
  134         -
        match tokens.next().transpose()? {
  135         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  136         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  137         -
                "CancellationMessage" => {
  138         -
                    builder = builder.set_cancellation_message(
  139         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  140         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  141         -
                            .transpose()?,
  142         -
                    );
  143         -
                }
  144         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  145         -
            },
  146         -
            other => {
  147         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  148         -
                    "expected object key or end object, found: {other:?}"
  149         -
                )))
  150         -
            }
  151         -
        }
  152         -
    }
  153         -
    if tokens.next().is_some() {
  154         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  155         -
            "found more JSON tokens after completing parsing",
  156         -
        ));
  157         -
    }
  158         -
    Ok(builder)
  159         -
}