AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

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

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

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `StartSpeechSynthesisTask`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct StartSpeechSynthesisTask;
    6      6   
impl StartSpeechSynthesisTask {
    7      7   
    /// Creates a new `StartSpeechSynthesisTask`
    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 =
          13  +
        crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -118,124 +242,570 @@
  138    144   
                crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError,
  139    145   
            >::new());
  140    146   
  141    147   
        ::std::borrow::Cow::Owned(rcb)
  142    148   
    }
  143    149   
}
  144    150   
  145    151   
#[derive(Debug)]
  146    152   
struct StartSpeechSynthesisTaskResponseDeserializer;
  147    153   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for StartSpeechSynthesisTaskResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         154  +
    fn deserialize_nonstreaming_with_config(
  149    155   
        &self,
  150    156   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         157  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    158   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    159   
        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    160   
        #[allow(unused_mut)]
  156    161   
        let mut force_error = false;
  157    162   
        ::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_start_speech_synthesis_task::de_start_speech_synthesis_task_http_error(status, headers, body)
         163  +
        if !success && status != 200 || force_error {
         164  +
            let headers = response.headers();
         165  +
            let body = response.body().bytes().expect("body loaded");
         166  +
            #[allow(unused_mut)]
         167  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         168  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         169  +
            })?;
         170  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         171  +
            let generic = generic_builder.build();
         172  +
            let error_code = match generic.code() {
         173  +
                ::std::option::Option::Some(code) => code,
         174  +
                ::std::option::Option::None => {
         175  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         176  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         177  +
                            crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::unhandled(generic),
         178  +
                        ),
         179  +
                    ))
         180  +
                }
         181  +
            };
         182  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         183  +
            let protocol = _cfg
         184  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         185  +
                .expect("a SharedClientProtocol is required");
         186  +
            let err = match error_code {
         187  +
                "EngineNotSupportedException" => {
         188  +
                    crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::EngineNotSupportedException({
         189  +
                        let mut tmp = match protocol
         190  +
                            .deserialize_response(response, crate::types::error::EngineNotSupportedException::SCHEMA, _cfg)
         191  +
                            .and_then(|mut deser| {
         192  +
                                crate::types::error::EngineNotSupportedException::deserialize_with_response(
         193  +
                                    &mut *deser,
         194  +
                                    response.headers(),
         195  +
                                    response.status().into(),
         196  +
                                    body,
         197  +
                                )
         198  +
                            }) {
         199  +
                            ::std::result::Result::Ok(val) => val,
         200  +
                            ::std::result::Result::Err(e) => {
         201  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         202  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         203  +
                                ))
         204  +
                            }
         205  +
                        };
         206  +
                        tmp.meta = generic;
         207  +
                        if tmp.message.is_none() {
         208  +
                            tmp.message = _error_message;
         209  +
                        }
         210  +
                        tmp
         211  +
                    })
         212  +
                }
         213  +
                "InvalidS3BucketException" => {
         214  +
                    crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::InvalidS3BucketException({
         215  +
                        let mut tmp = match protocol
         216  +
                            .deserialize_response(response, crate::types::error::InvalidS3BucketException::SCHEMA, _cfg)
         217  +
                            .and_then(|mut deser| {
         218  +
                                crate::types::error::InvalidS3BucketException::deserialize_with_response(
         219  +
                                    &mut *deser,
         220  +
                                    response.headers(),
         221  +
                                    response.status().into(),
         222  +
                                    body,
         223  +
                                )
         224  +
                            }) {
         225  +
                            ::std::result::Result::Ok(val) => val,
         226  +
                            ::std::result::Result::Err(e) => {
         227  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         228  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         229  +
                                ))
         230  +
                            }
         231  +
                        };
         232  +
                        tmp.meta = generic;
         233  +
                        if tmp.message.is_none() {
         234  +
                            tmp.message = _error_message;
         235  +
                        }
         236  +
                        tmp
         237  +
                    })
         238  +
                }
         239  +
                "InvalidS3KeyException" => crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::InvalidS3KeyException({
         240  +
                    let mut tmp = match protocol
         241  +
                        .deserialize_response(response, crate::types::error::InvalidS3KeyException::SCHEMA, _cfg)
         242  +
                        .and_then(|mut deser| {
         243  +
                            crate::types::error::InvalidS3KeyException::deserialize_with_response(
         244  +
                                &mut *deser,
         245  +
                                response.headers(),
         246  +
                                response.status().into(),
         247  +
                                body,
         248  +
                            )
         249  +
                        }) {
         250  +
                        ::std::result::Result::Ok(val) => val,
         251  +
                        ::std::result::Result::Err(e) => {
         252  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         253  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         254  +
                            ))
         255  +
                        }
         256  +
                    };
         257  +
                    tmp.meta = generic;
         258  +
                    if tmp.message.is_none() {
         259  +
                        tmp.message = _error_message;
         260  +
                    }
         261  +
                    tmp
         262  +
                }),
         263  +
                "InvalidSampleRateException" => {
         264  +
                    crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::InvalidSampleRateException({
         265  +
                        let mut tmp = match protocol
         266  +
                            .deserialize_response(response, crate::types::error::InvalidSampleRateException::SCHEMA, _cfg)
         267  +
                            .and_then(|mut deser| {
         268  +
                                crate::types::error::InvalidSampleRateException::deserialize_with_response(
         269  +
                                    &mut *deser,
         270  +
                                    response.headers(),
         271  +
                                    response.status().into(),
         272  +
                                    body,
         273  +
                                )
         274  +
                            }) {
         275  +
                            ::std::result::Result::Ok(val) => val,
         276  +
                            ::std::result::Result::Err(e) => {
         277  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         278  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         279  +
                                ))
         280  +
                            }
         281  +
                        };
         282  +
                        tmp.meta = generic;
         283  +
                        if tmp.message.is_none() {
         284  +
                            tmp.message = _error_message;
         285  +
                        }
         286  +
                        tmp
         287  +
                    })
         288  +
                }
         289  +
                "InvalidSnsTopicArnException" => {
         290  +
                    crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::InvalidSnsTopicArnException({
         291  +
                        let mut tmp = match protocol
         292  +
                            .deserialize_response(response, crate::types::error::InvalidSnsTopicArnException::SCHEMA, _cfg)
         293  +
                            .and_then(|mut deser| {
         294  +
                                crate::types::error::InvalidSnsTopicArnException::deserialize_with_response(
         295  +
                                    &mut *deser,
         296  +
                                    response.headers(),
         297  +
                                    response.status().into(),
         298  +
                                    body,
         299  +
                                )
         300  +
                            }) {
         301  +
                            ::std::result::Result::Ok(val) => val,
         302  +
                            ::std::result::Result::Err(e) => {
         303  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         304  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         305  +
                                ))
         306  +
                            }
         307  +
                        };
         308  +
                        tmp.meta = generic;
         309  +
                        if tmp.message.is_none() {
         310  +
                            tmp.message = _error_message;
         311  +
                        }
         312  +
                        tmp
         313  +
                    })
         314  +
                }
         315  +
                "InvalidSsmlException" => crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::InvalidSsmlException({
         316  +
                    let mut tmp = match protocol
         317  +
                        .deserialize_response(response, crate::types::error::InvalidSsmlException::SCHEMA, _cfg)
         318  +
                        .and_then(|mut deser| {
         319  +
                            crate::types::error::InvalidSsmlException::deserialize_with_response(
         320  +
                                &mut *deser,
         321  +
                                response.headers(),
         322  +
                                response.status().into(),
         323  +
                                body,
         324  +
                            )
         325  +
                        }) {
         326  +
                        ::std::result::Result::Ok(val) => val,
         327  +
                        ::std::result::Result::Err(e) => {
         328  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         329  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         330  +
                            ))
         331  +
                        }
         332  +
                    };
         333  +
                    tmp.meta = generic;
         334  +
                    if tmp.message.is_none() {
         335  +
                        tmp.message = _error_message;
         336  +
                    }
         337  +
                    tmp
         338  +
                }),
         339  +
                "LanguageNotSupportedException" => {
         340  +
                    crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::LanguageNotSupportedException({
         341  +
                        let mut tmp = match protocol
         342  +
                            .deserialize_response(response, crate::types::error::LanguageNotSupportedException::SCHEMA, _cfg)
         343  +
                            .and_then(|mut deser| {
         344  +
                                crate::types::error::LanguageNotSupportedException::deserialize_with_response(
         345  +
                                    &mut *deser,
         346  +
                                    response.headers(),
         347  +
                                    response.status().into(),
         348  +
                                    body,
         349  +
                                )
         350  +
                            }) {
         351  +
                            ::std::result::Result::Ok(val) => val,
         352  +
                            ::std::result::Result::Err(e) => {
         353  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         354  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         355  +
                                ))
         356  +
                            }
         357  +
                        };
         358  +
                        tmp.meta = generic;
         359  +
                        if tmp.message.is_none() {
         360  +
                            tmp.message = _error_message;
         361  +
                        }
         362  +
                        tmp
         363  +
                    })
         364  +
                }
         365  +
                "LexiconNotFoundException" => {
         366  +
                    crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::LexiconNotFoundException({
         367  +
                        let mut tmp = match protocol
         368  +
                            .deserialize_response(response, crate::types::error::LexiconNotFoundException::SCHEMA, _cfg)
         369  +
                            .and_then(|mut deser| {
         370  +
                                crate::types::error::LexiconNotFoundException::deserialize_with_response(
         371  +
                                    &mut *deser,
         372  +
                                    response.headers(),
         373  +
                                    response.status().into(),
         374  +
                                    body,
         375  +
                                )
         376  +
                            }) {
         377  +
                            ::std::result::Result::Ok(val) => val,
         378  +
                            ::std::result::Result::Err(e) => {
         379  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         380  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         381  +
                                ))
         382  +
                            }
         383  +
                        };
         384  +
                        tmp.meta = generic;
         385  +
                        if tmp.message.is_none() {
         386  +
                            tmp.message = _error_message;
         387  +
                        }
         388  +
                        tmp
         389  +
                    })
         390  +
                }
         391  +
                "MarksNotSupportedForFormatException" => {
         392  +
                    crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::MarksNotSupportedForFormatException({
         393  +
                        let mut tmp = match protocol
         394  +
                            .deserialize_response(response, crate::types::error::MarksNotSupportedForFormatException::SCHEMA, _cfg)
         395  +
                            .and_then(|mut deser| {
         396  +
                                crate::types::error::MarksNotSupportedForFormatException::deserialize_with_response(
         397  +
                                    &mut *deser,
         398  +
                                    response.headers(),
         399  +
                                    response.status().into(),
         400  +
                                    body,
         401  +
                                )
         402  +
                            }) {
         403  +
                            ::std::result::Result::Ok(val) => val,
         404  +
                            ::std::result::Result::Err(e) => {
         405  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         406  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         407  +
                                ))
         408  +
                            }
         409  +
                        };
         410  +
                        tmp.meta = generic;
         411  +
                        if tmp.message.is_none() {
         412  +
                            tmp.message = _error_message;
         413  +
                        }
         414  +
                        tmp
         415  +
                    })
         416  +
                }
         417  +
                "ServiceFailureException" => crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::ServiceFailureException({
         418  +
                    let mut tmp = match protocol
         419  +
                        .deserialize_response(response, crate::types::error::ServiceFailureException::SCHEMA, _cfg)
         420  +
                        .and_then(|mut deser| {
         421  +
                            crate::types::error::ServiceFailureException::deserialize_with_response(
         422  +
                                &mut *deser,
         423  +
                                response.headers(),
         424  +
                                response.status().into(),
         425  +
                                body,
         426  +
                            )
         427  +
                        }) {
         428  +
                        ::std::result::Result::Ok(val) => val,
         429  +
                        ::std::result::Result::Err(e) => {
         430  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         431  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         432  +
                            ))
         433  +
                        }
         434  +
                    };
         435  +
                    tmp.meta = generic;
         436  +
                    if tmp.message.is_none() {
         437  +
                        tmp.message = _error_message;
         438  +
                    }
         439  +
                    tmp
         440  +
                }),
         441  +
                "SsmlMarksNotSupportedForTextTypeException" => {
         442  +
                    crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::SsmlMarksNotSupportedForTextTypeException({
         443  +
                        let mut tmp = match protocol
         444  +
                            .deserialize_response(response, crate::types::error::SsmlMarksNotSupportedForTextTypeException::SCHEMA, _cfg)
         445  +
                            .and_then(|mut deser| {
         446  +
                                crate::types::error::SsmlMarksNotSupportedForTextTypeException::deserialize_with_response(
         447  +
                                    &mut *deser,
         448  +
                                    response.headers(),
         449  +
                                    response.status().into(),
         450  +
                                    body,
         451  +
                                )
         452  +
                            }) {
         453  +
                            ::std::result::Result::Ok(val) => val,
         454  +
                            ::std::result::Result::Err(e) => {
         455  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         456  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         457  +
                                ))
         458  +
                            }
         459  +
                        };
         460  +
                        tmp.meta = generic;
         461  +
                        if tmp.message.is_none() {
         462  +
                            tmp.message = _error_message;
         463  +
                        }
         464  +
                        tmp
         465  +
                    })
         466  +
                }
         467  +
                "TextLengthExceededException" => {
         468  +
                    crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::TextLengthExceededException({
         469  +
                        let mut tmp = match protocol
         470  +
                            .deserialize_response(response, crate::types::error::TextLengthExceededException::SCHEMA, _cfg)
         471  +
                            .and_then(|mut deser| {
         472  +
                                crate::types::error::TextLengthExceededException::deserialize_with_response(
         473  +
                                    &mut *deser,
         474  +
                                    response.headers(),
         475  +
                                    response.status().into(),
         476  +
                                    body,
         477  +
                                )
         478  +
                            }) {
         479  +
                            ::std::result::Result::Ok(val) => val,
         480  +
                            ::std::result::Result::Err(e) => {
         481  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         482  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         483  +
                                ))
         484  +
                            }
         485  +
                        };
         486  +
                        tmp.meta = generic;
         487  +
                        if tmp.message.is_none() {
         488  +
                            tmp.message = _error_message;
         489  +
                        }
         490  +
                        tmp
         491  +
                    })
         492  +
                }
         493  +
                _ => crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::generic(generic),
         494  +
            };
         495  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         496  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         497  +
            ))
  160    498   
        } else {
  161         -
            crate::protocol_serde::shape_start_speech_synthesis_task::de_start_speech_synthesis_task_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         499  +
            let protocol = _cfg
         500  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         501  +
                .expect("a SharedClientProtocol is required");
         502  +
            let mut deser = protocol
         503  +
                .deserialize_response(response, StartSpeechSynthesisTask::OUTPUT_SCHEMA, _cfg)
         504  +
                .map_err(|e| {
         505  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         506  +
                })?;
         507  +
            let body = response.body().bytes().expect("body loaded");
         508  +
            let output = crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskOutput::deserialize_with_response(
         509  +
                &mut *deser,
         510  +
                response.headers(),
         511  +
                response.status().into(),
         512  +
                body,
         513  +
            )
         514  +
            .map_err(|e| {
         515  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         516  +
            })?;
         517  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         518  +
        }
  164    519   
    }
  165    520   
}
  166    521   
