AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

tmp-codegen-diff/aws-sdk/sdk/lambda/src/types/error/_unsupported_media_type_exception.rs

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

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

@@ -19,19 +84,84 @@
   39     39   
path = "../aws-smithy-json"
   40     40   
version = "0.62.6"
   41     41   
   42     42   
[dependencies.aws-smithy-observability]
   43     43   
path = "../aws-smithy-observability"
   44     44   
version = "0.2.6"
   45     45   
   46     46   
[dependencies.aws-smithy-runtime]
   47     47   
path = "../aws-smithy-runtime"
   48     48   
features = ["client"]
   49         -
version = "1.10.3"
          49  +
version = "1.10.4"
   50     50   
   51     51   
[dependencies.aws-smithy-runtime-api]
   52     52   
path = "../aws-smithy-runtime-api"
   53     53   
features = ["client", "http-1x", "http-02x"]
   54         -
version = "1.11.6"
          54  +
version = "1.11.7"
   55     55   
   56     56   
[dependencies.aws-smithy-schema]
   57     57   
path = "../aws-smithy-schema"
   58     58   
version = "1.0.0"
   59     59   
   60     60   
[dependencies.aws-smithy-types]
   61     61   
path = "../aws-smithy-types"
   62     62   
features = ["http-body-1-x"]
   63     63   
version = "1.4.7"
   64     64   
@@ -92,92 +157,157 @@
  112    112   
features = ["test-util", "wire-mock"]
  113    113   
version = "1.1.12"
  114    114   
  115    115   
[dev-dependencies.aws-smithy-protocol-test]
  116    116   
path = "../aws-smithy-protocol-test"
  117    117   
version = "0.63.14"
  118    118   
  119    119   
[dev-dependencies.aws-smithy-runtime]
  120    120   
path = "../aws-smithy-runtime"
  121    121   
features = ["test-util"]
  122         -
version = "1.10.3"
         122  +
version = "1.10.4"
  123    123   
  124    124   
[dev-dependencies.aws-smithy-runtime-api]
  125    125   
path = "../aws-smithy-runtime-api"
  126    126   
features = ["test-util"]
  127         -
version = "1.11.6"
         127  +
version = "1.11.7"
  128    128   
  129    129   
[dev-dependencies.aws-smithy-types]
  130    130   
path = "../aws-smithy-types"
  131    131   
features = ["http-body-1-x", "test-util"]
  132    132   
version = "1.4.7"
  133    133   
  134    134   
[dev-dependencies.futures-util]
  135    135   
version = "0.3.25"
  136    136   
features = ["alloc"]
  137    137   
default-features = false

tmp-codegen-diff/aws-sdk/sdk/polly/src/config.rs

@@ -23,23 +82,86 @@
   43     43   
            config: self.cloneable.clone(),
   44     44   
            runtime_components: self.runtime_components.clone(),
   45     45   
            runtime_plugins: self.runtime_plugins.clone(),
   46     46   
            behavior_version: self.behavior_version,
   47     47   
        }
   48     48   
    }
   49     49   
    /// Return a reference to the stalled stream protection configuration contained in this config, if any.
   50     50   
    pub fn stalled_stream_protection(&self) -> ::std::option::Option<&crate::config::StalledStreamProtectionConfig> {
   51     51   
        self.config.load::<crate::config::StalledStreamProtectionConfig>()
   52     52   
    }
          53  +
    /// Returns the client protocol used for serialization and deserialization.
          54  +
    pub fn protocol(&self) -> ::std::option::Option<&::aws_smithy_schema::protocol::SharedClientProtocol> {
          55  +
        self.config.load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
          56  +
    }
   53     57   
    /// Return the [`SharedHttpClient`](crate::config::SharedHttpClient) to use when making requests, if any.
   54     58   
    pub fn http_client(&self) -> Option<crate::config::SharedHttpClient> {
   55     59   
        self.runtime_components.http_client()
   56     60   
    }
   57     61   
    /// Return the auth schemes configured on this service config
   58     62   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   59     63   
        self.runtime_components.auth_schemes()
   60     64   
    }
   61     65   
   62     66   
    /// Return the auth scheme resolver configured on this service config
@@ -153,157 +238,261 @@
  173    177   
    ///
  174    178   
    pub fn new() -> Self {
  175    179   
        Self::default()
  176    180   
    }
  177    181   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  178    182   
    /// but not those in runtime components.
  179    183   
    #[allow(unused)]
  180    184   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  181    185   
        let mut builder = Self::new();
  182    186   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         187  +
        if let ::std::option::Option::Some(protocol) = config_bag.load::<::aws_smithy_schema::protocol::SharedClientProtocol>().cloned() {
         188  +
            builder.set_protocol(::std::option::Option::Some(protocol));
         189  +
        }
  183    190   
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  184    191   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  185    192   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  186    193   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  187    194   
        builder.set_app_name(config_bag.load::<::aws_types::app_name::AppName>().cloned());
  188    195   
        builder.set_endpoint_url(config_bag.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()));
  189    196   
        builder.set_use_dual_stack(config_bag.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0));
  190    197   
        builder.set_use_fips(config_bag.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0));
  191    198   
        builder.set_region(config_bag.load::<crate::config::Region>().cloned());
  192    199   
        builder
  193    200   
    }
  194    201   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  195    202   
    /// to configure protection for stalled streams.
  196    203   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  197    204   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  198    205   
        self
  199    206   
    }
  200    207   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  201    208   
    /// to configure protection for stalled streams.
  202    209   
    pub fn set_stalled_stream_protection(
  203    210   
        &mut self,
  204    211   
        stalled_stream_protection_config: ::std::option::Option<crate::config::StalledStreamProtectionConfig>,
  205    212   
    ) -> &mut Self {
  206    213   
        self.config.store_or_unset(stalled_stream_protection_config);
  207    214   
        self
  208    215   
    }
         216  +
    /// Sets the client protocol to use for serialization and deserialization.
         217  +
    ///
         218  +
    /// This overrides the default protocol determined by the service model,
         219  +
    /// enabling runtime protocol selection.
         220  +
    pub fn protocol(mut self, protocol: impl ::aws_smithy_schema::protocol::ClientProtocol + 'static) -> Self {
         221  +
        self.set_protocol(::std::option::Option::Some(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         222  +
            protocol,
         223  +
        )));
         224  +
        self
         225  +
    }
         226  +
         227  +
    /// Sets the client protocol to use for serialization and deserialization.
         228  +
    pub fn set_protocol(&mut self, protocol: ::std::option::Option<::aws_smithy_schema::protocol::SharedClientProtocol>) -> &mut Self {
         229  +
        self.config.store_or_unset(protocol);
         230  +
        self
         231  +
    }
  209    232   
    /// Sets the HTTP client to use when making requests.
  210    233   
    ///
  211    234   
    /// # Examples
  212    235   
    /// ```no_run
  213    236   
    /// # #[cfg(test)]
  214    237   
    /// # mod tests {
  215    238   
    /// # #[test]
  216    239   
    /// # fn example() {
  217    240   
    /// use std::time::Duration;
  218    241   
    /// use aws_sdk_polly::config::Config;
