AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12 (ignoring whitespace)

Files changed:

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

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

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

@@ -1,0 +39,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_language_code_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::LanguageCode>>, ::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 = ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::LanguageCode::from(u.as_ref())))
   22         -
                            .transpose()?;
   23         -
                        if let Some(value) = value {
   24         -
                            items.push(value);
   25         -
                        } else {
   26         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   27         -
                                "dense list cannot contain null values",
   28         -
                            ));
   29         -
                        }
   30         -
                    }
   31         -
                }
   32         -
            }
   33         -
            Ok(Some(items))
   34         -
        }
   35         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   36         -
            "expected start array or null",
   37         -
        )),
   38         -
    }
   39         -
}

tmp-codegen-diff/aws-sdk/sdk/polly/src/protocol_serde/shape_language_not_supported_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_language_not_supported_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::LanguageNotSupportedExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::LanguageNotSupportedExceptionBuilder, ::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_lexicon.rs

@@ -1,0 +47,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_lexicon<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::Lexicon>, ::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::LexiconBuilder::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         -
                        "Content" => {
   19         -
                            builder = builder.set_content(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "Name" => {
   26         -
                            builder = builder.set_name(
   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         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   33         -
                    },
   34         -
                    other => {
   35         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   36         -
                            "expected object key or end object, found: {other:?}"
   37         -
                        )))
   38         -
                    }
   39         -
                }
   40         -
            }
   41         -
            Ok(Some(builder.build()))
   42         -
        }
   43         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   44         -
            "expected start object or null",
   45         -
        )),
   46         -
    }
   47         -
}

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

@@ -1,0 +74,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_lexicon_attributes<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::LexiconAttributes>, ::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::LexiconAttributesBuilder::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         -
                        "Alphabet" => {
   19         -
                            builder = builder.set_alphabet(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "LanguageCode" => {
   26         -
                            builder = builder.set_language_code(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::LanguageCode::from(u.as_ref())))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "LastModified" => {
   33         -
                            builder = builder.set_last_modified(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   34         -
                                tokens.next(),
   35         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   36         -
                            )?);
   37         -
                        }
   38         -
                        "LexiconArn" => {
   39         -
                            builder = builder.set_lexicon_arn(
   40         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   41         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   42         -
                                    .transpose()?,
   43         -
                            );
   44         -
                        }
   45         -
                        "LexemesCount" => {
   46         -
                            builder = builder.set_lexemes_count(
   47         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   48         -
                                    .map(i32::try_from)
   49         -
                                    .transpose()?,
   50         -
                            );
   51         -
                        }
   52         -
                        "Size" => {
   53         -
                            builder = builder.set_size(
   54         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   55         -
                                    .map(i32::try_from)
   56         -
                                    .transpose()?,
   57         -
                            );
   58         -
                        }
   59         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   60         -
                    },
   61         -
                    other => {
   62         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   63         -
                            "expected object key or end object, found: {other:?}"
   64         -
                        )))
   65         -
                    }
   66         -
                }
   67         -
            }
   68         -
            Ok(Some(builder.build()))
   69         -
        }
   70         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   71         -
            "expected start object or null",
   72         -
        )),
   73         -
    }
   74         -
}

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

@@ -1,0 +43,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_lexicon_description<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::LexiconDescription>, ::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::LexiconDescriptionBuilder::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         -
                        "Name" => {
   19         -
                            builder = builder.set_name(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "Attributes" => {
   26         -
                            builder = builder.set_attributes(crate::protocol_serde::shape_lexicon_attributes::de_lexicon_attributes(tokens, _value)?);
   27         -
                        }
   28         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   29         -
                    },
   30         -
                    other => {
   31         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   32         -
                            "expected object key or end object, found: {other:?}"
   33         -
                        )))
   34         -
                    }
   35         -
                }
   36         -
            }
   37         -
            Ok(Some(builder.build()))
   38         -
        }
   39         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   40         -
            "expected start object or null",
   41         -
        )),
   42         -
    }
   43         -
}

