AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

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

@@ -1,0 +154,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_function_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_function::GetFunctionOutput, crate::operation::get_function::GetFunctionError> {
    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_function::GetFunctionError::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_function::GetFunctionError::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_function::GetFunctionError::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_function::GetFunctionError::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_function::GetFunctionError::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_function::GetFunctionError::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_function::GetFunctionError::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_function::GetFunctionError::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_function::GetFunctionError::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_function::GetFunctionError::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_function::GetFunctionError::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_function::GetFunctionError::generic(generic),
   89         -
    })
   90         -
}
   91         -
   92         -
#[allow(clippy::unnecessary_wraps)]
   93         -
pub fn de_get_function_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_function::GetFunctionOutput, crate::operation::get_function::GetFunctionError> {
   98         -
    Ok({
   99         -
        #[allow(unused_mut)]
  100         -
        let mut output = crate::operation::get_function::builders::GetFunctionOutputBuilder::default();
  101         -
        output = crate::protocol_serde::shape_get_function::de_get_function(_response_body, output)
  102         -
            .map_err(crate::operation::get_function::GetFunctionError::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_function(
  109         -
    _value: &[u8],
  110         -
    mut builder: crate::operation::get_function::builders::GetFunctionOutputBuilder,
  111         -
) -> ::std::result::Result<crate::operation::get_function::builders::GetFunctionOutputBuilder, ::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         -
                "Code" => {
  121         -
                    builder = builder.set_code(crate::protocol_serde::shape_function_code_location::de_function_code_location(
  122         -
                        tokens, _value,
  123         -
                    )?);
  124         -
                }
  125         -
                "Concurrency" => {
  126         -
                    builder = builder.set_concurrency(crate::protocol_serde::shape_concurrency::de_concurrency(tokens, _value)?);
  127         -
                }
  128         -
                "Configuration" => {
  129         -
                    builder = builder.set_configuration(crate::protocol_serde::shape_function_configuration::de_function_configuration(
  130         -
                        tokens, _value,
  131         -
                    )?);
  132         -
                }
  133         -
                "Tags" => {
  134         -
                    builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens, _value)?);
  135         -
                }
  136         -
                "TagsError" => {
  137         -
                    builder = builder.set_tags_error(crate::protocol_serde::shape_tags_error::de_tags_error(tokens, _value)?);
  138         -
                }
  139         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  140         -
            },
  141         -
            other => {
  142         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  143         -
                    "expected object key or end object, found: {other:?}"
  144         -
                )))
  145         -
            }
  146         -
        }
  147         -
    }
  148         -
    if tokens.next().is_some() {
  149         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  150         -
            "found more JSON tokens after completing parsing",
  151         -
        ));
  152         -
    }
  153         -
    Ok(builder)
  154         -
}

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

@@ -1,0 +169,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_function_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_function_code_signing_config::GetFunctionCodeSigningConfigOutput,
    9         -
    crate::operation::get_function_code_signing_config::GetFunctionCodeSigningConfigError,
   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_function_code_signing_config::GetFunctionCodeSigningConfigError::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_function_code_signing_config::GetFunctionCodeSigningConfigError::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::get_function_code_signing_config::GetFunctionCodeSigningConfigError::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::get_function_code_signing_config::GetFunctionCodeSigningConfigError::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::get_function_code_signing_config::GetFunctionCodeSigningConfigError::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::get_function_code_signing_config::GetFunctionCodeSigningConfigError::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::get_function_code_signing_config::GetFunctionCodeSigningConfigError::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::get_function_code_signing_config::GetFunctionCodeSigningConfigError::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::get_function_code_signing_config::GetFunctionCodeSigningConfigError::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::get_function_code_signing_config::GetFunctionCodeSigningConfigError::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::get_function_code_signing_config::GetFunctionCodeSigningConfigError::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::get_function_code_signing_config::GetFunctionCodeSigningConfigError::generic(generic),
  102         -
    })
  103         -
}
  104         -
  105         -
