AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c

Files changed:

tmp-codegen-diff/aws-sdk/sdk/polly/src/protocol_serde/shape_start_speech_synthesis_task_input.rs

@@ -1,0 +55,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_start_speech_synthesis_task_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.engine {
    7         -
        object.key("Engine").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.language_code {
   10         -
        object.key("LanguageCode").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.lexicon_names {
   13         -
        let mut array_4 = object.key("LexiconNames").start_array();
   14         -
        for item_5 in var_3 {
   15         -
            {
   16         -
                array_4.value().string(item_5.as_str());
   17         -
            }
   18         -
        }
   19         -
        array_4.finish();
   20         -
    }
   21         -
    if let Some(var_6) = &input.output_format {
   22         -
        object.key("OutputFormat").string(var_6.as_str());
   23         -
    }
   24         -
    if let Some(var_7) = &input.output_s3_bucket_name {
   25         -
        object.key("OutputS3BucketName").string(var_7.as_str());
   26         -
    }
   27         -
    if let Some(var_8) = &input.output_s3_key_prefix {
   28         -
        object.key("OutputS3KeyPrefix").string(var_8.as_str());
   29         -
    }
   30         -
    if let Some(var_9) = &input.sample_rate {
   31         -
        object.key("SampleRate").string(var_9.as_str());
   32         -
    }
   33         -
    if let Some(var_10) = &input.sns_topic_arn {
   34         -
        object.key("SnsTopicArn").string(var_10.as_str());
   35         -
    }
   36         -
    if let Some(var_11) = &input.speech_mark_types {
   37         -
        let mut array_12 = object.key("SpeechMarkTypes").start_array();
   38         -
        for item_13 in var_11 {
   39         -
            {
   40         -
                array_12.value().string(item_13.as_str());
   41         -
            }
   42         -
        }
   43         -
        array_12.finish();
   44         -
    }
   45         -
    if let Some(var_14) = &input.text {
   46         -
        object.key("Text").string(var_14.as_str());
   47         -
    }
   48         -
    if let Some(var_15) = &input.text_type {
   49         -
        object.key("TextType").string(var_15.as_str());
   50         -
    }
   51         -
    if let Some(var_16) = &input.voice_id {
   52         -
        object.key("VoiceId").string(var_16.as_str());
   53         -
    }
   54         -
    Ok(())
   55         -
}

tmp-codegen-diff/aws-sdk/sdk/polly/src/protocol_serde/shape_synthesis_task.rs

@@ -1,0 +132,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_synthesis_task<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::SynthesisTask>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   12         -
            #[allow(unused_mut)]
   13         -
            let mut builder = crate::types::builders::SynthesisTaskBuilder::default();
   14         -
            loop {
   15         -
                match tokens.next().transpose()? {
   16         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   17         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   18         -
                        "Engine" => {
   19         -
                            builder = builder.set_engine(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::Engine::from(u.as_ref())))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "TaskId" => {
   26         -
                            builder = builder.set_task_id(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "TaskStatus" => {
   33         -
                            builder = builder.set_task_status(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   35         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::TaskStatus::from(u.as_ref())))
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "TaskStatusReason" => {
   40         -
                            builder = builder.set_task_status_reason(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   42         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "OutputUri" => {
   47         -
                            builder = builder.set_output_uri(
   48         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   49         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   50         -
                                    .transpose()?,
   51         -
                            );
   52         -
                        }
   53         -
                        "CreationTime" => {
   54         -
                            builder = builder.set_creation_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   55         -
                                tokens.next(),
   56         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   57         -
                            )?);
   58         -
                        }
   59         -
                        "RequestCharacters" => {
   60         -
                            builder = builder.set_request_characters(
   61         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   62         -
                                    .map(i32::try_from)
   63         -
                                    .transpose()?,
   64         -
                            );
   65         -
                        }
   66         -
                        "SnsTopicArn" => {
   67         -
                            builder = builder.set_sns_topic_arn(
   68         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   69         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   70         -
                                    .transpose()?,
   71         -
                            );
   72         -
                        }
   73         -
                        "LexiconNames" => {
   74         -
                            builder =
   75         -
                                builder.set_lexicon_names(crate::protocol_serde::shape_lexicon_name_list::de_lexicon_name_list(tokens, _value)?);
   76         -
                        }
   77         -
                        "OutputFormat" => {
   78         -
                            builder = builder.set_output_format(
   79         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   80         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::OutputFormat::from(u.as_ref())))
   81         -
                                    .transpose()?,
   82         -
                            );
   83         -
                        }
   84         -
                        "SampleRate" => {
   85         -
                            builder = builder.set_sample_rate(
   86         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   87         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   88         -
                                    .transpose()?,
   89         -
                            );
   90         -
                        }
   91         -
                        "SpeechMarkTypes" => {
   92         -
                            builder = builder.set_speech_mark_types(crate::protocol_serde::shape_speech_mark_type_list::de_speech_mark_type_list(
   93         -
                                tokens, _value,
   94         -
                            )?);
   95         -
                        }
   96         -
                        "TextType" => {
   97         -
                            builder = builder.set_text_type(
   98         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   99         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::TextType::from(u.as_ref())))
  100         -
                                    .transpose()?,
  101         -
                            );
  102         -
                        }
  103         -
                        "VoiceId" => {
  104         -
                            builder = builder.set_voice_id(
  105         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  106         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::VoiceId::from(u.as_ref())))
  107         -
                                    .transpose()?,
  108         -
                            );
  109         -
                        }
  110         -
                        "LanguageCode" => {
  111         -
                            builder = builder.set_language_code(
  112         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  113         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::LanguageCode::from(u.as_ref())))
  114         -
                                    .transpose()?,
  115         -
                            );
  116         -
                        }
  117         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  118         -
                    },
  119         -
                    other => {
  120         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  121         -
                            "expected object key or end object, found: {other:?}"
  122         -
                        )))
  123         -
                    }
  124         -
                }
  125         -
            }
  126         -
            Ok(Some(builder.build()))
  127         -
        }
  128         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  129         -
            "expected start object or null",
  130         -
        )),
  131         -
    }
  132         -
}

tmp-codegen-diff/aws-sdk/sdk/polly/src/protocol_serde/shape_synthesis_task_not_found_exception.rs

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

tmp-codegen-diff/aws-sdk/sdk/polly/src/protocol_serde/shape_synthesis_tasks.rs

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_synthesis_tasks<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::SynthesisTask>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   12         -
            let mut items = Vec::new();
   13         -
            loop {
   14         -
                match tokens.peek() {
   15         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   16         -
                        tokens.next().transpose().unwrap();
   17         -
                        break;
   18         -
                    }
   19         -
                    _ => {
   20         -
                        let value = crate::protocol_serde::shape_synthesis_task::de_synthesis_task(tokens, _value)?;
   21         -
                        if let Some(value) = value {
   22         -
                            items.push(value);
   23         -
                        } else {
   24         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25         -
                                "dense list cannot contain null values",
   26         -
                            ));
   27         -
                        }
   28         -
                    }
   29         -
                }
   30         -
            }
   31         -
            Ok(Some(items))
   32         -
        }
   33         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "expected start array or null",
   35         -
        )),
   36         -
    }
   37         -
}

tmp-codegen-diff/aws-sdk/sdk/polly/src/protocol_serde/shape_synthesize_speech.rs

@@ -4,4 +210,0 @@
   24     24   
            crate::protocol_serde::shape_synthesize_speech_output::de_request_characters_header(_response_headers).map_err(|_| {
   25     25   
                crate::operation::synthesize_speech::SynthesizeSpeechError::unhandled(
   26     26   
                    "Failed to parse RequestCharacters from header `x-amzn-RequestCharacters",
   27     27   
                )
   28     28   
            })?,
   29     29   
        );
   30     30   
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   31     31   
        output.build()
   32     32   
    })
   33     33   
}
   34         -
   35         -