tmp-codegen-diff/aws-sdk/sdk/polly/src/protocol_serde/shape_lexicon_description_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_lexicon_description_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::LexiconDescription>>, ::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_lexicon_description::de_lexicon_description(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_lexicon_name_list.rs

@@ -1,0 +39,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_lexicon_name_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<::std::string::String>>, ::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 = ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                            .transpose()?;
   23         -
                        if let Some(value) = value {
   24         -
                            items.push(value);
   25         -
                        } else {
   26         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   27         -
                                "dense list cannot contain null values",
   28         -
                            ));
   29         -
                        }
   30         -
                    }
   31         -
                }
   32         -
            }
   33         -
            Ok(Some(items))
   34         -
        }
   35         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   36         -
            "expected start array or null",
   37         -
        )),
   38         -
    }
   39         -
}

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

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

tmp-codegen-diff/aws-sdk/sdk/polly/src/protocol_serde/shape_lexicon_size_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_lexicon_size_exceeded_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::LexiconSizeExceededExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::LexiconSizeExceededExceptionBuilder, ::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_list_lexicons.rs

@@ -1,0 +111,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_list_lexicons_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::list_lexicons::ListLexiconsOutput, crate::operation::list_lexicons::ListLexiconsError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::list_lexicons::ListLexiconsError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::list_lexicons::ListLexiconsError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidNextTokenException" => crate::operation::list_lexicons::ListLexiconsError::InvalidNextTokenException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InvalidNextTokenExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_invalid_next_token_exception::de_invalid_next_token_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::list_lexicons::ListLexiconsError::unhandled)?;
   27         -
                let output = output.meta(generic);
   28         -
                output.build()
   29         -
            };
   30         -
            if tmp.message.is_none() {
   31         -
                tmp.message = _error_message;
   32         -
            }
   33         -
            tmp
   34         -
        }),
   35         -
        "ServiceFailureException" => crate::operation::list_lexicons::ListLexiconsError::ServiceFailureException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::ServiceFailureExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_service_failure_exception::de_service_failure_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::list_lexicons::ListLexiconsError::unhandled)?;
   42         -
                let output = output.meta(generic);
   43         -
                output.build()
   44         -
            };
   45         -
            if tmp.message.is_none() {
   46         -
                tmp.message = _error_message;
   47         -
            }
   48         -
            tmp
   49         -
        }),
   50         -
        _ => crate::operation::list_lexicons::ListLexiconsError::generic(generic),
   51         -
    })
   52         -
}
   53         -
   54         -
#[allow(clippy::unnecessary_wraps)]
   55         -
pub fn de_list_lexicons_http_response(
   56         -
    _response_status: u16,
   57         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   58         -
    _response_body: &[u8],
   59         -
) -> std::result::Result<crate::operation::list_lexicons::ListLexiconsOutput, crate::operation::list_lexicons::ListLexiconsError> {
   60         -
    Ok({
   61         -
        #[allow(unused_mut)]
   62         -
        let mut output = crate::operation::list_lexicons::builders::ListLexiconsOutputBuilder::default();
   63         -
        output = crate::protocol_serde::shape_list_lexicons::de_list_lexicons(_response_body, output)
   64         -
            .map_err(crate::operation::list_lexicons::ListLexiconsError::unhandled)?;
   65         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   66         -
        output.build()
   67         -
    })
   68         -
}
   69         -
   70         -
pub(crate) fn de_list_lexicons(
   71         -
    _value: &[u8],
   72         -
    mut builder: crate::operation::list_lexicons::builders::ListLexiconsOutputBuilder,
   73         -
) -> ::std::result::Result<
   74         -
    crate::operation::list_lexicons::builders::ListLexiconsOutputBuilder,
   75         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   76         -
> {
   77         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   78         -
    let tokens = &mut tokens_owned;
   79         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   80         -
    loop {
   81         -
        match tokens.next().transpose()? {
   82         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   83         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   84         -
                "Lexicons" => {
   85         -
                    builder = builder.set_lexicons(crate::protocol_serde::shape_lexicon_description_list::de_lexicon_description_list(
   86         -
                        tokens, _value,
   87         -
                    )?);
   88         -
                }
   89         -
                "NextToken" => {
   90         -
                    builder = builder.set_next_token(
   91         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   92         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   93         -
                            .transpose()?,
   94         -
                    );
   95         -
                }
   96         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   97         -
            },
   98         -
            other => {
   99         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  100         -
                    "expected object key or end object, found: {other:?}"
  101         -
                )))
  102         -
            }
  103         -
        }
  104         -
    }
  105         -
    if tokens.next().is_some() {
  106         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  107         -
            "found more JSON tokens after completing parsing",
  108         -
        ));
  109         -
    }
  110         -
    Ok(builder)
  111         -
}

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