#[allow(clippy::unnecessary_wraps)]
  106         -
pub fn de_get_function_code_signing_config_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::get_function_code_signing_config::GetFunctionCodeSigningConfigOutput,
  112         -
    crate::operation::get_function_code_signing_config::GetFunctionCodeSigningConfigError,
  113         -
> {
  114         -
    Ok({
  115         -
        #[allow(unused_mut)]
  116         -
        let mut output = crate::operation::get_function_code_signing_config::builders::GetFunctionCodeSigningConfigOutputBuilder::default();
  117         -
        output = crate::protocol_serde::shape_get_function_code_signing_config::de_get_function_code_signing_config(_response_body, output)
  118         -
            .map_err(crate::operation::get_function_code_signing_config::GetFunctionCodeSigningConfigError::unhandled)?;
  119         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  120         -
        crate::serde_util::get_function_code_signing_config_output_output_correct_errors(output)
  121         -
            .build()
  122         -
            .map_err(crate::operation::get_function_code_signing_config::GetFunctionCodeSigningConfigError::unhandled)?
  123         -
    })
  124         -
}
  125         -
  126         -
pub(crate) fn de_get_function_code_signing_config(
  127         -
    _value: &[u8],
  128         -
    mut builder: crate::operation::get_function_code_signing_config::builders::GetFunctionCodeSigningConfigOutputBuilder,
  129         -
) -> ::std::result::Result<
  130         -
    crate::operation::get_function_code_signing_config::builders::GetFunctionCodeSigningConfigOutputBuilder,
  131         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  132         -
> {
  133         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  134         -
    let tokens = &mut tokens_owned;
  135         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  136         -
    loop {
  137         -
        match tokens.next().transpose()? {
  138         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  139         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  140         -
                "CodeSigningConfigArn" => {
  141         -
                    builder = builder.set_code_signing_config_arn(
  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         -
                "FunctionName" => {
  148         -
                    builder = builder.set_function_name(
  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         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  155         -
            },
  156         -
            other => {
  157         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  158         -
                    "expected object key or end object, found: {other:?}"
  159         -
                )))
  160         -
            }
  161         -
        }
  162         -
    }
  163         -
    if tokens.next().is_some() {
  164         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  165         -
            "found more JSON tokens after completing parsing",
  166         -
        ));
  167         -
    }
  168         -
    Ok(builder)
  169         -
}

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

@@ -1,0 +158,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_function_concurrency_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_function_concurrency::GetFunctionConcurrencyOutput,
    9         -
    crate::operation::get_function_concurrency::GetFunctionConcurrencyError,
   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_function_concurrency::GetFunctionConcurrencyError::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::get_function_concurrency::GetFunctionConcurrencyError::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::get_function_concurrency::GetFunctionConcurrencyError::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::get_function_concurrency::GetFunctionConcurrencyError::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::get_function_concurrency::GetFunctionConcurrencyError::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::get_function_concurrency::GetFunctionConcurrencyError::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::get_function_concurrency::GetFunctionConcurrencyError::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::get_function_concurrency::GetFunctionConcurrencyError::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::get_function_concurrency::GetFunctionConcurrencyError::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::get_function_concurrency::GetFunctionConcurrencyError::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::get_function_concurrency::GetFunctionConcurrencyError::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::get_function_concurrency::GetFunctionConcurrencyError::generic(generic),
  100         -
    })
  101         -
}
  102         -
  103         -
#[allow(clippy::unnecessary_wraps)]
  104         -
pub fn de_get_function_concurrency_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::get_function_concurrency::GetFunctionConcurrencyOutput,
  110         -
    crate::operation::get_function_concurrency::GetFunctionConcurrencyError,
  111         -
