AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c

Files changed:

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

@@ -1,0 +254,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_function_configuration<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::FunctionConfiguration>, ::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::FunctionConfigurationBuilder::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         -
                        "FunctionName" => {
   19         -
                            builder = builder.set_function_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         -
                        "FunctionArn" => {
   26         -
                            builder = builder.set_function_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         -
                        "Runtime" => {
   33         -
                            builder = builder.set_runtime(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   35         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::Runtime::from(u.as_ref())))
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "Role" => {
   40         -
                            builder = builder.set_role(
   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         -
                        "Handler" => {
   47         -
                            builder = builder.set_handler(
   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         -
                        "CodeSize" => {
   54         -
                            builder = builder.set_code_size(
   55         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   56         -
                                    .map(i64::try_from)
   57         -
                                    .transpose()?,
   58         -
                            );
   59         -
                        }
   60         -
                        "Description" => {
   61         -
                            builder = builder.set_description(
   62         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   63         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   64         -
                                    .transpose()?,
   65         -
                            );
   66         -
                        }
   67         -
                        "Timeout" => {
   68         -
                            builder = builder.set_timeout(
   69         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   70         -
                                    .map(i32::try_from)
   71         -
                                    .transpose()?,
   72         -
                            );
   73         -
                        }
   74         -
                        "MemorySize" => {
   75         -
                            builder = builder.set_memory_size(
   76         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   77         -
                                    .map(i32::try_from)
   78         -
                                    .transpose()?,
   79         -
                            );
   80         -
                        }
   81         -
                        "LastModified" => {
   82         -
                            builder = builder.set_last_modified(
   83         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   84         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   85         -
                                    .transpose()?,
   86         -
                            );
   87         -
                        }
   88         -
                        "CodeSha256" => {
   89         -
                            builder = builder.set_code_sha256(
   90         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   91         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   92         -
                                    .transpose()?,
   93         -
                            );
   94         -
                        }
   95         -
                        "Version" => {
   96         -
                            builder = builder.set_version(
   97         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   98         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   99         -
                                    .transpose()?,
  100         -
                            );
  101         -
                        }
  102         -
                        "VpcConfig" => {
  103         -
                            builder =
  104         -
                                builder.set_vpc_config(crate::protocol_serde::shape_vpc_config_response::de_vpc_config_response(tokens, _value)?);
  105         -
                        }
  106         -
                        "DeadLetterConfig" => {
  107         -
                            builder = builder
  108         -
                                .set_dead_letter_config(crate::protocol_serde::shape_dead_letter_config::de_dead_letter_config(tokens, _value)?);
  109         -
                        }
  110         -
                        "Environment" => {
  111         -
                            builder = builder.set_environment(crate::protocol_serde::shape_environment_response::de_environment_response(
  112         -
                                tokens, _value,
  113         -
                            )?);
  114         -
                        }
  115         -
                        "KMSKeyArn" => {
  116         -
                            builder = builder.set_kms_key_arn(
  117         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  118         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  119         -
                                    .transpose()?,
  120         -
                            );
  121         -
                        }
  122         -
                        "TracingConfig" => {
  123         -
                            builder = builder.set_tracing_config(crate::protocol_serde::shape_tracing_config_response::de_tracing_config_response(
  124         -
                                tokens, _value,
  125         -
                            )?);
  126         -
                        }
  127         -
                        "MasterArn" => {
  128         -
                            builder = builder.set_master_arn(
  129         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  130         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  131         -
                                    .transpose()?,
  132         -
                            );
  133         -
                        }
  134         -
                        "RevisionId" => {
  135         -
                            builder = builder.set_revision_id(
  136         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  137         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  138         -
                                    .transpose()?,
  139         -
                            );
  140         -
                        }
  141         -
                        "Layers" => {
  142         -
                            builder = builder.set_layers(crate::protocol_serde::shape_layers_reference_list::de_layers_reference_list(
  143         -
                                tokens, _value,
  144         -
                            )?);
  145         -
                        }
  146         -
                        "State" => {
  147         -
                            builder = builder.set_state(
  148         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  149         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::State::from(u.as_ref())))
  150         -
                                    .transpose()?,
  151         -
                            );
  152         -
                        }
  153         -
                        "StateReason" => {
  154         -
                            builder = builder.set_state_reason(
  155         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  156         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  157         -
                                    .transpose()?,
  158         -
                            );
  159         -
                        }
  160         -
                        "StateReasonCode" => {
  161         -
                            builder = builder.set_state_reason_code(
  162         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  163         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::StateReasonCode::from(u.as_ref())))
  164         -
                                    .transpose()?,
  165         -
                            );
  166         -
                        }
  167         -
                        "LastUpdateStatus" => {
  168         -
                            builder = builder.set_last_update_status(
  169         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  170         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::LastUpdateStatus::from(u.as_ref())))
  171         -
                                    .transpose()?,
  172         -
                            );
  173         -
                        }
  174         -
                        "LastUpdateStatusReason" => {
  175         -
                            builder = builder.set_last_update_status_reason(
  176         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  177         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  178         -
                                    .transpose()?,
  179         -
                            );
  180         -
                        }
  181         -
                        "LastUpdateStatusReasonCode" => {
  182         -
                            builder = builder.set_last_update_status_reason_code(
  183         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  184         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::LastUpdateStatusReasonCode::from(u.as_ref())))
  185         -
                                    .transpose()?,
  186         -
                            );
  187         -
                        }
  188         -
                        "FileSystemConfigs" => {
  189         -
                            builder = builder.set_file_system_configs(
  190         -
                                crate::protocol_serde::shape_file_system_config_list::de_file_system_config_list(tokens, _value)?,
  191         -
                            );
  192         -
                        }
  193         -
                        "PackageType" => {
  194         -
                            builder = builder.set_package_type(
  195         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  196         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::PackageType::from(u.as_ref())))
  197         -
                                    .transpose()?,
  198         -
                            );
  199         -
                        }
  200         -
                        "ImageConfigResponse" => {
  201         -
                            builder = builder.set_image_config_response(
  202         -
                                crate::protocol_serde::shape_image_config_response::de_image_config_response(tokens, _value)?,
  203         -
                            );
  204         -
                        }
  205         -
                        "SigningProfileVersionArn" => {
  206         -
                            builder = builder.set_signing_profile_version_arn(
  207         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  208         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  209         -
                                    .transpose()?,
  210         -
                            );
  211         -
                        }
  212         -
                        "SigningJobArn" => {
  213         -
                            builder = builder.set_signing_job_arn(
  214         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  215         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  216         -
                                    .transpose()?,
  217         -
                            );
  218         -
                        }
  219         -
                        "Architectures" => {
  220         -
                            builder =
  221         -
                                builder.set_architectures(crate::protocol_serde::shape_architectures_list::de_architectures_list(tokens, _value)?);
  222         -
                        }
  223         -
                        "EphemeralStorage" => {
  224         -
                            builder =
  225         -
                                builder.set_ephemeral_storage(crate::protocol_serde::shape_ephemeral_storage::de_ephemeral_storage(tokens, _value)?);
  226         -
                        }
  227         -
                        "SnapStart" => {
  228         -
                            builder =
  229         -
                                builder.set_snap_start(crate::protocol_serde::shape_snap_start_response::de_snap_start_response(tokens, _value)?);
  230         -
                        }
  231         -
                        "RuntimeVersionConfig" => {
  232         -
                            builder = builder.set_runtime_version_config(
  233         -
                                crate::protocol_serde::shape_runtime_version_config::de_runtime_version_config(tokens, _value)?,
  234         -
                            );
  235         -
                        }
  236         -
                        "LoggingConfig" => {
  237         -
                            builder = builder.set_logging_config(crate::protocol_serde::shape_logging_config::de_logging_config(tokens, _value)?);
  238         -
                        }
  239         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  240         -
                    },
  241         -
                    other => {
  242         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  243         -
                            "expected object key or end object, found: {other:?}"
  244         -
                        )))
  245         -
                    }
  246         -
                }
  247         -
            }
  248         -
            Ok(Some(builder.build()))
  249         -
        }
  250         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  251         -
            "expected start object or null",
  252         -
        )),
  253         -
    }
  254         -
}

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

