AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_kms_access_denied_exception.rs

@@ -1,0 +42,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_kms_access_denied_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::KmsAccessDeniedExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::KmsAccessDeniedExceptionBuilder, ::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         -
                "Type" => {
   14         -
                    builder = builder.set_type(
   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         -
                "Message" => {
   21         -
                    builder = builder.set_message(
   22         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   23         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   24         -
                            .transpose()?,
   25         -
                    );
   26         -
                }
   27         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   28         -
            },
   29         -
            other => {
   30         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   31         -
                    "expected object key or end object, found: {other:?}"
   32         -
                )))
   33         -
            }
   34         -
        }
   35         -
    }
   36         -
    if tokens.next().is_some() {
   37         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   38         -
            "found more JSON tokens after completing parsing",
   39         -
        ));
   40         -
    }
   41         -
    Ok(builder)
   42         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_kms_disabled_exception.rs

@@ -1,0 +42,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_kms_disabled_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::KmsDisabledExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::KmsDisabledExceptionBuilder, ::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         -
                "Type" => {
   14         -
                    builder = builder.set_type(
   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         -
                "Message" => {
   21         -
                    builder = builder.set_message(
   22         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   23         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   24         -
                            .transpose()?,
   25         -
                    );
   26         -
                }
   27         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   28         -
            },
   29         -
            other => {
   30         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   31         -
                    "expected object key or end object, found: {other:?}"
   32         -
                )))
   33         -
            }
   34         -
        }
   35         -
    }
   36         -
    if tokens.next().is_some() {
   37         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   38         -
            "found more JSON tokens after completing parsing",
   39         -
        ));
   40         -
    }
   41         -
    Ok(builder)
   42         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_kms_invalid_state_exception.rs

@@ -1,0 +42,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_kms_invalid_state_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::KmsInvalidStateExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::KmsInvalidStateExceptionBuilder, ::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         -
                "Type" => {
   14         -
                    builder = builder.set_type(
   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         -
                "Message" => {
   21         -
                    builder = builder.set_message(
   22         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   23         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   24         -
                            .transpose()?,
   25         -
                    );
   26         -
                }
   27         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   28         -
            },
   29         -
            other => {
   30         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   31         -
                    "expected object key or end object, found: {other:?}"
   32         -
                )))
   33         -
            }
   34         -
        }
   35         -
    }
   36         -
    if tokens.next().is_some() {
   37         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   38         -
            "found more JSON tokens after completing parsing",
   39         -
        ));
   40         -
    }
   41         -
    Ok(builder)
   42         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_kms_not_found_exception.rs

@@ -1,0 +42,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_kms_not_found_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::KmsNotFoundExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::KmsNotFoundExceptionBuilder, ::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         -
                "Type" => {
   14         -
                    builder = builder.set_type(
   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         -
                "Message" => {
   21         -
                    builder = builder.set_message(
   22         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   23         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   24         -
                            .transpose()?,
   25         -
                    );
   26         -
                }
   27         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   28         -
            },
   29         -
            other => {
   30         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   31         -
                    "expected object key or end object, found: {other:?}"
   32         -
                )))
   33         -
            }
   34         -
        }
   35         -
    }
   36         -
    if tokens.next().is_some() {
   37         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   38         -
            "found more JSON tokens after completing parsing",
   39         -
        ));
   40         -
    }
   41         -
    Ok(builder)
   42         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_layer.rs