@@ -1272,1295 +1331,1359 @@
 1292   1315   
#[derive(::std::fmt::Debug)]
 1293   1316   
pub(crate) struct ServiceRuntimePlugin {
 1294   1317   
    config: ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer>,
 1295   1318   
    runtime_components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1296   1319   
}
 1297   1320   
 1298   1321   
impl ServiceRuntimePlugin {
 1299   1322   
    pub fn new(_service_config: crate::config::Config) -> Self {
 1300   1323   
        let config = {
 1301   1324   
            let mut cfg = ::aws_smithy_types::config_bag::Layer::new("Parrot_v1");
        1325  +
            if _service_config.protocol().is_none() {
        1326  +
                cfg.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
        1327  +
                    ::aws_smithy_json::protocol::aws_rest_json_1::AwsRestJsonProtocol::new(),
        1328  +
                ));
        1329  +
            }
 1302   1330   
            cfg.store_put(::aws_smithy_runtime::client::orchestrator::AuthSchemeAndEndpointOrchestrationV2);
 1303   1331   
            ::std::option::Option::Some(cfg.freeze())
 1304   1332   
        };
 1305   1333   
        let mut runtime_components = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ServiceRuntimePlugin");
 1306   1334   
        runtime_components.set_auth_scheme_option_resolver(::std::option::Option::Some({
 1307   1335   
            use crate::config::auth::ResolveAuthScheme;
 1308   1336   
            crate::config::auth::DefaultAuthSchemeResolver::default().into_shared_resolver()
 1309   1337   
        }));
 1310   1338   
        runtime_components.set_endpoint_resolver(::std::option::Option::Some({
 1311   1339   
            use crate::config::endpoint::ResolveEndpoint;
@@ -1407,1435 +1466,1497 @@
 1427   1455   
        }
 1428   1456   
        // resiliency
 1429   1457   
        builder.set_retry_config(input.retry_config().cloned());
 1430   1458   
        builder.set_timeout_config(input.timeout_config().cloned());
 1431   1459   
        builder.set_sleep_impl(input.sleep_impl());
 1432   1460   
 1433   1461   
        builder.set_http_client(input.http_client());
 1434   1462   
        builder.set_time_source(input.time_source());
 1435   1463   
        builder.set_behavior_version(input.behavior_version());
 1436   1464   
        builder.set_auth_scheme_preference(input.auth_scheme_preference().cloned());
        1465  +
        if let Some(protocol) = input.protocol() {
        1466  +
            builder.set_protocol(Some(protocol.clone()));
        1467  +
        }
 1437   1468   
        // setting `None` here removes the default
 1438   1469   
        if let Some(config) = input.stalled_stream_protection() {
 1439   1470   
            builder.set_stalled_stream_protection(Some(config));
 1440   1471   
        }
 1441   1472   
 1442   1473   
        if let Some(cache) = input.identity_cache() {
 1443   1474   
            builder.set_identity_cache(cache);
 1444   1475   
        }
 1445   1476   
        builder.set_app_name(input.app_name().cloned());
 1446   1477   

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

@@ -178,178 +213,213 @@
  198    198   
pub(crate) mod presigning_interceptors;
  199    199   
  200    200   
pub(crate) mod protocol_serde;
  201    201   
  202    202   
mod sdk_feature_tracker;
  203    203   
  204    204   
mod serialization_settings;
  205    205   
  206    206   
mod endpoint_lib;
  207    207   
  208         -
mod lens;
  209         -
  210    208   
mod json_errors;
  211    209   
         210  +
mod lens;
         211  +
  212    212   
#[doc(inline)]
  213    213   
pub use client::Client;

tmp-codegen-diff/aws-sdk/sdk/polly/src/operation/delete_lexicon.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 `DeleteLexicon`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DeleteLexicon;
    6      6   
impl DeleteLexicon {
    7      7   
    /// Creates a new `DeleteLexicon`
    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::delete_lexicon::DeleteLexiconInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::delete_lexicon::DeleteLexiconOutput::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::delete_lexicon::DeleteLexiconInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::delete_lexicon::DeleteLexiconOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::delete_lexicon::DeleteLexiconError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +244,333 @@
  135    139   
                crate::operation::delete_lexicon::DeleteLexiconError,
  136    140   
            >::new());
  137    141   
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct DeleteLexiconResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteLexiconResponseDeserializer {
  145         -
    fn deserialize_nonstreaming(
         149  +
    fn deserialize_nonstreaming_with_config(
  146    150   
        &self,
  147    151   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         152  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  148    153   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  149    154   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  150         -
        let headers = response.headers();
  151         -
        let body = response.body().bytes().expect("body loaded");
  152    155   
        #[allow(unused_mut)]
  153    156   
        let mut force_error = false;
  154    157   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  155         -
        let parse_result = if !success && status != 200 || force_error {
  156         -
            crate::protocol_serde::shape_delete_lexicon::de_delete_lexicon_http_error(status, headers, body)
         158  +
        if !success && status != 200 || force_error {
         159  +
            let headers = response.headers();
         160  +
            let body = response.body().bytes().expect("body loaded");
         161  +
            #[allow(unused_mut)]
         162  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         163  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         164  +
            })?;
         165  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         166  +
            let generic = generic_builder.build();
         167  +
            let error_code = match generic.code() {
         168  +
                ::std::option::Option::Some(code) => code,
         169  +
                ::std::option::Option::None => {
         170  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         171  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::delete_lexicon::DeleteLexiconError::unhandled(generic)),
         172  +
                    ))
         173  +
                }
         174  +
            };
         175  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         176  +
            let protocol = _cfg
         177  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         178  +
                .expect("a SharedClientProtocol is required");
         179  +
            let err = match error_code {
         180  +
                "LexiconNotFoundException" => crate::operation::delete_lexicon::DeleteLexiconError::LexiconNotFoundException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::LexiconNotFoundException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::LexiconNotFoundException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
         197  +
                    };
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "ServiceFailureException" => crate::operation::delete_lexicon::DeleteLexiconError::ServiceFailureException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::ServiceFailureException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::ServiceFailureException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                _ => crate::operation::delete_lexicon::DeleteLexiconError::generic(generic),
         229  +
            };
         230  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         231  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         232  +
            ))
  157    233   
        } else {
  158         -
            crate::protocol_serde::shape_delete_lexicon::de_delete_lexicon_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         234  +
            let protocol = _cfg
         235  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         236  +
                .expect("a SharedClientProtocol is required");
         237  +
            let mut deser = protocol.deserialize_response(response, DeleteLexicon::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         238  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         239  +
            })?;
         240  +
            let body = response.body().bytes().expect("body loaded");
         241  +
            let output = crate::operation::delete_lexicon::DeleteLexiconOutput::deserialize_with_response(
         242  +
                &mut *deser,
         243  +
                response.headers(),
         244  +
                response.status().into(),
         245  +
                body,
         246  +
            )
         247  +
            .map_err(|e| {
         248  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         249  +
            })?;
         250  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         251  +
        }
  161    252   
    }
  162    253   
}
  163    254   