> {
  112         -
    Ok({
  113         -
        #[allow(unused_mut)]
  114         -
        let mut output = crate::operation::get_function_concurrency::builders::GetFunctionConcurrencyOutputBuilder::default();
  115         -
        output = crate::protocol_serde::shape_get_function_concurrency::de_get_function_concurrency(_response_body, output)
  116         -
            .map_err(crate::operation::get_function_concurrency::GetFunctionConcurrencyError::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_get_function_concurrency(
  123         -
    _value: &[u8],
  124         -
    mut builder: crate::operation::get_function_concurrency::builders::GetFunctionConcurrencyOutputBuilder,
  125         -
) -> ::std::result::Result<
  126         -
    crate::operation::get_function_concurrency::builders::GetFunctionConcurrencyOutputBuilder,
  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         -
                "ReservedConcurrentExecutions" => {
  137         -
                    builder = builder.set_reserved_concurrent_executions(
  138         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  139         -
                            .map(i32::try_from)
  140         -
                            .transpose()?,
  141         -
                    );
  142         -
                }
  143         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  144         -
            },
  145         -
            other => {
  146         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  147         -
                    "expected object key or end object, found: {other:?}"
  148         -
                )))
  149         -
            }
  150         -
        }
  151         -
    }
  152         -
    if tokens.next().is_some() {
  153         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  154         -
            "found more JSON tokens after completing parsing",
  155         -
        ));
  156         -
    }
  157         -
    Ok(builder)
  158         -
}

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

@@ -1,0 +367,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_function_configuration_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_function_configuration::GetFunctionConfigurationOutput,
    9         -
    crate::operation::get_function_configuration::GetFunctionConfigurationError,
   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_function_configuration::GetFunctionConfigurationError::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::get_function_configuration::GetFunctionConfigurationError::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::get_function_configuration::GetFunctionConfigurationError::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::get_function_configuration::GetFunctionConfigurationError::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::get_function_configuration::GetFunctionConfigurationError::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::get_function_configuration::GetFunctionConfigurationError::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::get_function_configuration::GetFunctionConfigurationError::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::get_function_configuration::GetFunctionConfigurationError::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::get_function_configuration::GetFunctionConfigurationError::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::get_function_configuration::GetFunctionConfigurationError::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::get_function_configuration::GetFunctionConfigurationError::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::get_function_configuration::GetFunctionConfigurationError::generic(generic),
  100         -
    })
  101         -
}
  102         -
  103         -
#[allow(clippy::unnecessary_wraps)]
  104         -
pub fn de_get_function_configuration_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::get_function_configuration::GetFunctionConfigurationOutput,
  110         -
    crate::operation::get_function_configuration::GetFunctionConfigurationError,
  111         -