#[allow(clippy::unnecessary_wraps)]
   36         -
pub fn de_synthesize_speech_http_error(
   37         -
    _response_status: u16,
   38         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   39         -
    _response_body: &[u8],
   40         -
) -> std::result::Result<crate::operation::synthesize_speech::SynthesizeSpeechOutput, crate::operation::synthesize_speech::SynthesizeSpeechError> {
   41         -
    #[allow(unused_mut)]
   42         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   43         -
        .map_err(crate::operation::synthesize_speech::SynthesizeSpeechError::unhandled)?;
   44         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   45         -
    let generic = generic_builder.build();
   46         -
    let error_code = match generic.code() {
   47         -
        Some(code) => code,
   48         -
        None => return Err(crate::operation::synthesize_speech::SynthesizeSpeechError::unhandled(generic)),
   49         -
    };
   50         -
   51         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   52         -
    Err(match error_code {
   53         -
        "EngineNotSupportedException" => crate::operation::synthesize_speech::SynthesizeSpeechError::EngineNotSupportedException({
   54         -
            #[allow(unused_mut)]
   55         -
            let mut tmp = {
   56         -
                #[allow(unused_mut)]
   57         -
                let mut output = crate::types::error::builders::EngineNotSupportedExceptionBuilder::default();
   58         -
                output =
   59         -
                    crate::protocol_serde::shape_engine_not_supported_exception::de_engine_not_supported_exception_json_err(_response_body, output)
   60         -
                        .map_err(crate::operation::synthesize_speech::SynthesizeSpeechError::unhandled)?;
   61         -
                let output = output.meta(generic);
   62         -
                output.build()
   63         -
            };
   64         -
            if tmp.message.is_none() {
   65         -
                tmp.message = _error_message;
   66         -
            }
   67         -
            tmp
   68         -
        }),
   69         -
        "InvalidSampleRateException" => crate::operation::synthesize_speech::SynthesizeSpeechError::InvalidSampleRateException({
   70         -
            #[allow(unused_mut)]
   71         -
            let mut tmp = {
   72         -
                #[allow(unused_mut)]
   73         -
                let mut output = crate::types::error::builders::InvalidSampleRateExceptionBuilder::default();
   74         -
                output =
   75         -
                    crate::protocol_serde::shape_invalid_sample_rate_exception::de_invalid_sample_rate_exception_json_err(_response_body, output)
   76         -
                        .map_err(crate::operation::synthesize_speech::SynthesizeSpeechError::unhandled)?;
   77         -
                let output = output.meta(generic);
   78         -
                output.build()
   79         -
            };
   80         -
            if tmp.message.is_none() {
   81         -
                tmp.message = _error_message;
   82         -
            }
   83         -
            tmp
   84         -
        }),
   85         -
        "InvalidSsmlException" => crate::operation::synthesize_speech::SynthesizeSpeechError::InvalidSsmlException({
   86         -
            #[allow(unused_mut)]
   87         -
            let mut tmp = {
   88         -
                #[allow(unused_mut)]
   89         -
                let mut output = crate::types::error::builders::InvalidSsmlExceptionBuilder::default();
   90         -
                output = crate::protocol_serde::shape_invalid_ssml_exception::de_invalid_ssml_exception_json_err(_response_body, output)
   91         -
                    .map_err(crate::operation::synthesize_speech::SynthesizeSpeechError::unhandled)?;
   92         -
                let output = output.meta(generic);
   93         -
                output.build()
   94         -
            };
   95         -
            if tmp.message.is_none() {
   96         -
                tmp.message = _error_message;
   97         -
            }
   98         -
            tmp
   99         -
        }),
  100         -
        "LanguageNotSupportedException" => crate::operation::synthesize_speech::SynthesizeSpeechError::LanguageNotSupportedException({
  101         -
            #[allow(unused_mut)]
  102         -
            let mut tmp = {
  103         -
                #[allow(unused_mut)]
  104         -
                let mut output = crate::types::error::builders::LanguageNotSupportedExceptionBuilder::default();
  105         -
                output = crate::protocol_serde::shape_language_not_supported_exception::de_language_not_supported_exception_json_err(
  106         -
                    _response_body,
  107         -
                    output,
  108         -
                )
  109         -
                .map_err(crate::operation::synthesize_speech::SynthesizeSpeechError::unhandled)?;
  110         -
                let output = output.meta(generic);
  111         -
                output.build()
  112         -
            };
  113         -
            if tmp.message.is_none() {
  114         -
                tmp.message = _error_message;
  115         -
            }
  116         -
            tmp
  117         -
        }),
  118         -
        "LexiconNotFoundException" => crate::operation::synthesize_speech::SynthesizeSpeechError::LexiconNotFoundException({
  119         -
            #[allow(unused_mut)]
  120         -
            let mut tmp = {
  121         -
                #[allow(unused_mut)]
  122         -
                let mut output = crate::types::error::builders::LexiconNotFoundExceptionBuilder::default();
  123         -
                output = crate::protocol_serde::shape_lexicon_not_found_exception::de_lexicon_not_found_exception_json_err(_response_body, output)
  124         -
                    .map_err(crate::operation::synthesize_speech::SynthesizeSpeechError::unhandled)?;
  125         -
                let output = output.meta(generic);
  126         -
                output.build()
  127         -
            };
  128         -
            if tmp.message.is_none() {
  129         -
                tmp.message = _error_message;
  130         -
            }
  131         -
            tmp
  132         -
        }),
  133         -
        "MarksNotSupportedForFormatException" => crate::operation::synthesize_speech::SynthesizeSpeechError::MarksNotSupportedForFormatException({
  134         -
            #[allow(unused_mut)]
  135         -
            let mut tmp = {
  136         -
                #[allow(unused_mut)]
  137         -
                let mut output = crate::types::error::builders::MarksNotSupportedForFormatExceptionBuilder::default();
  138         -
                output = crate::protocol_serde::shape_marks_not_supported_for_format_exception::de_marks_not_supported_for_format_exception_json_err(
  139         -
                    _response_body,
  140         -
                    output,
  141         -
                )
  142         -
                .map_err(crate::operation::synthesize_speech::SynthesizeSpeechError::unhandled)?;
  143         -
                let output = output.meta(generic);
  144         -
                output.build()
  145         -
            };
  146         -
            if tmp.message.is_none() {
  147         -
                tmp.message = _error_message;
  148         -
            }
  149         -
            tmp
  150         -
        }),
  151         -
        "ServiceFailureException" => crate::operation::synthesize_speech::SynthesizeSpeechError::ServiceFailureException({
  152         -
            #[allow(unused_mut)]
  153         -
            let mut tmp = {
  154         -
                #[allow(unused_mut)]
  155         -
                let mut output = crate::types::error::builders::ServiceFailureExceptionBuilder::default();
  156         -
                output = crate::protocol_serde::shape_service_failure_exception::de_service_failure_exception_json_err(_response_body, output)
  157         -
                    .map_err(crate::operation::synthesize_speech::SynthesizeSpeechError::unhandled)?;
  158         -
                let output = output.meta(generic);
  159         -
                output.build()
  160         -
            };
  161         -
            if tmp.message.is_none() {
  162         -
                tmp.message = _error_message;
  163         -
            }
  164         -
            tmp
  165         -
        }),
  166         -
        "SsmlMarksNotSupportedForTextTypeException" => {
  167         -
            crate::operation::synthesize_speech::SynthesizeSpeechError::SsmlMarksNotSupportedForTextTypeException({
  168         -
                #[allow(unused_mut)]
  169         -
                let mut tmp = {
  170         -
                    #[allow(unused_mut)]
  171         -
                    let mut output = crate::types::error::builders::SsmlMarksNotSupportedForTextTypeExceptionBuilder::default();
  172         -
                    output = crate::protocol_serde::shape_ssml_marks_not_supported_for_text_type_exception::de_ssml_marks_not_supported_for_text_type_exception_json_err(_response_body, output).map_err(crate::operation::synthesize_speech::SynthesizeSpeechError::unhandled)?;
  173         -
                    let output = output.meta(generic);
  174         -
                    output.build()
  175         -
                };
  176         -
                if tmp.message.is_none() {
  177         -
                    tmp.message = _error_message;
  178         -
                }
  179         -
                tmp
  180         -
            })
  181         -
        }
  182         -
        "TextLengthExceededException" => crate::operation::synthesize_speech::SynthesizeSpeechError::TextLengthExceededException({
  183         -
            #[allow(unused_mut)]
  184         -
            let mut tmp = {
  185         -
                #[allow(unused_mut)]
  186         -
                let mut output = crate::types::error::builders::TextLengthExceededExceptionBuilder::default();
  187         -
                output =
  188         -
                    crate::protocol_serde::shape_text_length_exceeded_exception::de_text_length_exceeded_exception_json_err(_response_body, output)
  189         -
                        .map_err(crate::operation::synthesize_speech::SynthesizeSpeechError::unhandled)?;
  190         -
                let output = output.meta(generic);
  191         -
                output.build()
  192         -
            };
  193         -
            if tmp.message.is_none() {
  194         -
                tmp.message = _error_message;
  195         -
            }
  196         -
            tmp
  197         -
        }),
  198         -
        _ => crate::operation::synthesize_speech::SynthesizeSpeechError::generic(generic),
  199         -
    })
  200         -
}
  201         -
  202         -
