AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

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

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

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

@@ -1,1 +96,143 @@
   18     18   
    "com.amazonaws.polly.synthetic",
   19     19   
    "GetSpeechSynthesisTaskOutput",
   20     20   
);
   21     21   
static GETSPEECHSYNTHESISTASKOUTPUT_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#GetSpeechSynthesisTaskOutput$SynthesisTask",
   24     24   
        "com.amazonaws.polly.synthetic",
   25     25   
        "GetSpeechSynthesisTaskOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28         -
    "synthesis_task",
          28  +
    "SynthesisTask",
   29     29   
    0,
   30     30   
);
          31  +
static GETSPEECHSYNTHESISTASKOUTPUT_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 GETSPEECHSYNTHESISTASKOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    GETSPEECHSYNTHESISTASKOUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&GETSPEECHSYNTHESISTASKOUTPUT_MEMBER_SYNTHESIS_TASK],
          41  +
    &[
          42  +
        &GETSPEECHSYNTHESISTASKOUTPUT_MEMBER_SYNTHESIS_TASK,
          43  +
        &GETSPEECHSYNTHESISTASKOUTPUT_MEMBER__REQUEST_ID,
          44  +
    ],
   35     45   
);
   36     46   
impl GetSpeechSynthesisTaskOutput {
   37     47   
    /// The schema for this shape.
   38     48   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETSPEECHSYNTHESISTASKOUTPUT_SCHEMA;
   39     49   
}
   40     50   
impl ::aws_smithy_schema::serde::SerializableStruct for GetSpeechSynthesisTaskOutput {
   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(&GETSPEECHSYNTHESISTASKOUTPUT_MEMBER_SYNTHESIS_TASK, val)?;
   48     58   
        }
   49     59   
        Ok(())
   50     60   
    }
   51     61   
}
   52     62   
impl GetSpeechSynthesisTaskOutput {
   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(&GETSPEECHSYNTHESISTASKOUTPUT_SCHEMA, (), |_, member, deser| {
          76  +
        deserializer.read_struct(&GETSPEECHSYNTHESISTASKOUTPUT_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 GetSpeechSynthesisTaskOutput {
          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(&GETSPEECHSYNTHESISTASKOUTPUT_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/list_lexicons.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 `ListLexicons`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListLexicons;
    6      6   
impl ListLexicons {
    7      7   
    /// Creates a new `ListLexicons`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_lexicons::ListLexiconsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_lexicons::ListLexiconsOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::list_lexicons::ListLexiconsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_lexicons::ListLexiconsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_lexicons::ListLexiconsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +246,333 @@
  135    139   
                crate::operation::list_lexicons::ListLexiconsError,
  136    140   
            >::new());
  137    141   
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct ListLexiconsResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListLexiconsResponseDeserializer {
  145         -
    fn deserialize_nonstreaming(
         149  +
    fn deserialize_nonstreaming_with_config(
  146    150   
        &self,
  147    151   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         152  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  148    153   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  149    154   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  150         -
        let headers = response.headers();
  151         -
        let body = response.body().bytes().expect("body loaded");
  152    155   
        #[allow(unused_mut)]
  153    156   
        let mut force_error = false;
  154    157   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  155         -
        let parse_result = if !success && status != 200 || force_error {
  156         -
            crate::protocol_serde::shape_list_lexicons::de_list_lexicons_http_error(status, headers, body)
         158  +
        if !success && status != 200 || force_error {
         159  +
            let headers = response.headers();
         160  +
            let body = response.body().bytes().expect("body loaded");
         161  +
            #[allow(unused_mut)]
         162  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         163  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         164  +
            })?;
         165  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         166  +
            let generic = generic_builder.build();
         167  +
            let error_code = match generic.code() {
         168  +
                ::std::option::Option::Some(code) => code,
         169  +
                ::std::option::Option::None => {
         170  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         171  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::list_lexicons::ListLexiconsError::unhandled(generic)),
         172  +
                    ))
         173  +
                }
         174  +
            };
         175  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         176  +
            let protocol = _cfg
         177  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         178  +
                .expect("a SharedClientProtocol is required");
         179  +
            let err = match error_code {
         180  +
                "InvalidNextTokenException" => crate::operation::list_lexicons::ListLexiconsError::InvalidNextTokenException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::InvalidNextTokenException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::InvalidNextTokenException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
         197  +
                    };
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "ServiceFailureException" => crate::operation::list_lexicons::ListLexiconsError::ServiceFailureException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::ServiceFailureException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::ServiceFailureException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                _ => crate::operation::list_lexicons::ListLexiconsError::generic(generic),
         229  +
            };
         230  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         231  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         232  +
            ))
  157    233   
        } else {
  158         -
            crate::protocol_serde::shape_list_lexicons::de_list_lexicons_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         234  +
            let protocol = _cfg
         235  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         236  +
                .expect("a SharedClientProtocol is required");
         237  +
            let mut deser = protocol.deserialize_response(response, ListLexicons::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         238  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         239  +
            })?;
         240  +
            let body = response.body().bytes().expect("body loaded");
         241  +
            let output = crate::operation::list_lexicons::ListLexiconsOutput::deserialize_with_response(
         242  +
                &mut *deser,
         243  +
                response.headers(),
         244  +
                response.status().into(),
         245  +
                body,
         246  +
            )
         247  +
            .map_err(|e| {
         248  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         249  +
            })?;
         250  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         251  +
        }
  161    252   
    }
  162    253   
}
  163    254   