#[derive(Debug)]
  167    522   
struct StartSpeechSynthesisTaskRequestSerializer;
  168    523   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for StartSpeechSynthesisTaskRequestSerializer {
  169    524   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    525   
    fn serialize_input(
  171    526   
        &self,
  172    527   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    528   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    529   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    530   
        let input = input
  176    531   
            .downcast::<crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskInput>()
  177    532   
            .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::start_speech_synthesis_task::StartSpeechSynthesisTaskInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                ::std::write!(output, "/v1/synthesisTasks").expect("formatting should succeed");
  190         -
                ::std::result::Result::Ok(())
  191         -
            }
  192         -
            #[allow(clippy::unnecessary_wraps)]
  193         -
            fn update_http_builder(
  194         -
                input: &crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskInput,
  195         -
                builder: ::http_1x::request::Builder,
  196         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  197         -
                let mut uri = ::std::string::String::new();
  198         -
                uri_base(input, &mut uri)?;
  199         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  200         -
            }
  201         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  202         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  203         -
            builder
  204         -
        };
  205         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  206         -
            crate::protocol_serde::shape_start_speech_synthesis_task::ser_start_speech_synthesis_task_input(&input)?,
  207         -
        );
  208         -
        if let Some(content_length) = body.content_length() {
  209         -
            let content_length = content_length.to_string();
  210         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  211         -
        }
  212         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         533  +
        let protocol = _cfg
         534  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         535  +
            .expect("a SharedClientProtocol is required");
         536  +
        let mut request = protocol
         537  +
            .serialize_request(&input, StartSpeechSynthesisTask::INPUT_SCHEMA, "", _cfg)
         538  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         539  +
         540  +
        return ::std::result::Result::Ok(request);
  213    541   
    }
  214    542   
}
  215    543   