@@ -1,0 +64,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_function_event_invoke_config<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::FunctionEventInvokeConfig>, ::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::FunctionEventInvokeConfigBuilder::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         -
                        "LastModified" => {
   19         -
                            builder = builder.set_last_modified(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   20         -
                                tokens.next(),
   21         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   22         -
                            )?);
   23         -
                        }
   24         -
                        "FunctionArn" => {
   25         -
                            builder = builder.set_function_arn(
   26         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   27         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   28         -
                                    .transpose()?,
   29         -
                            );
   30         -
                        }
   31         -
                        "MaximumRetryAttempts" => {
   32         -
                            builder = builder.set_maximum_retry_attempts(
   33         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   34         -
                                    .map(i32::try_from)
   35         -
                                    .transpose()?,
   36         -
                            );
   37         -
                        }
   38         -
                        "MaximumEventAgeInSeconds" => {
   39         -
                            builder = builder.set_maximum_event_age_in_seconds(
   40         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   41         -
                                    .map(i32::try_from)
   42         -
                                    .transpose()?,
   43         -
                            );
   44         -
                        }
   45         -
                        "DestinationConfig" => {
   46         -
                            builder = builder
   47         -
                                .set_destination_config(crate::protocol_serde::shape_destination_config::de_destination_config(tokens, _value)?);
   48         -
                        }
   49         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   50         -
                    },
   51         -
                    other => {
   52         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   53         -
                            "expected object key or end object, found: {other:?}"
   54         -
                        )))
   55         -
                    }
   56         -
                }
   57         -
            }
   58         -
            Ok(Some(builder.build()))
   59         -
        }
   60         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   61         -
            "expected start object or null",
   62         -
        )),
   63         -
    }
   64         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_function_event_invoke_config_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_function_event_invoke_config_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::FunctionEventInvokeConfig>>, ::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_function_event_invoke_config::de_function_event_invoke_config(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_function_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_function_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::FunctionConfiguration>>, ::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_function_configuration::de_function_configuration(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_function_response_type_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_function_response_type_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::FunctionResponseType>>, ::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::FunctionResponseType::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/lambda/src/protocol_serde/shape_function_url_config.rs

@@ -1,0 +80,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_function_url_config<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::FunctionUrlConfig>, ::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::FunctionUrlConfigBuilder::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         -
                        "FunctionUrl" => {
   19         -
                            builder = builder.set_function_url(
   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         -
                        "FunctionArn" => {
   26         -
                            builder = builder.set_function_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         -
                        "CreationTime" => {
   33         -
                            builder = builder.set_creation_time(
   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         -
                        "LastModifiedTime" => {
   40         -
                            builder = builder.set_last_modified_time(
   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         -
                        "Cors" => {
   47         -
                            builder = builder.set_cors(crate::protocol_serde::shape_cors::de_cors(tokens, _value)?);
   48         -
                        }
   49         -
                        "AuthType" => {
   50         -
                            builder = builder.set_auth_type(
   51         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   52         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::FunctionUrlAuthType::from(u.as_ref())))
   53         -
                                    .transpose()?,
   54         -
                            );
   55         -
                        }
   56         -
                        "InvokeMode" => {
   57         -
                            builder = builder.set_invoke_mode(
   58         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   59         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::InvokeMode::from(u.as_ref())))
   60         -
                                    .transpose()?,
   61         -
                            );
   62         -
                        }
   63         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   64         -
                    },
   65         -
                    other => {
   66         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   67         -
                            "expected object key or end object, found: {other:?}"
   68         -
                        )))
   69         -
                    }
   70         -
                }
   71         -
            }
   72         -
            Ok(Some(crate::serde_util::function_url_config_correct_errors(builder).build().map_err(
   73         -
                |err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err),
   74         -
            )?))
   75         -
        }
   76         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   77         -
            "expected start object or null",
   78         -
        )),
   79         -
    }
   80         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_function_url_config_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_function_url_config_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::FunctionUrlConfig>>, ::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_function_url_config::de_function_url_config(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_get_account_settings.rs

@@ -1,0 +118,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_get_account_settings_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::get_account_settings::GetAccountSettingsOutput,
    9         -
    crate::operation::get_account_settings::GetAccountSettingsError,
   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::get_account_settings::GetAccountSettingsError::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::get_account_settings::GetAccountSettingsError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "ServiceException" => crate::operation::get_account_settings::GetAccountSettingsError::ServiceException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::ServiceExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_service_exception::de_service_exception_json_err(_response_body, output)
   29         -
                    .map_err(crate::operation::get_account_settings::GetAccountSettingsError::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         -
        "TooManyRequestsException" => crate::operation::get_account_settings::GetAccountSettingsError::TooManyRequestsException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::TooManyRequestsExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_too_many_requests_exception::de_too_many_requests_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::get_account_settings::GetAccountSettingsError::unhandled)?;
   45         -
                output = output.set_retry_after_seconds(
   46         -
                    crate::protocol_serde::shape_too_many_requests_exception::de_retry_after_seconds_header(_response_headers).map_err(|_| {
   47         -
                        crate::operation::get_account_settings::GetAccountSettingsError::unhandled(
   48         -
                            "Failed to parse retryAfterSeconds from header `Retry-After",
   49         -
                        )
   50         -
                    })?,
   51         -
                );
   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         -
        _ => crate::operation::get_account_settings::GetAccountSettingsError::generic(generic),
   61         -
    })
   62         -
}
   63         -
   64         -