@@ -1,0 +119,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_list_speech_synthesis_tasks_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksOutput,
    9         -
    crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => {
   19         -
            return Err(crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "InvalidNextTokenException" => crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError::InvalidNextTokenException({
   28         -
            #[allow(unused_mut)]
   29         -
            let mut tmp = {
   30         -
                #[allow(unused_mut)]
   31         -
                let mut output = crate::types::error::builders::InvalidNextTokenExceptionBuilder::default();
   32         -
                output = crate::protocol_serde::shape_invalid_next_token_exception::de_invalid_next_token_exception_json_err(_response_body, output)
   33         -
                    .map_err(crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError::unhandled)?;
   34         -
                let output = output.meta(generic);
   35         -
                output.build()
   36         -
            };
   37         -
            if tmp.message.is_none() {
   38         -
                tmp.message = _error_message;
   39         -
            }
   40         -
            tmp
   41         -
        }),
   42         -
        "ServiceFailureException" => crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError::ServiceFailureException({
   43         -
            #[allow(unused_mut)]
   44         -
            let mut tmp = {
   45         -
                #[allow(unused_mut)]
   46         -
                let mut output = crate::types::error::builders::ServiceFailureExceptionBuilder::default();
   47         -
                output = crate::protocol_serde::shape_service_failure_exception::de_service_failure_exception_json_err(_response_body, output)
   48         -
                    .map_err(crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError::unhandled)?;
   49         -
                let output = output.meta(generic);
   50         -
                output.build()
   51         -
            };
   52         -
            if tmp.message.is_none() {
   53         -
                tmp.message = _error_message;
   54         -
            }
   55         -
            tmp
   56         -
        }),
   57         -
        _ => crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError::generic(generic),
   58         -
    })
   59         -
}
   60         -
   61         -
#[allow(clippy::unnecessary_wraps)]
   62         -
pub fn de_list_speech_synthesis_tasks_http_response(
   63         -
    _response_status: u16,
   64         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   65         -
    _response_body: &[u8],
   66         -
) -> std::result::Result<
   67         -
    crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksOutput,
   68         -
    crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError,
   69         -
> {
   70         -
    Ok({
   71         -
        #[allow(unused_mut)]
   72         -
        let mut output = crate::operation::list_speech_synthesis_tasks::builders::ListSpeechSynthesisTasksOutputBuilder::default();
   73         -
        output = crate::protocol_serde::shape_list_speech_synthesis_tasks::de_list_speech_synthesis_tasks(_response_body, output)
   74         -
            .map_err(crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError::unhandled)?;
   75         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   76         -
        output.build()
   77         -
    })
   78         -
}
   79         -
   80         -
pub(crate) fn de_list_speech_synthesis_tasks(
   81         -
    _value: &[u8],
   82         -
    mut builder: crate::operation::list_speech_synthesis_tasks::builders::ListSpeechSynthesisTasksOutputBuilder,
   83         -
) -> ::std::result::Result<
   84         -
    crate::operation::list_speech_synthesis_tasks::builders::ListSpeechSynthesisTasksOutputBuilder,
   85         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   86         -
> {
   87         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   88         -
    let tokens = &mut tokens_owned;
   89         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   90         -
    loop {
   91         -
        match tokens.next().transpose()? {
   92         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   93         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   94         -
                "NextToken" => {
   95         -
                    builder = builder.set_next_token(
   96         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   97         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   98         -
                            .transpose()?,
   99         -
                    );
  100         -
                }
  101         -
                "SynthesisTasks" => {
  102         -
                    builder = builder.set_synthesis_tasks(crate::protocol_serde::shape_synthesis_tasks::de_synthesis_tasks(tokens, _value)?);
  103         -
                }
  104         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  105         -
            },
  106         -
            other => {
  107         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  108         -
                    "expected object key or end object, found: {other:?}"
  109         -
                )))
  110         -
            }
  111         -
        }
  112         -
    }
  113         -
    if tokens.next().is_some() {
  114         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  115         -
            "found more JSON tokens after completing parsing",
  116         -
        ));
  117         -
    }
  118         -
    Ok(builder)
  119         -
}