@@ -1,0 +61,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_layer<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::Layer>, ::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::LayerBuilder::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         -
                        "Arn" => {
   19         -
                            builder = builder.set_arn(
   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         -
                        "CodeSize" => {
   26         -
                            builder = builder.set_code_size(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   28         -
                                    .map(i64::try_from)
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "SigningProfileVersionArn" => {
   33         -
                            builder = builder.set_signing_profile_version_arn(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   35         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "SigningJobArn" => {
   40         -
                            builder = builder.set_signing_job_arn(
   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         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   47         -
                    },
   48         -
                    other => {
   49         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   50         -
                            "expected object key or end object, found: {other:?}"
   51         -
                        )))
   52         -
                    }
   53         -
                }
   54         -
            }
   55         -
            Ok(Some(builder.build()))
   56         -
        }
   57         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   58         -
            "expected start object or null",
   59         -
        )),
   60         -
    }
   61         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_layer_version_content_input.rs

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_layer_version_content_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::LayerVersionContentInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.s3_bucket {
    7         -
        object.key("S3Bucket").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.s3_key {
   10         -
        object.key("S3Key").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.s3_object_version {
   13         -
        object.key("S3ObjectVersion").string(var_3.as_str());
   14         -
    }
   15         -
    if let Some(var_4) = &input.zip_file {
   16         -
        object.key("ZipFile").string_unchecked(&::aws_smithy_types::base64::encode(var_4));
   17         -
    }
   18         -
    Ok(())
   19         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_layer_version_content_output.rs

@@ -1,0 +68,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_layer_version_content_output<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::LayerVersionContentOutput>, ::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::LayerVersionContentOutputBuilder::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         -
                        "Location" => {
   19         -
                            builder = builder.set_location(
   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         -
                        "CodeSha256" => {
   26         -
                            builder = builder.set_code_sha256(
   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         -
                        "CodeSize" => {
   33         -
                            builder = builder.set_code_size(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   35         -
                                    .map(i64::try_from)
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "SigningProfileVersionArn" => {
   40         -
                            builder = builder.set_signing_profile_version_arn(
   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         -
                        "SigningJobArn" => {
   47         -
                            builder = builder.set_signing_job_arn(
   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         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   54         -
                    },
   55         -
                    other => {
   56         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   57         -
                            "expected object key or end object, found: {other:?}"
   58         -
                        )))
   59         -
                    }
   60         -
                }
   61         -
            }
   62         -
            Ok(Some(builder.build()))
   63         -
        }
   64         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   65         -
            "expected start object or null",
   66         -
        )),
   67         -
    }
   68         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_layer_versions_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_layer_versions_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::LayerVersionsListItem>>, ::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_layer_versions_list_item::de_layer_versions_list_item(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/lambda/src/protocol_serde/shape_layer_versions_list_item.rs

@@ -1,0 +77,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_layer_versions_list_item<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::LayerVersionsListItem>, ::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::LayerVersionsListItemBuilder::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         -
                        "LayerVersionArn" => {
   19         -
                            builder = builder.set_layer_version_arn(
   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         -
                        "Version" => {
   26         -
                            builder = builder.set_version(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   28         -
                                    .map(i64::try_from)
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "Description" => {
   33         -
                            builder = builder.set_description(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   35         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "CreatedDate" => {
   40         -
                            builder = builder.set_created_date(
   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         -
                        "CompatibleRuntimes" => {
   47         -
                            builder = builder
   48         -
                                .set_compatible_runtimes(crate::protocol_serde::shape_compatible_runtimes::de_compatible_runtimes(tokens, _value)?);
   49         -
                        }
   50         -
                        "LicenseInfo" => {
   51         -
                            builder = builder.set_license_info(
   52         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   53         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   54         -
                                    .transpose()?,
   55         -
                            );
   56         -
                        }
   57         -
                        "CompatibleArchitectures" => {
   58         -
                            builder = builder.set_compatible_architectures(
   59         -
                                crate::protocol_serde::shape_compatible_architectures::de_compatible_architectures(tokens, _value)?,
   60         -
                            );
   61         -
                        }
   62         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   63         -
                    },
   64         -
                    other => {
   65         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   66         -
                            "expected object key or end object, found: {other:?}"
   67         -
                        )))
   68         -
                    }
   69         -
                }
   70         -
            }
   71         -
            Ok(Some(builder.build()))
   72         -
        }
   73         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   74         -
            "expected start object or null",
   75         -
        )),
   76         -
    }
   77         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_layers_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_layers_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::LayersListItem>>, ::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_layers_list_item::de_layers_list_item(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/lambda/src/protocol_serde/shape_layers_list_item.rs

@@ -1,0 +52,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_layers_list_item<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::LayersListItem>, ::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::LayersListItemBuilder::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         -
                        "LayerName" => {
   19         -
                            builder = builder.set_layer_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         -
                        "LayerArn" => {
   26         -
                            builder = builder.set_layer_arn(
   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         -
                        "LatestMatchingVersion" => {
   33         -
                            builder = builder.set_latest_matching_version(
   34         -
                                crate::protocol_serde::shape_layer_versions_list_item::de_layer_versions_list_item(tokens, _value)?,
   35         -
                            );
   36         -
                        }
   37         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   38         -
                    },
   39         -
                    other => {
   40         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   41         -
                            "expected object key or end object, found: {other:?}"
   42         -
                        )))
   43         -
                    }
   44         -
                }
   45         -
            }
   46         -
            Ok(Some(builder.build()))
   47         -
        }
   48         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   49         -
            "expected start object or null",
   50         -
        )),
   51         -
    }
   52         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_layers_reference_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_layers_reference_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::Layer>>, ::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_layer::de_layer(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/lambda/src/protocol_serde/shape_list_aliases.rs

@@ -1,0 +145,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_aliases_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_aliases::ListAliasesOutput, crate::operation::list_aliases::ListAliasesError> {
    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_aliases::ListAliasesError::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_aliases::ListAliasesError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidParameterValueException" => crate::operation::list_aliases::ListAliasesError::InvalidParameterValueException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   26         -
                    _response_body,
   27         -
                    output,
   28         -
                )
   29         -
                .map_err(crate::operation::list_aliases::ListAliasesError::unhandled)?;
   30         -
                let output = output.meta(generic);
   31         -
                output.build()
   32         -
            };
   33         -
            if tmp.message.is_none() {
   34         -
                tmp.message = _error_message;
   35         -
            }
   36         -
            tmp
   37         -
        }),
   38         -
        "ResourceNotFoundException" => crate::operation::list_aliases::ListAliasesError::ResourceNotFoundException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::list_aliases::ListAliasesError::unhandled)?;
   45         -
                let output = output.meta(generic);
   46         -
                output.build()
   47         -
            };
   48         -
            if tmp.message.is_none() {
   49         -
                tmp.message = _error_message;
   50         -
            }
   51         -
            tmp
   52         -
        }),
   53         -
        "ServiceException" => crate::operation::list_aliases::ListAliasesError::ServiceException({
   54         -
            #[allow(unused_mut)]
   55         -
            let mut tmp = {
   56         -
                #[allow(unused_mut)]
   57         -
                let mut output = crate::types::error::builders::ServiceExceptionBuilder::default();
   58         -
                output = crate::protocol_serde::shape_service_exception::de_service_exception_json_err(_response_body, output)
   59         -
                    .map_err(crate::operation::list_aliases::ListAliasesError::unhandled)?;
   60         -
                let output = output.meta(generic);
   61         -
                output.build()
   62         -
            };
   63         -
            if tmp.message.is_none() {
   64         -
                tmp.message = _error_message;
   65         -
            }
   66         -
            tmp
   67         -
        }),
   68         -
        "TooManyRequestsException" => crate::operation::list_aliases::ListAliasesError::TooManyRequestsException({
   69         -
            #[allow(unused_mut)]
   70         -
            let mut tmp = {
   71         -
                #[allow(unused_mut)]
   72         -
                let mut output = crate::types::error::builders::TooManyRequestsExceptionBuilder::default();
   73         -
                output = crate::protocol_serde::shape_too_many_requests_exception::de_too_many_requests_exception_json_err(_response_body, output)
   74         -
                    .map_err(crate::operation::list_aliases::ListAliasesError::unhandled)?;
   75         -
                output = output.set_retry_after_seconds(
   76         -
                    crate::protocol_serde::shape_too_many_requests_exception::de_retry_after_seconds_header(_response_headers).map_err(|_| {
   77         -
                        crate::operation::list_aliases::ListAliasesError::unhandled("Failed to parse retryAfterSeconds from header `Retry-After")
   78         -
                    })?,
   79         -
                );
   80         -
                let output = output.meta(generic);
   81         -
                output.build()
   82         -
            };
   83         -
            if tmp.message.is_none() {
   84         -
                tmp.message = _error_message;
   85         -
            }
   86         -
            tmp
   87         -
        }),
   88         -
        _ => crate::operation::list_aliases::ListAliasesError::generic(generic),
   89         -
    })
   90         -
}
   91         -
   92         -