#[allow(clippy::unnecessary_wraps)]
   65         -
pub fn de_get_account_settings_http_response(
   66         -
    _response_status: u16,
   67         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   68         -
    _response_body: &[u8],
   69         -
) -> std::result::Result<
   70         -
    crate::operation::get_account_settings::GetAccountSettingsOutput,
   71         -
    crate::operation::get_account_settings::GetAccountSettingsError,
   72         -
> {
   73         -
    Ok({
   74         -
        #[allow(unused_mut)]
   75         -
        let mut output = crate::operation::get_account_settings::builders::GetAccountSettingsOutputBuilder::default();
   76         -
        output = crate::protocol_serde::shape_get_account_settings::de_get_account_settings(_response_body, output)
   77         -
            .map_err(crate::operation::get_account_settings::GetAccountSettingsError::unhandled)?;
   78         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   79         -
        output.build()
   80         -
    })
   81         -
}
   82         -
   83         -
pub(crate) fn de_get_account_settings(
   84         -
    _value: &[u8],
   85         -
    mut builder: crate::operation::get_account_settings::builders::GetAccountSettingsOutputBuilder,
   86         -
) -> ::std::result::Result<
   87         -
    crate::operation::get_account_settings::builders::GetAccountSettingsOutputBuilder,
   88         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   89         -