#[derive(Debug)]
  164    255   
struct ListLexiconsRequestSerializer;
  165    256   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListLexiconsRequestSerializer {
  166    257   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    258   
    fn serialize_input(
  168    259   
        &self,
  169    260   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    261   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    262   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    263   
        let input = input
  173    264   
            .downcast::<crate::operation::list_lexicons::ListLexiconsInput>()
  174    265   
            .expect("correct type");
  175         -
        let _header_serialization_settings = _cfg
  176         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  177         -
            .cloned()
  178         -
            .unwrap_or_default();
  179         -
        let mut request_builder = {
  180         -
            #[allow(clippy::uninlined_format_args)]
  181         -
            fn uri_base(
  182         -
                _input: &crate::operation::list_lexicons::ListLexiconsInput,
  183         -
                output: &mut ::std::string::String,
  184         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  185         -
                use ::std::fmt::Write as _;
  186         -
                ::std::write!(output, "/v1/lexicons").expect("formatting should succeed");
  187         -
                ::std::result::Result::Ok(())
  188         -
            }
  189         -
            fn uri_query(
  190         -
                _input: &crate::operation::list_lexicons::ListLexiconsInput,
  191         -
                mut output: &mut ::std::string::String,
  192         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  193         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  194         -
                if let ::std::option::Option::Some(inner_1) = &_input.next_token {
  195         -
                    {
  196         -
                        query.push_kv("NextToken", &::aws_smithy_http::query::fmt_string(inner_1));
  197         -
                    }
         266  +
        let protocol = _cfg
         267  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         268  +
            .expect("a SharedClientProtocol is required");
         269  +
        if protocol.supports_http_bindings() {
         270  +
            let mut request = protocol
         271  +
                .serialize_body(&input, ListLexicons::INPUT_SCHEMA, "", _cfg)
         272  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         273  +
            {
         274  +
                let mut uri = "/v1/lexicons".to_string();
         275  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         276  +
                if let Some(ref val) = input.next_token {
         277  +
                    query_params.push(("NextToken".to_string(), val.to_string()));
  198    278   
                }
  199         -
                ::std::result::Result::Ok(())
  200         -
            }
  201         -
            #[allow(clippy::unnecessary_wraps)]
  202         -
            fn update_http_builder(
  203         -
                input: &crate::operation::list_lexicons::ListLexiconsInput,
  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         -
                uri_query(input, &mut uri)?;
  209         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
         279  +
                if !query_params.is_empty() {
         280  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         281  +
                    let pairs: Vec<String> = query_params
         282  +
                        .iter()
         283  +
                        .map(|(k, v)| {
         284  +
                            format!(
         285  +
                                "{}={}",
         286  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         287  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         288  +
                            )
         289  +
                        })
         290  +
                        .collect();
         291  +
                    uri.push_str(&pairs.join("&"));
         292  +
                }
         293  +
                request.set_uri(uri.as_str()).expect("valid URI");
  210    294   
            }
  211         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  212         -
            builder
  213         -
        };
  214         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  215    295   
  216         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         296  +
            return ::std::result::Result::Ok(request);
         297  +
        } else {
         298  +
            let mut request = protocol
         299  +
                .serialize_request(&input, ListLexicons::INPUT_SCHEMA, "", _cfg)
         300  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         301  +
         302  +
            return ::std::result::Result::Ok(request);
         303  +
        }
  217    304   
    }
  218    305   
}
  219    306   
#[derive(Debug)]
  220    307   
struct ListLexiconsEndpointParamsInterceptor;
  221    308   
  222    309   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListLexiconsEndpointParamsInterceptor {
  223    310   
    fn name(&self) -> &'static str {
  224    311   
        "ListLexiconsEndpointParamsInterceptor"
  225    312   
    }
  226    313   

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/polly/src/operation/list_speech_synthesis_tasks.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 `ListSpeechSynthesisTasks`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListSpeechSynthesisTasks;
    6      6   
impl ListSpeechSynthesisTasks {
    7      7   
    /// Creates a new `ListSpeechSynthesisTasks`
    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::list_speech_synthesis_tasks::ListSpeechSynthesisTasksInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksOutput::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::list_speech_synthesis_tasks::ListSpeechSynthesisTasksInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -118,124 +259,350 @@
  138    144   
                crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError,
  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 ListSpeechSynthesisTasksResponseDeserializer;
  147    153   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListSpeechSynthesisTasksResponseDeserializer {
  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_list_speech_synthesis_tasks::de_list_speech_synthesis_tasks_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::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError::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  +
                "InvalidNextTokenException" => {
         188  +
                    crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError::InvalidNextTokenException({
         189  +
                        let mut tmp = match protocol
         190  +
                            .deserialize_response(response, crate::types::error::InvalidNextTokenException::SCHEMA, _cfg)
         191  +
                            .and_then(|mut deser| {
         192  +
                                crate::types::error::InvalidNextTokenException::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  +
                "ServiceFailureException" => crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError::ServiceFailureException({
         214  +
                    let mut tmp = match protocol
         215  +
                        .deserialize_response(response, crate::types::error::ServiceFailureException::SCHEMA, _cfg)
         216  +
                        .and_then(|mut deser| {
         217  +
                            crate::types::error::ServiceFailureException::deserialize_with_response(
         218  +
                                &mut *deser,
         219  +
                                response.headers(),
         220  +
                                response.status().into(),
         221  +
                                body,
         222  +
                            )
         223  +
                        }) {
         224  +
                        ::std::result::Result::Ok(val) => val,
         225  +
                        ::std::result::Result::Err(e) => {
         226  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         227  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         228  +
                            ))
         229  +
                        }
         230  +
                    };
         231  +
                    tmp.meta = generic;
         232  +
                    if tmp.message.is_none() {
         233  +
                        tmp.message = _error_message;
         234  +
                    }
         235  +
                    tmp
         236  +
                }),
         237  +
                _ => crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError::generic(generic),
         238  +
            };
         239  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         240  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         241  +
            ))
  160    242   
        } else {
  161         -
            crate::protocol_serde::shape_list_speech_synthesis_tasks::de_list_speech_synthesis_tasks_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         243  +
            let protocol = _cfg
         244  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         245  +
                .expect("a SharedClientProtocol is required");
         246  +
            let mut deser = protocol
         247  +
                .deserialize_response(response, ListSpeechSynthesisTasks::OUTPUT_SCHEMA, _cfg)
         248  +
                .map_err(|e| {
         249  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         250  +
                })?;
         251  +
            let body = response.body().bytes().expect("body loaded");
         252  +
            let output = crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksOutput::deserialize_with_response(
         253  +
                &mut *deser,
         254  +
                response.headers(),
         255  +
                response.status().into(),
         256  +
                body,
         257  +
            )
         258  +
            .map_err(|e| {
         259  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         260  +
            })?;
         261  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         262  +
        }
  164    263   
    }
  165    264   
}
  166    265   
#[derive(Debug)]
  167    266   
struct ListSpeechSynthesisTasksRequestSerializer;
  168    267   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListSpeechSynthesisTasksRequestSerializer {
  169    268   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    269   
    fn serialize_input(
  171    270   
        &self,
  172    271   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    272   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    273   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    274   
        let input = input
  176    275   
            .downcast::<crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksInput>()
  177    276   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksInput,
  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         -
            fn uri_query(
  193         -
                _input: &crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksInput,
  194         -
                mut output: &mut ::std::string::String,
  195         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  196         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  197         -
                if let ::std::option::Option::Some(inner_1) = &_input.max_results {
  198         -
                    {
  199         -
                        query.push_kv("MaxResults", ::aws_smithy_types::primitive::Encoder::from(*inner_1).encode());
  200         -
                    }
         277  +
        let protocol = _cfg
         278  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         279  +
            .expect("a SharedClientProtocol is required");
         280  +
        if protocol.supports_http_bindings() {
         281  +
            let mut request = protocol
         282  +
                .serialize_body(&input, ListSpeechSynthesisTasks::INPUT_SCHEMA, "", _cfg)
         283  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         284  +
            {
         285  +
                let mut uri = "/v1/synthesisTasks".to_string();
         286  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         287  +
                if let Some(ref val) = input.max_results {
         288  +
                    query_params.push(("MaxResults".to_string(), val.to_string()));
  201    289   
                }
  202         -
                if let ::std::option::Option::Some(inner_2) = &_input.next_token {
  203         -
                    {
  204         -
                        query.push_kv("NextToken", &::aws_smithy_http::query::fmt_string(inner_2));
  205         -
                    }
         290  +
                if let Some(ref val) = input.next_token {
         291  +
                    query_params.push(("NextToken".to_string(), val.to_string()));
  206    292   
                }
  207         -
                if let ::std::option::Option::Some(inner_3) = &_input.status {
  208         -
                    {
  209         -
                        query.push_kv("Status", &::aws_smithy_http::query::fmt_string(inner_3.as_str()));
  210         -
                    }
         293  +
                if let Some(ref val) = input.status {
         294  +
                    query_params.push(("Status".to_string(), val.as_str().to_string()));
  211    295   
                }
  212         -
                ::std::result::Result::Ok(())
  213         -
            }
  214         -
            #[allow(clippy::unnecessary_wraps)]
  215         -
            fn update_http_builder(
  216         -
                input: &crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksInput,
  217         -
                builder: ::http_1x::request::Builder,
  218         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  219         -
                let mut uri = ::std::string::String::new();
  220         -
                uri_base(input, &mut uri)?;
  221         -
                uri_query(input, &mut uri)?;
  222         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
         296  +
                if !query_params.is_empty() {
         297  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         298  +
                    let pairs: Vec<String> = query_params
         299  +
                        .iter()
         300  +
                        .map(|(k, v)| {
         301  +
                            format!(
         302  +
                                "{}={}",
         303  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         304  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         305  +
                            )
         306  +
                        })
         307  +
                        .collect();
         308  +
                    uri.push_str(&pairs.join("&"));
         309  +
                }
         310  +
                request.set_uri(uri.as_str()).expect("valid URI");
  223    311   
            }
  224         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  225         -
            builder
  226         -
        };
  227         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  228    312   
  229         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         313  +
            return ::std::result::Result::Ok(request);
         314  +
        } else {
         315  +
            let mut request = protocol
         316  +
                .serialize_request(&input, ListSpeechSynthesisTasks::INPUT_SCHEMA, "", _cfg)
         317  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         318  +
         319  +
            return ::std::result::Result::Ok(request);
         320  +
        }
  230    321   
    }
  231    322   
}
  232    323   
#[derive(Debug)]
  233    324   
struct ListSpeechSynthesisTasksEndpointParamsInterceptor;
  234    325   
  235    326   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListSpeechSynthesisTasksEndpointParamsInterceptor {
  236    327   
    fn name(&self) -> &'static str {
  237    328   
        "ListSpeechSynthesisTasksEndpointParamsInterceptor"
  238    329   
    }
  239    330   

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

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

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

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

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

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `PutLexicon`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutLexicon;
    6      6   
impl PutLexicon {
    7      7   
    /// Creates a new `PutLexicon`
    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::put_lexicon::PutLexiconInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_lexicon::PutLexiconOutput::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::put_lexicon::PutLexiconInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::put_lexicon::PutLexiconOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::put_lexicon::PutLexiconError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +246,451 @@
  135    139   
                crate::operation::put_lexicon::PutLexiconError,
  136    140   
            >::new());
  137    141   
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct PutLexiconResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutLexiconResponseDeserializer {
  145         -
    fn deserialize_nonstreaming(
         149  +
    fn deserialize_nonstreaming_with_config(
  146    150   
        &self,
  147    151   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         152  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  148    153   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  149    154   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  150         -
        let headers = response.headers();
  151         -
        let body = response.body().bytes().expect("body loaded");
  152    155   
        #[allow(unused_mut)]
  153    156   
        let mut force_error = false;
  154    157   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  155         -
        let parse_result = if !success && status != 200 || force_error {
  156         -
            crate::protocol_serde::shape_put_lexicon::de_put_lexicon_http_error(status, headers, body)
         158  +
        if !success && status != 200 || force_error {
         159  +
            let headers = response.headers();
         160  +
            let body = response.body().bytes().expect("body loaded");
         161  +
            #[allow(unused_mut)]
         162  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         163  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         164  +
            })?;
         165  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         166  +
            let generic = generic_builder.build();
         167  +
            let error_code = match generic.code() {
         168  +
                ::std::option::Option::Some(code) => code,
         169  +
                ::std::option::Option::None => {
         170  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         171  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::put_lexicon::PutLexiconError::unhandled(generic)),
         172  +
                    ))
         173  +
                }
         174  +
            };
         175  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         176  +
            let protocol = _cfg
         177  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         178  +
                .expect("a SharedClientProtocol is required");
         179  +
            let err = match error_code {
         180  +
                "InvalidLexiconException" => crate::operation::put_lexicon::PutLexiconError::InvalidLexiconException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::InvalidLexiconException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::InvalidLexiconException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
         197  +
                    };
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "LexiconSizeExceededException" => crate::operation::put_lexicon::PutLexiconError::LexiconSizeExceededException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::LexiconSizeExceededException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::LexiconSizeExceededException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "MaxLexemeLengthExceededException" => crate::operation::put_lexicon::PutLexiconError::MaxLexemeLengthExceededException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::MaxLexemeLengthExceededException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::MaxLexemeLengthExceededException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "MaxLexiconsNumberExceededException" => crate::operation::put_lexicon::PutLexiconError::MaxLexiconsNumberExceededException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::MaxLexiconsNumberExceededException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::MaxLexiconsNumberExceededException::deserialize_with_response(
         257  +
                                &mut *deser,
         258  +
                                response.headers(),
         259  +
                                response.status().into(),
         260  +
                                body,
         261  +
                            )
         262  +
                        }) {
         263  +
                        ::std::result::Result::Ok(val) => val,
         264  +
                        ::std::result::Result::Err(e) => {
         265  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         266  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         267  +
                            ))
         268  +
                        }
         269  +
                    };
         270  +
                    tmp.meta = generic;
         271  +
                    if tmp.message.is_none() {
         272  +
                        tmp.message = _error_message;
         273  +
                    }
         274  +
                    tmp
         275  +
                }),
         276  +
                "ServiceFailureException" => crate::operation::put_lexicon::PutLexiconError::ServiceFailureException({
         277  +
                    let mut tmp = match protocol
         278  +
                        .deserialize_response(response, crate::types::error::ServiceFailureException::SCHEMA, _cfg)
         279  +
                        .and_then(|mut deser| {
         280  +
                            crate::types::error::ServiceFailureException::deserialize_with_response(
         281  +
                                &mut *deser,
         282  +
                                response.headers(),
         283  +
                                response.status().into(),
         284  +
                                body,
         285  +
                            )
         286  +
                        }) {
         287  +
                        ::std::result::Result::Ok(val) => val,
         288  +
                        ::std::result::Result::Err(e) => {
         289  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         290  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         291  +
                            ))
         292  +
                        }
         293  +
                    };
         294  +
                    tmp.meta = generic;
         295  +
                    if tmp.message.is_none() {
         296  +
                        tmp.message = _error_message;
         297  +
                    }
         298  +
                    tmp
         299  +
                }),
         300  +
                "UnsupportedPlsAlphabetException" => crate::operation::put_lexicon::PutLexiconError::UnsupportedPlsAlphabetException({
         301  +
                    let mut tmp = match protocol
         302  +
                        .deserialize_response(response, crate::types::error::UnsupportedPlsAlphabetException::SCHEMA, _cfg)
         303  +
                        .and_then(|mut deser| {
         304  +
                            crate::types::error::UnsupportedPlsAlphabetException::deserialize_with_response(
         305  +
                                &mut *deser,
         306  +
                                response.headers(),
         307  +
                                response.status().into(),
         308  +
                                body,
         309  +
                            )
         310  +
                        }) {
         311  +
                        ::std::result::Result::Ok(val) => val,
         312  +
                        ::std::result::Result::Err(e) => {
         313  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         314  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         315  +
                            ))
         316  +
                        }
         317  +
                    };
         318  +
                    tmp.meta = generic;
         319  +
                    if tmp.message.is_none() {
         320  +
                        tmp.message = _error_message;
         321  +
                    }
         322  +
                    tmp
         323  +
                }),
         324  +
                "UnsupportedPlsLanguageException" => crate::operation::put_lexicon::PutLexiconError::UnsupportedPlsLanguageException({
         325  +
                    let mut tmp = match protocol
         326  +
                        .deserialize_response(response, crate::types::error::UnsupportedPlsLanguageException::SCHEMA, _cfg)
         327  +
                        .and_then(|mut deser| {
         328  +
                            crate::types::error::UnsupportedPlsLanguageException::deserialize_with_response(
         329  +
                                &mut *deser,
         330  +
                                response.headers(),
         331  +
                                response.status().into(),
         332  +
                                body,
         333  +
                            )
         334  +
                        }) {
         335  +
                        ::std::result::Result::Ok(val) => val,
         336  +
                        ::std::result::Result::Err(e) => {
         337  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         338  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         339  +
                            ))
         340  +
                        }
         341  +
                    };
         342  +
                    tmp.meta = generic;
         343  +
                    if tmp.message.is_none() {
         344  +
                        tmp.message = _error_message;
         345  +
                    }
         346  +
                    tmp
         347  +
                }),
         348  +
                _ => crate::operation::put_lexicon::PutLexiconError::generic(generic),
         349  +
            };
         350  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         351  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         352  +
            ))
  157    353   
        } else {
  158         -
            crate::protocol_serde::shape_put_lexicon::de_put_lexicon_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         354  +
            let protocol = _cfg
         355  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         356  +
                .expect("a SharedClientProtocol is required");
         357  +
            let mut deser = protocol.deserialize_response(response, PutLexicon::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         358  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         359  +
            })?;
         360  +
            let body = response.body().bytes().expect("body loaded");
         361  +
            let output = crate::operation::put_lexicon::PutLexiconOutput::deserialize_with_response(
         362  +
                &mut *deser,
         363  +
                response.headers(),
         364  +
                response.status().into(),
         365  +
                body,
         366  +
            )
         367  +
            .map_err(|e| {
         368  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         369  +
            })?;
         370  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         371  +
        }
  161    372   
    }
  162    373   
}
  163    374   