#[allow(clippy::unnecessary_wraps)]
   93         -
pub fn de_list_aliases_http_response(
   94         -
    _response_status: u16,
   95         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   96         -
    _response_body: &[u8],
   97         -
) -> std::result::Result<crate::operation::list_aliases::ListAliasesOutput, crate::operation::list_aliases::ListAliasesError> {
   98         -
    Ok({
   99         -
        #[allow(unused_mut)]
  100         -
        let mut output = crate::operation::list_aliases::builders::ListAliasesOutputBuilder::default();
  101         -
        output = crate::protocol_serde::shape_list_aliases::de_list_aliases(_response_body, output)
  102         -
            .map_err(crate::operation::list_aliases::ListAliasesError::unhandled)?;
  103         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  104         -
        output.build()
  105         -
    })
  106         -
}
  107         -
  108         -
pub(crate) fn de_list_aliases(
  109         -
    _value: &[u8],
  110         -
    mut builder: crate::operation::list_aliases::builders::ListAliasesOutputBuilder,
  111         -
) -> ::std::result::Result<crate::operation::list_aliases::builders::ListAliasesOutputBuilder, ::aws_smithy_json::deserialize::error::DeserializeError>
  112         -
{
  113         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  114         -
    let tokens = &mut tokens_owned;
  115         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  116         -
    loop {
  117         -
        match tokens.next().transpose()? {
  118         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  119         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  120         -
                "Aliases" => {
  121         -
                    builder = builder.set_aliases(crate::protocol_serde::shape_alias_list::de_alias_list(tokens, _value)?);
  122         -
                }
  123         -
                "NextMarker" => {
  124         -
                    builder = builder.set_next_marker(
  125         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  126         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  127         -
                            .transpose()?,
  128         -
                    );
  129         -
                }
  130         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  131         -
            },
  132         -
            other => {
  133         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  134         -
                    "expected object key or end object, found: {other:?}"
  135         -
                )))
  136         -
            }
  137         -
        }
  138         -
    }
  139         -
    if tokens.next().is_some() {
  140         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  141         -
            "found more JSON tokens after completing parsing",
  142         -
        ));
  143         -
    }
  144         -
    Ok(builder)
  145         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_list_code_signing_configs.rs