> {
   90         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   91         -
    let tokens = &mut tokens_owned;
   92         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   93         -
    loop {
   94         -
        match tokens.next().transpose()? {
   95         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   96         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   97         -
                "AccountLimit" => {
   98         -
                    builder = builder.set_account_limit(crate::protocol_serde::shape_account_limit::de_account_limit(tokens, _value)?);
   99         -
                }
  100         -
                "AccountUsage" => {
  101         -
                    builder = builder.set_account_usage(crate::protocol_serde::shape_account_usage::de_account_usage(tokens, _value)?);
  102         -
                }
  103         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  104         -
            },
  105         -
            other => {
  106         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  107         -
                    "expected object key or end object, found: {other:?}"
  108         -
                )))
  109         -
            }
  110         -
        }
  111         -
    }
  112         -
    if tokens.next().is_some() {
  113         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  114         -
            "found more JSON tokens after completing parsing",
  115         -
        ));
  116         -
    }
  117         -
    Ok(builder)
  118         -
}

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

@@ -1,0 +174,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_get_alias_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::get_alias::GetAliasOutput, crate::operation::get_alias::GetAliasError> {
    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::get_alias::GetAliasError::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::get_alias::GetAliasError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidParameterValueException" => crate::operation::get_alias::GetAliasError::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::get_alias::GetAliasError::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::get_alias::GetAliasError::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::get_alias::GetAliasError::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::get_alias::GetAliasError::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::get_alias::GetAliasError::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::get_alias::GetAliasError::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::get_alias::GetAliasError::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::get_alias::GetAliasError::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::get_alias::GetAliasError::generic(generic),
   89         -
    })
   90         -
}
   91         -
   92         -