#[derive(Debug)]
  216    544   
struct StartSpeechSynthesisTaskEndpointParamsInterceptor;
  217    545   
  218    546   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StartSpeechSynthesisTaskEndpointParamsInterceptor {
  219    547   
    fn name(&self) -> &'static str {
  220    548   
        "StartSpeechSynthesisTaskEndpointParamsInterceptor"
  221    549   
    }
  222    550   

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

@@ -73,73 +263,264 @@
   93     93   
    "com.amazonaws.polly.synthetic",
   94     94   
    "StartSpeechSynthesisTaskInput",
   95     95   
);
   96     96   
static STARTSPEECHSYNTHESISTASKINPUT_MEMBER_ENGINE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   97     97   
    ::aws_smithy_schema::ShapeId::from_static(
   98     98   
        "com.amazonaws.polly.synthetic#StartSpeechSynthesisTaskInput$Engine",
   99     99   
        "com.amazonaws.polly.synthetic",
  100    100   
        "StartSpeechSynthesisTaskInput",
  101    101   
    ),
  102    102   
    ::aws_smithy_schema::ShapeType::String,
  103         -
    "engine",
         103  +
    "Engine",
  104    104   
    0,
  105    105   
);
  106    106   
static STARTSPEECHSYNTHESISTASKINPUT_MEMBER_LANGUAGE_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  107    107   
    ::aws_smithy_schema::ShapeId::from_static(
  108    108   
        "com.amazonaws.polly.synthetic#StartSpeechSynthesisTaskInput$LanguageCode",
  109    109   
        "com.amazonaws.polly.synthetic",
  110    110   
        "StartSpeechSynthesisTaskInput",
  111    111   
    ),
  112    112   
    ::aws_smithy_schema::ShapeType::String,
  113         -
    "language_code",
         113  +
    "LanguageCode",
  114    114   
    1,
  115    115   
);
  116    116   
static STARTSPEECHSYNTHESISTASKINPUT_MEMBER_LEXICON_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  117    117   
    ::aws_smithy_schema::ShapeId::from_static(
  118    118   
        "com.amazonaws.polly.synthetic#StartSpeechSynthesisTaskInput$LexiconNames",
  119    119   
        "com.amazonaws.polly.synthetic",
  120    120   
        "StartSpeechSynthesisTaskInput",
  121    121   
    ),
  122    122   
    ::aws_smithy_schema::ShapeType::List,
  123         -
    "lexicon_names",
         123  +
    "LexiconNames",
  124    124   
    2,
  125    125   
);
  126    126   
static STARTSPEECHSYNTHESISTASKINPUT_MEMBER_OUTPUT_FORMAT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  127    127   
    ::aws_smithy_schema::ShapeId::from_static(
  128    128   
        "com.amazonaws.polly.synthetic#StartSpeechSynthesisTaskInput$OutputFormat",
  129    129   
        "com.amazonaws.polly.synthetic",
  130    130   
        "StartSpeechSynthesisTaskInput",
  131    131   
    ),
  132    132   
    ::aws_smithy_schema::ShapeType::String,
  133         -
    "output_format",
         133  +
    "OutputFormat",
  134    134   
    3,
  135    135   
);
  136    136   
static STARTSPEECHSYNTHESISTASKINPUT_MEMBER_OUTPUT_S3_BUCKET_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  137    137   
    ::aws_smithy_schema::ShapeId::from_static(
  138    138   
        "com.amazonaws.polly.synthetic#StartSpeechSynthesisTaskInput$OutputS3BucketName",
  139    139   
        "com.amazonaws.polly.synthetic",
  140    140   
        "StartSpeechSynthesisTaskInput",
  141    141   
    ),
  142    142   
    ::aws_smithy_schema::ShapeType::String,
  143         -
    "output_s3_bucket_name",
         143  +
    "OutputS3BucketName",
  144    144   
    4,
  145    145   
);
  146    146   
static STARTSPEECHSYNTHESISTASKINPUT_MEMBER_OUTPUT_S3_KEY_PREFIX: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  147    147   
    ::aws_smithy_schema::ShapeId::from_static(
  148    148   
        "com.amazonaws.polly.synthetic#StartSpeechSynthesisTaskInput$OutputS3KeyPrefix",
  149    149   
        "com.amazonaws.polly.synthetic",
  150    150   
        "StartSpeechSynthesisTaskInput",
  151    151   
    ),
  152    152   
    ::aws_smithy_schema::ShapeType::String,
  153         -
    "output_s3_key_prefix",
         153  +
    "OutputS3KeyPrefix",
  154    154   
    5,
  155    155   
);
  156    156   
static STARTSPEECHSYNTHESISTASKINPUT_MEMBER_SAMPLE_RATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  157    157   
    ::aws_smithy_schema::ShapeId::from_static(
  158    158   
        "com.amazonaws.polly.synthetic#StartSpeechSynthesisTaskInput$SampleRate",
  159    159   
        "com.amazonaws.polly.synthetic",
  160    160   
        "StartSpeechSynthesisTaskInput",
  161    161   
    ),
  162    162   
    ::aws_smithy_schema::ShapeType::String,
  163         -
    "sample_rate",
         163  +
    "SampleRate",
  164    164   
    6,
  165    165   
);
  166    166   
static STARTSPEECHSYNTHESISTASKINPUT_MEMBER_SNS_TOPIC_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  167    167   
    ::aws_smithy_schema::ShapeId::from_static(
  168    168   
        "com.amazonaws.polly.synthetic#StartSpeechSynthesisTaskInput$SnsTopicArn",
  169    169   
        "com.amazonaws.polly.synthetic",
  170    170   
        "StartSpeechSynthesisTaskInput",
  171    171   
    ),
  172    172   
    ::aws_smithy_schema::ShapeType::String,
  173         -
    "sns_topic_arn",
         173  +
    "SnsTopicArn",
  174    174   
    7,
  175    175   
);
  176    176   
static STARTSPEECHSYNTHESISTASKINPUT_MEMBER_SPEECH_MARK_TYPES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  177    177   
    ::aws_smithy_schema::ShapeId::from_static(
  178    178   
        "com.amazonaws.polly.synthetic#StartSpeechSynthesisTaskInput$SpeechMarkTypes",
  179    179   
        "com.amazonaws.polly.synthetic",
  180    180   
        "StartSpeechSynthesisTaskInput",
  181    181   
    ),
  182    182   
    ::aws_smithy_schema::ShapeType::List,
  183         -
    "speech_mark_types",
         183  +
    "SpeechMarkTypes",
  184    184   
    8,
  185    185   
);
  186    186   