#[derive(Debug)]
  164    255   
struct DeleteLexiconRequestSerializer;
  165    256   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteLexiconRequestSerializer {
  166    257   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    258   
    fn serialize_input(
  168    259   
        &self,
  169    260   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    261   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    262   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    263   
        let input = input
  173    264   
            .downcast::<crate::operation::delete_lexicon::DeleteLexiconInput>()
  174    265   
            .expect("correct type");
  175         -
        let _header_serialization_settings = _cfg
  176         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  177         -
            .cloned()
  178         -
            .unwrap_or_default();
  179         -
        let mut request_builder = {
  180         -
            #[allow(clippy::uninlined_format_args)]
  181         -
            fn uri_base(
  182         -
                _input: &crate::operation::delete_lexicon::DeleteLexiconInput,
  183         -
                output: &mut ::std::string::String,
  184         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  185         -
                use ::std::fmt::Write as _;
  186         -
                let input_1 = &_input.name;
  187         -
                let input_1 = input_1
  188         -
                    .as_ref()
  189         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("name", "cannot be empty or unset"))?;
  190         -
                let name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  191         -
                if name.is_empty() {
  192         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  193         -
                        "name",
  194         -
                        "cannot be empty or unset",
  195         -
                    ));
         266  +
        let protocol = _cfg
         267  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         268  +
            .expect("a SharedClientProtocol is required");
         269  +
        if protocol.supports_http_bindings() {
         270  +
            let mut request = protocol
         271  +
                .serialize_body(&input, DeleteLexicon::INPUT_SCHEMA, "", _cfg)
         272  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         273  +
            {
         274  +
                let mut uri = "/v1/lexicons/{Name}".to_string();
         275  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         276  +
                if let Some(ref val) = input.name {
         277  +
                    uri = uri.replace("{Name}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  196    278   
                }
  197         -
                ::std::write!(output, "/v1/lexicons/{Name}", Name = name).expect("formatting should succeed");
  198         -
                ::std::result::Result::Ok(())
  199         -
            }
  200         -
            #[allow(clippy::unnecessary_wraps)]
  201         -
            fn update_http_builder(
  202         -
                input: &crate::operation::delete_lexicon::DeleteLexiconInput,
  203         -
                builder: ::http_1x::request::Builder,
  204         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  205         -
                let mut uri = ::std::string::String::new();
  206         -
                uri_base(input, &mut uri)?;
  207         -
                ::std::result::Result::Ok(builder.method("DELETE").uri(uri))
         279  +
                if !query_params.is_empty() {
         280  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         281  +
                    let pairs: Vec<String> = query_params
         282  +
                        .iter()
         283  +
                        .map(|(k, v)| {
         284  +
                            format!(
         285  +
                                "{}={}",
         286  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         287  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         288  +
                            )
         289  +
                        })
         290  +
                        .collect();
         291  +
                    uri.push_str(&pairs.join("&"));
         292  +
                }
         293  +
                request.set_uri(uri.as_str()).expect("valid URI");
  208    294   
            }
  209         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  210         -
            builder
  211         -
        };
  212         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  213    295   
  214         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         296  +
            return ::std::result::Result::Ok(request);
         297  +
        } else {
         298  +
            let mut request = protocol
         299  +
                .serialize_request(&input, DeleteLexicon::INPUT_SCHEMA, "", _cfg)
         300  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         301  +
         302  +
            return ::std::result::Result::Ok(request);
         303  +
        }
  215    304   
    }
  216    305   
}
  217    306   
#[derive(Debug)]
  218    307   
struct DeleteLexiconEndpointParamsInterceptor;
  219    308   
  220    309   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteLexiconEndpointParamsInterceptor {
  221    310   
    fn name(&self) -> &'static str {
  222    311   
        "DeleteLexiconEndpointParamsInterceptor"
  223    312   
    }
  224    313   

tmp-codegen-diff/aws-sdk/sdk/polly/src/operation/delete_lexicon/_delete_lexicon_input.rs

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

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

tmp-codegen-diff/aws-sdk/sdk/polly/src/operation/describe_voices.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 `DescribeVoices`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeVoices;
    6      6   