#[allow(clippy::unnecessary_wraps)]
   93         -
pub fn de_get_alias_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::get_alias::GetAliasOutput, crate::operation::get_alias::GetAliasError> {
   98         -
    Ok({
   99         -
        #[allow(unused_mut)]
  100         -
        let mut output = crate::operation::get_alias::builders::GetAliasOutputBuilder::default();
  101         -
        output = crate::protocol_serde::shape_get_alias::de_get_alias(_response_body, output)
  102         -
            .map_err(crate::operation::get_alias::GetAliasError::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_get_alias(
  109         -
    _value: &[u8],
  110         -
    mut builder: crate::operation::get_alias::builders::GetAliasOutputBuilder,
  111         -
) -> ::std::result::Result<crate::operation::get_alias::builders::GetAliasOutputBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
  112         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  113         -
    let tokens = &mut tokens_owned;
  114         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  115         -
    loop {
  116         -
        match tokens.next().transpose()? {
  117         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  118         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  119         -
                "AliasArn" => {
  120         -
                    builder = builder.set_alias_arn(
  121         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  122         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  123         -
                            .transpose()?,
  124         -
                    );
  125         -
                }
  126         -
                "Description" => {
  127         -
                    builder = builder.set_description(
  128         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  129         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  130         -
                            .transpose()?,
  131         -
                    );
  132         -
                }
  133         -
                "FunctionVersion" => {
  134         -
                    builder = builder.set_function_version(
  135         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  136         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  137         -
                            .transpose()?,
  138         -
                    );
  139         -
                }
  140         -
                "Name" => {
  141         -
                    builder = builder.set_name(
  142         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  143         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  144         -
                            .transpose()?,
  145         -
                    );
  146         -
                }
  147         -
                "RevisionId" => {
  148         -
                    builder = builder.set_revision_id(
  149         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  150         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  151         -
                            .transpose()?,
  152         -
                    );
  153         -
                }
  154         -
                "RoutingConfig" => {
  155         -
                    builder = builder.set_routing_config(crate::protocol_serde::shape_alias_routing_configuration::de_alias_routing_configuration(
  156         -
                        tokens, _value,
  157         -
                    )?);
  158         -
                }
  159         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  160         -
            },
  161         -
            other => {
  162         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  163         -
                    "expected object key or end object, found: {other:?}"
  164         -
                )))
  165         -
            }
  166         -
        }
  167         -
    }
  168         -
    if tokens.next().is_some() {
  169         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  170         -
            "found more JSON tokens after completing parsing",
  171         -
        ));
  172         -
    }
  173         -
    Ok(builder)
  174         -
}

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

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

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