> {
  112         -
    Ok({
  113         -
        #[allow(unused_mut)]
  114         -
        let mut output = crate::operation::get_function_configuration::builders::GetFunctionConfigurationOutputBuilder::default();
  115         -
        output = crate::protocol_serde::shape_get_function_configuration::de_get_function_configuration(_response_body, output)
  116         -
            .map_err(crate::operation::get_function_configuration::GetFunctionConfigurationError::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_get_function_configuration(
  123         -
    _value: &[u8],
  124         -
    mut builder: crate::operation::get_function_configuration::builders::GetFunctionConfigurationOutputBuilder,
  125         -
) -> ::std::result::Result<
  126         -
    crate::operation::get_function_configuration::builders::GetFunctionConfigurationOutputBuilder,
  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         -
                "Architectures" => {
  137         -
                    builder = builder.set_architectures(crate::protocol_serde::shape_architectures_list::de_architectures_list(tokens, _value)?);
  138         -
                }
  139         -
                "CodeSha256" => {
  140         -
                    builder = builder.set_code_sha256(
  141         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  142         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  143         -
                            .transpose()?,
  144         -
                    );
  145         -
                }
  146         -
                "CodeSize" => {
  147         -
                    builder = builder.set_code_size(
  148         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  149         -
                            .map(i64::try_from)
  150         -
                            .transpose()?,
  151         -
                    );
  152         -
                }
  153         -
                "DeadLetterConfig" => {
  154         -
                    builder = builder.set_dead_letter_config(crate::protocol_serde::shape_dead_letter_config::de_dead_letter_config(tokens, _value)?);
  155         -
                }
  156         -
                "Description" => {
  157         -
                    builder = builder.set_description(
  158         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  159         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  160         -
                            .transpose()?,
  161         -
                    );
  162         -
                }
  163         -
                "Environment" => {
  164         -
                    builder = builder.set_environment(crate::protocol_serde::shape_environment_response::de_environment_response(
  165         -
                        tokens, _value,
  166         -
                    )?);
  167         -
                }
  168         -
                "EphemeralStorage" => {
  169         -
                    builder = builder.set_ephemeral_storage(crate::protocol_serde::shape_ephemeral_storage::de_ephemeral_storage(tokens, _value)?);
  170         -
                }
  171         -
                "FileSystemConfigs" => {
  172         -
                    builder = builder.set_file_system_configs(crate::protocol_serde::shape_file_system_config_list::de_file_system_config_list(
  173         -
                        tokens, _value,
  174         -
                    )?);
  175         -
                }
  176         -
                "FunctionArn" => {
  177         -
                    builder = builder.set_function_arn(
  178         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  179         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  180         -
                            .transpose()?,
  181         -
                    );
  182         -
                }
  183         -
                "FunctionName" => {
  184         -
                    builder = builder.set_function_name(
  185         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  186         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  187         -
                            .transpose()?,
  188         -
                    );
  189         -
                }
  190         -
                "Handler" => {
  191         -
                    builder = builder.set_handler(
  192         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  193         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  194         -
                            .transpose()?,
  195         -
                    );
  196         -
                }
  197         -
                "ImageConfigResponse" => {
  198         -
                    builder = builder.set_image_config_response(crate::protocol_serde::shape_image_config_response::de_image_config_response(
  199         -
                        tokens, _value,
  200         -
                    )?);
  201         -
                }
  202         -
                "KMSKeyArn" => {
  203         -
                    builder = builder.set_kms_key_arn(
  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         -
                "LastModified" => {
  210         -
                    builder = builder.set_last_modified(
  211         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  212         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  213         -
                            .transpose()?,
  214         -
                    );
  215         -
                }
  216         -
                "LastUpdateStatus" => {
  217         -
                    builder = builder.set_last_update_status(
  218         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  219         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::LastUpdateStatus::from(u.as_ref())))
  220         -
                            .transpose()?,
  221         -
                    );
  222         -
                }
  223         -
                "LastUpdateStatusReason" => {
  224         -
                    builder = builder.set_last_update_status_reason(
  225         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  226         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  227         -
                            .transpose()?,
  228         -
                    );
  229         -
                }
  230         -
                "LastUpdateStatusReasonCode" => {
  231         -
                    builder = builder.set_last_update_status_reason_code(
  232         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  233         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::LastUpdateStatusReasonCode::from(u.as_ref())))
  234         -
                            .transpose()?,
  235         -
                    );
  236         -
                }
  237         -
                "Layers" => {
  238         -
                    builder = builder.set_layers(crate::protocol_serde::shape_layers_reference_list::de_layers_reference_list(
  239         -
                        tokens, _value,
  240         -
                    )?);
  241         -
                }
  242         -
                "LoggingConfig" => {
  243         -
                    builder = builder.set_logging_config(crate::protocol_serde::shape_logging_config::de_logging_config(tokens, _value)?);
  244         -
                }
  245         -
                "MasterArn" => {
  246         -
                    builder = builder.set_master_arn(
  247         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  248         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  249         -
                            .transpose()?,
  250         -
                    );
  251         -
                }
  252         -
                "MemorySize" => {
  253         -
                    builder = builder.set_memory_size(
  254         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  255         -
                            .map(i32::try_from)
  256         -
                            .transpose()?,
  257         -
                    );
  258         -
                }
  259         -
                "PackageType" => {
  260         -
                    builder = builder.set_package_type(
  261         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  262         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::PackageType::from(u.as_ref())))
  263         -
                            .transpose()?,
  264         -
                    );
  265         -
                }
  266         -
                "RevisionId" => {
  267         -
                    builder = builder.set_revision_id(
  268         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  269         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  270         -
                            .transpose()?,
  271         -
                    );
  272         -
                }
  273         -
                "Role" => {
  274         -
                    builder = builder.set_role(
  275         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  276         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  277         -
                            .transpose()?,
  278         -
                    );
  279         -
                }
  280         -
                "Runtime" => {
  281         -
                    builder = builder.set_runtime(
  282         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  283         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::Runtime::from(u.as_ref())))
  284         -
                            .transpose()?,
  285         -
                    );
  286         -
                }
  287         -
                "RuntimeVersionConfig" => {
  288         -
                    builder = builder.set_runtime_version_config(crate::protocol_serde::shape_runtime_version_config::de_runtime_version_config(
  289         -
                        tokens, _value,
  290         -
                    )?);
  291         -
                }
  292         -
                "SigningJobArn" => {
  293         -
                    builder = builder.set_signing_job_arn(
  294         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  295         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  296         -
                            .transpose()?,
  297         -
                    );
  298         -
                }
  299         -
                "SigningProfileVersionArn" => {
  300         -
                    builder = builder.set_signing_profile_version_arn(
  301         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  302         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  303         -
                            .transpose()?,
  304         -
                    );
  305         -
                }
  306         -
                "SnapStart" => {
  307         -
                    builder = builder.set_snap_start(crate::protocol_serde::shape_snap_start_response::de_snap_start_response(tokens, _value)?);
  308         -
                }
  309         -
                "State" => {
  310         -
                    builder = builder.set_state(
  311         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  312         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::State::from(u.as_ref())))
  313         -
                            .transpose()?,
  314         -
                    );
  315         -
                }
  316         -
                "StateReason" => {
  317         -
                    builder = builder.set_state_reason(
  318         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  319         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  320         -
                            .transpose()?,
  321         -
                    );
  322         -
                }
  323         -
                "StateReasonCode" => {
  324         -
                    builder = builder.set_state_reason_code(
  325         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  326         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::StateReasonCode::from(u.as_ref())))
  327         -
                            .transpose()?,
  328         -
                    );
  329         -
                }
  330         -
                "Timeout" => {
  331         -
                    builder = builder.set_timeout(
  332         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  333         -
                            .map(i32::try_from)
  334         -
                            .transpose()?,
  335         -
                    );
  336         -
                }
  337         -
                "TracingConfig" => {
  338         -
                    builder = builder.set_tracing_config(crate::protocol_serde::shape_tracing_config_response::de_tracing_config_response(
  339         -
                        tokens, _value,
  340         -
                    )?);
  341         -
                }
  342         -
                "Version" => {
  343         -
                    builder = builder.set_version(
  344         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  345         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  346         -
                            .transpose()?,
  347         -
                    );
  348         -
                }
  349         -
                "VpcConfig" => {
  350         -
                    builder = builder.set_vpc_config(crate::protocol_serde::shape_vpc_config_response::de_vpc_config_response(tokens, _value)?);
  351         -
                }
  352         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  353         -
            },
  354         -
            other => {
  355         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  356         -
                    "expected object key or end object, found: {other:?}"
  357         -
                )))
  358         -
            }
  359         -
        }
  360         -
    }
  361         -
    if tokens.next().is_some() {
  362         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  363         -
            "found more JSON tokens after completing parsing",
  364         -
        ));
  365         -
    }
  366         -
    Ok(builder)
  367         -
}

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