impl DescribeVoices {
    7      7   
    /// Creates a new `DescribeVoices`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_voices::DescribeVoicesInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_voices::DescribeVoicesOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::describe_voices::DescribeVoicesInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::describe_voices::DescribeVoicesOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::describe_voices::DescribeVoicesError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +264,346 @@
  135    139   
                crate::operation::describe_voices::DescribeVoicesError,
  136    140   
            >::new());
  137    141   
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct DescribeVoicesResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeVoicesResponseDeserializer {
  145         -
    fn deserialize_nonstreaming(
         149  +
    fn deserialize_nonstreaming_with_config(
  146    150   
        &self,
  147    151   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         152  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  148    153   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  149    154   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  150         -
        let headers = response.headers();
  151         -
        let body = response.body().bytes().expect("body loaded");
  152    155   
        #[allow(unused_mut)]
  153    156   
        let mut force_error = false;
  154    157   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  155         -
        let parse_result = if !success && status != 200 || force_error {
  156         -
            crate::protocol_serde::shape_describe_voices::de_describe_voices_http_error(status, headers, body)
         158  +
        if !success && status != 200 || force_error {
         159  +
            let headers = response.headers();
         160  +
            let body = response.body().bytes().expect("body loaded");
         161  +
            #[allow(unused_mut)]
         162  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         163  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         164  +
            })?;
         165  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         166  +
            let generic = generic_builder.build();
         167  +
            let error_code = match generic.code() {
         168  +
                ::std::option::Option::Some(code) => code,
         169  +
                ::std::option::Option::None => {
         170  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         171  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::describe_voices::DescribeVoicesError::unhandled(
         172  +
                            generic,
         173  +
                        )),
         174  +
                    ))
         175  +
                }
         176  +
            };
         177  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         178  +
            let protocol = _cfg
         179  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         180  +
                .expect("a SharedClientProtocol is required");
         181  +
            let err = match error_code {
         182  +
                "InvalidNextTokenException" => crate::operation::describe_voices::DescribeVoicesError::InvalidNextTokenException({
         183  +
                    let mut tmp = match protocol
         184  +
                        .deserialize_response(response, crate::types::error::InvalidNextTokenException::SCHEMA, _cfg)
         185  +
                        .and_then(|mut deser| {
         186  +
                            crate::types::error::InvalidNextTokenException::deserialize_with_response(
         187  +
                                &mut *deser,
         188  +
                                response.headers(),
         189  +
                                response.status().into(),
         190  +
                                body,
         191  +
                            )
         192  +
                        }) {
         193  +
                        ::std::result::Result::Ok(val) => val,
         194  +
                        ::std::result::Result::Err(e) => {
         195  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         196  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         197  +
                            ))
         198  +
                        }
         199  +
                    };
         200  +
                    tmp.meta = generic;
         201  +
                    if tmp.message.is_none() {
         202  +
                        tmp.message = _error_message;
         203  +
                    }
         204  +
                    tmp
         205  +
                }),
         206  +
                "ServiceFailureException" => crate::operation::describe_voices::DescribeVoicesError::ServiceFailureException({
         207  +
                    let mut tmp = match protocol
         208  +
                        .deserialize_response(response, crate::types::error::ServiceFailureException::SCHEMA, _cfg)
         209  +
                        .and_then(|mut deser| {
         210  +
                            crate::types::error::ServiceFailureException::deserialize_with_response(
         211  +
                                &mut *deser,
         212  +
                                response.headers(),
         213  +
                                response.status().into(),
         214  +
                                body,
         215  +
                            )
         216  +
                        }) {
         217  +
                        ::std::result::Result::Ok(val) => val,
         218  +
                        ::std::result::Result::Err(e) => {
         219  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         220  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         221  +
                            ))
         222  +
                        }
         223  +
                    };
         224  +
                    tmp.meta = generic;
         225  +
                    if tmp.message.is_none() {
         226  +
                        tmp.message = _error_message;
         227  +
                    }
         228  +
                    tmp
         229  +
                }),
         230  +
                _ => crate::operation::describe_voices::DescribeVoicesError::generic(generic),
         231  +
            };
         232  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         233  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         234  +
            ))
  157    235   
        } else {
  158         -
            crate::protocol_serde::shape_describe_voices::de_describe_voices_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         236  +
            let protocol = _cfg
         237  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         238  +
                .expect("a SharedClientProtocol is required");
         239  +
            let mut deser = protocol
         240  +
                .deserialize_response(response, DescribeVoices::OUTPUT_SCHEMA, _cfg)
         241  +
                .map_err(|e| {
         242  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         243  +
                })?;
         244  +
            let body = response.body().bytes().expect("body loaded");
         245  +
            let output = crate::operation::describe_voices::DescribeVoicesOutput::deserialize_with_response(
         246  +
                &mut *deser,
         247  +
                response.headers(),
         248  +
                response.status().into(),
         249  +
                body,
         250  +
            )
         251  +
            .map_err(|e| {
         252  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         253  +
            })?;
         254  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         255  +
        }
  161    256   
    }
  162    257   
}
  163    258   
#[derive(Debug)]
  164    259   