@@ -1,0 +126,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_code_signing_configs_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_code_signing_configs::ListCodeSigningConfigsOutput,
    9         -
    crate::operation::list_code_signing_configs::ListCodeSigningConfigsError,
   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_code_signing_configs::ListCodeSigningConfigsError::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_code_signing_configs::ListCodeSigningConfigsError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "InvalidParameterValueException" => {
   28         -
            crate::operation::list_code_signing_configs::ListCodeSigningConfigsError::InvalidParameterValueException({
   29         -
                #[allow(unused_mut)]
   30         -
                let mut tmp = {
   31         -
                    #[allow(unused_mut)]
   32         -
                    let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   33         -
                    output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   34         -
                        _response_body,
   35         -
                        output,
   36         -
                    )
   37         -
                    .map_err(crate::operation::list_code_signing_configs::ListCodeSigningConfigsError::unhandled)?;
   38         -
                    let output = output.meta(generic);
   39         -
                    output.build()
   40         -
                };
   41         -
                if tmp.message.is_none() {
   42         -
                    tmp.message = _error_message;
   43         -
                }
   44         -
                tmp
   45         -
            })
   46         -
        }
   47         -
        "ServiceException" => crate::operation::list_code_signing_configs::ListCodeSigningConfigsError::ServiceException({
   48         -
            #[allow(unused_mut)]
   49         -
            let mut tmp = {
   50         -
                #[allow(unused_mut)]
   51         -
                let mut output = crate::types::error::builders::ServiceExceptionBuilder::default();
   52         -
                output = crate::protocol_serde::shape_service_exception::de_service_exception_json_err(_response_body, output)
   53         -
                    .map_err(crate::operation::list_code_signing_configs::ListCodeSigningConfigsError::unhandled)?;
   54         -
                let output = output.meta(generic);
   55         -
                output.build()
   56         -
            };
   57         -
            if tmp.message.is_none() {
   58         -
                tmp.message = _error_message;
   59         -
            }
   60         -
            tmp
   61         -
        }),
   62         -
        _ => crate::operation::list_code_signing_configs::ListCodeSigningConfigsError::generic(generic),
   63         -
    })
   64         -
}
   65         -
   66         -