static STARTSPEECHSYNTHESISTASKINPUT_MEMBER_TEXT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  187    187   
    ::aws_smithy_schema::ShapeId::from_static(
  188    188   
        "com.amazonaws.polly.synthetic#StartSpeechSynthesisTaskInput$Text",
  189    189   
        "com.amazonaws.polly.synthetic",
  190    190   
        "StartSpeechSynthesisTaskInput",
  191    191   
    ),
  192    192   
    ::aws_smithy_schema::ShapeType::String,
  193         -
    "text",
         193  +
    "Text",
  194    194   
    9,
  195    195   
);
  196    196   
static STARTSPEECHSYNTHESISTASKINPUT_MEMBER_TEXT_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  197    197   
    ::aws_smithy_schema::ShapeId::from_static(
  198    198   
        "com.amazonaws.polly.synthetic#StartSpeechSynthesisTaskInput$TextType",
  199    199   
        "com.amazonaws.polly.synthetic",
  200    200   
        "StartSpeechSynthesisTaskInput",
  201    201   
    ),
  202    202   
    ::aws_smithy_schema::ShapeType::String,
  203         -
    "text_type",
         203  +
    "TextType",
  204    204   
    10,
  205    205   
);
  206    206   
static STARTSPEECHSYNTHESISTASKINPUT_MEMBER_VOICE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  207    207   
    ::aws_smithy_schema::ShapeId::from_static(
  208    208   
        "com.amazonaws.polly.synthetic#StartSpeechSynthesisTaskInput$VoiceId",
  209    209   
        "com.amazonaws.polly.synthetic",
  210    210   
        "StartSpeechSynthesisTaskInput",
  211    211   
    ),
  212    212   
    ::aws_smithy_schema::ShapeType::String,
  213         -
    "voice_id",
         213  +
    "VoiceId",
  214    214   
    11,
  215    215   
);
  216    216   
static STARTSPEECHSYNTHESISTASKINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  217    217   
    STARTSPEECHSYNTHESISTASKINPUT_SCHEMA_ID,
  218    218   
    ::aws_smithy_schema::ShapeType::Structure,
  219    219   
    &[
  220    220   
        &STARTSPEECHSYNTHESISTASKINPUT_MEMBER_ENGINE,
  221    221   
        &STARTSPEECHSYNTHESISTASKINPUT_MEMBER_LANGUAGE_CODE,
  222    222   
        &STARTSPEECHSYNTHESISTASKINPUT_MEMBER_LEXICON_NAMES,
  223    223   
        &STARTSPEECHSYNTHESISTASKINPUT_MEMBER_OUTPUT_FORMAT,
  224    224   
        &STARTSPEECHSYNTHESISTASKINPUT_MEMBER_OUTPUT_S3_BUCKET_NAME,
  225    225   
        &STARTSPEECHSYNTHESISTASKINPUT_MEMBER_OUTPUT_S3_KEY_PREFIX,
  226    226   
        &STARTSPEECHSYNTHESISTASKINPUT_MEMBER_SAMPLE_RATE,
  227    227   
        &STARTSPEECHSYNTHESISTASKINPUT_MEMBER_SNS_TOPIC_ARN,
  228    228   
        &STARTSPEECHSYNTHESISTASKINPUT_MEMBER_SPEECH_MARK_TYPES,
  229    229   
        &STARTSPEECHSYNTHESISTASKINPUT_MEMBER_TEXT,
  230    230   
        &STARTSPEECHSYNTHESISTASKINPUT_MEMBER_TEXT_TYPE,
  231    231   
        &STARTSPEECHSYNTHESISTASKINPUT_MEMBER_VOICE_ID,
  232    232   
    ],
  233         -
);
         233  +
)
         234  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/v1/synthesisTasks", None));
  234    235   
impl StartSpeechSynthesisTaskInput {
  235    236   
    /// The schema for this shape.
  236    237   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STARTSPEECHSYNTHESISTASKINPUT_SCHEMA;
  237    238   
}
  238    239   
impl ::aws_smithy_schema::serde::SerializableStruct for StartSpeechSynthesisTaskInput {
  239    240   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  240    241   
    fn serialize_members(
  241    242   
        &self,
  242    243   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  243    244   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
@@ -271,272 +409,410 @@
  291    292   
            ser.write_string(&STARTSPEECHSYNTHESISTASKINPUT_MEMBER_TEXT_TYPE, val.as_str())?;
  292    293   
        }
  293    294   
        if let Some(ref val) = self.voice_id {
  294    295   
            ser.write_string(&STARTSPEECHSYNTHESISTASKINPUT_MEMBER_VOICE_ID, val.as_str())?;
  295    296   
        }
  296    297   
        Ok(())
  297    298   
    }
  298    299   
}
  299    300   
impl StartSpeechSynthesisTaskInput {
  300    301   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  301         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  302         -
        deserializer: &mut D,
         302  +
    pub fn deserialize(
         303  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  303    304   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  304    305   
        #[allow(unused_variables, unused_mut)]
  305    306   
        let mut builder = Self::builder();
  306    307   
        #[allow(
  307    308   
            unused_variables,
  308    309   
            unreachable_code,
  309    310   
            clippy::single_match,
  310    311   
            clippy::match_single_binding,
  311    312   
            clippy::diverging_sub_expression
  312    313   
        )]
  313         -
        deserializer.read_struct(&STARTSPEECHSYNTHESISTASKINPUT_SCHEMA, (), |_, member, deser| {
         314  +
        deserializer.read_struct(&STARTSPEECHSYNTHESISTASKINPUT_SCHEMA, &mut |member, deser| {
  314    315   
            match member.member_index() {
  315    316   
                Some(0) => {
  316    317   
                    builder.engine = Some(crate::types::Engine::from(deser.read_string(member)?.as_str()));
  317    318   
                }
  318    319   
                Some(1) => {
  319    320   
                    builder.language_code = Some(crate::types::LanguageCode::from(deser.read_string(member)?.as_str()));
  320    321   
                }
  321    322   
                Some(2) => {
  322         -
                    builder.lexicon_names = Some({
  323         -
                        let container = if let Some(cap) = deser.container_size() {
  324         -
                            Vec::with_capacity(cap)
  325         -
                        } else {
  326         -
                            Vec::new()
  327         -
                        };
  328         -
                        deser.read_list(member, container, |mut list, deser| {
  329         -
                            list.push(deser.read_string(member)?);
  330         -
                            Ok(list)
  331         -
                        })?
  332         -
                    });
         323  +
                    builder.lexicon_names = Some(deser.read_string_list(member)?);
  333    324   
                }
  334    325   
                Some(3) => {
  335    326   
                    builder.output_format = Some(crate::types::OutputFormat::from(deser.read_string(member)?.as_str()));
  336    327   
                }
  337    328   
                Some(4) => {
  338    329   
                    builder.output_s3_bucket_name = Some(deser.read_string(member)?);
  339    330   
                }
  340    331   
                Some(5) => {
  341    332   
                    builder.output_s3_key_prefix = Some(deser.read_string(member)?);
  342    333   
                }
  343    334   
                Some(6) => {
  344    335   
                    builder.sample_rate = Some(deser.read_string(member)?);
  345    336   
                }
  346    337   
                Some(7) => {
  347    338   
                    builder.sns_topic_arn = Some(deser.read_string(member)?);
  348    339   
                }
  349    340   
                Some(8) => {
  350    341   
                    builder.speech_mark_types = Some({
  351         -
                        let container = if let Some(cap) = deser.container_size() {
  352         -
                            Vec::with_capacity(cap)
  353         -
                        } else {
  354         -
                            Vec::new()
  355         -
                        };
  356         -
                        deser.read_list(member, container, |mut list, deser| {
  357         -
                            list.push(crate::types::SpeechMarkType::from(deser.read_string(member)?.as_str()));
  358         -
                            Ok(list)
  359         -
                        })?
         342  +
                        let mut container = Vec::new();
         343  +
                        deser.read_list(member, &mut |deser| {
         344  +
                            container.push(crate::types::SpeechMarkType::from(deser.read_string(member)?.as_str()));
         345  +
                            Ok(())
         346  +
                        })?;
         347  +
                        container
  360    348   
                    });
  361    349   
                }
  362    350   
                Some(9) => {
  363    351   
                    builder.text = Some(deser.read_string(member)?);
  364    352   
                }
  365    353   
                Some(10) => {
  366    354   
                    builder.text_type = Some(crate::types::TextType::from(deser.read_string(member)?.as_str()));
  367    355   
                }
  368    356   
                Some(11) => {
  369    357   
                    builder.voice_id = Some(crate::types::VoiceId::from(deser.read_string(member)?.as_str()));
  370    358   
                }
  371    359   
                _ => {}
  372    360   
            }
  373    361   
            Ok(())
  374    362   
        })?;
         363  +
        builder.output_s3_bucket_name = builder.output_s3_bucket_name.or(Some(String::new()));
         364  +
        builder.text = builder.text.or(Some(String::new()));
  375    365   
        builder
  376    366   
            .build()
  377    367   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  378    368   
    }
  379    369   
}
         370  +