struct DescribeVoicesRequestSerializer;
  165    260   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeVoicesRequestSerializer {
  166    261   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    262   
    fn serialize_input(
  168    263   
        &self,
  169    264   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    265   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    266   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    267   
        let input = input
  173    268   
            .downcast::<crate::operation::describe_voices::DescribeVoicesInput>()
  174    269   
            .expect("correct type");
  175         -
        let _header_serialization_settings = _cfg
  176         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  177         -
            .cloned()
  178         -
            .unwrap_or_default();
  179         -
        let mut request_builder = {
  180         -
            #[allow(clippy::uninlined_format_args)]
  181         -
            fn uri_base(
  182         -
                _input: &crate::operation::describe_voices::DescribeVoicesInput,
  183         -
                output: &mut ::std::string::String,
  184         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  185         -
                use ::std::fmt::Write as _;
  186         -
                ::std::write!(output, "/v1/voices").expect("formatting should succeed");
  187         -
                ::std::result::Result::Ok(())
  188         -
            }
  189         -
            fn uri_query(
  190         -
                _input: &crate::operation::describe_voices::DescribeVoicesInput,
  191         -
                mut output: &mut ::std::string::String,
  192         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  193         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  194         -
                if let ::std::option::Option::Some(inner_1) = &_input.engine {
  195         -
                    {
  196         -
                        query.push_kv("Engine", &::aws_smithy_http::query::fmt_string(inner_1.as_str()));
  197         -
                    }
         270  +
        let protocol = _cfg
         271  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         272  +
            .expect("a SharedClientProtocol is required");
         273  +
        if protocol.supports_http_bindings() {
         274  +
            let mut request = protocol
         275  +
                .serialize_body(&input, DescribeVoices::INPUT_SCHEMA, "", _cfg)
         276  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         277  +
            {
         278  +
                let mut uri = "/v1/voices".to_string();
         279  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         280  +
                if let Some(ref val) = input.engine {
         281  +
                    query_params.push(("Engine".to_string(), val.as_str().to_string()));
  198    282   
                }
  199         -
                if let ::std::option::Option::Some(inner_2) = &_input.language_code {
  200         -
                    {
  201         -
                        query.push_kv("LanguageCode", &::aws_smithy_http::query::fmt_string(inner_2.as_str()));
  202         -
                    }
         283  +
                if let Some(ref val) = input.language_code {
         284  +
                    query_params.push(("LanguageCode".to_string(), val.as_str().to_string()));
  203    285   
                }
  204         -
                if let ::std::option::Option::Some(inner_3) = &_input.include_additional_language_codes {
  205         -
                    {
  206         -
                        query.push_kv(
  207         -
                            "IncludeAdditionalLanguageCodes",
  208         -
                            ::aws_smithy_types::primitive::Encoder::from(*inner_3).encode(),
  209         -
                        );
  210         -
                    }
         286  +
                if let Some(ref val) = input.include_additional_language_codes {
         287  +
                    query_params.push(("IncludeAdditionalLanguageCodes".to_string(), val.to_string()));
  211    288   
                }
  212         -
                if let ::std::option::Option::Some(inner_4) = &_input.next_token {
  213         -
                    {
  214         -
                        query.push_kv("NextToken", &::aws_smithy_http::query::fmt_string(inner_4));
  215         -
                    }
         289  +
                if let Some(ref val) = input.next_token {
         290  +
                    query_params.push(("NextToken".to_string(), val.to_string()));
  216    291   
                }
  217         -
                ::std::result::Result::Ok(())
  218         -
            }
  219         -
            #[allow(clippy::unnecessary_wraps)]
  220         -
            fn update_http_builder(
  221         -
                input: &crate::operation::describe_voices::DescribeVoicesInput,
  222         -
                builder: ::http_1x::request::Builder,
  223         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  224         -
                let mut uri = ::std::string::String::new();
  225         -
                uri_base(input, &mut uri)?;
  226         -
                uri_query(input, &mut uri)?;
  227         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
         292  +
                if !query_params.is_empty() {
         293  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         294  +
                    let pairs: Vec<String> = query_params
         295  +
                        .iter()
         296  +
                        .map(|(k, v)| {
         297  +
                            format!(
         298  +
                                "{}={}",
         299  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         300  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         301  +
                            )
         302  +
                        })
         303  +
                        .collect();
         304  +
                    uri.push_str(&pairs.join("&"));
         305  +
                }
         306  +
                request.set_uri(uri.as_str()).expect("valid URI");
  228    307   
            }
  229         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  230         -
            builder
  231         -
        };
  232         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  233    308   
  234         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         309  +
            return ::std::result::Result::Ok(request);
         310  +
        } else {
         311  +
            let mut request = protocol
         312  +
                .serialize_request(&input, DescribeVoices::INPUT_SCHEMA, "", _cfg)
         313  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         314  +
         315  +
            return ::std::result::Result::Ok(request);
         316  +
        }
  235    317   
    }
  236    318   
}
  237    319   
#[derive(Debug)]
  238    320   
struct DescribeVoicesEndpointParamsInterceptor;
  239    321   
  240    322   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeVoicesEndpointParamsInterceptor {
  241    323   
    fn name(&self) -> &'static str {
  242    324   
        "DescribeVoicesEndpointParamsInterceptor"
  243    325   
    }
  244    326   

tmp-codegen-diff/aws-sdk/sdk/polly/src/operation/describe_voices/_describe_voices_input.rs

@@ -15,15 +183,195 @@
   35     35   
    "com.amazonaws.polly.synthetic",
   36     36   
    "DescribeVoicesInput",
   37     37   
);
   38     38   
static DESCRIBEVOICESINPUT_MEMBER_ENGINE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "com.amazonaws.polly.synthetic#DescribeVoicesInput$Engine",
   41     41   
        "com.amazonaws.polly.synthetic",
   42     42   
        "DescribeVoicesInput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::String,
   45         -
    "engine",
          45  +
    "Engine",
   46     46   
    0,
   47     47   
)
   48     48   
.with_http_query("Engine");
   49     49   
static DESCRIBEVOICESINPUT_MEMBER_LANGUAGE_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   50     50   
    ::aws_smithy_schema::ShapeId::from_static(
   51     51   
        "com.amazonaws.polly.synthetic#DescribeVoicesInput$LanguageCode",
   52     52   
        "com.amazonaws.polly.synthetic",
   53     53   
        "DescribeVoicesInput",
   54     54   
    ),
   55     55   
    ::aws_smithy_schema::ShapeType::String,
   56         -
    "language_code",
          56  +
    "LanguageCode",
   57     57   
    1,
   58     58   
)
   59     59   
.with_http_query("LanguageCode");
   60     60   
static DESCRIBEVOICESINPUT_MEMBER_INCLUDE_ADDITIONAL_LANGUAGE_CODES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   61     61   
    ::aws_smithy_schema::ShapeId::from_static(
   62     62   
        "com.amazonaws.polly.synthetic#DescribeVoicesInput$IncludeAdditionalLanguageCodes",
   63     63   
        "com.amazonaws.polly.synthetic",
   64     64   
        "DescribeVoicesInput",
   65     65   
    ),
   66     66   
    ::aws_smithy_schema::ShapeType::Boolean,
   67         -
    "include_additional_language_codes",
          67  +
    "IncludeAdditionalLanguageCodes",
   68     68   
    2,
   69     69   
)
   70     70   
.with_http_query("IncludeAdditionalLanguageCodes");
   71     71   
static DESCRIBEVOICESINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   72     72   
    ::aws_smithy_schema::ShapeId::from_static(
   73     73   
        "com.amazonaws.polly.synthetic#DescribeVoicesInput$NextToken",
   74     74   
        "com.amazonaws.polly.synthetic",
   75     75   
        "DescribeVoicesInput",
   76     76   
    ),
   77     77   
    ::aws_smithy_schema::ShapeType::String,
   78         -
    "next_token",
          78  +
    "NextToken",
   79     79   
    3,
   80     80   
)
   81     81   
.with_http_query("NextToken");
   82     82   
static DESCRIBEVOICESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   83     83   
    DESCRIBEVOICESINPUT_SCHEMA_ID,
   84     84   
    ::aws_smithy_schema::ShapeType::Structure,
   85     85   
    &[
   86     86   
        &DESCRIBEVOICESINPUT_MEMBER_ENGINE,
   87     87   
        &DESCRIBEVOICESINPUT_MEMBER_LANGUAGE_CODE,
   88     88   
        &DESCRIBEVOICESINPUT_MEMBER_INCLUDE_ADDITIONAL_LANGUAGE_CODES,
   89     89   
        &DESCRIBEVOICESINPUT_MEMBER_NEXT_TOKEN,
   90     90   
    ],
   91         -
);
          91  +
)
          92  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/v1/voices", None));
   92     93   
impl DescribeVoicesInput {
   93     94   
    /// The schema for this shape.
   94     95   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEVOICESINPUT_SCHEMA;
   95     96   
}
   96     97   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeVoicesInput {
   97     98   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   98     99   
    fn serialize_members(
   99    100   
        &self,
  100    101   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  101    102   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  102    103   
        if let Some(ref val) = self.engine {
  103    104   
            ser.write_string(&DESCRIBEVOICESINPUT_MEMBER_ENGINE, val.as_str())?;
  104    105   
        }
  105    106   
        if let Some(ref val) = self.language_code {
  106    107   
            ser.write_string(&DESCRIBEVOICESINPUT_MEMBER_LANGUAGE_CODE, val.as_str())?;
  107    108   
        }
  108    109   
        if let Some(ref val) = self.include_additional_language_codes {
  109    110   
            ser.write_boolean(&DESCRIBEVOICESINPUT_MEMBER_INCLUDE_ADDITIONAL_LANGUAGE_CODES, *val)?;
  110    111   
        }
  111    112   
        if let Some(ref val) = self.next_token {
  112    113   
            ser.write_string(&DESCRIBEVOICESINPUT_MEMBER_NEXT_TOKEN, val)?;
  113    114   
        }
  114    115   
        Ok(())
  115    116   
    }
  116    117   
}
  117    118   