#[allow(clippy::unnecessary_wraps)]
   67         -
pub fn de_list_code_signing_configs_http_response(
   68         -
    _response_status: u16,
   69         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   70         -
    _response_body: &[u8],
   71         -
) -> std::result::Result<
   72         -
    crate::operation::list_code_signing_configs::ListCodeSigningConfigsOutput,
   73         -
    crate::operation::list_code_signing_configs::ListCodeSigningConfigsError,
   74         -
> {
   75         -
    Ok({
   76         -
        #[allow(unused_mut)]
   77         -
        let mut output = crate::operation::list_code_signing_configs::builders::ListCodeSigningConfigsOutputBuilder::default();
   78         -
        output = crate::protocol_serde::shape_list_code_signing_configs::de_list_code_signing_configs(_response_body, output)
   79         -
            .map_err(crate::operation::list_code_signing_configs::ListCodeSigningConfigsError::unhandled)?;
   80         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   81         -
        output.build()
   82         -
    })
   83         -
}
   84         -
   85         -
pub(crate) fn de_list_code_signing_configs(
   86         -
    _value: &[u8],
   87         -
    mut builder: crate::operation::list_code_signing_configs::builders::ListCodeSigningConfigsOutputBuilder,
   88         -
) -> ::std::result::Result<
   89         -
    crate::operation::list_code_signing_configs::builders::ListCodeSigningConfigsOutputBuilder,
   90         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   91         -
> {
   92         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   93         -
    let tokens = &mut tokens_owned;
   94         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   95         -
    loop {
   96         -
        match tokens.next().transpose()? {
   97         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   98         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   99         -
                "CodeSigningConfigs" => {
  100         -
                    builder = builder.set_code_signing_configs(crate::protocol_serde::shape_code_signing_config_list::de_code_signing_config_list(
  101         -
                        tokens, _value,
  102         -
                    )?);
  103         -
                }
  104         -
                "NextMarker" => {
  105         -
                    builder = builder.set_next_marker(
  106         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  107         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  108         -
                            .transpose()?,
  109         -
                    );
  110         -
                }
  111         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  112         -
            },
  113         -
            other => {
  114         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  115         -
                    "expected object key or end object, found: {other:?}"
  116         -
                )))
  117         -
            }
  118         -
        }
  119         -
    }
  120         -
    if tokens.next().is_some() {
  121         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  122         -
            "found more JSON tokens after completing parsing",
  123         -
        ));
  124         -
    }
  125         -
    Ok(builder)
  126         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_list_event_source_mappings.rs