@@ -1,0 +329,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_get_event_source_mapping_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::get_event_source_mapping::GetEventSourceMappingOutput,
    9         -
    crate::operation::get_event_source_mapping::GetEventSourceMappingError,
   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::get_event_source_mapping::GetEventSourceMappingError::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::get_event_source_mapping::GetEventSourceMappingError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InvalidParameterValueException" => crate::operation::get_event_source_mapping::GetEventSourceMappingError::InvalidParameterValueException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   29         -
                    _response_body,
   30         -
                    output,
   31         -
                )
   32         -
                .map_err(crate::operation::get_event_source_mapping::GetEventSourceMappingError::unhandled)?;
   33         -
                let output = output.meta(generic);
   34         -
                output.build()
   35         -
            };
   36         -
            if tmp.message.is_none() {
   37         -
                tmp.message = _error_message;
   38         -
            }
   39         -
            tmp
   40         -
        }),
   41         -
        "ResourceNotFoundException" => crate::operation::get_event_source_mapping::GetEventSourceMappingError::ResourceNotFoundException({
   42         -
            #[allow(unused_mut)]
   43         -
            let mut tmp = {
   44         -
                #[allow(unused_mut)]
   45         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   46         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   47         -
                    .map_err(crate::operation::get_event_source_mapping::GetEventSourceMappingError::unhandled)?;
   48         -
                let output = output.meta(generic);
   49         -
                output.build()
   50         -
            };
   51         -
            if tmp.message.is_none() {
   52         -
                tmp.message = _error_message;
   53         -
            }
   54         -
            tmp
   55         -
        }),
   56         -
        "ServiceException" => crate::operation::get_event_source_mapping::GetEventSourceMappingError::ServiceException({
   57         -
            #[allow(unused_mut)]
   58         -
            let mut tmp = {
   59         -
                #[allow(unused_mut)]
   60         -
                let mut output = crate::types::error::builders::ServiceExceptionBuilder::default();
   61         -
                output = crate::protocol_serde::shape_service_exception::de_service_exception_json_err(_response_body, output)
   62         -
                    .map_err(crate::operation::get_event_source_mapping::GetEventSourceMappingError::unhandled)?;
   63         -
                let output = output.meta(generic);
   64         -
                output.build()
   65         -
            };
   66         -
            if tmp.message.is_none() {
   67         -
                tmp.message = _error_message;
   68         -
            }
   69         -
            tmp
   70         -
        }),
   71         -
        "TooManyRequestsException" => crate::operation::get_event_source_mapping::GetEventSourceMappingError::TooManyRequestsException({
   72         -
            #[allow(unused_mut)]
   73         -
            let mut tmp = {
   74         -
                #[allow(unused_mut)]
   75         -
                let mut output = crate::types::error::builders::TooManyRequestsExceptionBuilder::default();
   76         -
                output = crate::protocol_serde::shape_too_many_requests_exception::de_too_many_requests_exception_json_err(_response_body, output)
   77         -
                    .map_err(crate::operation::get_event_source_mapping::GetEventSourceMappingError::unhandled)?;
   78         -
                output = output.set_retry_after_seconds(
   79         -
                    crate::protocol_serde::shape_too_many_requests_exception::de_retry_after_seconds_header(_response_headers).map_err(|_| {
   80         -
                        crate::operation::get_event_source_mapping::GetEventSourceMappingError::unhandled(
   81         -
                            "Failed to parse retryAfterSeconds from header `Retry-After",
   82         -
                        )
   83         -
                    })?,
   84         -
                );
   85         -
                let output = output.meta(generic);
   86         -
                output.build()
   87         -
            };
   88         -
            if tmp.message.is_none() {
   89         -
                tmp.message = _error_message;
   90         -
            }
   91         -
            tmp
   92         -
        }),
   93         -
        _ => crate::operation::get_event_source_mapping::GetEventSourceMappingError::generic(generic),
   94         -
    })
   95         -
}
   96         -
   97         -
#[allow(clippy::unnecessary_wraps)]
   98         -
pub fn de_get_event_source_mapping_http_response(
   99         -
    _response_status: u16,
  100         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  101         -
    _response_body: &[u8],
  102         -
) -> std::result::Result<
  103         -
    crate::operation::get_event_source_mapping::GetEventSourceMappingOutput,
  104         -
    crate::operation::get_event_source_mapping::GetEventSourceMappingError,
  105         -
> {
  106         -
    Ok({
  107         -
        #[allow(unused_mut)]
  108         -
        let mut output = crate::operation::get_event_source_mapping::builders::GetEventSourceMappingOutputBuilder::default();
  109         -
        output = crate::protocol_serde::shape_get_event_source_mapping::de_get_event_source_mapping(_response_body, output)
  110         -
            .map_err(crate::operation::get_event_source_mapping::GetEventSourceMappingError::unhandled)?;
  111         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  112         -
        output.build()
  113         -
    })
  114         -
}
  115         -
  116         -
pub(crate) fn de_get_event_source_mapping(
  117         -
    _value: &[u8],
  118         -
    mut builder: crate::operation::get_event_source_mapping::builders::GetEventSourceMappingOutputBuilder,
  119         -
) -> ::std::result::Result<
  120         -
    crate::operation::get_event_source_mapping::builders::GetEventSourceMappingOutputBuilder,
  121         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  122         -