impl StartSpeechSynthesisTaskInput {
         371  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         372  +
    pub fn deserialize_with_response(
         373  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         374  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         375  +
        _status: u16,
         376  +
        _body: &[u8],
         377  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         378  +
        Self::deserialize(deserializer)
         379  +
    }
         380  +
}
  380    381   
impl StartSpeechSynthesisTaskInput {
  381    382   
    /// Creates a new builder-style object to manufacture [`StartSpeechSynthesisTaskInput`](crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskInput).
  382    383   
    pub fn builder() -> crate::operation::start_speech_synthesis_task::builders::StartSpeechSynthesisTaskInputBuilder {
  383    384   
        crate::operation::start_speech_synthesis_task::builders::StartSpeechSynthesisTaskInputBuilder::default()
  384    385   
    }
  385    386   
}
  386    387   
  387    388   
/// A builder for [`StartSpeechSynthesisTaskInput`](crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskInput).
  388    389   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  389    390   
#[non_exhaustive]

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

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

tmp-codegen-diff/aws-sdk/sdk/polly/src/operation/synthesize_speech.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 `SynthesizeSpeech`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct SynthesizeSpeech;
    6      6   
impl SynthesizeSpeech {
    7      7   
    /// Creates a new `SynthesizeSpeech`
    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::synthesize_speech::SynthesizeSpeechInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::synthesize_speech::SynthesizeSpeechOutput::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::synthesize_speech::SynthesizeSpeechInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::synthesize_speech::SynthesizeSpeechOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::synthesize_speech::SynthesizeSpeechError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -56,60 +116,242 @@
   76     80   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   77     81   
            }
   78     82   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   79     83   
                config_override,
   80     84   
                client_config.config.clone(),
   81     85   
                &client_config.runtime_components,
   82     86   
            ));
   83     87   
        }
   84     88   
        runtime_plugins
   85     89   
    }
          90  +
    /// The schema for this operation's presigned input shape.
          91  +
    pub const PRESIGNED_INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = &PRESIGNED_SCHEMA;
   86     92   
}
          93  +
static PRESIGNED_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
          94  +
    "com.amazonaws.polly.synthetic.synthetic.aws.presigned#SynthesizeSpeechInput",
          95  +
    "com.amazonaws.polly.synthetic.synthetic.aws.presigned",
          96  +
    "SynthesizeSpeechInput",
          97  +
);
          98  +
static PRESIGNED_MEMBER_ENGINE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          99  +
    ::aws_smithy_schema::ShapeId::from_static(
         100  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned#SynthesizeSpeechInput$Engine",
         101  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned",
         102  +
        "SynthesizeSpeechInput",
         103  +
    ),
         104  +
    ::aws_smithy_schema::ShapeType::String,
         105  +
    "Engine",
         106  +
    0,
         107  +
)
         108  +
.with_http_query("Engine");
         109  +
static PRESIGNED_MEMBER_LANGUAGE_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         110  +
    ::aws_smithy_schema::ShapeId::from_static(
         111  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned#SynthesizeSpeechInput$LanguageCode",
         112  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned",
         113  +
        "SynthesizeSpeechInput",
         114  +
    ),
         115  +
    ::aws_smithy_schema::ShapeType::String,
         116  +
    "LanguageCode",
         117  +
    1,
         118  +
)
         119  +
.with_http_query("LanguageCode");
         120  +
static PRESIGNED_MEMBER_LEXICON_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         121  +
    ::aws_smithy_schema::ShapeId::from_static(
         122  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned#SynthesizeSpeechInput$LexiconNames",
         123  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned",
         124  +
        "SynthesizeSpeechInput",
         125  +
    ),
         126  +
    ::aws_smithy_schema::ShapeType::List,
         127  +
    "LexiconNames",
         128  +
    2,
         129  +
)
         130  +
.with_http_query("LexiconNames");
         131  +
static PRESIGNED_MEMBER_OUTPUT_FORMAT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         132  +
    ::aws_smithy_schema::ShapeId::from_static(
         133  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned#SynthesizeSpeechInput$OutputFormat",
         134  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned",
         135  +
        "SynthesizeSpeechInput",
         136  +
    ),
         137  +
    ::aws_smithy_schema::ShapeType::String,
         138  +
    "OutputFormat",
         139  +
    3,
         140  +
)
         141  +
.with_http_query("OutputFormat");
         142  +
static PRESIGNED_MEMBER_SAMPLE_RATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         143  +
    ::aws_smithy_schema::ShapeId::from_static(
         144  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned#SynthesizeSpeechInput$SampleRate",
         145  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned",
         146  +
        "SynthesizeSpeechInput",
         147  +
    ),
         148  +
    ::aws_smithy_schema::ShapeType::String,
         149  +
    "SampleRate",
         150  +
    4,
         151  +
)
         152  +
.with_http_query("SampleRate");
         153  +
static PRESIGNED_MEMBER_SPEECH_MARK_TYPES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         154  +
    ::aws_smithy_schema::ShapeId::from_static(
         155  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned#SynthesizeSpeechInput$SpeechMarkTypes",
         156  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned",
         157  +
        "SynthesizeSpeechInput",
         158  +
    ),
         159  +
    ::aws_smithy_schema::ShapeType::List,
         160  +
    "SpeechMarkTypes",
         161  +
    5,
         162  +
)
         163  +
.with_http_query("SpeechMarkTypes");
         164  +
static PRESIGNED_MEMBER_TEXT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         165  +
    ::aws_smithy_schema::ShapeId::from_static(
         166  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned#SynthesizeSpeechInput$Text",
         167  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned",
         168  +
        "SynthesizeSpeechInput",
         169  +
    ),
         170  +
    ::aws_smithy_schema::ShapeType::String,
         171  +
    "Text",
         172  +
    6,
         173  +
)
         174  +
.with_http_query("Text");
         175  +
static PRESIGNED_MEMBER_TEXT_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         176  +
    ::aws_smithy_schema::ShapeId::from_static(
         177  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned#SynthesizeSpeechInput$TextType",
         178  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned",
         179  +
        "SynthesizeSpeechInput",
         180  +
    ),
         181  +
    ::aws_smithy_schema::ShapeType::String,
         182  +
    "TextType",
         183  +
    7,
         184  +
)
         185  +
.with_http_query("TextType");
         186  +
static PRESIGNED_MEMBER_VOICE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         187  +
    ::aws_smithy_schema::ShapeId::from_static(
         188  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned#SynthesizeSpeechInput$VoiceId",
         189  +
        "com.amazonaws.polly.synthetic.synthetic.aws.presigned",
         190  +
        "SynthesizeSpeechInput",
         191  +
    ),
         192  +
    ::aws_smithy_schema::ShapeType::String,
         193  +
    "VoiceId",
         194  +
    8,
         195  +
)
         196  +