@@ -1,0 +163,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_event_source_mappings_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_event_source_mappings::ListEventSourceMappingsOutput,
    9         -
    crate::operation::list_event_source_mappings::ListEventSourceMappingsError,
   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_event_source_mappings::ListEventSourceMappingsError::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_event_source_mappings::ListEventSourceMappingsError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "InvalidParameterValueException" => {
   28         -
            crate::operation::list_event_source_mappings::ListEventSourceMappingsError::InvalidParameterValueException({
   29         -
                #[allow(unused_mut)]
   30         -
                let mut tmp = {
   31         -
                    #[allow(unused_mut)]
   32         -
                    let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   33         -
                    output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   34         -
                        _response_body,
   35         -
                        output,
   36         -
                    )
   37         -
                    .map_err(crate::operation::list_event_source_mappings::ListEventSourceMappingsError::unhandled)?;
   38         -
                    let output = output.meta(generic);
   39         -
                    output.build()
   40         -
                };
   41         -
                if tmp.message.is_none() {
   42         -
                    tmp.message = _error_message;
   43         -
                }
   44         -
                tmp
   45         -
            })
   46         -
        }
   47         -
        "ResourceNotFoundException" => crate::operation::list_event_source_mappings::ListEventSourceMappingsError::ResourceNotFoundException({
   48         -
            #[allow(unused_mut)]
   49         -
            let mut tmp = {
   50         -
                #[allow(unused_mut)]
   51         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   52         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   53         -
                    .map_err(crate::operation::list_event_source_mappings::ListEventSourceMappingsError::unhandled)?;
   54         -
                let output = output.meta(generic);
   55         -
                output.build()
   56         -
            };
   57         -
            if tmp.message.is_none() {
   58         -
                tmp.message = _error_message;
   59         -
            }
   60         -
            tmp
   61         -
        }),
   62         -
        "ServiceException" => crate::operation::list_event_source_mappings::ListEventSourceMappingsError::ServiceException({
   63         -
            #[allow(unused_mut)]
   64         -
            let mut tmp = {
   65         -
                #[allow(unused_mut)]
   66         -
                let mut output = crate::types::error::builders::ServiceExceptionBuilder::default();
   67         -
                output = crate::protocol_serde::shape_service_exception::de_service_exception_json_err(_response_body, output)
   68         -
                    .map_err(crate::operation::list_event_source_mappings::ListEventSourceMappingsError::unhandled)?;
   69         -
                let output = output.meta(generic);
   70         -
                output.build()
   71         -
            };
   72         -
            if tmp.message.is_none() {
   73         -
                tmp.message = _error_message;
   74         -
            }
   75         -
            tmp
   76         -
        }),
   77         -
        "TooManyRequestsException" => crate::operation::list_event_source_mappings::ListEventSourceMappingsError::TooManyRequestsException({
   78         -
            #[allow(unused_mut)]
   79         -
            let mut tmp = {
   80         -
                #[allow(unused_mut)]
   81         -
                let mut output = crate::types::error::builders::TooManyRequestsExceptionBuilder::default();
   82         -
                output = crate::protocol_serde::shape_too_many_requests_exception::de_too_many_requests_exception_json_err(_response_body, output)
   83         -
                    .map_err(crate::operation::list_event_source_mappings::ListEventSourceMappingsError::unhandled)?;
   84         -
                output = output.set_retry_after_seconds(
   85         -
                    crate::protocol_serde::shape_too_many_requests_exception::de_retry_after_seconds_header(_response_headers).map_err(|_| {
   86         -
                        crate::operation::list_event_source_mappings::ListEventSourceMappingsError::unhandled(
   87         -
                            "Failed to parse retryAfterSeconds from header `Retry-After",
   88         -
                        )
   89         -
                    })?,
   90         -
                );
   91         -
                let output = output.meta(generic);
   92         -
                output.build()
   93         -
            };
   94         -
            if tmp.message.is_none() {
   95         -
                tmp.message = _error_message;
   96         -
            }
   97         -
            tmp
   98         -
        }),
   99         -
        _ => crate::operation::list_event_source_mappings::ListEventSourceMappingsError::generic(generic),
  100         -
    })
  101         -
}
  102         -
  103         -
#[allow(clippy::unnecessary_wraps)]
  104         -
pub fn de_list_event_source_mappings_http_response(
  105         -
    _response_status: u16,
  106         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  107         -
    _response_body: &[u8],
  108         -
) -> std::result::Result<
  109         -
    crate::operation::list_event_source_mappings::ListEventSourceMappingsOutput,
  110         -
    crate::operation::list_event_source_mappings::ListEventSourceMappingsError,
  111         -
> {
  112         -
    Ok({
  113         -
        #[allow(unused_mut)]
  114         -
        let mut output = crate::operation::list_event_source_mappings::builders::ListEventSourceMappingsOutputBuilder::default();
  115         -
        output = crate::protocol_serde::shape_list_event_source_mappings::de_list_event_source_mappings(_response_body, output)
  116         -
            .map_err(crate::operation::list_event_source_mappings::ListEventSourceMappingsError::unhandled)?;
  117         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  118         -
        output.build()
  119         -
    })
  120         -
}
  121         -
  122         -