pub fn ser_synthesize_speech_input(
  203         -
    input: &crate::operation::synthesize_speech::SynthesizeSpeechInput,
  204         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  205         -
    let mut out = String::new();
  206         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  207         -
    crate::protocol_serde::shape_synthesize_speech_input::ser_synthesize_speech_input_input(&mut object, input)?;
  208         -
    object.finish();
  209         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  210         -
}

tmp-codegen-diff/aws-sdk/sdk/polly/src/protocol_serde/shape_synthesize_speech_input.rs

@@ -1,0 +46,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_synthesize_speech_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::synthesize_speech::SynthesizeSpeechInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.engine {
    7         -
        object.key("Engine").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.language_code {
   10         -
        object.key("LanguageCode").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.lexicon_names {
   13         -
        let mut array_4 = object.key("LexiconNames").start_array();
   14         -
        for item_5 in var_3 {
   15         -
            {
   16         -
                array_4.value().string(item_5.as_str());
   17         -
            }
   18         -
        }
   19         -
        array_4.finish();
   20         -
    }
   21         -
    if let Some(var_6) = &input.output_format {
   22         -
        object.key("OutputFormat").string(var_6.as_str());
   23         -
    }
   24         -
    if let Some(var_7) = &input.sample_rate {
   25         -
        object.key("SampleRate").string(var_7.as_str());
   26         -
    }
   27         -
    if let Some(var_8) = &input.speech_mark_types {
   28         -
        let mut array_9 = object.key("SpeechMarkTypes").start_array();
   29         -
        for item_10 in var_8 {
   30         -
            {
   31         -
                array_9.value().string(item_10.as_str());
   32         -
            }
   33         -
        }
   34         -
        array_9.finish();
   35         -
    }
   36         -
    if let Some(var_11) = &input.text {
   37         -
        object.key("Text").string(var_11.as_str());
   38         -
    }
   39         -
    if let Some(var_12) = &input.text_type {
   40         -
        object.key("TextType").string(var_12.as_str());
   41         -
    }
   42         -
    if let Some(var_13) = &input.voice_id {
   43         -
        object.key("VoiceId").string(var_13.as_str());
   44         -
    }
   45         -
    Ok(())
   46         -
}

tmp-codegen-diff/aws-sdk/sdk/polly/src/protocol_serde/shape_text_length_exceeded_exception.rs

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

tmp-codegen-diff/aws-sdk/sdk/polly/src/protocol_serde/shape_unsupported_pls_alphabet_exception.rs

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

tmp-codegen-diff/aws-sdk/sdk/polly/src/protocol_serde/shape_unsupported_pls_language_exception.rs

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

tmp-codegen-diff/aws-sdk/sdk/polly/src/protocol_serde/shape_voice.rs

@@ -1,0 +76,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_voice<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::Voice>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   12         -
            #[allow(unused_mut)]
   13         -
            let mut builder = crate::types::builders::VoiceBuilder::default();
   14         -
            loop {
   15         -
                match tokens.next().transpose()? {
   16         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   17         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   18         -
                        "Gender" => {
   19         -
                            builder = builder.set_gender(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::Gender::from(u.as_ref())))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "Id" => {
   26         -
                            builder = builder.set_id(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::VoiceId::from(u.as_ref())))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "LanguageCode" => {
   33         -
                            builder = builder.set_language_code(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   35         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::LanguageCode::from(u.as_ref())))
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "LanguageName" => {
   40         -
                            builder = builder.set_language_name(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   42         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "Name" => {
   47         -
                            builder = builder.set_name(
   48         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   49         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   50         -
                                    .transpose()?,
   51         -
                            );
   52         -
                        }
   53         -
                        "AdditionalLanguageCodes" => {
   54         -
                            builder = builder.set_additional_language_codes(crate::protocol_serde::shape_language_code_list::de_language_code_list(
   55         -
                                tokens, _value,
   56         -
                            )?);
   57         -
                        }
   58         -
                        "SupportedEngines" => {
   59         -
                            builder = builder.set_supported_engines(crate::protocol_serde::shape_engine_list::de_engine_list(tokens, _value)?);
   60         -
                        }
   61         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   62         -
                    },
   63         -
                    other => {
   64         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   65         -
                            "expected object key or end object, found: {other:?}"
   66         -
                        )))
   67         -
                    }
   68         -
                }
   69         -
            }
   70         -
            Ok(Some(builder.build()))
   71         -
        }
   72         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   73         -
            "expected start object or null",
   74         -
        )),
   75         -
    }
   76         -
}

tmp-codegen-diff/aws-sdk/sdk/polly/src/protocol_serde/shape_voice_list.rs

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_voice_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::Voice>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   12         -
            let mut items = Vec::new();
   13         -
            loop {
   14         -
                match tokens.peek() {
   15         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   16         -
                        tokens.next().transpose().unwrap();
   17         -
                        break;
   18         -
                    }
   19         -
                    _ => {
   20         -
                        let value = crate::protocol_serde::shape_voice::de_voice(tokens, _value)?;
   21         -
                        if let Some(value) = value {
   22         -
                            items.push(value);
   23         -
                        } else {
   24         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25         -
                                "dense list cannot contain null values",
   26         -
                            ));
   27         -
                        }
   28         -
                    }
   29         -
                }
   30         -
            }
   31         -
            Ok(Some(items))
   32         -
        }
   33         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "expected start array or null",
   35         -
        )),
   36         -
    }
   37         -
}

tmp-codegen-diff/aws-sdk/sdk/polly/src/types/_lexicon.rs

@@ -5,5 +126,137 @@
   25     25   
        formatter.field("content", &"*** Sensitive Data Redacted ***");
   26     26   
        formatter.field("name", &self.name);
   27     27   
        formatter.finish()
   28     28   
    }
   29     29   
}
   30     30   