.with_http_query("VoiceId");
         197  +
static PRESIGNED_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
         198  +
    PRESIGNED_SCHEMA_ID,
         199  +
    ::aws_smithy_schema::ShapeType::Structure,
         200  +
    &[
         201  +
        &PRESIGNED_MEMBER_ENGINE,
         202  +
        &PRESIGNED_MEMBER_LANGUAGE_CODE,
         203  +
        &PRESIGNED_MEMBER_LEXICON_NAMES,
         204  +
        &PRESIGNED_MEMBER_OUTPUT_FORMAT,
         205  +
        &PRESIGNED_MEMBER_SAMPLE_RATE,
         206  +
        &PRESIGNED_MEMBER_SPEECH_MARK_TYPES,
         207  +
        &PRESIGNED_MEMBER_TEXT,
         208  +
        &PRESIGNED_MEMBER_TEXT_TYPE,
         209  +
        &PRESIGNED_MEMBER_VOICE_ID,
         210  +
    ],
         211  +
)
         212  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/v1/speech", None));
   87    213   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for SynthesizeSpeech {
   88    214   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   89    215   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("SynthesizeSpeech");
   90    216   
   91    217   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   92    218   
            SynthesizeSpeechRequestSerializer,
   93    219   
        ));
   94    220   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   95    221   
            SynthesizeSpeechResponseDeserializer,
   96    222   
        ));
@@ -132,258 +249,594 @@
  152    278   
  153    279   
        // If this is an error, defer to the non-streaming parser
  154    280   
        if (!response.status().is_success() && response.status().as_u16() != 200) || force_error {
  155    281   
            return ::std::option::Option::None;
  156    282   
        }
  157    283   
        ::std::option::Option::Some(crate::protocol_serde::type_erase_result(
  158    284   
            crate::protocol_serde::shape_synthesize_speech::de_synthesize_speech_http_response(response),
  159    285   
        ))
  160    286   
    }
  161    287   
  162         -
    fn deserialize_nonstreaming(
         288  +
    fn deserialize_nonstreaming_with_config(
  163    289   
        &self,
  164    290   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         291  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  165    292   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  166    293   
        // For streaming operations, we only hit this case if its an error
  167    294   
        let body = response.body().bytes().expect("body loaded");
  168         -
        crate::protocol_serde::type_erase_result(crate::protocol_serde::shape_synthesize_speech::de_synthesize_speech_http_error(
  169         -
            response.status().as_u16(),
  170         -
            response.headers(),
  171         -
            body,
         295  +
        let status = response.status().as_u16();
         296  +
        let headers = response.headers();
         297  +
        #[allow(unused_mut)]
         298  +
        let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         299  +
            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         300  +
        })?;
         301  +
        generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         302  +
        let generic = generic_builder.build();
         303  +
        let error_code = match generic.code() {
         304  +
            ::std::option::Option::Some(code) => code,
         305  +
            ::std::option::Option::None => {
         306  +
                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         307  +
                    ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::synthesize_speech::SynthesizeSpeechError::unhandled(
         308  +
                        generic,
         309  +
                    )),
         310  +
                ))
         311  +
            }
         312  +
        };
         313  +
        let _error_message = generic.message().map(|msg| msg.to_owned());
         314  +
        let protocol = _cfg
         315  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         316  +
            .expect("a SharedClientProtocol is required");
         317  +
        let err = match error_code {
         318  +
            "EngineNotSupportedException" => crate::operation::synthesize_speech::SynthesizeSpeechError::EngineNotSupportedException({
         319  +
                let mut tmp = match protocol
         320  +
                    .deserialize_response(response, crate::types::error::EngineNotSupportedException::SCHEMA, _cfg)
         321  +
                    .and_then(|mut deser| {
         322  +
                        crate::types::error::EngineNotSupportedException::deserialize_with_response(
         323  +
                            &mut *deser,
         324  +
                            response.headers(),
         325  +
                            response.status().into(),
         326  +
                            body,
         327  +
                        )
         328  +
                    }) {
         329  +
                    ::std::result::Result::Ok(val) => val,
         330  +
                    ::std::result::Result::Err(e) => {
         331  +
                        return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         332  +
                            ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         333  +
                        ))
         334  +
                    }
         335  +
                };
         336  +
                tmp.meta = generic;
         337  +
                if tmp.message.is_none() {
         338  +
                    tmp.message = _error_message;
         339  +
                }
         340  +
                tmp
         341  +
            }),
         342  +
            "InvalidSampleRateException" => crate::operation::synthesize_speech::SynthesizeSpeechError::InvalidSampleRateException({
         343  +
                let mut tmp = match protocol
         344  +
                    .deserialize_response(response, crate::types::error::InvalidSampleRateException::SCHEMA, _cfg)
         345  +
                    .and_then(|mut deser| {
         346  +
                        crate::types::error::InvalidSampleRateException::deserialize_with_response(
         347  +
                            &mut *deser,
         348  +
                            response.headers(),
         349  +
                            response.status().into(),
         350  +
                            body,
         351  +
                        )
         352  +
                    }) {
         353  +
                    ::std::result::Result::Ok(val) => val,
         354  +
                    ::std::result::Result::Err(e) => {
         355  +
                        return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         356  +
                            ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         357  +
                        ))
         358  +
                    }
         359  +
                };
         360  +
                tmp.meta = generic;
         361  +
                if tmp.message.is_none() {
         362  +
                    tmp.message = _error_message;
         363  +
                }
         364  +
                tmp
         365  +
            }),
         366  +
            "InvalidSsmlException" => crate::operation::synthesize_speech::SynthesizeSpeechError::InvalidSsmlException({
         367  +
                let mut tmp = match protocol
         368  +
                    .deserialize_response(response, crate::types::error::InvalidSsmlException::SCHEMA, _cfg)
         369  +
                    .and_then(|mut deser| {
         370  +
                        crate::types::error::InvalidSsmlException::deserialize_with_response(
         371  +
                            &mut *deser,
         372  +
                            response.headers(),
         373  +
                            response.status().into(),
         374  +
                            body,
         375  +
                        )
         376  +
                    }) {
         377  +
                    ::std::result::Result::Ok(val) => val,
         378  +
                    ::std::result::Result::Err(e) => {
         379  +
                        return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         380  +
                            ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         381  +
                        ))
         382  +
                    }
         383  +
                };
         384  +
                tmp.meta = generic;
         385  +
                if tmp.message.is_none() {
         386  +
                    tmp.message = _error_message;
         387  +
                }
         388  +
                tmp
         389  +
            }),
         390  +
            "LanguageNotSupportedException" => crate::operation::synthesize_speech::SynthesizeSpeechError::LanguageNotSupportedException({
         391  +
                let mut tmp = match protocol
         392  +
                    .deserialize_response(response, crate::types::error::LanguageNotSupportedException::SCHEMA, _cfg)
         393  +
                    .and_then(|mut deser| {
         394  +
                        crate::types::error::LanguageNotSupportedException::deserialize_with_response(
         395  +
                            &mut *deser,
         396  +
                            response.headers(),
         397  +
                            response.status().into(),
         398  +
                            body,
         399  +
                        )
         400  +
                    }) {
         401  +
                    ::std::result::Result::Ok(val) => val,
         402  +
                    ::std::result::Result::Err(e) => {
         403  +
                        return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         404  +
                            ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         405  +
                        ))
         406  +
                    }
         407  +
                };
         408  +
                tmp.meta = generic;
         409  +
                if tmp.message.is_none() {
         410  +
                    tmp.message = _error_message;
         411  +
                }
         412  +
                tmp
         413  +
            }),
         414  +
            "LexiconNotFoundException" => crate::operation::synthesize_speech::SynthesizeSpeechError::LexiconNotFoundException({
         415  +
                let mut tmp = match protocol
         416  +
                    .deserialize_response(response, crate::types::error::LexiconNotFoundException::SCHEMA, _cfg)
         417  +
                    .and_then(|mut deser| {
         418  +
                        crate::types::error::LexiconNotFoundException::deserialize_with_response(
         419  +
                            &mut *deser,
         420  +
                            response.headers(),
         421  +
                            response.status().into(),
         422  +
                            body,
         423  +
                        )
         424  +
                    }) {
         425  +
                    ::std::result::Result::Ok(val) => val,
         426  +
                    ::std::result::Result::Err(e) => {
         427  +
                        return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         428  +
                            ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         429  +
                        ))
         430  +
                    }
         431  +
                };
         432  +
                tmp.meta = generic;
         433  +
                if tmp.message.is_none() {
         434  +
                    tmp.message = _error_message;
         435  +
                }
         436  +
                tmp
         437  +
            }),
         438  +
            "MarksNotSupportedForFormatException" => {
         439  +
                crate::operation::synthesize_speech::SynthesizeSpeechError::MarksNotSupportedForFormatException({
         440  +
                    let mut tmp = match protocol
         441  +
                        .deserialize_response(response, crate::types::error::MarksNotSupportedForFormatException::SCHEMA, _cfg)
         442  +
                        .and_then(|mut deser| {
         443  +
                            crate::types::error::MarksNotSupportedForFormatException::deserialize_with_response(
         444  +
                                &mut *deser,
         445  +
                                response.headers(),
         446  +
                                response.status().into(),
         447  +
                                body,
         448  +
                            )
         449  +
                        }) {
         450  +
                        ::std::result::Result::Ok(val) => val,
         451  +
                        ::std::result::Result::Err(e) => {
         452  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         453  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         454  +
                            ))
         455  +
                        }
         456  +
                    };
         457  +
                    tmp.meta = generic;
         458  +
                    if tmp.message.is_none() {
         459  +
                        tmp.message = _error_message;
         460  +
                    }
         461  +
                    tmp
         462  +
                })
         463  +
            }
         464  +
            "ServiceFailureException" => crate::operation::synthesize_speech::SynthesizeSpeechError::ServiceFailureException({
         465  +
                let mut tmp = match protocol
         466  +
                    .deserialize_response(response, crate::types::error::ServiceFailureException::SCHEMA, _cfg)
         467  +
                    .and_then(|mut deser| {
         468  +
                        crate::types::error::ServiceFailureException::deserialize_with_response(
         469  +
                            &mut *deser,
         470  +
                            response.headers(),
         471  +
                            response.status().into(),
         472  +
                            body,
         473  +
                        )
         474  +
                    }) {
         475  +
                    ::std::result::Result::Ok(val) => val,
         476  +
                    ::std::result::Result::Err(e) => {
         477  +
                        return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         478  +
                            ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         479  +
                        ))
         480  +
                    }
         481  +
                };
         482  +
                tmp.meta = generic;
         483  +
                if tmp.message.is_none() {
         484  +
                    tmp.message = _error_message;
         485  +
                }
         486  +
                tmp
         487  +
            }),
         488  +
            "SsmlMarksNotSupportedForTextTypeException" => {
         489  +
                crate::operation::synthesize_speech::SynthesizeSpeechError::SsmlMarksNotSupportedForTextTypeException({
         490  +
                    let mut tmp = match protocol
         491  +
                        .deserialize_response(response, crate::types::error::SsmlMarksNotSupportedForTextTypeException::SCHEMA, _cfg)
         492  +
                        .and_then(|mut deser| {
         493  +
                            crate::types::error::SsmlMarksNotSupportedForTextTypeException::deserialize_with_response(
         494  +
                                &mut *deser,
         495  +
                                response.headers(),
         496  +
                                response.status().into(),
         497  +
                                body,
         498  +
                            )
         499  +
                        }) {
         500  +
                        ::std::result::Result::Ok(val) => val,
         501  +
                        ::std::result::Result::Err(e) => {
         502  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         503  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         504  +
                            ))
         505  +
                        }
         506  +
                    };
         507  +
                    tmp.meta = generic;
         508  +
                    if tmp.message.is_none() {
         509  +
                        tmp.message = _error_message;
         510  +
                    }
         511  +
                    tmp
         512  +
                })
         513  +
            }
         514  +
            "TextLengthExceededException" => crate::operation::synthesize_speech::SynthesizeSpeechError::TextLengthExceededException({
         515  +
                let mut tmp = match protocol
         516  +
                    .deserialize_response(response, crate::types::error::TextLengthExceededException::SCHEMA, _cfg)
         517  +
                    .and_then(|mut deser| {
         518  +
                        crate::types::error::TextLengthExceededException::deserialize_with_response(
         519  +
                            &mut *deser,
         520  +
                            response.headers(),
         521  +
                            response.status().into(),
         522  +
                            body,
         523  +
                        )
         524  +
                    }) {
         525  +
                    ::std::result::Result::Ok(val) => val,
         526  +
                    ::std::result::Result::Err(e) => {
         527  +
                        return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         528  +
                            ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         529  +
                        ))
         530  +
                    }
         531  +
                };
         532  +
                tmp.meta = generic;
         533  +
                if tmp.message.is_none() {
         534  +
                    tmp.message = _error_message;
         535  +
                }
         536  +
                tmp
         537  +
            }),
         538  +
            _ => crate::operation::synthesize_speech::SynthesizeSpeechError::generic(generic),
         539  +
        };
         540  +
        ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         541  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
  172    542   
        ))
  173    543   
    }
  174    544   
}
  175    545   