pub(crate) fn de_list_event_source_mappings(
  123         -
    _value: &[u8],
  124         -
    mut builder: crate::operation::list_event_source_mappings::builders::ListEventSourceMappingsOutputBuilder,
  125         -
) -> ::std::result::Result<
  126         -
    crate::operation::list_event_source_mappings::builders::ListEventSourceMappingsOutputBuilder,
  127         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  128         -
> {
  129         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  130         -
    let tokens = &mut tokens_owned;
  131         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  132         -
    loop {
  133         -
        match tokens.next().transpose()? {
  134         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  135         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  136         -
                "EventSourceMappings" => {
  137         -
                    builder = builder.set_event_source_mappings(
  138         -
                        crate::protocol_serde::shape_event_source_mappings_list::de_event_source_mappings_list(tokens, _value)?,
  139         -
                    );
  140         -
                }
  141         -
                "NextMarker" => {
  142         -
                    builder = builder.set_next_marker(
  143         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  144         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  145         -
                            .transpose()?,
  146         -
                    );
  147         -
                }
  148         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  149         -
            },
  150         -
            other => {
  151         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  152         -
                    "expected object key or end object, found: {other:?}"
  153         -
                )))
  154         -
            }
  155         -
        }
  156         -
    }
  157         -
    if tokens.next().is_some() {
  158         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  159         -
            "found more JSON tokens after completing parsing",
  160         -
        ));
  161         -
    }
  162         -
    Ok(builder)
  163         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_list_function_event_invoke_configs.rs