static LEXICON_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
   31     31   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#Lexicon", "com.amazonaws.polly", "Lexicon");
   32     32   
static LEXICON_MEMBER_CONTENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   33     33   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#Lexicon$Content", "com.amazonaws.polly", "Lexicon"),
   34     34   
    ::aws_smithy_schema::ShapeType::String,
   35         -
    "content",
          35  +
    "Content",
   36     36   
    0,
   37     37   
);
   38     38   
static LEXICON_MEMBER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#Lexicon$Name", "com.amazonaws.polly", "Lexicon"),
   40     40   
    ::aws_smithy_schema::ShapeType::String,
   41         -
    "name",
          41  +
    "Name",
   42     42   
    1,
   43     43   
);
   44     44   
static LEXICON_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   45     45   
    LEXICON_SCHEMA_ID,
   46     46   
    ::aws_smithy_schema::ShapeType::Structure,
   47     47   
    &[&LEXICON_MEMBER_CONTENT, &LEXICON_MEMBER_NAME],
   48     48   
);
   49     49   
impl Lexicon {
   50     50   
    /// The schema for this shape.
   51     51   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LEXICON_SCHEMA;
   52     52   
}
   53     53   
impl ::aws_smithy_schema::serde::SerializableStruct for Lexicon {
   54     54   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   55     55   
    fn serialize_members(
   56     56   
        &self,
   57     57   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   58     58   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   59     59   
        if let Some(ref val) = self.content {
   60     60   
            ser.write_string(&LEXICON_MEMBER_CONTENT, val)?;
   61     61   
        }
   62     62   
        if let Some(ref val) = self.name {
   63     63   
            ser.write_string(&LEXICON_MEMBER_NAME, val)?;
   64     64   
        }
   65     65   
        Ok(())
   66     66   
    }
   67     67   
}
   68     68   
impl Lexicon {
   69     69   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   70         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   71         -
        deserializer: &mut D,
          70  +
    pub fn deserialize(
          71  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   72     72   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   73     73   
        #[allow(unused_variables, unused_mut)]
   74     74   
        let mut builder = Self::builder();
   75     75   
        #[allow(
   76     76   
            unused_variables,
   77     77   
            unreachable_code,
   78     78   
            clippy::single_match,
   79     79   
            clippy::match_single_binding,
   80     80   
            clippy::diverging_sub_expression
   81     81   
        )]
   82         -
        deserializer.read_struct(&LEXICON_SCHEMA, (), |_, member, deser| {
          82  +
        deserializer.read_struct(&LEXICON_SCHEMA, &mut |member, deser| {
   83     83   
            match member.member_index() {
   84     84   
                Some(0) => {
   85     85   
                    builder.content = Some(deser.read_string(member)?);
   86     86   
                }
   87     87   
                Some(1) => {
   88     88   
                    builder.name = Some(deser.read_string(member)?);
   89     89   
                }
   90     90   
                _ => {}
   91     91   
            }
   92     92   
            Ok(())
   93     93   
        })?;
   94     94   
        Ok(builder.build())
   95     95   
    }
   96     96   
}
          97  +
impl Lexicon {
          98  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          99  +
    pub fn deserialize_with_response(
         100  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         101  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         102  +
        _status: u16,
         103  +
        _body: &[u8],
         104  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         105  +
        Self::deserialize(deserializer)
         106  +
    }
         107  +
}
   97    108   
impl Lexicon {
   98    109   
    /// Creates a new builder-style object to manufacture [`Lexicon`](crate::types::Lexicon).
   99    110   
    pub fn builder() -> crate::types::builders::LexiconBuilder {
  100    111   
        crate::types::builders::LexiconBuilder::default()
  101    112   
    }
  102    113   
}
  103    114   
  104    115   
/// A builder for [`Lexicon`](crate::types::Lexicon).
  105    116   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
  106    117   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/polly/src/types/_lexicon_attributes.rs

@@ -25,25 +219,230 @@
   45     45   
}
   46     46   
static LEXICONATTRIBUTES_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
   47     47   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#LexiconAttributes", "com.amazonaws.polly", "LexiconAttributes");
   48     48   
static LEXICONATTRIBUTES_MEMBER_ALPHABET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   49     49   
    ::aws_smithy_schema::ShapeId::from_static(
   50     50   
        "com.amazonaws.polly#LexiconAttributes$Alphabet",
   51     51   
        "com.amazonaws.polly",
   52     52   
        "LexiconAttributes",
   53     53   
    ),
   54     54   
    ::aws_smithy_schema::ShapeType::String,
   55         -
    "alphabet",
          55  +
    "Alphabet",
   56     56   
    0,
   57     57   
);
   58     58   
static LEXICONATTRIBUTES_MEMBER_LANGUAGE_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   59     59   
    ::aws_smithy_schema::ShapeId::from_static(
   60     60   
        "com.amazonaws.polly#LexiconAttributes$LanguageCode",
   61     61   
        "com.amazonaws.polly",
   62     62   
        "LexiconAttributes",
   63     63   
    ),
   64     64   
    ::aws_smithy_schema::ShapeType::String,
   65         -
    "language_code",
          65  +
    "LanguageCode",
   66     66   
    1,
   67     67   
);
   68     68   
static LEXICONATTRIBUTES_MEMBER_LAST_MODIFIED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   69     69   
    ::aws_smithy_schema::ShapeId::from_static(
   70     70   
        "com.amazonaws.polly#LexiconAttributes$LastModified",
   71     71   
        "com.amazonaws.polly",
   72     72   
        "LexiconAttributes",
   73     73   
    ),
   74     74   
    ::aws_smithy_schema::ShapeType::Timestamp,
   75         -
    "last_modified",
          75  +
    "LastModified",
   76     76   
    2,
   77     77   
);
   78     78   
static LEXICONATTRIBUTES_MEMBER_LEXICON_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   79     79   
    ::aws_smithy_schema::ShapeId::from_static(
   80     80   
        "com.amazonaws.polly#LexiconAttributes$LexiconArn",
   81     81   
        "com.amazonaws.polly",
   82     82   
        "LexiconAttributes",
   83     83   
    ),
   84     84   
    ::aws_smithy_schema::ShapeType::String,
   85         -
    "lexicon_arn",
          85  +
    "LexiconArn",
   86     86   
    3,
   87     87   
);
   88     88   
static LEXICONATTRIBUTES_MEMBER_LEXEMES_COUNT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   89     89   
    ::aws_smithy_schema::ShapeId::from_static(
   90     90   
        "com.amazonaws.polly#LexiconAttributes$LexemesCount",
   91     91   
        "com.amazonaws.polly",
   92     92   
        "LexiconAttributes",
   93     93   
    ),
   94     94   
    ::aws_smithy_schema::ShapeType::Integer,
   95         -
    "lexemes_count",
          95  +
    "LexemesCount",
   96     96   
    4,
   97     97   
);
   98     98   
static LEXICONATTRIBUTES_MEMBER_SIZE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   99     99   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#LexiconAttributes$Size", "com.amazonaws.polly", "LexiconAttributes"),
  100    100   
    ::aws_smithy_schema::ShapeType::Integer,
  101         -
    "size",
         101  +
    "Size",
  102    102   
    5,
  103    103   
);
  104    104   