impl DescribeVoicesInput {
  118    119   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  119         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  120         -
        deserializer: &mut D,
         120  +
    pub fn deserialize(
         121  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  121    122   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  122    123   
        #[allow(unused_variables, unused_mut)]
  123    124   
        let mut builder = Self::builder();
  124    125   
        #[allow(
  125    126   
            unused_variables,
  126    127   
            unreachable_code,
  127    128   
            clippy::single_match,
  128    129   
            clippy::match_single_binding,
  129    130   
            clippy::diverging_sub_expression
  130    131   
        )]
  131         -
        deserializer.read_struct(&DESCRIBEVOICESINPUT_SCHEMA, (), |_, member, deser| {
         132  +
        deserializer.read_struct(&DESCRIBEVOICESINPUT_SCHEMA, &mut |member, deser| {
  132    133   
            match member.member_index() {
  133    134   
                Some(0) => {
  134    135   
                    builder.engine = Some(crate::types::Engine::from(deser.read_string(member)?.as_str()));
  135    136   
                }
  136    137   
                Some(1) => {
  137    138   
                    builder.language_code = Some(crate::types::LanguageCode::from(deser.read_string(member)?.as_str()));
  138    139   
                }
  139    140   
                Some(2) => {
  140    141   
                    builder.include_additional_language_codes = Some(deser.read_boolean(member)?);
  141    142   
                }
  142    143   
                Some(3) => {
  143    144   
                    builder.next_token = Some(deser.read_string(member)?);
  144    145   
                }
  145    146   
                _ => {}
  146    147   
            }
  147    148   
            Ok(())
  148    149   
        })?;
  149    150   
        builder
  150    151   
            .build()
  151    152   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  152    153   
    }
  153    154   
}
         155  +
impl DescribeVoicesInput {
         156  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         157  +
    pub fn deserialize_with_response(
         158  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         159  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         160  +
        _status: u16,
         161  +
        _body: &[u8],
         162  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         163  +
        Self::deserialize(deserializer)
         164  +
    }
         165  +
}
  154    166   
impl DescribeVoicesInput {
  155    167   
    /// Creates a new builder-style object to manufacture [`DescribeVoicesInput`](crate::operation::describe_voices::DescribeVoicesInput).
  156    168   
    pub fn builder() -> crate::operation::describe_voices::builders::DescribeVoicesInputBuilder {
  157    169   
        crate::operation::describe_voices::builders::DescribeVoicesInputBuilder::default()
  158    170   
    }
  159    171   
}
  160    172   
  161    173   
/// A builder for [`DescribeVoicesInput`](crate::operation::describe_voices::DescribeVoicesInput).
  162    174   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  163    175   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/polly/src/operation/describe_voices/_describe_voices_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/polly/src/operation/get_lexicon.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 `GetLexicon`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct GetLexicon;
    6      6   
impl GetLexicon {
    7      7   
    /// Creates a new `GetLexicon`
    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::get_lexicon::GetLexiconInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::get_lexicon::GetLexiconOutput::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::get_lexicon::GetLexiconInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::get_lexicon::GetLexiconOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::get_lexicon::GetLexiconError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -116,120 +243,332 @@
  136    140   
                crate::operation::get_lexicon::GetLexiconError,
  137    141   
            >::new());
  138    142   
  139    143   
        ::std::borrow::Cow::Owned(rcb)
  140    144   
    }
  141    145   
}
  142    146   
  143    147   
#[derive(Debug)]
  144    148   
struct GetLexiconResponseDeserializer;
  145    149   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetLexiconResponseDeserializer {
  146         -
    fn deserialize_nonstreaming(
         150  +
    fn deserialize_nonstreaming_with_config(
  147    151   
        &self,
  148    152   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         153  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  149    154   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  150    155   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  151         -
        let headers = response.headers();
  152         -
        let body = response.body().bytes().expect("body loaded");
  153    156   
        #[allow(unused_mut)]
  154    157   
        let mut force_error = false;
  155    158   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  156         -
        let parse_result = if !success && status != 200 || force_error {
  157         -
            crate::protocol_serde::shape_get_lexicon::de_get_lexicon_http_error(status, headers, body)
         159  +
        if !success && status != 200 || force_error {
         160  +
            let headers = response.headers();
         161  +
            let body = response.body().bytes().expect("body loaded");
         162  +
            #[allow(unused_mut)]
         163  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         164  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         165  +
            })?;
         166  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         167  +
            let generic = generic_builder.build();
         168  +
            let error_code = match generic.code() {
         169  +
                ::std::option::Option::Some(code) => code,
         170  +
                ::std::option::Option::None => {
         171  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         172  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::get_lexicon::GetLexiconError::unhandled(generic)),
         173  +
                    ))
         174  +
                }
         175  +
            };
         176  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         177  +
            let protocol = _cfg
         178  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         179  +
                .expect("a SharedClientProtocol is required");
         180  +
            let err = match error_code {
         181  +
                "LexiconNotFoundException" => crate::operation::get_lexicon::GetLexiconError::LexiconNotFoundException({
         182  +
                    let mut tmp = match protocol
         183  +
                        .deserialize_response(response, crate::types::error::LexiconNotFoundException::SCHEMA, _cfg)
         184  +
                        .and_then(|mut deser| {
         185  +
                            crate::types::error::LexiconNotFoundException::deserialize_with_response(
         186  +
                                &mut *deser,
         187  +
                                response.headers(),
         188  +
                                response.status().into(),
         189  +
                                body,
         190  +
                            )
         191  +
                        }) {
         192  +
                        ::std::result::Result::Ok(val) => val,
         193  +
                        ::std::result::Result::Err(e) => {
         194  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         195  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         196  +
                            ))
         197  +
                        }
         198  +
                    };
         199  +
                    tmp.meta = generic;
         200  +
                    if tmp.message.is_none() {
         201  +
                        tmp.message = _error_message;
         202  +
                    }
         203  +
                    tmp
         204  +
                }),
         205  +
                "ServiceFailureException" => crate::operation::get_lexicon::GetLexiconError::ServiceFailureException({
         206  +
                    let mut tmp = match protocol
         207  +
                        .deserialize_response(response, crate::types::error::ServiceFailureException::SCHEMA, _cfg)
         208  +
                        .and_then(|mut deser| {
         209  +
                            crate::types::error::ServiceFailureException::deserialize_with_response(
         210  +
                                &mut *deser,
         211  +
                                response.headers(),
         212  +
                                response.status().into(),
         213  +
                                body,
         214  +
                            )
         215  +
                        }) {
         216  +
                        ::std::result::Result::Ok(val) => val,
         217  +
                        ::std::result::Result::Err(e) => {
         218  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         219  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         220  +
                            ))
         221  +
                        }
         222  +
                    };
         223  +
                    tmp.meta = generic;
         224  +
                    if tmp.message.is_none() {
         225  +
                        tmp.message = _error_message;
         226  +
                    }
         227  +
                    tmp
         228  +
                }),
         229  +
                _ => crate::operation::get_lexicon::GetLexiconError::generic(generic),
         230  +
            };
         231  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         232  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         233  +
            ))
  158    234   
        } else {
  159         -
            crate::protocol_serde::shape_get_lexicon::de_get_lexicon_http_response(status, headers, body)
  160         -
        };
  161         -
        crate::protocol_serde::type_erase_result(parse_result)
         235  +
            let protocol = _cfg
         236  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         237  +
                .expect("a SharedClientProtocol is required");
         238  +
            let mut deser = protocol.deserialize_response(response, GetLexicon::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         239  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         240  +
            })?;
         241  +
            let body = response.body().bytes().expect("body loaded");
         242  +
            let output = crate::operation::get_lexicon::GetLexiconOutput::deserialize_with_response(
         243  +
                &mut *deser,
         244  +
                response.headers(),
         245  +
                response.status().into(),
         246  +
                body,
         247  +
            )
         248  +
            .map_err(|e| {
         249  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         250  +
            })?;
         251  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         252  +
        }
  162    253   
    }
  163    254   
}
  164    255   