#[derive(Debug)]
  176    546   
struct SynthesizeSpeechRequestSerializer;
  177    547   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for SynthesizeSpeechRequestSerializer {
  178    548   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  179    549   
    fn serialize_input(
  180    550   
        &self,
  181    551   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  182    552   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  183    553   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  184    554   
        let input = input
  185    555   
            .downcast::<crate::operation::synthesize_speech::SynthesizeSpeechInput>()
  186    556   
            .expect("correct type");
  187         -
        let _header_serialization_settings = _cfg
  188         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  189         -
            .cloned()
  190         -
            .unwrap_or_default();
  191         -
        let mut request_builder = {
  192         -
            #[allow(clippy::uninlined_format_args)]
  193         -
            fn uri_base(
  194         -
                _input: &crate::operation::synthesize_speech::SynthesizeSpeechInput,
  195         -
                output: &mut ::std::string::String,
  196         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  197         -
                use ::std::fmt::Write as _;
  198         -
                ::std::write!(output, "/v1/speech").expect("formatting should succeed");
  199         -
                ::std::result::Result::Ok(())
  200         -
            }
  201         -
            #[allow(clippy::unnecessary_wraps)]
  202         -
            fn update_http_builder(
  203         -
                input: &crate::operation::synthesize_speech::SynthesizeSpeechInput,
  204         -
                builder: ::http_1x::request::Builder,
  205         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  206         -
                let mut uri = ::std::string::String::new();
  207         -
                uri_base(input, &mut uri)?;
  208         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  209         -
            }
  210         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  211         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  212         -
            builder
  213         -
        };
  214         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_synthesize_speech::ser_synthesize_speech_input(&input)?);
  215         -
        if let Some(content_length) = body.content_length() {
  216         -
            let content_length = content_length.to_string();
  217         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  218         -
        }
  219         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         557  +
        let protocol = _cfg
         558  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         559  +
            .expect("a SharedClientProtocol is required");
         560  +
        let mut request = protocol
         561  +
            .serialize_request(&input, SynthesizeSpeech::INPUT_SCHEMA, "", _cfg)
         562  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         563  +
         564  +
        return ::std::result::Result::Ok(request);
  220    565   
    }
  221    566   
}
  222    567   
#[derive(Debug)]
  223    568   