static LEXICONATTRIBUTES_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  105    105   
    LEXICONATTRIBUTES_SCHEMA_ID,
  106    106   
    ::aws_smithy_schema::ShapeType::Structure,
  107    107   
    &[
  108    108   
        &LEXICONATTRIBUTES_MEMBER_ALPHABET,
  109    109   
        &LEXICONATTRIBUTES_MEMBER_LANGUAGE_CODE,
  110    110   
        &LEXICONATTRIBUTES_MEMBER_LAST_MODIFIED,
  111    111   
        &LEXICONATTRIBUTES_MEMBER_LEXICON_ARN,
  112    112   
        &LEXICONATTRIBUTES_MEMBER_LEXEMES_COUNT,
  113    113   
        &LEXICONATTRIBUTES_MEMBER_SIZE,
  114    114   
    ],
  115    115   
);
  116    116   
impl LexiconAttributes {
  117    117   
    /// The schema for this shape.
  118    118   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LEXICONATTRIBUTES_SCHEMA;
  119    119   
}
  120    120   
impl ::aws_smithy_schema::serde::SerializableStruct for LexiconAttributes {
  121    121   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  122    122   
    fn serialize_members(
  123    123   
        &self,
  124    124   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  125    125   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  126    126   
        if let Some(ref val) = self.alphabet {
  127    127   
            ser.write_string(&LEXICONATTRIBUTES_MEMBER_ALPHABET, val)?;
  128    128   
        }
  129    129   
        if let Some(ref val) = self.language_code {
  130    130   
            ser.write_string(&LEXICONATTRIBUTES_MEMBER_LANGUAGE_CODE, val.as_str())?;
  131    131   
        }
  132    132   
        if let Some(ref val) = self.last_modified {
  133    133   
            ser.write_timestamp(&LEXICONATTRIBUTES_MEMBER_LAST_MODIFIED, val)?;
  134    134   
        }
  135    135   
        if let Some(ref val) = self.lexicon_arn {
  136    136   
            ser.write_string(&LEXICONATTRIBUTES_MEMBER_LEXICON_ARN, val)?;
  137    137   
        }
  138    138   
        {
  139    139   
            let val = &self.lexemes_count;
  140    140   
            ser.write_integer(&LEXICONATTRIBUTES_MEMBER_LEXEMES_COUNT, *val)?;
  141    141   
        }
  142    142   
        {
  143    143   
            let val = &self.size;
  144    144   
            ser.write_integer(&LEXICONATTRIBUTES_MEMBER_SIZE, *val)?;
  145    145   
        }
  146    146   
        Ok(())
  147    147   
    }
  148    148   
}
  149    149   
impl LexiconAttributes {
  150    150   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  151         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  152         -
        deserializer: &mut D,
         151  +
    pub fn deserialize(
         152  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  153    153   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  154    154   
        #[allow(unused_variables, unused_mut)]
  155    155   
        let mut builder = Self::builder();
  156    156   
        #[allow(
  157    157   
            unused_variables,
  158    158   
            unreachable_code,
  159    159   
            clippy::single_match,
  160    160   
            clippy::match_single_binding,
  161    161   
            clippy::diverging_sub_expression
  162    162   
        )]
  163         -
        deserializer.read_struct(&LEXICONATTRIBUTES_SCHEMA, (), |_, member, deser| {
         163  +
        deserializer.read_struct(&LEXICONATTRIBUTES_SCHEMA, &mut |member, deser| {
  164    164   
            match member.member_index() {
  165    165   
                Some(0) => {
  166    166   
                    builder.alphabet = Some(deser.read_string(member)?);
  167    167   
                }
  168    168   
                Some(1) => {
  169    169   
                    builder.language_code = Some(crate::types::LanguageCode::from(deser.read_string(member)?.as_str()));
  170    170   
                }
  171    171   
                Some(2) => {
  172    172   
                    builder.last_modified = Some(deser.read_timestamp(member)?);
  173    173   
                }
  174    174   
                Some(3) => {
  175    175   
                    builder.lexicon_arn = Some(deser.read_string(member)?);
  176    176   
                }
  177    177   
                Some(4) => {
  178    178   
                    builder.lexemes_count = Some(deser.read_integer(member)?);
  179    179   
                }
  180    180   
                Some(5) => {
  181    181   
                    builder.size = Some(deser.read_integer(member)?);
  182    182   
                }
  183    183   
                _ => {}
  184    184   
            }
  185    185   
            Ok(())
  186    186   
        })?;
  187    187   
        Ok(builder.build())
  188    188   
    }
  189    189   
}
         190  +
impl LexiconAttributes {
         191  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         192  +
    pub fn deserialize_with_response(
         193  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         194  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         195  +
        _status: u16,
         196  +
        _body: &[u8],
         197  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         198  +
        Self::deserialize(deserializer)
         199  +
    }
         200  +
}
  190    201   
impl LexiconAttributes {
  191    202   
    /// Creates a new builder-style object to manufacture [`LexiconAttributes`](crate::types::LexiconAttributes).
  192    203   
    pub fn builder() -> crate::types::builders::LexiconAttributesBuilder {
  193    204   
        crate::types::builders::LexiconAttributesBuilder::default()
  194    205   
    }
  195    206   
}
  196    207   
  197    208   
/// A builder for [`LexiconAttributes`](crate::types::LexiconAttributes).
  198    209   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  199    210   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/polly/src/types/_lexicon_description.rs

@@ -1,1 +122,133 @@
   17     17   
    /// <p>Provides lexicon metadata.</p>
   18     18   
    pub fn attributes(&self) -> ::std::option::Option<&crate::types::LexiconAttributes> {
   19     19   
        self.attributes.as_ref()
   20     20   
    }
   21     21   
}
   22     22   
static LEXICONDESCRIPTION_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
   23     23   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#LexiconDescription", "com.amazonaws.polly", "LexiconDescription");
   24     24   
static LEXICONDESCRIPTION_MEMBER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   25     25   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#LexiconDescription$Name", "com.amazonaws.polly", "LexiconDescription"),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "name",
          27  +
    "Name",
   28     28   
    0,
   29     29   
);
   30     30   
static LEXICONDESCRIPTION_MEMBER_ATTRIBUTES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   31     31   
    ::aws_smithy_schema::ShapeId::from_static(
   32     32   
        "com.amazonaws.polly#LexiconDescription$Attributes",
   33     33   
        "com.amazonaws.polly",
   34     34   
        "LexiconDescription",
   35     35   
    ),
   36     36   
    ::aws_smithy_schema::ShapeType::Structure,
   37         -
    "attributes",
          37  +
    "Attributes",
   38     38   
    1,
   39     39   
);
   40     40   
static LEXICONDESCRIPTION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   41     41   
    LEXICONDESCRIPTION_SCHEMA_ID,
   42     42   
    ::aws_smithy_schema::ShapeType::Structure,
   43     43   
    &[&LEXICONDESCRIPTION_MEMBER_NAME, &LEXICONDESCRIPTION_MEMBER_ATTRIBUTES],
   44     44   
);
   45     45   
impl LexiconDescription {
   46     46   
    /// The schema for this shape.
   47     47   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LEXICONDESCRIPTION_SCHEMA;
   48     48   
}
   49     49   
impl ::aws_smithy_schema::serde::SerializableStruct for LexiconDescription {
   50     50   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   51     51   
    fn serialize_members(
   52     52   
        &self,
   53     53   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   54     54   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   55     55   
        if let Some(ref val) = self.name {
   56     56   
            ser.write_string(&LEXICONDESCRIPTION_MEMBER_NAME, val)?;
   57     57   
        }
   58     58   
        if let Some(ref val) = self.attributes {
   59     59   
            ser.write_struct(&LEXICONDESCRIPTION_MEMBER_ATTRIBUTES, val)?;
   60     60   
        }
   61     61   
        Ok(())
   62     62   
    }
   63     63   
}
   64     64   