@@ -1,0 +183,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_function_event_invoke_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_function_event_invoke_config::GetFunctionEventInvokeConfigOutput,
    9         -
    crate::operation::get_function_event_invoke_config::GetFunctionEventInvokeConfigError,
   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_function_event_invoke_config::GetFunctionEventInvokeConfigError::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_function_event_invoke_config::GetFunctionEventInvokeConfigError::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::get_function_event_invoke_config::GetFunctionEventInvokeConfigError::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::get_function_event_invoke_config::GetFunctionEventInvokeConfigError::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::get_function_event_invoke_config::GetFunctionEventInvokeConfigError::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::get_function_event_invoke_config::GetFunctionEventInvokeConfigError::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::get_function_event_invoke_config::GetFunctionEventInvokeConfigError::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::get_function_event_invoke_config::GetFunctionEventInvokeConfigError::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::get_function_event_invoke_config::GetFunctionEventInvokeConfigError::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::get_function_event_invoke_config::GetFunctionEventInvokeConfigError::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::get_function_event_invoke_config::GetFunctionEventInvokeConfigError::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::get_function_event_invoke_config::GetFunctionEventInvokeConfigError::generic(generic),
  102         -
    })
  103         -
}
  104         -
  105         -
#[allow(clippy::unnecessary_wraps)]
  106         -