#[derive(Debug)]
  165    256   
struct GetLexiconRequestSerializer;
  166    257   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetLexiconRequestSerializer {
  167    258   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  168    259   
    fn serialize_input(
  169    260   
        &self,
  170    261   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  171    262   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  172    263   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  173    264   
        let input = input.downcast::<crate::operation::get_lexicon::GetLexiconInput>().expect("correct type");
  174         -
        let _header_serialization_settings = _cfg
  175         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  176         -
            .cloned()
  177         -
            .unwrap_or_default();
  178         -
        let mut request_builder = {
  179         -
            #[allow(clippy::uninlined_format_args)]
  180         -
            fn uri_base(
  181         -
                _input: &crate::operation::get_lexicon::GetLexiconInput,
  182         -
                output: &mut ::std::string::String,
  183         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  184         -
                use ::std::fmt::Write as _;
  185         -
                let input_1 = &_input.name;
  186         -
                let input_1 = input_1
  187         -
                    .as_ref()
  188         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("name", "cannot be empty or unset"))?;
  189         -
                let name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  190         -
                if name.is_empty() {
  191         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  192         -
                        "name",
  193         -
                        "cannot be empty or unset",
  194         -
                    ));
         265  +
        let protocol = _cfg
         266  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         267  +
            .expect("a SharedClientProtocol is required");
         268  +
        if protocol.supports_http_bindings() {
         269  +
            let mut request = protocol
         270  +
                .serialize_body(&input, GetLexicon::INPUT_SCHEMA, "", _cfg)
         271  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         272  +
            {
         273  +
                let mut uri = "/v1/lexicons/{Name}".to_string();
         274  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         275  +
                if let Some(ref val) = input.name {
         276  +
                    uri = uri.replace("{Name}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  195    277   
                }
  196         -
                ::std::write!(output, "/v1/lexicons/{Name}", Name = name).expect("formatting should succeed");
  197         -
                ::std::result::Result::Ok(())
  198         -
            }
  199         -
            #[allow(clippy::unnecessary_wraps)]
  200         -
            fn update_http_builder(
  201         -
                input: &crate::operation::get_lexicon::GetLexiconInput,
  202         -
                builder: ::http_1x::request::Builder,
  203         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  204         -
                let mut uri = ::std::string::String::new();
  205         -
                uri_base(input, &mut uri)?;
  206         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
         278  +
                if !query_params.is_empty() {
         279  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         280  +
                    let pairs: Vec<String> = query_params
         281  +
                        .iter()
         282  +
                        .map(|(k, v)| {
         283  +
                            format!(
         284  +
                                "{}={}",
         285  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         286  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         287  +
                            )
         288  +
                        })
         289  +
                        .collect();
         290  +
                    uri.push_str(&pairs.join("&"));
         291  +
                }
         292  +
                request.set_uri(uri.as_str()).expect("valid URI");
  207    293   
            }
  208         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  209         -
            builder
  210         -
        };
  211         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  212    294   
  213         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         295  +
            return ::std::result::Result::Ok(request);
         296  +
        } else {
         297  +
            let mut request = protocol
         298  +
                .serialize_request(&input, GetLexicon::INPUT_SCHEMA, "", _cfg)
         299  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         300  +
         301  +
            return ::std::result::Result::Ok(request);
         302  +
        }
  214    303   
    }
  215    304   
}
  216    305   
#[derive(Debug)]
  217    306   
struct GetLexiconEndpointParamsInterceptor;
  218    307   
  219    308   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetLexiconEndpointParamsInterceptor {
  220    309   
    fn name(&self) -> &'static str {
  221    310   
        "GetLexiconEndpointParamsInterceptor"
  222    311   
    }
  223    312   

tmp-codegen-diff/aws-sdk/sdk/polly/src/operation/get_lexicon/_get_lexicon_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/polly/src/operation/get_lexicon/_get_lexicon_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/polly/src/operation/get_speech_synthesis_task.rs

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `GetSpeechSynthesisTask`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct GetSpeechSynthesisTask;
    6      6   