impl LexiconDescription {
   65     65   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   66         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   67         -
        deserializer: &mut D,
          66  +
    pub fn deserialize(
          67  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   68     68   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   69     69   
        #[allow(unused_variables, unused_mut)]
   70     70   
        let mut builder = Self::builder();
   71     71   
        #[allow(
   72     72   
            unused_variables,
   73     73   
            unreachable_code,
   74     74   
            clippy::single_match,
   75     75   
            clippy::match_single_binding,
   76     76   
            clippy::diverging_sub_expression
   77     77   
        )]
   78         -
        deserializer.read_struct(&LEXICONDESCRIPTION_SCHEMA, (), |_, member, deser| {
          78  +
        deserializer.read_struct(&LEXICONDESCRIPTION_SCHEMA, &mut |member, deser| {
   79     79   
            match member.member_index() {
   80     80   
                Some(0) => {
   81     81   
                    builder.name = Some(deser.read_string(member)?);
   82     82   
                }
   83     83   
                Some(1) => {
   84     84   
                    builder.attributes = Some(crate::types::LexiconAttributes::deserialize(deser)?);
   85     85   
                }
   86     86   
                _ => {}
   87     87   
            }
   88     88   
            Ok(())
   89     89   
        })?;
   90     90   
        Ok(builder.build())
   91     91   
    }
   92     92   
}
          93  +
impl LexiconDescription {
          94  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          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  +
        Self::deserialize(deserializer)
         102  +
    }
         103  +
}
   93    104   
impl LexiconDescription {
   94    105   
    /// Creates a new builder-style object to manufacture [`LexiconDescription`](crate::types::LexiconDescription).
   95    106   
    pub fn builder() -> crate::types::builders::LexiconDescriptionBuilder {
   96    107   
        crate::types::builders::LexiconDescriptionBuilder::default()
   97    108   
    }
   98    109   
}
   99    110   
  100    111   
/// A builder for [`LexiconDescription`](crate::types::LexiconDescription).
  101    112   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  102    113   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/polly/src/types/_synthesis_task.rs

@@ -85,85 +241,241 @@
  105    105   
    /// <p>If a bilingual voice is used and no language code is specified, Amazon Polly uses the default language of the bilingual voice. The default language for any voice is the one returned by the <a href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a> operation for the <code>LanguageCode</code> parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi.</p>
  106    106   
    pub fn language_code(&self) -> ::std::option::Option<&crate::types::LanguageCode> {
  107    107   
        self.language_code.as_ref()
  108    108   
    }
  109    109   
}
  110    110   
static SYNTHESISTASK_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
  111    111   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#SynthesisTask", "com.amazonaws.polly", "SynthesisTask");
  112    112   
static SYNTHESISTASK_MEMBER_ENGINE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  113    113   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#SynthesisTask$Engine", "com.amazonaws.polly", "SynthesisTask"),
  114    114   
    ::aws_smithy_schema::ShapeType::String,
  115         -
    "engine",
         115  +
    "Engine",
  116    116   
    0,
  117    117   
);
  118    118   
static SYNTHESISTASK_MEMBER_TASK_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  119    119   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#SynthesisTask$TaskId", "com.amazonaws.polly", "SynthesisTask"),
  120    120   
    ::aws_smithy_schema::ShapeType::String,
  121         -
    "task_id",
         121  +
    "TaskId",
  122    122   
    1,
  123    123   
);
  124    124   
static SYNTHESISTASK_MEMBER_TASK_STATUS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  125    125   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#SynthesisTask$TaskStatus", "com.amazonaws.polly", "SynthesisTask"),
  126    126   
    ::aws_smithy_schema::ShapeType::String,
  127         -
    "task_status",
         127  +
    "TaskStatus",
  128    128   
    2,
  129    129   
);
  130    130   
static SYNTHESISTASK_MEMBER_TASK_STATUS_REASON: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  131    131   
    ::aws_smithy_schema::ShapeId::from_static(
  132    132   
        "com.amazonaws.polly#SynthesisTask$TaskStatusReason",
  133    133   
        "com.amazonaws.polly",
  134    134   
        "SynthesisTask",
  135    135   
    ),
  136    136   
    ::aws_smithy_schema::ShapeType::String,
  137         -
    "task_status_reason",
         137  +
    "TaskStatusReason",
  138    138   
    3,
  139    139   
);
  140    140   
static SYNTHESISTASK_MEMBER_OUTPUT_URI: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  141    141   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#SynthesisTask$OutputUri", "com.amazonaws.polly", "SynthesisTask"),
  142    142   
    ::aws_smithy_schema::ShapeType::String,
  143         -
    "output_uri",
         143  +
    "OutputUri",
  144    144   
    4,
  145    145   
);
  146    146   
static SYNTHESISTASK_MEMBER_CREATION_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  147    147   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#SynthesisTask$CreationTime", "com.amazonaws.polly", "SynthesisTask"),
  148    148   
    ::aws_smithy_schema::ShapeType::Timestamp,
  149         -
    "creation_time",
         149  +
    "CreationTime",
  150    150   
    5,
  151    151   
);
  152    152   
static SYNTHESISTASK_MEMBER_REQUEST_CHARACTERS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  153    153   
    ::aws_smithy_schema::ShapeId::from_static(
  154    154   
        "com.amazonaws.polly#SynthesisTask$RequestCharacters",
  155    155   
        "com.amazonaws.polly",
  156    156   
        "SynthesisTask",
  157    157   
    ),
  158    158   
    ::aws_smithy_schema::ShapeType::Integer,
  159         -
    "request_characters",
         159  +
    "RequestCharacters",
  160    160   
    6,
  161    161   
);
  162    162   
static SYNTHESISTASK_MEMBER_SNS_TOPIC_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  163    163   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#SynthesisTask$SnsTopicArn", "com.amazonaws.polly", "SynthesisTask"),
  164    164   
    ::aws_smithy_schema::ShapeType::String,
  165         -
    "sns_topic_arn",
         165  +
    "SnsTopicArn",
  166    166   
    7,
  167    167   
);
  168    168   
static SYNTHESISTASK_MEMBER_LEXICON_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  169    169   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#SynthesisTask$LexiconNames", "com.amazonaws.polly", "SynthesisTask"),
  170    170   
    ::aws_smithy_schema::ShapeType::List,
  171         -
    "lexicon_names",
         171  +
    "LexiconNames",
  172    172   
    8,
  173    173   
);
  174    174   
static SYNTHESISTASK_MEMBER_OUTPUT_FORMAT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  175    175   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#SynthesisTask$OutputFormat", "com.amazonaws.polly", "SynthesisTask"),
  176    176   
    ::aws_smithy_schema::ShapeType::String,
  177         -
    "output_format",
         177  +
    "OutputFormat",
  178    178   
    9,
  179    179   
);
  180    180   
static SYNTHESISTASK_MEMBER_SAMPLE_RATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  181    181   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#SynthesisTask$SampleRate", "com.amazonaws.polly", "SynthesisTask"),
  182    182   
    ::aws_smithy_schema::ShapeType::String,
  183         -
    "sample_rate",
         183  +
    "SampleRate",
  184    184   
    10,
  185    185   
);
  186    186   
static SYNTHESISTASK_MEMBER_SPEECH_MARK_TYPES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  187    187   
    ::aws_smithy_schema::ShapeId::from_static(
  188    188   
        "com.amazonaws.polly#SynthesisTask$SpeechMarkTypes",
  189    189   
        "com.amazonaws.polly",
  190    190   
        "SynthesisTask",
  191    191   
    ),
  192    192   
    ::aws_smithy_schema::ShapeType::List,
  193         -
    "speech_mark_types",
         193  +
    "SpeechMarkTypes",
  194    194   
    11,
  195    195   
);
  196    196   