struct SynthesizeSpeechEndpointParamsInterceptor;
  224    569   
  225    570   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SynthesizeSpeechEndpointParamsInterceptor {
  226    571   
    fn name(&self) -> &'static str {
  227    572   
        "SynthesizeSpeechEndpointParamsInterceptor"
  228    573   
    }
  229    574   
@@ -440,785 +563,882 @@
  460    805   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for SynthesizeSpeechPresigningRequestSerializer {
  461    806   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  462    807   
    fn serialize_input(
  463    808   
        &self,
  464    809   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  465    810   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  466    811   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  467    812   
        let input = input
  468    813   
            .downcast::<crate::operation::synthesize_speech::SynthesizeSpeechInput>()
  469    814   
            .expect("correct type");
  470         -
        let _header_serialization_settings = _cfg
  471         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  472         -
            .cloned()
  473         -
            .unwrap_or_default();
  474         -
        let mut request_builder = {
  475         -
            #[allow(clippy::uninlined_format_args)]
  476         -
            fn uri_base(
  477         -
                _input: &crate::operation::synthesize_speech::SynthesizeSpeechInput,
  478         -
                output: &mut ::std::string::String,
  479         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  480         -
                use ::std::fmt::Write as _;
  481         -
                ::std::write!(output, "/v1/speech").expect("formatting should succeed");
  482         -
                ::std::result::Result::Ok(())
  483         -
            }
  484         -
            fn uri_query(
  485         -
                _input: &crate::operation::synthesize_speech::SynthesizeSpeechInput,
  486         -
                mut output: &mut ::std::string::String,
  487         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  488         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  489         -
                if let ::std::option::Option::Some(inner_1) = &_input.engine {
  490         -
                    {
  491         -
                        query.push_kv("Engine", &::aws_smithy_http::query::fmt_string(inner_1.as_str()));
  492         -
                    }
         815  +
        let protocol = _cfg
         816  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         817  +
            .expect("a SharedClientProtocol is required");
         818  +
        if protocol.supports_http_bindings() {
         819  +
            let mut request = protocol
         820  +
                .serialize_body(&input, SynthesizeSpeech::PRESIGNED_INPUT_SCHEMA, "", _cfg)
         821  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         822  +
            {
         823  +
                let mut uri = "/v1/speech".to_string();
         824  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         825  +
                if let Some(ref val) = input.engine {
         826  +
                    query_params.push(("Engine".to_string(), val.as_str().to_string()));
  493    827   
                }
  494         -
                if let ::std::option::Option::Some(inner_2) = &_input.language_code {
  495         -
                    {
  496         -
                        query.push_kv("LanguageCode", &::aws_smithy_http::query::fmt_string(inner_2.as_str()));
  497         -
                    }
         828  +
                if let Some(ref val) = input.language_code {
         829  +
                    query_params.push(("LanguageCode".to_string(), val.as_str().to_string()));
  498    830   
                }
  499         -
                if let ::std::option::Option::Some(inner_3) = &_input.lexicon_names {
  500         -
                    {
  501         -
                        for inner_4 in inner_3 {
  502         -
                            query.push_kv("LexiconNames", &::aws_smithy_http::query::fmt_string(inner_4));
  503         -
                        }
         831  +
                if let Some(ref val) = input.lexicon_names {
         832  +
                    for item in val {
         833  +
                        query_params.push(("LexiconNames".to_string(), item.to_string()));
  504    834   
                    }
  505    835   
                }
  506         -
                let inner_5 = &_input.output_format;
  507         -
                let inner_5 = inner_5
  508         -
                    .as_ref()
  509         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("output_format", "cannot be empty or unset"))?;
  510         -
                query.push_kv("OutputFormat", &::aws_smithy_http::query::fmt_string(inner_5.as_str()));
  511         -
                if let ::std::option::Option::Some(inner_6) = &_input.sample_rate {
  512         -
                    {
  513         -
                        query.push_kv("SampleRate", &::aws_smithy_http::query::fmt_string(inner_6));
  514         -
                    }
         836  +
                if let Some(ref val) = input.output_format {
         837  +
                    query_params.push(("OutputFormat".to_string(), val.as_str().to_string()));
  515    838   
                }
  516         -
                if let ::std::option::Option::Some(inner_7) = &_input.speech_mark_types {
  517         -
                    {
  518         -
                        for inner_8 in inner_7 {
  519         -
                            query.push_kv("SpeechMarkTypes", &::aws_smithy_http::query::fmt_string(inner_8.as_str()));
  520         -
                        }
         839  +
                if let Some(ref val) = input.sample_rate {
         840  +
                    query_params.push(("SampleRate".to_string(), val.to_string()));
         841  +
                }
         842  +
                if let Some(ref val) = input.speech_mark_types {
         843  +
                    for item in val {
         844  +
                        query_params.push(("SpeechMarkTypes".to_string(), item.as_str().to_string()));
  521    845   
                    }
  522    846   
                }
  523         -
                let inner_9 = &_input.text;
  524         -
                let inner_9 = inner_9
  525         -
                    .as_ref()
  526         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("text", "cannot be empty or unset"))?;
  527         -
                if inner_9.is_empty() {
  528         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  529         -
                        "text",
  530         -
                        "cannot be empty or unset",
  531         -
                    ));
         847  +
                if let Some(ref val) = input.text {
         848  +
                    query_params.push(("Text".to_string(), val.to_string()));
  532    849   
                }
  533         -
                query.push_kv("Text", &::aws_smithy_http::query::fmt_string(inner_9));
  534         -
                if let ::std::option::Option::Some(inner_10) = &_input.text_type {
  535         -
                    {
  536         -
                        query.push_kv("TextType", &::aws_smithy_http::query::fmt_string(inner_10.as_str()));
  537         -
                    }
         850  +
                if let Some(ref val) = input.text_type {
         851  +
                    query_params.push(("TextType".to_string(), val.as_str().to_string()));
  538    852   
                }
  539         -
                let inner_11 = &_input.voice_id;
  540         -
                let inner_11 = inner_11
  541         -
                    .as_ref()
  542         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("voice_id", "cannot be empty or unset"))?;
  543         -
                query.push_kv("VoiceId", &::aws_smithy_http::query::fmt_string(inner_11.as_str()));
  544         -
                ::std::result::Result::Ok(())
  545         -
            }
  546         -
            #[allow(clippy::unnecessary_wraps)]
  547         -
            fn update_http_builder(
  548         -
                input: &crate::operation::synthesize_speech::SynthesizeSpeechInput,
  549         -
                builder: ::http_1x::request::Builder,
  550         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  551         -
                let mut uri = ::std::string::String::new();
  552         -
                uri_base(input, &mut uri)?;
  553         -
                uri_query(input, &mut uri)?;
  554         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
         853  +
                if let Some(ref val) = input.voice_id {
         854  +
                    query_params.push(("VoiceId".to_string(), val.as_str().to_string()));
         855  +
                }
         856  +
                if !query_params.is_empty() {
         857  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         858  +
                    let pairs: Vec<String> = query_params
         859  +
                        .iter()
         860  +
                        .map(|(k, v)| {
         861  +
                            format!(
         862  +
                                "{}={}",
         863  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         864  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         865  +
                            )
         866  +
                        })
         867  +
                        .collect();
         868  +
                    uri.push_str(&pairs.join("&"));
         869  +
                }
         870  +
                request.set_uri(uri.as_str()).expect("valid URI");
  555    871   
            }
  556         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  557         -
            builder
  558         -
        };
  559         -
        let body = ::aws_smithy_types::body::SdkBody::empty();
  560    872   
  561         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         873  +
            return ::std::result::Result::Ok(request);
         874  +
        } else {
         875  +
            let mut request = protocol
         876  +
                .serialize_request(&input, SynthesizeSpeech::PRESIGNED_INPUT_SCHEMA, "", _cfg)
         877  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         878  +
         879  +
            return ::std::result::Result::Ok(request);
         880  +
        }
  562    881   
    }
  563    882   
}