> {
  123         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  124         -
    let tokens = &mut tokens_owned;
  125         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  126         -
    loop {
  127         -
        match tokens.next().transpose()? {
  128         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  129         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  130         -
                "AmazonManagedKafkaEventSourceConfig" => {
  131         -
                    builder = builder.set_amazon_managed_kafka_event_source_config(
  132         -
                        crate::protocol_serde::shape_amazon_managed_kafka_event_source_config::de_amazon_managed_kafka_event_source_config(
  133         -
                            tokens, _value,
  134         -
                        )?,
  135         -
                    );
  136         -
                }
  137         -
                "BatchSize" => {
  138         -
                    builder = builder.set_batch_size(
  139         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  140         -
                            .map(i32::try_from)
  141         -
                            .transpose()?,
  142         -
                    );
  143         -
                }
  144         -
                "BisectBatchOnFunctionError" => {
  145         -
                    builder = builder.set_bisect_batch_on_function_error(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
  146         -
                }
  147         -
                "DestinationConfig" => {
  148         -
                    builder = builder.set_destination_config(crate::protocol_serde::shape_destination_config::de_destination_config(tokens, _value)?);
  149         -
                }
  150         -
                "DocumentDBEventSourceConfig" => {
  151         -
                    builder = builder.set_document_db_event_source_config(
  152         -
                        crate::protocol_serde::shape_document_db_event_source_config::de_document_db_event_source_config(tokens, _value)?,
  153         -
                    );
  154         -
                }
  155         -
                "EventSourceArn" => {
  156         -
                    builder = builder.set_event_source_arn(
  157         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  158         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  159         -
                            .transpose()?,
  160         -
                    );
  161         -
                }
  162         -
                "EventSourceMappingArn" => {
  163         -
                    builder = builder.set_event_source_mapping_arn(
  164         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  165         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  166         -
                            .transpose()?,
  167         -
                    );
  168         -
                }
  169         -
                "FilterCriteria" => {
  170         -
                    builder = builder.set_filter_criteria(crate::protocol_serde::shape_filter_criteria::de_filter_criteria(tokens, _value)?);
  171         -
                }
  172         -
                "FilterCriteriaError" => {
  173         -
                    builder = builder.set_filter_criteria_error(crate::protocol_serde::shape_filter_criteria_error::de_filter_criteria_error(
  174         -
                        tokens, _value,
  175         -
                    )?);
  176         -
                }
  177         -
                "FunctionArn" => {
  178         -
                    builder = builder.set_function_arn(
  179         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  180         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  181         -
                            .transpose()?,
  182         -
                    );
  183         -
                }
  184         -
                "FunctionResponseTypes" => {
  185         -
                    builder = builder.set_function_response_types(
  186         -
                        crate::protocol_serde::shape_function_response_type_list::de_function_response_type_list(tokens, _value)?,
  187         -
                    );
  188         -
                }
  189         -
                "KMSKeyArn" => {
  190         -
                    builder = builder.set_kms_key_arn(
  191         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  192         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  193         -
                            .transpose()?,
  194         -
                    );
  195         -
                }
  196         -
                "LastModified" => {
  197         -
                    builder = builder.set_last_modified(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
  198         -
                        tokens.next(),
  199         -
                        ::aws_smithy_types::date_time::Format::EpochSeconds,
  200         -
                    )?);
  201         -
                }
  202         -
                "LastProcessingResult" => {
  203         -
                    builder = builder.set_last_processing_result(
  204         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  205         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  206         -
                            .transpose()?,
  207         -
                    );
  208         -
                }
  209         -
                "MaximumBatchingWindowInSeconds" => {
  210         -
                    builder = builder.set_maximum_batching_window_in_seconds(
  211         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  212         -
                            .map(i32::try_from)
  213         -
                            .transpose()?,
  214         -
                    );
  215         -
                }
  216         -
                "MaximumRecordAgeInSeconds" => {
  217         -
                    builder = builder.set_maximum_record_age_in_seconds(
  218         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  219         -
                            .map(i32::try_from)
  220         -
                            .transpose()?,
  221         -
                    );
  222         -
                }
  223         -
                "MaximumRetryAttempts" => {
  224         -
                    builder = builder.set_maximum_retry_attempts(
  225         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  226         -
                            .map(i32::try_from)
  227         -
                            .transpose()?,
  228         -
                    );
  229         -
                }
  230         -
                "MetricsConfig" => {
  231         -
                    builder = builder.set_metrics_config(
  232         -
                        crate::protocol_serde::shape_event_source_mapping_metrics_config::de_event_source_mapping_metrics_config(tokens, _value)?,
  233         -
                    );
  234         -
                }
  235         -
                "ParallelizationFactor" => {
  236         -
                    builder = builder.set_parallelization_factor(
  237         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  238         -
                            .map(i32::try_from)
  239         -
                            .transpose()?,
  240         -
                    );
  241         -
                }
  242         -
                "ProvisionedPollerConfig" => {
  243         -
                    builder = builder.set_provisioned_poller_config(
  244         -
                        crate::protocol_serde::shape_provisioned_poller_config::de_provisioned_poller_config(tokens, _value)?,
  245         -
                    );
  246         -
                }
  247         -
                "Queues" => {
  248         -
                    builder = builder.set_queues(crate::protocol_serde::shape_queues::de_queues(tokens, _value)?);
  249         -
                }
  250         -
                "ScalingConfig" => {
  251         -
                    builder = builder.set_scaling_config(crate::protocol_serde::shape_scaling_config::de_scaling_config(tokens, _value)?);
  252         -
                }
  253         -
                "SelfManagedEventSource" => {
  254         -
                    builder = builder.set_self_managed_event_source(
  255         -
                        crate::protocol_serde::shape_self_managed_event_source::de_self_managed_event_source(tokens, _value)?,
  256         -
                    );
  257         -
                }
  258         -
                "SelfManagedKafkaEventSourceConfig" => {
  259         -
                    builder = builder.set_self_managed_kafka_event_source_config(
  260         -
                        crate::protocol_serde::shape_self_managed_kafka_event_source_config::de_self_managed_kafka_event_source_config(
  261         -
                            tokens, _value,
  262         -
                        )?,
  263         -
                    );
  264         -
                }
  265         -
                "SourceAccessConfigurations" => {
  266         -
                    builder = builder.set_source_access_configurations(
  267         -
                        crate::protocol_serde::shape_source_access_configurations::de_source_access_configurations(tokens, _value)?,
  268         -
                    );
  269         -
                }
  270         -
                "StartingPosition" => {
  271         -
                    builder = builder.set_starting_position(
  272         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  273         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::EventSourcePosition::from(u.as_ref())))
  274         -
                            .transpose()?,
  275         -
                    );
  276         -
                }
  277         -
                "StartingPositionTimestamp" => {
  278         -
                    builder = builder.set_starting_position_timestamp(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
  279         -
                        tokens.next(),
  280         -
                        ::aws_smithy_types::date_time::Format::EpochSeconds,
  281         -
                    )?);
  282         -
                }
  283         -
                "State" => {
  284         -
                    builder = builder.set_state(
  285         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  286         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  287         -
                            .transpose()?,
  288         -
                    );
  289         -
                }
  290         -
                "StateTransitionReason" => {
  291         -
                    builder = builder.set_state_transition_reason(
  292         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  293         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  294         -
                            .transpose()?,
  295         -
                    );
  296         -
                }
  297         -
                "Topics" => {
  298         -
                    builder = builder.set_topics(crate::protocol_serde::shape_topics::de_topics(tokens, _value)?);
  299         -
                }
  300         -
                "TumblingWindowInSeconds" => {
  301         -
                    builder = builder.set_tumbling_window_in_seconds(
  302         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  303         -
                            .map(i32::try_from)
  304         -
                            .transpose()?,
  305         -
                    );
  306         -
                }
  307         -
                "UUID" => {
  308         -
                    builder = builder.set_uuid(
  309         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  310         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  311         -
                            .transpose()?,
  312         -
                    );
  313         -
                }
  314         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  315         -
            },
  316         -
            other => {
  317         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  318         -
                    "expected object key or end object, found: {other:?}"
  319         -
                )))
  320         -
            }
  321         -
        }
  322         -
    }
  323         -
    if tokens.next().is_some() {
  324         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  325         -
            "found more JSON tokens after completing parsing",
  326         -
        ));
  327         -
    }
  328         -
    Ok(builder)
  329         -
}