pub fn de_get_function_event_invoke_config_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::get_function_event_invoke_config::GetFunctionEventInvokeConfigOutput,
  112         -
    crate::operation::get_function_event_invoke_config::GetFunctionEventInvokeConfigError,
  113         -
> {
  114         -
    Ok({
  115         -
        #[allow(unused_mut)]
  116         -
        let mut output = crate::operation::get_function_event_invoke_config::builders::GetFunctionEventInvokeConfigOutputBuilder::default();
  117         -
        output = crate::protocol_serde::shape_get_function_event_invoke_config::de_get_function_event_invoke_config(_response_body, output)
  118         -
            .map_err(crate::operation::get_function_event_invoke_config::GetFunctionEventInvokeConfigError::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_get_function_event_invoke_config(
  125         -
    _value: &[u8],
  126         -
    mut builder: crate::operation::get_function_event_invoke_config::builders::GetFunctionEventInvokeConfigOutputBuilder,
  127         -
) -> ::std::result::Result<
  128         -
    crate::operation::get_function_event_invoke_config::builders::GetFunctionEventInvokeConfigOutputBuilder,
  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         -
                "DestinationConfig" => {
  139         -
                    builder = builder.set_destination_config(crate::protocol_serde::shape_destination_config::de_destination_config(tokens, _value)?);
  140         -
                }
  141         -
                "FunctionArn" => {
  142         -
                    builder = builder.set_function_arn(
  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         -
                "LastModified" => {
  149         -
                    builder = builder.set_last_modified(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
  150         -
                        tokens.next(),
  151         -
                        ::aws_smithy_types::date_time::Format::EpochSeconds,
  152         -
                    )?);
  153         -
                }
  154         -
                "MaximumEventAgeInSeconds" => {
  155         -
                    builder = builder.set_maximum_event_age_in_seconds(
  156         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  157         -
                            .map(i32::try_from)
  158         -
                            .transpose()?,
  159         -
                    );
  160         -
                }
  161         -
                "MaximumRetryAttempts" => {
  162         -
                    builder = builder.set_maximum_retry_attempts(
  163         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  164         -
                            .map(i32::try_from)
  165         -
                            .transpose()?,
  166         -
                    );
  167         -
                }
  168         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  169         -
            },
  170         -
            other => {
  171         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  172         -
                    "expected object key or end object, found: {other:?}"
  173         -
                )))
  174         -
            }
  175         -
        }
  176         -
    }
  177         -
    if tokens.next().is_some() {
  178         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  179         -
            "found more JSON tokens after completing parsing",
  180         -
        ));
  181         -
    }
  182         -
    Ok(builder)
  183         -
}