impl GetSpeechSynthesisTask {
    7      7   
    /// Creates a new `GetSpeechSynthesisTask`
    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::get_speech_synthesis_task::GetSpeechSynthesisTaskInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskOutput::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::get_speech_synthesis_task::GetSpeechSynthesisTaskInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +247,366 @@
  138    142   
                crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskError,
  139    143   
            >::new());
  140    144   
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct GetSpeechSynthesisTaskResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetSpeechSynthesisTaskResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_get_speech_synthesis_task::de_get_speech_synthesis_task_http_error(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         175  +
                            crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskError::unhandled(generic),
         176  +
                        ),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "InvalidTaskIdException" => crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskError::InvalidTaskIdException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::InvalidTaskIdException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::InvalidTaskIdException::deserialize_with_response(
         190  +
                                &mut *deser,
         191  +
                                response.headers(),
         192  +
                                response.status().into(),
         193  +
                                body,
         194  +
                            )
         195  +
                        }) {
         196  +
                        ::std::result::Result::Ok(val) => val,
         197  +
                        ::std::result::Result::Err(e) => {
         198  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         199  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         200  +
                            ))
         201  +
                        }
         202  +
                    };
         203  +
                    tmp.meta = generic;
         204  +
                    if tmp.message.is_none() {
         205  +
                        tmp.message = _error_message;
         206  +
                    }
         207  +
                    tmp
         208  +
                }),
         209  +
                "ServiceFailureException" => crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskError::ServiceFailureException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::ServiceFailureException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::ServiceFailureException::deserialize_with_response(
         214  +
                                &mut *deser,
         215  +
                                response.headers(),
         216  +
                                response.status().into(),
         217  +
                                body,
         218  +
                            )
         219  +
                        }) {
         220  +
                        ::std::result::Result::Ok(val) => val,
         221  +
                        ::std::result::Result::Err(e) => {
         222  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         223  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         224  +
                            ))
         225  +
                        }
         226  +
                    };
         227  +
                    tmp.meta = generic;
         228  +
                    if tmp.message.is_none() {
         229  +
                        tmp.message = _error_message;
         230  +
                    }
         231  +
                    tmp
         232  +
                }),
         233  +
                "SynthesisTaskNotFoundException" => {
         234  +
                    crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskError::SynthesisTaskNotFoundException({
         235  +
                        let mut tmp = match protocol
         236  +
                            .deserialize_response(response, crate::types::error::SynthesisTaskNotFoundException::SCHEMA, _cfg)
         237  +
                            .and_then(|mut deser| {
         238  +
                                crate::types::error::SynthesisTaskNotFoundException::deserialize_with_response(
         239  +
                                    &mut *deser,
         240  +
                                    response.headers(),
         241  +
                                    response.status().into(),
         242  +
                                    body,
         243  +
                                )
         244  +
                            }) {
         245  +
                            ::std::result::Result::Ok(val) => val,
         246  +
                            ::std::result::Result::Err(e) => {
         247  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         248  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         249  +
                                ))
         250  +
                            }
         251  +
                        };
         252  +
                        tmp.meta = generic;
         253  +
                        if tmp.message.is_none() {
         254  +
                            tmp.message = _error_message;
         255  +
                        }
         256  +
                        tmp
         257  +
                    })
         258  +
                }
         259  +
                _ => crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskError::generic(generic),
         260  +
            };
         261  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         262  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         263  +
            ))
  160    264   
        } else {
  161         -
            crate::protocol_serde::shape_get_speech_synthesis_task::de_get_speech_synthesis_task_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         265  +
            let protocol = _cfg
         266  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         267  +
                .expect("a SharedClientProtocol is required");
         268  +
            let mut deser = protocol
         269  +
                .deserialize_response(response, GetSpeechSynthesisTask::OUTPUT_SCHEMA, _cfg)
         270  +
                .map_err(|e| {
         271  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         272  +
                })?;
         273  +
            let body = response.body().bytes().expect("body loaded");
         274  +
            let output = crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskOutput::deserialize_with_response(
         275  +
                &mut *deser,
         276  +
                response.headers(),
         277  +
                response.status().into(),
         278  +
                body,
         279  +
            )
         280  +
            .map_err(|e| {
         281  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         282  +
            })?;
         283  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         284  +
        }
  164    285   
    }
  165    286   
}
  166    287   
#[derive(Debug)]
  167    288   
struct GetSpeechSynthesisTaskRequestSerializer;
  168    289   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetSpeechSynthesisTaskRequestSerializer {
  169    290   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    291   
    fn serialize_input(
  171    292   
        &self,
  172    293   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    294   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    295   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    296   
        let input = input
  176    297   
            .downcast::<crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskInput>()
  177    298   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                let input_1 = &_input.task_id;
  190         -
                let input_1 = input_1
  191         -
                    .as_ref()
  192         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("task_id", "cannot be empty or unset"))?;
  193         -
                let task_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  194         -
                if task_id.is_empty() {
  195         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  196         -
                        "task_id",
  197         -
                        "cannot be empty or unset",
  198         -
                    ));
         299  +
        let protocol = _cfg
         300  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         301  +
            .expect("a SharedClientProtocol is required");
         302  +
        if protocol.supports_http_bindings() {
         303  +
            let mut request = protocol
         304  +
                .serialize_body(&input, GetSpeechSynthesisTask::INPUT_SCHEMA, "", _cfg)
         305  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         306  +
            {
         307  +
                let mut uri = "/v1/synthesisTasks/{TaskId}".to_string();
         308  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         309  +
                if let Some(ref val) = input.task_id {
         310  +
                    uri = uri.replace("{TaskId}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  199    311   
                }
  200         -
                ::std::write!(output, "/v1/synthesisTasks/{TaskId}", TaskId = task_id).expect("formatting should succeed");
  201         -
                ::std::result::Result::Ok(())
  202         -
            }
  203         -
            #[allow(clippy::unnecessary_wraps)]
  204         -
            fn update_http_builder(
  205         -
                input: &crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskInput,
  206         -
                builder: ::http_1x::request::Builder,
  207         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  208         -
                let mut uri = ::std::string::String::new();
  209         -
                uri_base(input, &mut uri)?;
  210         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
         312  +
                if !query_params.is_empty() {
         313  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         314  +
                    let pairs: Vec<String> = query_params
         315  +
                        .iter()
         316  +
                        .map(|(k, v)| {
         317  +
                            format!(
         318  +
                                "{}={}",
         319  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         320  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         321  +
                            )
         322  +
                        })
         323  +
                        .collect();
         324  +
                    uri.push_str(&pairs.join("&"));
         325  +
                }
         326  +
                request.set_uri(uri.as_str()).expect("valid URI");
  211    327   
            }
  212         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  213         -
            builder
  214         -
        };
  215         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  216    328   
  217         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         329  +
            return ::std::result::Result::Ok(request);
         330  +
        } else {
         331  +
            let mut request = protocol
         332  +
                .serialize_request(&input, GetSpeechSynthesisTask::INPUT_SCHEMA, "", _cfg)
         333  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         334  +
         335  +
            return ::std::result::Result::Ok(request);
         336  +
        }
  218    337   
    }
  219    338   
}
  220    339   
#[derive(Debug)]
  221    340   
struct GetSpeechSynthesisTaskEndpointParamsInterceptor;
  222    341   
  223    342   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetSpeechSynthesisTaskEndpointParamsInterceptor {
  224    343   
    fn name(&self) -> &'static str {
  225    344   
        "GetSpeechSynthesisTaskEndpointParamsInterceptor"
  226    345   
    }
  227    346