@@ -1,0 +165,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_function_event_invoke_configs_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_function_event_invoke_configs::ListFunctionEventInvokeConfigsOutput,
    9         -
    crate::operation::list_function_event_invoke_configs::ListFunctionEventInvokeConfigsError,
   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_function_event_invoke_configs::ListFunctionEventInvokeConfigsError::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 => return Err(crate::operation::list_function_event_invoke_configs::ListFunctionEventInvokeConfigsError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InvalidParameterValueException" => {
   24         -
            crate::operation::list_function_event_invoke_configs::ListFunctionEventInvokeConfigsError::InvalidParameterValueException({
   25         -
                #[allow(unused_mut)]
   26         -
                let mut tmp = {
   27         -
                    #[allow(unused_mut)]
   28         -
                    let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   29         -
                    output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   30         -
                        _response_body,
   31         -
                        output,
   32         -
                    )
   33         -
                    .map_err(crate::operation::list_function_event_invoke_configs::ListFunctionEventInvokeConfigsError::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         -
        }
   43         -
        "ResourceNotFoundException" => {
   44         -
            crate::operation::list_function_event_invoke_configs::ListFunctionEventInvokeConfigsError::ResourceNotFoundException({
   45         -
                #[allow(unused_mut)]
   46         -
                let mut tmp = {
   47         -
                    #[allow(unused_mut)]
   48         -
                    let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   49         -
                    output =
   50         -
                        crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   51         -
                            .map_err(crate::operation::list_function_event_invoke_configs::ListFunctionEventInvokeConfigsError::unhandled)?;
   52         -
                    let output = output.meta(generic);
   53         -
                    output.build()
   54         -
                };
   55         -
                if tmp.message.is_none() {
   56         -
                    tmp.message = _error_message;
   57         -
                }
   58         -
                tmp
   59         -
            })
   60         -
        }
   61         -
        "ServiceException" => crate::operation::list_function_event_invoke_configs::ListFunctionEventInvokeConfigsError::ServiceException({
   62         -
            #[allow(unused_mut)]
   63         -
            let mut tmp = {
   64         -
                #[allow(unused_mut)]
   65         -
                let mut output = crate::types::error::builders::ServiceExceptionBuilder::default();
   66         -
                output = crate::protocol_serde::shape_service_exception::de_service_exception_json_err(_response_body, output)
   67         -
                    .map_err(crate::operation::list_function_event_invoke_configs::ListFunctionEventInvokeConfigsError::unhandled)?;
   68         -
                let output = output.meta(generic);
   69         -
                output.build()
   70         -
            };
   71         -
            if tmp.message.is_none() {
   72         -
                tmp.message = _error_message;
   73         -
            }
   74         -
            tmp
   75         -
        }),
   76         -
        "TooManyRequestsException" => {
   77         -
            crate::operation::list_function_event_invoke_configs::ListFunctionEventInvokeConfigsError::TooManyRequestsException({
   78         -
                #[allow(unused_mut)]
   79         -
                let mut tmp = {
   80         -
                    #[allow(unused_mut)]
   81         -
                    let mut output = crate::types::error::builders::TooManyRequestsExceptionBuilder::default();
   82         -
                    output =
   83         -
                        crate::protocol_serde::shape_too_many_requests_exception::de_too_many_requests_exception_json_err(_response_body, output)
   84         -
                            .map_err(crate::operation::list_function_event_invoke_configs::ListFunctionEventInvokeConfigsError::unhandled)?;
   85         -
                    output = output.set_retry_after_seconds(
   86         -
                        crate::protocol_serde::shape_too_many_requests_exception::de_retry_after_seconds_header(_response_headers).map_err(|_| {
   87         -
                            crate::operation::list_function_event_invoke_configs::ListFunctionEventInvokeConfigsError::unhandled(
   88         -
                                "Failed to parse retryAfterSeconds from header `Retry-After",
   89         -
                            )
   90         -
                        })?,
   91         -
                    );
   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         -
        }
  101         -
        _ => crate::operation::list_function_event_invoke_configs::ListFunctionEventInvokeConfigsError::generic(generic),
  102         -
    })
  103         -
}
  104         -
  105         -
#[allow(clippy::unnecessary_wraps)]
  106         -
pub fn de_list_function_event_invoke_configs_http_response(
  107         -
    _response_status: u16,
  108         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  109         -
    _response_body: &[u8],
  110         -
) -> std::result::Result<
  111         -
    crate::operation::list_function_event_invoke_configs::ListFunctionEventInvokeConfigsOutput,
  112         -
    crate::operation::list_function_event_invoke_configs::ListFunctionEventInvokeConfigsError,
  113         -
> {
  114         -
    Ok({
  115         -
        #[allow(unused_mut)]
  116         -
        let mut output = crate::operation::list_function_event_invoke_configs::builders::ListFunctionEventInvokeConfigsOutputBuilder::default();
  117         -
        output = crate::protocol_serde::shape_list_function_event_invoke_configs::de_list_function_event_invoke_configs(_response_body, output)
  118         -
            .map_err(crate::operation::list_function_event_invoke_configs::ListFunctionEventInvokeConfigsError::unhandled)?;
  119         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  120         -
        output.build()
  121         -
    })
  122         -
}
  123         -
  124         -
pub(crate) fn de_list_function_event_invoke_configs(
  125         -
    _value: &[u8],
  126         -
    mut builder: crate::operation::list_function_event_invoke_configs::builders::ListFunctionEventInvokeConfigsOutputBuilder,
  127         -
) -> ::std::result::Result<
  128         -
    crate::operation::list_function_event_invoke_configs::builders::ListFunctionEventInvokeConfigsOutputBuilder,
  129         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  130         -
> {
  131         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  132         -
    let tokens = &mut tokens_owned;
  133         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  134         -
    loop {
  135         -
        match tokens.next().transpose()? {
  136         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  137         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  138         -
                "FunctionEventInvokeConfigs" => {
  139         -
                    builder = builder.set_function_event_invoke_configs(
  140         -
                        crate::protocol_serde::shape_function_event_invoke_config_list::de_function_event_invoke_config_list(tokens, _value)?,
  141         -
                    );
  142         -
                }
  143         -
                "NextMarker" => {
  144         -
                    builder = builder.set_next_marker(
  145         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  146         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  147         -
                            .transpose()?,
  148         -
                    );
  149         -
                }
  150         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  151         -
            },
  152         -
            other => {
  153         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  154         -
                    "expected object key or end object, found: {other:?}"
  155         -
                )))
  156         -
            }
  157         -
        }
  158         -
    }
  159         -
    if tokens.next().is_some() {
  160         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  161         -
            "found more JSON tokens after completing parsing",
  162         -
        ));
  163         -
    }
  164         -
    Ok(builder)
  165         -
}