#[derive(Debug)]
  164    375   
struct PutLexiconRequestSerializer;
  165    376   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutLexiconRequestSerializer {
  166    377   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    378   
    fn serialize_input(
  168    379   
        &self,
  169    380   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    381   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    382   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    383   
        let input = input.downcast::<crate::operation::put_lexicon::PutLexiconInput>().expect("correct type");
  173         -
        let _header_serialization_settings = _cfg
  174         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  175         -
            .cloned()
  176         -
            .unwrap_or_default();
  177         -
        let mut request_builder = {
  178         -
            #[allow(clippy::uninlined_format_args)]
  179         -
            fn uri_base(
  180         -
                _input: &crate::operation::put_lexicon::PutLexiconInput,
  181         -
                output: &mut ::std::string::String,
  182         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  183         -
                use ::std::fmt::Write as _;
  184         -
                let input_1 = &_input.name;
  185         -
                let input_1 = input_1
  186         -
                    .as_ref()
  187         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("name", "cannot be empty or unset"))?;
  188         -
                let name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  189         -
                if name.is_empty() {
  190         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  191         -
                        "name",
  192         -
                        "cannot be empty or unset",
  193         -
                    ));
         384  +
        let protocol = _cfg
         385  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         386  +
            .expect("a SharedClientProtocol is required");
         387  +
        if protocol.supports_http_bindings() {
         388  +
            let mut request = protocol
         389  +
                .serialize_body(&input, PutLexicon::INPUT_SCHEMA, "", _cfg)
         390  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         391  +
            {
         392  +
                let mut uri = "/v1/lexicons/{Name}".to_string();
         393  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         394  +
                if let Some(ref val) = input.name {
         395  +
                    uri = uri.replace("{Name}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  194    396   
                }
  195         -
                ::std::write!(output, "/v1/lexicons/{Name}", Name = name).expect("formatting should succeed");
  196         -
                ::std::result::Result::Ok(())
  197         -
            }
  198         -
            #[allow(clippy::unnecessary_wraps)]
  199         -
            fn update_http_builder(
  200         -
                input: &crate::operation::put_lexicon::PutLexiconInput,
  201         -
                builder: ::http_1x::request::Builder,
  202         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  203         -
                let mut uri = ::std::string::String::new();
  204         -
                uri_base(input, &mut uri)?;
  205         -
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
         397  +
                if !query_params.is_empty() {
         398  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         399  +
                    let pairs: Vec<String> = query_params
         400  +
                        .iter()
         401  +
                        .map(|(k, v)| {
         402  +
                            format!(
         403  +
                                "{}={}",
         404  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         405  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         406  +
                            )
         407  +
                        })
         408  +
                        .collect();
         409  +
                    uri.push_str(&pairs.join("&"));
         410  +
                }
         411  +
                request.set_uri(uri.as_str()).expect("valid URI");
  206    412   
            }
  207         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  208         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  209         -
            builder
  210         -
        };
  211         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_put_lexicon::ser_put_lexicon_input(&input)?);
  212         -
        if let Some(content_length) = body.content_length() {
  213         -
            let content_length = content_length.to_string();
  214         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
         413  +
         414  +
            return ::std::result::Result::Ok(request);
         415  +
        } else {
         416  +
            let mut request = protocol
         417  +
                .serialize_request(&input, PutLexicon::INPUT_SCHEMA, "", _cfg)
         418  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         419  +
         420  +
            return ::std::result::Result::Ok(request);
  215    421   
        }
  216         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  217    422   
    }
  218    423   
}
  219    424   
#[derive(Debug)]
  220    425   
struct PutLexiconEndpointParamsInterceptor;
  221    426   
  222    427   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutLexiconEndpointParamsInterceptor {
  223    428   
    fn name(&self) -> &'static str {
  224    429   
        "PutLexiconEndpointParamsInterceptor"
  225    430   
    }
  226    431   

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

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