static SYNTHESISTASK_MEMBER_TEXT_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  197    197   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#SynthesisTask$TextType", "com.amazonaws.polly", "SynthesisTask"),
  198    198   
    ::aws_smithy_schema::ShapeType::String,
  199         -
    "text_type",
         199  +
    "TextType",
  200    200   
    12,
  201    201   
);
  202    202   
static SYNTHESISTASK_MEMBER_VOICE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  203    203   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#SynthesisTask$VoiceId", "com.amazonaws.polly", "SynthesisTask"),
  204    204   
    ::aws_smithy_schema::ShapeType::String,
  205         -
    "voice_id",
         205  +
    "VoiceId",
  206    206   
    13,
  207    207   
);
  208    208   
static SYNTHESISTASK_MEMBER_LANGUAGE_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  209    209   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#SynthesisTask$LanguageCode", "com.amazonaws.polly", "SynthesisTask"),
  210    210   
    ::aws_smithy_schema::ShapeType::String,
  211         -
    "language_code",
         211  +
    "LanguageCode",
  212    212   
    14,
  213    213   
);
  214    214   
static SYNTHESISTASK_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  215    215   
    SYNTHESISTASK_SCHEMA_ID,
  216    216   
    ::aws_smithy_schema::ShapeType::Structure,
  217    217   
    &[
  218    218   
        &SYNTHESISTASK_MEMBER_ENGINE,
  219    219   
        &SYNTHESISTASK_MEMBER_TASK_ID,
  220    220   
        &SYNTHESISTASK_MEMBER_TASK_STATUS,
  221    221   
        &SYNTHESISTASK_MEMBER_TASK_STATUS_REASON,
@@ -282,282 +427,425 @@
  302    302   
            ser.write_string(&SYNTHESISTASK_MEMBER_VOICE_ID, val.as_str())?;
  303    303   
        }
  304    304   
        if let Some(ref val) = self.language_code {
  305    305   
            ser.write_string(&SYNTHESISTASK_MEMBER_LANGUAGE_CODE, val.as_str())?;
  306    306   
        }
  307    307   
        Ok(())
  308    308   
    }
  309    309   
}
  310    310   
impl SynthesisTask {
  311    311   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  312         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  313         -
        deserializer: &mut D,
         312  +
    pub fn deserialize(
         313  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  314    314   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  315    315   
        #[allow(unused_variables, unused_mut)]
  316    316   
        let mut builder = Self::builder();
  317    317   
        #[allow(
  318    318   
            unused_variables,
  319    319   
            unreachable_code,
  320    320   
            clippy::single_match,
  321    321   
            clippy::match_single_binding,
  322    322   
            clippy::diverging_sub_expression
  323    323   
        )]
  324         -
        deserializer.read_struct(&SYNTHESISTASK_SCHEMA, (), |_, member, deser| {
         324  +
        deserializer.read_struct(&SYNTHESISTASK_SCHEMA, &mut |member, deser| {
  325    325   
            match member.member_index() {
  326    326   
                Some(0) => {
  327    327   
                    builder.engine = Some(crate::types::Engine::from(deser.read_string(member)?.as_str()));
  328    328   
                }
  329    329   
                Some(1) => {
  330    330   
                    builder.task_id = Some(deser.read_string(member)?);
  331    331   
                }
  332    332   
                Some(2) => {
  333    333   
                    builder.task_status = Some(crate::types::TaskStatus::from(deser.read_string(member)?.as_str()));
  334    334   
                }
  335    335   
                Some(3) => {
  336    336   
                    builder.task_status_reason = Some(deser.read_string(member)?);
  337    337   
                }
  338    338   
                Some(4) => {
  339    339   
                    builder.output_uri = Some(deser.read_string(member)?);
  340    340   
                }
  341    341   
                Some(5) => {
  342    342   
                    builder.creation_time = Some(deser.read_timestamp(member)?);
  343    343   
                }
  344    344   
                Some(6) => {
  345    345   
                    builder.request_characters = Some(deser.read_integer(member)?);
  346    346   
                }
  347    347   
                Some(7) => {
  348    348   
                    builder.sns_topic_arn = Some(deser.read_string(member)?);
  349    349   
                }
  350    350   
                Some(8) => {
  351         -
                    builder.lexicon_names = Some({
  352         -
                        let container = if let Some(cap) = deser.container_size() {
  353         -
                            Vec::with_capacity(cap)
  354         -
                        } else {
  355         -
                            Vec::new()
  356         -
                        };
  357         -
                        deser.read_list(member, container, |mut list, deser| {
  358         -
                            list.push(deser.read_string(member)?);
  359         -
                            Ok(list)
  360         -
                        })?
  361         -
                    });
         351  +
                    builder.lexicon_names = Some(deser.read_string_list(member)?);
  362    352   
                }
  363    353   
                Some(9) => {
  364    354   
                    builder.output_format = Some(crate::types::OutputFormat::from(deser.read_string(member)?.as_str()));
  365    355   
                }
  366    356   
                Some(10) => {
  367    357   
                    builder.sample_rate = Some(deser.read_string(member)?);
  368    358   
                }
  369    359   
                Some(11) => {
  370    360   
                    builder.speech_mark_types = Some({
  371         -
                        let container = if let Some(cap) = deser.container_size() {
  372         -
                            Vec::with_capacity(cap)
  373         -
                        } else {
  374         -
                            Vec::new()
  375         -
                        };
  376         -
                        deser.read_list(member, container, |mut list, deser| {
  377         -
                            list.push(crate::types::SpeechMarkType::from(deser.read_string(member)?.as_str()));
  378         -
                            Ok(list)
  379         -
                        })?
         361  +
                        let mut container = Vec::new();
         362  +
                        deser.read_list(member, &mut |deser| {
         363  +
                            container.push(crate::types::SpeechMarkType::from(deser.read_string(member)?.as_str()));
         364  +
                            Ok(())
         365  +
                        })?;
         366  +
                        container
  380    367   
                    });
  381    368   
                }
  382    369   
                Some(12) => {
  383    370   
                    builder.text_type = Some(crate::types::TextType::from(deser.read_string(member)?.as_str()));
  384    371   
                }
  385    372   
                Some(13) => {
  386    373   
                    builder.voice_id = Some(crate::types::VoiceId::from(deser.read_string(member)?.as_str()));
  387    374   
                }
  388    375   
                Some(14) => {
  389    376   
                    builder.language_code = Some(crate::types::LanguageCode::from(deser.read_string(member)?.as_str()));
  390    377   
                }
  391    378   
                _ => {}
  392    379   
            }
  393    380   
            Ok(())
  394    381   
        })?;
  395    382   
        Ok(builder.build())
  396    383   
    }
  397    384   
}
         385  +
impl SynthesisTask {
         386  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         387  +
    pub fn deserialize_with_response(
         388  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         389  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         390  +
        _status: u16,
         391  +
        _body: &[u8],
         392  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         393  +
        Self::deserialize(deserializer)
         394  +
    }
         395  +
}
  398    396   
impl SynthesisTask {
  399    397   
    /// Creates a new builder-style object to manufacture [`SynthesisTask`](crate::types::SynthesisTask).
  400    398   
    pub fn builder() -> crate::types::builders::SynthesisTaskBuilder {
  401    399   
        crate::types::builders::SynthesisTaskBuilder::default()
  402    400   
    }
  403    401   
}
  404    402   
  405    403   
/// A builder for [`SynthesisTask`](crate::types::SynthesisTask).
  406    404   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  407    405   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/polly/src/types/_voice.rs