tmp-codegen-diff/aws-sdk/sdk/polly/src/protocol_serde/shape_marks_not_supported_for_format_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_marks_not_supported_for_format_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::MarksNotSupportedForFormatExceptionBuilder,
    5         -
) -> ::std::result::Result<
    6         -
    crate::types::error::builders::MarksNotSupportedForFormatExceptionBuilder,
    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_max_lexeme_length_exceeded_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_max_lexeme_length_exceeded_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::MaxLexemeLengthExceededExceptionBuilder,
    5         -
) -> ::std::result::Result<
    6         -
    crate::types::error::builders::MaxLexemeLengthExceededExceptionBuilder,
    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_max_lexicons_number_exceeded_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_max_lexicons_number_exceeded_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::MaxLexiconsNumberExceededExceptionBuilder,
    5         -
) -> ::std::result::Result<
    6         -
    crate::types::error::builders::MaxLexiconsNumberExceededExceptionBuilder,
    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_put_lexicon.rs

@@ -1,0 +164,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_put_lexicon_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::put_lexicon::PutLexiconOutput, crate::operation::put_lexicon::PutLexiconError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::put_lexicon::PutLexiconError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::put_lexicon::PutLexiconError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidLexiconException" => crate::operation::put_lexicon::PutLexiconError::InvalidLexiconException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InvalidLexiconExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_invalid_lexicon_exception::de_invalid_lexicon_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::put_lexicon::PutLexiconError::unhandled)?;
   27         -
                let output = output.meta(generic);
   28         -
                output.build()
   29         -
            };
   30         -
            if tmp.message.is_none() {
   31         -
                tmp.message = _error_message;
   32         -
            }
   33         -
            tmp
   34         -
        }),
   35         -
        "LexiconSizeExceededException" => crate::operation::put_lexicon::PutLexiconError::LexiconSizeExceededException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::LexiconSizeExceededExceptionBuilder::default();
   40         -
                output =
   41         -
                    crate::protocol_serde::shape_lexicon_size_exceeded_exception::de_lexicon_size_exceeded_exception_json_err(_response_body, output)
   42         -
                        .map_err(crate::operation::put_lexicon::PutLexiconError::unhandled)?;
   43         -
                let output = output.meta(generic);
   44         -
                output.build()
   45         -
            };
   46         -
            if tmp.message.is_none() {
   47         -
                tmp.message = _error_message;
   48         -
            }
   49         -
            tmp
   50         -
        }),
   51         -
        "MaxLexemeLengthExceededException" => crate::operation::put_lexicon::PutLexiconError::MaxLexemeLengthExceededException({
   52         -
            #[allow(unused_mut)]
   53         -
            let mut tmp = {
   54         -
                #[allow(unused_mut)]
   55         -
                let mut output = crate::types::error::builders::MaxLexemeLengthExceededExceptionBuilder::default();
   56         -
                output = crate::protocol_serde::shape_max_lexeme_length_exceeded_exception::de_max_lexeme_length_exceeded_exception_json_err(
   57         -
                    _response_body,
   58         -
                    output,
   59         -
                )
   60         -
                .map_err(crate::operation::put_lexicon::PutLexiconError::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         -
        "MaxLexiconsNumberExceededException" => crate::operation::put_lexicon::PutLexiconError::MaxLexiconsNumberExceededException({
   70         -
            #[allow(unused_mut)]
   71         -
            let mut tmp = {
   72         -
                #[allow(unused_mut)]
   73         -
                let mut output = crate::types::error::builders::MaxLexiconsNumberExceededExceptionBuilder::default();
   74         -
                output = crate::protocol_serde::shape_max_lexicons_number_exceeded_exception::de_max_lexicons_number_exceeded_exception_json_err(
   75         -
                    _response_body,
   76         -
                    output,
   77         -
                )
   78         -
                .map_err(crate::operation::put_lexicon::PutLexiconError::unhandled)?;
   79         -
                let output = output.meta(generic);
   80         -
                output.build()
   81         -
            };
   82         -
            if tmp.message.is_none() {
   83         -
                tmp.message = _error_message;
   84         -
            }
   85         -
            tmp
   86         -
        }),
   87         -
        "ServiceFailureException" => crate::operation::put_lexicon::PutLexiconError::ServiceFailureException({
   88         -
            #[allow(unused_mut)]
   89         -
            let mut tmp = {
   90         -
                #[allow(unused_mut)]
   91         -
                let mut output = crate::types::error::builders::ServiceFailureExceptionBuilder::default();
   92         -
                output = crate::protocol_serde::shape_service_failure_exception::de_service_failure_exception_json_err(_response_body, output)
   93         -
                    .map_err(crate::operation::put_lexicon::PutLexiconError::unhandled)?;
   94         -
                let output = output.meta(generic);
   95         -
                output.build()
   96         -
            };
   97         -
            if tmp.message.is_none() {
   98         -
                tmp.message = _error_message;
   99         -
            }
  100         -
            tmp
  101         -
        }),
  102         -
        "UnsupportedPlsAlphabetException" => crate::operation::put_lexicon::PutLexiconError::UnsupportedPlsAlphabetException({
  103         -
            #[allow(unused_mut)]
  104         -
            let mut tmp = {
  105         -
                #[allow(unused_mut)]
  106         -
                let mut output = crate::types::error::builders::UnsupportedPlsAlphabetExceptionBuilder::default();
  107         -
                output = crate::protocol_serde::shape_unsupported_pls_alphabet_exception::de_unsupported_pls_alphabet_exception_json_err(
  108         -
                    _response_body,
  109         -
                    output,
  110         -
                )
  111         -
                .map_err(crate::operation::put_lexicon::PutLexiconError::unhandled)?;
  112         -
                let output = output.meta(generic);
  113         -
                output.build()
  114         -
            };
  115         -
            if tmp.message.is_none() {
  116         -
                tmp.message = _error_message;
  117         -
            }
  118         -
            tmp
  119         -
        }),
  120         -
        "UnsupportedPlsLanguageException" => crate::operation::put_lexicon::PutLexiconError::UnsupportedPlsLanguageException({
  121         -
            #[allow(unused_mut)]
  122         -
            let mut tmp = {
  123         -
                #[allow(unused_mut)]
  124         -
                let mut output = crate::types::error::builders::UnsupportedPlsLanguageExceptionBuilder::default();
  125         -
                output = crate::protocol_serde::shape_unsupported_pls_language_exception::de_unsupported_pls_language_exception_json_err(
  126         -
                    _response_body,
  127         -
                    output,
  128         -
                )
  129         -
                .map_err(crate::operation::put_lexicon::PutLexiconError::unhandled)?;
  130         -
                let output = output.meta(generic);
  131         -
                output.build()
  132         -
            };
  133         -
            if tmp.message.is_none() {
  134         -
                tmp.message = _error_message;
  135         -
            }
  136         -
            tmp
  137         -
        }),
  138         -
        _ => crate::operation::put_lexicon::PutLexiconError::generic(generic),
  139         -
    })
  140         -
}
  141         -
  142         -
#[allow(clippy::unnecessary_wraps)]
  143         -
pub fn de_put_lexicon_http_response(
  144         -
    _response_status: u16,
  145         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  146         -
    _response_body: &[u8],
  147         -
) -> std::result::Result<crate::operation::put_lexicon::PutLexiconOutput, crate::operation::put_lexicon::PutLexiconError> {
  148         -
    Ok({
  149         -
        #[allow(unused_mut)]
  150         -
        let mut output = crate::operation::put_lexicon::builders::PutLexiconOutputBuilder::default();
  151         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  152         -
        output.build()
  153         -
    })
  154         -
}
  155         -
  156         -
pub fn ser_put_lexicon_input(
  157         -
    input: &crate::operation::put_lexicon::PutLexiconInput,
  158         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  159         -
    let mut out = String::new();
  160         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  161         -
    crate::protocol_serde::shape_put_lexicon_input::ser_put_lexicon_input_input(&mut object, input)?;
  162         -
    object.finish();
  163         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  164         -
}