@@ -33,33 +129,129 @@
   53     53   
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.supported_engines.is_none()`.
   54     54   
    pub fn supported_engines(&self) -> &[crate::types::Engine] {
   55     55   
        self.supported_engines.as_deref().unwrap_or_default()
   56     56   
    }
   57     57   
}
   58     58   
static VOICE_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
   59     59   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#Voice", "com.amazonaws.polly", "Voice");
   60     60   
static VOICE_MEMBER_GENDER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   61     61   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#Voice$Gender", "com.amazonaws.polly", "Voice"),
   62     62   
    ::aws_smithy_schema::ShapeType::String,
   63         -
    "gender",
          63  +
    "Gender",
   64     64   
    0,
   65     65   
);
   66     66   
static VOICE_MEMBER_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   67     67   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#Voice$Id", "com.amazonaws.polly", "Voice"),
   68     68   
    ::aws_smithy_schema::ShapeType::String,
   69         -
    "id",
          69  +
    "Id",
   70     70   
    1,
   71     71   
);
   72     72   
static VOICE_MEMBER_LANGUAGE_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#Voice$LanguageCode", "com.amazonaws.polly", "Voice"),
   74     74   
    ::aws_smithy_schema::ShapeType::String,
   75         -
    "language_code",
          75  +
    "LanguageCode",
   76     76   
    2,
   77     77   
);
   78     78   
static VOICE_MEMBER_LANGUAGE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   79     79   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#Voice$LanguageName", "com.amazonaws.polly", "Voice"),
   80     80   
    ::aws_smithy_schema::ShapeType::String,
   81         -
    "language_name",
          81  +
    "LanguageName",
   82     82   
    3,
   83     83   
);
   84     84   
static VOICE_MEMBER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   85     85   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#Voice$Name", "com.amazonaws.polly", "Voice"),
   86     86   
    ::aws_smithy_schema::ShapeType::String,
   87         -
    "name",
          87  +
    "Name",
   88     88   
    4,
   89     89   
);
   90     90   
static VOICE_MEMBER_ADDITIONAL_LANGUAGE_CODES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   91     91   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#Voice$AdditionalLanguageCodes", "com.amazonaws.polly", "Voice"),
   92     92   
    ::aws_smithy_schema::ShapeType::List,
   93         -
    "additional_language_codes",
          93  +
    "AdditionalLanguageCodes",
   94     94   
    5,
   95     95   
);
   96     96   
static VOICE_MEMBER_SUPPORTED_ENGINES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   97     97   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.polly#Voice$SupportedEngines", "com.amazonaws.polly", "Voice"),
   98     98   
    ::aws_smithy_schema::ShapeType::List,
   99         -
    "supported_engines",
          99  +
    "SupportedEngines",
  100    100   
    6,
  101    101   
);
  102    102   
static VOICE_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  103    103   
    VOICE_SCHEMA_ID,
  104    104   
    ::aws_smithy_schema::ShapeType::Structure,
  105    105   
    &[
  106    106   
        &VOICE_MEMBER_GENDER,
  107    107   
        &VOICE_MEMBER_ID,
  108    108   
        &VOICE_MEMBER_LANGUAGE_CODE,
  109    109   
        &VOICE_MEMBER_LANGUAGE_NAME,
@@ -137,137 +258,263 @@
  157    157   
                    }
  158    158   
                    Ok(())
  159    159   
                },
  160    160   
            )?;
  161    161   
        }
  162    162   
        Ok(())
  163    163   
    }
  164    164   
}
  165    165   
impl Voice {
  166    166   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  167         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  168         -
        deserializer: &mut D,
         167  +
    pub fn deserialize(
         168  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  169    169   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  170    170   
        #[allow(unused_variables, unused_mut)]
  171    171   
        let mut builder = Self::builder();
  172    172   
        #[allow(
  173    173   
            unused_variables,
  174    174   
            unreachable_code,
  175    175   
            clippy::single_match,
  176    176   
            clippy::match_single_binding,
  177    177   
            clippy::diverging_sub_expression
  178    178   
        )]
  179         -
        deserializer.read_struct(&VOICE_SCHEMA, (), |_, member, deser| {
         179  +
        deserializer.read_struct(&VOICE_SCHEMA, &mut |member, deser| {
  180    180   
            match member.member_index() {
  181    181   
                Some(0) => {
  182    182   
                    builder.gender = Some(crate::types::Gender::from(deser.read_string(member)?.as_str()));
  183    183   
                }
  184    184   
                Some(1) => {
  185    185   
                    builder.id = Some(crate::types::VoiceId::from(deser.read_string(member)?.as_str()));
  186    186   
                }
  187    187   
                Some(2) => {
  188    188   
                    builder.language_code = Some(crate::types::LanguageCode::from(deser.read_string(member)?.as_str()));
  189    189   
                }
  190    190   
                Some(3) => {
  191    191   
                    builder.language_name = Some(deser.read_string(member)?);
  192    192   
                }
  193    193   
                Some(4) => {
  194    194   
                    builder.name = Some(deser.read_string(member)?);
  195    195   
                }
  196    196   
                Some(5) => {
  197    197   
                    builder.additional_language_codes = Some({
  198         -
                        let container = if let Some(cap) = deser.container_size() {
  199         -
                            Vec::with_capacity(cap)
  200         -
                        } else {
  201         -
                            Vec::new()
  202         -
                        };
  203         -
                        deser.read_list(member, container, |mut list, deser| {
  204         -
                            list.push(crate::types::LanguageCode::from(deser.read_string(member)?.as_str()));
  205         -
                            Ok(list)
  206         -
                        })?
         198  +
                        let mut container = Vec::new();
         199  +
                        deser.read_list(member, &mut |deser| {
         200  +
                            container.push(crate::types::LanguageCode::from(deser.read_string(member)?.as_str()));
         201  +
                            Ok(())
         202  +
                        })?;
         203  +
                        container
  207    204   
                    });
  208    205   
                }
  209    206   
                Some(6) => {
  210    207   
                    builder.supported_engines = Some({
  211         -
                        let container = if let Some(cap) = deser.container_size() {
  212         -
                            Vec::with_capacity(cap)
  213         -
                        } else {
  214         -
                            Vec::new()
  215         -
                        };
  216         -
                        deser.read_list(member, container, |mut list, deser| {
  217         -
                            list.push(crate::types::Engine::from(deser.read_string(member)?.as_str()));
  218         -
                            Ok(list)
  219         -
                        })?
         208  +
                        let mut container = Vec::new();
         209  +
                        deser.read_list(member, &mut |deser| {
         210  +
                            container.push(crate::types::Engine::from(deser.read_string(member)?.as_str()));
         211  +
                            Ok(())
         212  +
                        })?;
         213  +
                        container
  220    214   
                    });
  221    215   
                }
  222    216   
                _ => {}
  223    217   
            }
  224    218   
            Ok(())
  225    219   
        })?;
  226    220   
        Ok(builder.build())
  227    221   
    }
  228    222   
}
         223  +
impl Voice {
         224  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         225  +
    pub fn deserialize_with_response(
         226  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         227  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         228  +
        _status: u16,
         229  +
        _body: &[u8],
         230  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         231  +
        Self::deserialize(deserializer)
         232  +
    }
         233  +
}
  229    234   
impl Voice {
  230    235   
    /// Creates a new builder-style object to manufacture [`Voice`](crate::types::Voice).
  231    236   
    pub fn builder() -> crate::types::builders::VoiceBuilder {
  232    237   
        crate::types::builders::VoiceBuilder::default()
  233    238   
    }
  234    239   
}
  235    240   
  236    241   
/// A builder for [`Voice`](crate::types::Voice).
  237    242   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  238    243   
#[non_exhaustive]