AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

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

@@ -1,0 +213,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_provisioned_concurrency_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_provisioned_concurrency_config::GetProvisionedConcurrencyConfigOutput,
    9         -
    crate::operation::get_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError,
   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_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError::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_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError::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_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError::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_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError::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         -
        "ProvisionedConcurrencyConfigNotFoundException" => {
   44         -
            crate::operation::get_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError::ProvisionedConcurrencyConfigNotFoundException(
   45         -
                {
   46         -
                    #[allow(unused_mut)]
   47         -
                    let mut tmp = {
   48         -
                        #[allow(unused_mut)]
   49         -
                        let mut output = crate::types::error::builders::ProvisionedConcurrencyConfigNotFoundExceptionBuilder::default();
   50         -
                        output = crate::protocol_serde::shape_provisioned_concurrency_config_not_found_exception::de_provisioned_concurrency_config_not_found_exception_json_err(_response_body, output).map_err(crate::operation::get_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError::unhandled)?;
   51         -
                        let output = output.meta(generic);
   52         -
                        output.build()
   53         -
                    };
   54         -
                    if tmp.message.is_none() {
   55         -
                        tmp.message = _error_message;
   56         -
                    }
   57         -
                    tmp
   58         -
                },
   59         -
            )
   60         -
        }
   61         -
        "ResourceNotFoundException" => {
   62         -
            crate::operation::get_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError::ResourceNotFoundException({
   63         -
                #[allow(unused_mut)]
   64         -
                let mut tmp = {
   65         -
                    #[allow(unused_mut)]
   66         -
                    let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   67         -
                    output =
   68         -
                        crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   69         -
                            .map_err(crate::operation::get_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError::unhandled)?;
   70         -
                    let output = output.meta(generic);
   71         -
                    output.build()
   72         -
                };
   73         -
                if tmp.message.is_none() {
   74         -
                    tmp.message = _error_message;
   75         -
                }
   76         -
                tmp
   77         -
            })
   78         -
        }
   79         -
        "ServiceException" => crate::operation::get_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError::ServiceException({
   80         -
            #[allow(unused_mut)]
   81         -
            let mut tmp = {
   82         -
                #[allow(unused_mut)]
   83         -
                let mut output = crate::types::error::builders::ServiceExceptionBuilder::default();
   84         -
                output = crate::protocol_serde::shape_service_exception::de_service_exception_json_err(_response_body, output)
   85         -
                    .map_err(crate::operation::get_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError::unhandled)?;
   86         -
                let output = output.meta(generic);
   87         -
                output.build()
   88         -
            };
   89         -
            if tmp.message.is_none() {
   90         -
                tmp.message = _error_message;
   91         -
            }
   92         -
            tmp
   93         -
        }),
   94         -
        "TooManyRequestsException" => {
   95         -
            crate::operation::get_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError::TooManyRequestsException({
   96         -
                #[allow(unused_mut)]
   97         -
                let mut tmp = {
   98         -
                    #[allow(unused_mut)]
   99         -
                    let mut output = crate::types::error::builders::TooManyRequestsExceptionBuilder::default();
  100         -
                    output =
  101         -
                        crate::protocol_serde::shape_too_many_requests_exception::de_too_many_requests_exception_json_err(_response_body, output)
  102         -
                            .map_err(crate::operation::get_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError::unhandled)?;
  103         -
                    output = output.set_retry_after_seconds(
  104         -
                        crate::protocol_serde::shape_too_many_requests_exception::de_retry_after_seconds_header(_response_headers).map_err(|_| {
  105         -
                            crate::operation::get_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError::unhandled(
  106         -
                                "Failed to parse retryAfterSeconds from header `Retry-After",
  107         -
                            )
  108         -
                        })?,
  109         -
                    );
  110         -
                    let output = output.meta(generic);
  111         -
                    output.build()
  112         -
                };
  113         -
                if tmp.message.is_none() {
  114         -
                    tmp.message = _error_message;
  115         -
                }
  116         -
                tmp
  117         -
            })
  118         -
        }
  119         -
        _ => crate::operation::get_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError::generic(generic),
  120         -
    })
  121         -
}
  122         -
  123         -
#[allow(clippy::unnecessary_wraps)]
  124         -
pub fn de_get_provisioned_concurrency_config_http_response(
  125         -
    _response_status: u16,
  126         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  127         -
    _response_body: &[u8],
  128         -
) -> std::result::Result<
  129         -
    crate::operation::get_provisioned_concurrency_config::GetProvisionedConcurrencyConfigOutput,
  130         -
    crate::operation::get_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError,
  131         -
> {
  132         -
    Ok({
  133         -
        #[allow(unused_mut)]
  134         -
        let mut output = crate::operation::get_provisioned_concurrency_config::builders::GetProvisionedConcurrencyConfigOutputBuilder::default();
  135         -
        output = crate::protocol_serde::shape_get_provisioned_concurrency_config::de_get_provisioned_concurrency_config(_response_body, output)
  136         -
            .map_err(crate::operation::get_provisioned_concurrency_config::GetProvisionedConcurrencyConfigError::unhandled)?;
  137         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  138         -
        output.build()
  139         -
    })
  140         -
}
  141         -
  142         -
pub(crate) fn de_get_provisioned_concurrency_config(
  143         -
    _value: &[u8],
  144         -
    mut builder: crate::operation::get_provisioned_concurrency_config::builders::GetProvisionedConcurrencyConfigOutputBuilder,
  145         -
) -> ::std::result::Result<
  146         -
    crate::operation::get_provisioned_concurrency_config::builders::GetProvisionedConcurrencyConfigOutputBuilder,
  147         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  148         -
> {
  149         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  150         -
    let tokens = &mut tokens_owned;
  151         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  152         -
    loop {
  153         -
        match tokens.next().transpose()? {
  154         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  155         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  156         -
                "AllocatedProvisionedConcurrentExecutions" => {
  157         -
                    builder = builder.set_allocated_provisioned_concurrent_executions(
  158         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  159         -
                            .map(i32::try_from)
  160         -
                            .transpose()?,
  161         -
                    );
  162         -
                }
  163         -
                "AvailableProvisionedConcurrentExecutions" => {
  164         -
                    builder = builder.set_available_provisioned_concurrent_executions(
  165         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  166         -
                            .map(i32::try_from)
  167         -
                            .transpose()?,
  168         -
                    );
  169         -
                }
  170         -
                "LastModified" => {
  171         -
                    builder = builder.set_last_modified(
  172         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  173         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  174         -
                            .transpose()?,
  175         -
                    );
  176         -
                }
  177         -
                "RequestedProvisionedConcurrentExecutions" => {
  178         -
                    builder = builder.set_requested_provisioned_concurrent_executions(
  179         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  180         -
                            .map(i32::try_from)
  181         -
                            .transpose()?,
  182         -
                    );
  183         -
                }
  184         -
                "Status" => {
  185         -
                    builder = builder.set_status(
  186         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  187         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::ProvisionedConcurrencyStatusEnum::from(u.as_ref())))
  188         -
                            .transpose()?,
  189         -
                    );
  190         -
                }
  191         -
                "StatusReason" => {
  192         -
                    builder = builder.set_status_reason(
  193         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  194         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  195         -
                            .transpose()?,
  196         -
                    );
  197         -
                }
  198         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  199         -
            },
  200         -
            other => {
  201         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  202         -
                    "expected object key or end object, found: {other:?}"
  203         -
                )))
  204         -
            }
  205         -
        }
  206         -
    }
  207         -
    if tokens.next().is_some() {
  208         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  209         -
            "found more JSON tokens after completing parsing",
  210         -
        ));
  211         -
    }
  212         -
    Ok(builder)
  213         -
}

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

@@ -1,0 +168,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_runtime_management_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_runtime_management_config::GetRuntimeManagementConfigOutput,
    9         -
    crate::operation::get_runtime_management_config::GetRuntimeManagementConfigError,
   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_runtime_management_config::GetRuntimeManagementConfigError::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_runtime_management_config::GetRuntimeManagementConfigError::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_runtime_management_config::GetRuntimeManagementConfigError::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_runtime_management_config::GetRuntimeManagementConfigError::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" => crate::operation::get_runtime_management_config::GetRuntimeManagementConfigError::ResourceNotFoundException({
   44         -
            #[allow(unused_mut)]
   45         -
            let mut tmp = {
   46         -
                #[allow(unused_mut)]
   47         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   48         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   49         -
                    .map_err(crate::operation::get_runtime_management_config::GetRuntimeManagementConfigError::unhandled)?;
   50         -
                let output = output.meta(generic);
   51         -
                output.build()
   52         -
            };
   53         -
            if tmp.message.is_none() {
   54         -
                tmp.message = _error_message;
   55         -
            }
   56         -
            tmp
   57         -
        }),
   58         -
        "ServiceException" => crate::operation::get_runtime_management_config::GetRuntimeManagementConfigError::ServiceException({
   59         -
            #[allow(unused_mut)]
   60         -
            let mut tmp = {
   61         -
                #[allow(unused_mut)]
   62         -
                let mut output = crate::types::error::builders::ServiceExceptionBuilder::default();
   63         -
                output = crate::protocol_serde::shape_service_exception::de_service_exception_json_err(_response_body, output)
   64         -
                    .map_err(crate::operation::get_runtime_management_config::GetRuntimeManagementConfigError::unhandled)?;
   65         -
                let output = output.meta(generic);
   66         -
                output.build()
   67         -
            };
   68         -
            if tmp.message.is_none() {
   69         -
                tmp.message = _error_message;
   70         -
            }
   71         -
            tmp
   72         -
        }),
   73         -
        "TooManyRequestsException" => crate::operation::get_runtime_management_config::GetRuntimeManagementConfigError::TooManyRequestsException({
   74         -
            #[allow(unused_mut)]
   75         -
            let mut tmp = {
   76         -
                #[allow(unused_mut)]
   77         -
                let mut output = crate::types::error::builders::TooManyRequestsExceptionBuilder::default();
   78         -
                output = crate::protocol_serde::shape_too_many_requests_exception::de_too_many_requests_exception_json_err(_response_body, output)
   79         -
                    .map_err(crate::operation::get_runtime_management_config::GetRuntimeManagementConfigError::unhandled)?;
   80         -
                output = output.set_retry_after_seconds(
   81         -
                    crate::protocol_serde::shape_too_many_requests_exception::de_retry_after_seconds_header(_response_headers).map_err(|_| {
   82         -
                        crate::operation::get_runtime_management_config::GetRuntimeManagementConfigError::unhandled(
   83         -
                            "Failed to parse retryAfterSeconds from header `Retry-After",
   84         -
                        )
   85         -
                    })?,
   86         -
                );
   87         -
                let output = output.meta(generic);
   88         -
                output.build()
   89         -
            };
   90         -
            if tmp.message.is_none() {
   91         -
                tmp.message = _error_message;
   92         -
            }
   93         -
            tmp
   94         -
        }),
   95         -
        _ => crate::operation::get_runtime_management_config::GetRuntimeManagementConfigError::generic(generic),
   96         -
    })
   97         -
}
   98         -
   99         -
#[allow(clippy::unnecessary_wraps)]
  100         -
pub fn de_get_runtime_management_config_http_response(
  101         -
    _response_status: u16,
  102         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  103         -
    _response_body: &[u8],
  104         -
) -> std::result::Result<
  105         -
    crate::operation::get_runtime_management_config::GetRuntimeManagementConfigOutput,
  106         -
    crate::operation::get_runtime_management_config::GetRuntimeManagementConfigError,
  107         -
> {
  108         -
    Ok({
  109         -
        #[allow(unused_mut)]
  110         -
        let mut output = crate::operation::get_runtime_management_config::builders::GetRuntimeManagementConfigOutputBuilder::default();
  111         -
        output = crate::protocol_serde::shape_get_runtime_management_config::de_get_runtime_management_config(_response_body, output)
  112         -
            .map_err(crate::operation::get_runtime_management_config::GetRuntimeManagementConfigError::unhandled)?;
  113         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  114         -
        output.build()
  115         -
    })
  116         -
}
  117         -
  118         -
pub(crate) fn de_get_runtime_management_config(
  119         -
    _value: &[u8],
  120         -
    mut builder: crate::operation::get_runtime_management_config::builders::GetRuntimeManagementConfigOutputBuilder,
  121         -
) -> ::std::result::Result<
  122         -
    crate::operation::get_runtime_management_config::builders::GetRuntimeManagementConfigOutputBuilder,
  123         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  124         -
> {
  125         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  126         -
    let tokens = &mut tokens_owned;
  127         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  128         -
    loop {
  129         -
        match tokens.next().transpose()? {
  130         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  131         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  132         -
                "FunctionArn" => {
  133         -
                    builder = builder.set_function_arn(
  134         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  135         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  136         -
                            .transpose()?,
  137         -
                    );
  138         -
                }
  139         -
                "RuntimeVersionArn" => {
  140         -
                    builder = builder.set_runtime_version_arn(
  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         -
                "UpdateRuntimeOn" => {
  147         -
                    builder = builder.set_update_runtime_on(
  148         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  149         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::UpdateRuntimeOn::from(u.as_ref())))
  150         -
                            .transpose()?,
  151         -
                    );
  152         -
                }
  153         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  154         -
            },
  155         -
            other => {
  156         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  157         -
                    "expected object key or end object, found: {other:?}"
  158         -
                )))
  159         -
            }
  160         -
        }
  161         -
    }
  162         -
    if tokens.next().is_some() {
  163         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  164         -
            "found more JSON tokens after completing parsing",
  165         -
        ));
  166         -
    }
  167         -
    Ok(builder)
  168         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_headers_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_headers_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<::std::string::String>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   12         -
            let mut items = Vec::new();
   13         -
            loop {
   14         -
                match tokens.peek() {
   15         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   16         -
                        tokens.next().transpose().unwrap();
   17         -
                        break;
   18         -
                    }
   19         -
                    _ => {
   20         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                            .transpose()?;
   23         -
                        if let Some(value) = value {
   24         -
                            items.push(value);
   25         -
                        } else {
   26         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   27         -
                                "dense list cannot contain null values",
   28         -
                            ));
   29         -
                        }
   30         -
                    }
   31         -
                }
   32         -
            }
   33         -
            Ok(Some(items))
   34         -
        }
   35         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   36         -
            "expected start array or null",
   37         -
        )),
   38         -
    }
   39         -
}

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

@@ -1,0 +74,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_image_config(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::ImageConfig,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.entry_point {
    7         -
        let mut array_2 = object.key("EntryPoint").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                array_2.value().string(item_3.as_str());
   11         -
            }
   12         -
        }
   13         -
        array_2.finish();
   14         -
    }
   15         -
    if let Some(var_4) = &input.command {
   16         -
        let mut array_5 = object.key("Command").start_array();
   17         -
        for item_6 in var_4 {
   18         -
            {
   19         -
                array_5.value().string(item_6.as_str());
   20         -
            }
   21         -
        }
   22         -
        array_5.finish();
   23         -
    }
   24         -
    if let Some(var_7) = &input.working_directory {
   25         -
        object.key("WorkingDirectory").string(var_7.as_str());
   26         -
    }
   27         -
    Ok(())
   28         -
}
   29         -
   30         -
pub(crate) fn de_image_config<'a, I>(
   31         -
    tokens: &mut ::std::iter::Peekable<I>,
   32         -
    _value: &'a [u8],
   33         -
) -> ::std::result::Result<Option<crate::types::ImageConfig>, ::aws_smithy_json::deserialize::error::DeserializeError>
   34         -
where
   35         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   36         -
{
   37         -
    match tokens.next().transpose()? {
   38         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   39         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   40         -
            #[allow(unused_mut)]
   41         -
            let mut builder = crate::types::builders::ImageConfigBuilder::default();
   42         -
            loop {
   43         -
                match tokens.next().transpose()? {
   44         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   45         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   46         -
                        "EntryPoint" => {
   47         -
                            builder = builder.set_entry_point(crate::protocol_serde::shape_string_list::de_string_list(tokens, _value)?);
   48         -
                        }
   49         -
                        "Command" => {
   50         -
                            builder = builder.set_command(crate::protocol_serde::shape_string_list::de_string_list(tokens, _value)?);
   51         -
                        }
   52         -
                        "WorkingDirectory" => {
   53         -
                            builder = builder.set_working_directory(
   54         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   55         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   56         -
                                    .transpose()?,
   57         -
                            );
   58         -
                        }
   59         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   60         -
                    },
   61         -
                    other => {
   62         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   63         -
                            "expected object key or end object, found: {other:?}"
   64         -
                        )))
   65         -
                    }
   66         -
                }
   67         -
            }
   68         -
            Ok(Some(builder.build()))
   69         -
        }
   70         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   71         -
            "expected start object or null",
   72         -
        )),
   73         -
    }
   74         -
}

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

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

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

@@ -1,0 +39,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_image_config_response<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::ImageConfigResponse>, ::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::ImageConfigResponseBuilder::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         -
                        "ImageConfig" => {
   19         -
                            builder = builder.set_image_config(crate::protocol_serde::shape_image_config::de_image_config(tokens, _value)?);
   20         -
                        }
   21         -
                        "Error" => {
   22         -
                            builder = builder.set_error(crate::protocol_serde::shape_image_config_error::de_image_config_error(tokens, _value)?);
   23         -
                        }
   24         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   25         -
                    },
   26         -
                    other => {
   27         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   28         -
                            "expected object key or end object, found: {other:?}"
   29         -
                        )))
   30         -
                    }
   31         -
                }
   32         -
            }
   33         -
            Ok(Some(builder.build()))
   34         -
        }
   35         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   36         -
            "expected start object or null",
   37         -
        )),
   38         -
    }
   39         -
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -1,0 +564,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_invoke_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::invoke::InvokeOutput, crate::operation::invoke::InvokeError> {
    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::invoke::InvokeError::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::invoke::InvokeError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "EC2AccessDeniedException" => crate::operation::invoke::InvokeError::Ec2AccessDeniedException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::Ec2AccessDeniedExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_ec2_access_denied_exception::de_ec2_access_denied_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
   27         -
                let output = output.meta(generic);
   28         -
                output.build()
   29         -
            };
   30         -
            if tmp.message.is_none() {
   31         -
                tmp.message = _error_message;
   32         -
            }
   33         -
            tmp
   34         -
        }),
   35         -
        "EC2ThrottledException" => crate::operation::invoke::InvokeError::Ec2ThrottledException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::Ec2ThrottledExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_ec2_throttled_exception::de_ec2_throttled_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
   42         -
                let output = output.meta(generic);
   43         -
                output.build()
   44         -
            };
   45         -
            if tmp.message.is_none() {
   46         -
                tmp.message = _error_message;
   47         -
            }
   48         -
            tmp
   49         -
        }),
   50         -
        "EC2UnexpectedException" => crate::operation::invoke::InvokeError::Ec2UnexpectedException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::Ec2UnexpectedExceptionBuilder::default();
   55         -
                output = crate::protocol_serde::shape_ec2_unexpected_exception::de_ec2_unexpected_exception_json_err(_response_body, output)
   56         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
   57         -
                let output = output.meta(generic);
   58         -
                output.build()
   59         -
            };
   60         -
            if tmp.message.is_none() {
   61         -
                tmp.message = _error_message;
   62         -
            }
   63         -
            tmp
   64         -
        }),
   65         -
        "EFSIOException" => crate::operation::invoke::InvokeError::EfsioException({
   66         -
            #[allow(unused_mut)]
   67         -
            let mut tmp = {
   68         -
                #[allow(unused_mut)]
   69         -
                let mut output = crate::types::error::builders::EfsioExceptionBuilder::default();
   70         -
                output = crate::protocol_serde::shape_efsio_exception::de_efsio_exception_json_err(_response_body, output)
   71         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
   72         -
                let output = output.meta(generic);
   73         -
                output.build()
   74         -
            };
   75         -
            if tmp.message.is_none() {
   76         -
                tmp.message = _error_message;
   77         -
            }
   78         -
            tmp
   79         -
        }),
   80         -
        "EFSMountConnectivityException" => crate::operation::invoke::InvokeError::EfsMountConnectivityException({
   81         -
            #[allow(unused_mut)]
   82         -
            let mut tmp = {
   83         -
                #[allow(unused_mut)]
   84         -
                let mut output = crate::types::error::builders::EfsMountConnectivityExceptionBuilder::default();
   85         -
                output = crate::protocol_serde::shape_efs_mount_connectivity_exception::de_efs_mount_connectivity_exception_json_err(
   86         -
                    _response_body,
   87         -
                    output,
   88         -
                )
   89         -
                .map_err(crate::operation::invoke::InvokeError::unhandled)?;
   90         -
                let output = output.meta(generic);
   91         -
                output.build()
   92         -
            };
   93         -
            if tmp.message.is_none() {
   94         -
                tmp.message = _error_message;
   95         -
            }
   96         -
            tmp
   97         -
        }),
   98         -
        "EFSMountFailureException" => crate::operation::invoke::InvokeError::EfsMountFailureException({
   99         -
            #[allow(unused_mut)]
  100         -
            let mut tmp = {
  101         -
                #[allow(unused_mut)]
  102         -
                let mut output = crate::types::error::builders::EfsMountFailureExceptionBuilder::default();
  103         -
                output = crate::protocol_serde::shape_efs_mount_failure_exception::de_efs_mount_failure_exception_json_err(_response_body, output)
  104         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  105         -
                let output = output.meta(generic);
  106         -
                output.build()
  107         -
            };
  108         -
            if tmp.message.is_none() {
  109         -
                tmp.message = _error_message;
  110         -
            }
  111         -
            tmp
  112         -
        }),
  113         -
        "EFSMountTimeoutException" => crate::operation::invoke::InvokeError::EfsMountTimeoutException({
  114         -
            #[allow(unused_mut)]
  115         -
            let mut tmp = {
  116         -
                #[allow(unused_mut)]
  117         -
                let mut output = crate::types::error::builders::EfsMountTimeoutExceptionBuilder::default();
  118         -
                output = crate::protocol_serde::shape_efs_mount_timeout_exception::de_efs_mount_timeout_exception_json_err(_response_body, output)
  119         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  120         -
                let output = output.meta(generic);
  121         -
                output.build()
  122         -
            };
  123         -
            if tmp.message.is_none() {
  124         -
                tmp.message = _error_message;
  125         -
            }
  126         -
            tmp
  127         -
        }),
  128         -
        "ENILimitReachedException" => crate::operation::invoke::InvokeError::EniLimitReachedException({
  129         -
            #[allow(unused_mut)]
  130         -
            let mut tmp = {
  131         -
                #[allow(unused_mut)]
  132         -
                let mut output = crate::types::error::builders::EniLimitReachedExceptionBuilder::default();
  133         -
                output = crate::protocol_serde::shape_eni_limit_reached_exception::de_eni_limit_reached_exception_json_err(_response_body, output)
  134         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  135         -
                let output = output.meta(generic);
  136         -
                output.build()
  137         -
            };
  138         -
            if tmp.message.is_none() {
  139         -
                tmp.message = _error_message;
  140         -
            }
  141         -
            tmp
  142         -
        }),
  143         -
        "InvalidParameterValueException" => crate::operation::invoke::InvokeError::InvalidParameterValueException({
  144         -
            #[allow(unused_mut)]
  145         -
            let mut tmp = {
  146         -
                #[allow(unused_mut)]
  147         -
                let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
  148         -
                output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
  149         -
                    _response_body,
  150         -
                    output,
  151         -
                )
  152         -
                .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  153         -
                let output = output.meta(generic);
  154         -
                output.build()
  155         -
            };
  156         -
            if tmp.message.is_none() {
  157         -
                tmp.message = _error_message;
  158         -
            }
  159         -
            tmp
  160         -
        }),
  161         -
        "InvalidRequestContentException" => crate::operation::invoke::InvokeError::InvalidRequestContentException({
  162         -
            #[allow(unused_mut)]
  163         -
            let mut tmp = {
  164         -
                #[allow(unused_mut)]
  165         -
                let mut output = crate::types::error::builders::InvalidRequestContentExceptionBuilder::default();
  166         -
                output = crate::protocol_serde::shape_invalid_request_content_exception::de_invalid_request_content_exception_json_err(
  167         -
                    _response_body,
  168         -
                    output,
  169         -
                )
  170         -
                .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  171         -
                let output = output.meta(generic);
  172         -
                output.build()
  173         -
            };
  174         -
            if tmp.message.is_none() {
  175         -
                tmp.message = _error_message;
  176         -
            }
  177         -
            tmp
  178         -
        }),
  179         -
        "InvalidRuntimeException" => crate::operation::invoke::InvokeError::InvalidRuntimeException({
  180         -
            #[allow(unused_mut)]
  181         -
            let mut tmp = {
  182         -
                #[allow(unused_mut)]
  183         -
                let mut output = crate::types::error::builders::InvalidRuntimeExceptionBuilder::default();
  184         -
                output = crate::protocol_serde::shape_invalid_runtime_exception::de_invalid_runtime_exception_json_err(_response_body, output)
  185         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  186         -
                let output = output.meta(generic);
  187         -
                output.build()
  188         -
            };
  189         -
            if tmp.message.is_none() {
  190         -
                tmp.message = _error_message;
  191         -
            }
  192         -
            tmp
  193         -
        }),
  194         -
        "InvalidSecurityGroupIDException" => crate::operation::invoke::InvokeError::InvalidSecurityGroupIdException({
  195         -
            #[allow(unused_mut)]
  196         -
            let mut tmp = {
  197         -
                #[allow(unused_mut)]
  198         -
                let mut output = crate::types::error::builders::InvalidSecurityGroupIdExceptionBuilder::default();
  199         -
                output = crate::protocol_serde::shape_invalid_security_group_id_exception::de_invalid_security_group_id_exception_json_err(
  200         -
                    _response_body,
  201         -
                    output,
  202         -
                )
  203         -
                .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  204         -
                let output = output.meta(generic);
  205         -
                output.build()
  206         -
            };
  207         -
            if tmp.message.is_none() {
  208         -
                tmp.message = _error_message;
  209         -
            }
  210         -
            tmp
  211         -
        }),
  212         -
        "InvalidSubnetIDException" => crate::operation::invoke::InvokeError::InvalidSubnetIdException({
  213         -
            #[allow(unused_mut)]
  214         -
            let mut tmp = {
  215         -
                #[allow(unused_mut)]
  216         -
                let mut output = crate::types::error::builders::InvalidSubnetIdExceptionBuilder::default();
  217         -
                output = crate::protocol_serde::shape_invalid_subnet_id_exception::de_invalid_subnet_id_exception_json_err(_response_body, output)
  218         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  219         -
                let output = output.meta(generic);
  220         -
                output.build()
  221         -
            };
  222         -
            if tmp.message.is_none() {
  223         -
                tmp.message = _error_message;
  224         -
            }
  225         -
            tmp
  226         -
        }),
  227         -
        "InvalidZipFileException" => crate::operation::invoke::InvokeError::InvalidZipFileException({
  228         -
            #[allow(unused_mut)]
  229         -
            let mut tmp = {
  230         -
                #[allow(unused_mut)]
  231         -
                let mut output = crate::types::error::builders::InvalidZipFileExceptionBuilder::default();
  232         -
                output = crate::protocol_serde::shape_invalid_zip_file_exception::de_invalid_zip_file_exception_json_err(_response_body, output)
  233         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  234         -
                let output = output.meta(generic);
  235         -
                output.build()
  236         -
            };
  237         -
            if tmp.message.is_none() {
  238         -
                tmp.message = _error_message;
  239         -
            }
  240         -
            tmp
  241         -
        }),
  242         -
        "KMSAccessDeniedException" => crate::operation::invoke::InvokeError::KmsAccessDeniedException({
  243         -
            #[allow(unused_mut)]
  244         -
            let mut tmp = {
  245         -
                #[allow(unused_mut)]
  246         -
                let mut output = crate::types::error::builders::KmsAccessDeniedExceptionBuilder::default();
  247         -
                output = crate::protocol_serde::shape_kms_access_denied_exception::de_kms_access_denied_exception_json_err(_response_body, output)
  248         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  249         -
                let output = output.meta(generic);
  250         -
                output.build()
  251         -
            };
  252         -
            if tmp.message.is_none() {
  253         -
                tmp.message = _error_message;
  254         -
            }
  255         -
            tmp
  256         -
        }),
  257         -
        "KMSDisabledException" => crate::operation::invoke::InvokeError::KmsDisabledException({
  258         -
            #[allow(unused_mut)]
  259         -
            let mut tmp = {
  260         -
                #[allow(unused_mut)]
  261         -
                let mut output = crate::types::error::builders::KmsDisabledExceptionBuilder::default();
  262         -
                output = crate::protocol_serde::shape_kms_disabled_exception::de_kms_disabled_exception_json_err(_response_body, output)
  263         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  264         -
                let output = output.meta(generic);
  265         -
                output.build()
  266         -
            };
  267         -
            if tmp.message.is_none() {
  268         -
                tmp.message = _error_message;
  269         -
            }
  270         -
            tmp
  271         -
        }),
  272         -
        "KMSInvalidStateException" => crate::operation::invoke::InvokeError::KmsInvalidStateException({
  273         -
            #[allow(unused_mut)]
  274         -
            let mut tmp = {
  275         -
                #[allow(unused_mut)]
  276         -
                let mut output = crate::types::error::builders::KmsInvalidStateExceptionBuilder::default();
  277         -
                output = crate::protocol_serde::shape_kms_invalid_state_exception::de_kms_invalid_state_exception_json_err(_response_body, output)
  278         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  279         -
                let output = output.meta(generic);
  280         -
                output.build()
  281         -
            };
  282         -
            if tmp.message.is_none() {
  283         -
                tmp.message = _error_message;
  284         -
            }
  285         -
            tmp
  286         -
        }),
  287         -
        "KMSNotFoundException" => crate::operation::invoke::InvokeError::KmsNotFoundException({
  288         -
            #[allow(unused_mut)]
  289         -
            let mut tmp = {
  290         -
                #[allow(unused_mut)]
  291         -
                let mut output = crate::types::error::builders::KmsNotFoundExceptionBuilder::default();
  292         -
                output = crate::protocol_serde::shape_kms_not_found_exception::de_kms_not_found_exception_json_err(_response_body, output)
  293         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  294         -
                let output = output.meta(generic);
  295         -
                output.build()
  296         -
            };
  297         -
            if tmp.message.is_none() {
  298         -
                tmp.message = _error_message;
  299         -
            }
  300         -
            tmp
  301         -
        }),
  302         -
        "RecursiveInvocationException" => crate::operation::invoke::InvokeError::RecursiveInvocationException({
  303         -
            #[allow(unused_mut)]
  304         -
            let mut tmp = {
  305         -
                #[allow(unused_mut)]
  306         -
                let mut output = crate::types::error::builders::RecursiveInvocationExceptionBuilder::default();
  307         -
                output =
  308         -
                    crate::protocol_serde::shape_recursive_invocation_exception::de_recursive_invocation_exception_json_err(_response_body, output)
  309         -
                        .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  310         -
                let output = output.meta(generic);
  311         -
                output.build()
  312         -
            };
  313         -
            if tmp.message.is_none() {
  314         -
                tmp.message = _error_message;
  315         -
            }
  316         -
            tmp
  317         -
        }),
  318         -
        "RequestTooLargeException" => crate::operation::invoke::InvokeError::RequestTooLargeException({
  319         -
            #[allow(unused_mut)]
  320         -
            let mut tmp = {
  321         -
                #[allow(unused_mut)]
  322         -
                let mut output = crate::types::error::builders::RequestTooLargeExceptionBuilder::default();
  323         -
                output = crate::protocol_serde::shape_request_too_large_exception::de_request_too_large_exception_json_err(_response_body, output)
  324         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  325         -
                let output = output.meta(generic);
  326         -
                output.build()
  327         -
            };
  328         -
            if tmp.message.is_none() {
  329         -
                tmp.message = _error_message;
  330         -
            }
  331         -
            tmp
  332         -
        }),
  333         -
        "ResourceConflictException" => crate::operation::invoke::InvokeError::ResourceConflictException({
  334         -
            #[allow(unused_mut)]
  335         -
            let mut tmp = {
  336         -
                #[allow(unused_mut)]
  337         -
                let mut output = crate::types::error::builders::ResourceConflictExceptionBuilder::default();
  338         -
                output = crate::protocol_serde::shape_resource_conflict_exception::de_resource_conflict_exception_json_err(_response_body, output)
  339         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  340         -
                let output = output.meta(generic);
  341         -
                output.build()
  342         -
            };
  343         -
            if tmp.message.is_none() {
  344         -
                tmp.message = _error_message;
  345         -
            }
  346         -
            tmp
  347         -
        }),
  348         -
        "ResourceNotFoundException" => crate::operation::invoke::InvokeError::ResourceNotFoundException({
  349         -
            #[allow(unused_mut)]
  350         -
            let mut tmp = {
  351         -
                #[allow(unused_mut)]
  352         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
  353         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
  354         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  355         -
                let output = output.meta(generic);
  356         -
                output.build()
  357         -
            };
  358         -
            if tmp.message.is_none() {
  359         -
                tmp.message = _error_message;
  360         -
            }
  361         -
            tmp
  362         -
        }),
  363         -
        "ResourceNotReadyException" => crate::operation::invoke::InvokeError::ResourceNotReadyException({
  364         -
            #[allow(unused_mut)]
  365         -
            let mut tmp = {
  366         -
                #[allow(unused_mut)]
  367         -
                let mut output = crate::types::error::builders::ResourceNotReadyExceptionBuilder::default();
  368         -
                output = crate::protocol_serde::shape_resource_not_ready_exception::de_resource_not_ready_exception_json_err(_response_body, output)
  369         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  370         -
                let output = output.meta(generic);
  371         -
                output.build()
  372         -
            };
  373         -
            if tmp.message.is_none() {
  374         -
                tmp.message = _error_message;
  375         -
            }
  376         -
            tmp
  377         -
        }),
  378         -
        "ServiceException" => crate::operation::invoke::InvokeError::ServiceException({
  379         -
            #[allow(unused_mut)]
  380         -
            let mut tmp = {
  381         -
                #[allow(unused_mut)]
  382         -
                let mut output = crate::types::error::builders::ServiceExceptionBuilder::default();
  383         -
                output = crate::protocol_serde::shape_service_exception::de_service_exception_json_err(_response_body, output)
  384         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  385         -
                let output = output.meta(generic);
  386         -
                output.build()
  387         -
            };
  388         -
            if tmp.message.is_none() {
  389         -
                tmp.message = _error_message;
  390         -
            }
  391         -
            tmp
  392         -
        }),
  393         -
        "SnapStartException" => crate::operation::invoke::InvokeError::SnapStartException({
  394         -
            #[allow(unused_mut)]
  395         -
            let mut tmp = {
  396         -
                #[allow(unused_mut)]
  397         -
                let mut output = crate::types::error::builders::SnapStartExceptionBuilder::default();
  398         -
                output = crate::protocol_serde::shape_snap_start_exception::de_snap_start_exception_json_err(_response_body, output)
  399         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  400         -
                let output = output.meta(generic);
  401         -
                output.build()
  402         -
            };
  403         -
            if tmp.message.is_none() {
  404         -
                tmp.message = _error_message;
  405         -
            }
  406         -
            tmp
  407         -
        }),
  408         -
        "SnapStartNotReadyException" => crate::operation::invoke::InvokeError::SnapStartNotReadyException({
  409         -
            #[allow(unused_mut)]
  410         -
            let mut tmp = {
  411         -
                #[allow(unused_mut)]
  412         -
                let mut output = crate::types::error::builders::SnapStartNotReadyExceptionBuilder::default();
  413         -
                output =
  414         -
                    crate::protocol_serde::shape_snap_start_not_ready_exception::de_snap_start_not_ready_exception_json_err(_response_body, output)
  415         -
                        .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  416         -
                let output = output.meta(generic);
  417         -
                output.build()
  418         -
            };
  419         -
            if tmp.message.is_none() {
  420         -
                tmp.message = _error_message;
  421         -
            }
  422         -
            tmp
  423         -
        }),
  424         -
        "SnapStartTimeoutException" => crate::operation::invoke::InvokeError::SnapStartTimeoutException({
  425         -
            #[allow(unused_mut)]
  426         -
            let mut tmp = {
  427         -
                #[allow(unused_mut)]
  428         -
                let mut output = crate::types::error::builders::SnapStartTimeoutExceptionBuilder::default();
  429         -
                output = crate::protocol_serde::shape_snap_start_timeout_exception::de_snap_start_timeout_exception_json_err(_response_body, output)
  430         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  431         -
                let output = output.meta(generic);
  432         -
                output.build()
  433         -
            };
  434         -
            if tmp.message.is_none() {
  435         -
                tmp.message = _error_message;
  436         -
            }
  437         -
            tmp
  438         -
        }),
  439         -
        "SubnetIPAddressLimitReachedException" => {
  440         -
            crate::operation::invoke::InvokeError::SubnetIpAddressLimitReachedException({
  441         -
                #[allow(unused_mut)]
  442         -
                let mut tmp = {
  443         -
                    #[allow(unused_mut)]
  444         -
                    let mut output = crate::types::error::builders::SubnetIpAddressLimitReachedExceptionBuilder::default();
  445         -
                    output = crate::protocol_serde::shape_subnet_ip_address_limit_reached_exception::de_subnet_ip_address_limit_reached_exception_json_err(_response_body, output).map_err(crate::operation::invoke::InvokeError::unhandled)?;
  446         -
                    let output = output.meta(generic);
  447         -
                    output.build()
  448         -
                };
  449         -
                if tmp.message.is_none() {
  450         -
                    tmp.message = _error_message;
  451         -
                }
  452         -
                tmp
  453         -
            })
  454         -
        }
  455         -
        "TooManyRequestsException" => crate::operation::invoke::InvokeError::TooManyRequestsException({
  456         -
            #[allow(unused_mut)]
  457         -
            let mut tmp = {
  458         -
                #[allow(unused_mut)]
  459         -
                let mut output = crate::types::error::builders::TooManyRequestsExceptionBuilder::default();
  460         -
                output = crate::protocol_serde::shape_too_many_requests_exception::de_too_many_requests_exception_json_err(_response_body, output)
  461         -
                    .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  462         -
                output = output.set_retry_after_seconds(
  463         -
                    crate::protocol_serde::shape_too_many_requests_exception::de_retry_after_seconds_header(_response_headers).map_err(|_| {
  464         -
                        crate::operation::invoke::InvokeError::unhandled("Failed to parse retryAfterSeconds from header `Retry-After")
  465         -
                    })?,
  466         -
                );
  467         -
                let output = output.meta(generic);
  468         -
                output.build()
  469         -
            };
  470         -
            if tmp.message.is_none() {
  471         -
                tmp.message = _error_message;
  472         -
            }
  473         -
            tmp
  474         -
        }),
  475         -
        "UnsupportedMediaTypeException" => crate::operation::invoke::InvokeError::UnsupportedMediaTypeException({
  476         -
            #[allow(unused_mut)]
  477         -
            let mut tmp = {
  478         -
                #[allow(unused_mut)]
  479         -
                let mut output = crate::types::error::builders::UnsupportedMediaTypeExceptionBuilder::default();
  480         -
                output = crate::protocol_serde::shape_unsupported_media_type_exception::de_unsupported_media_type_exception_json_err(
  481         -
                    _response_body,
  482         -
                    output,
  483         -
                )
  484         -
                .map_err(crate::operation::invoke::InvokeError::unhandled)?;
  485         -
                let output = output.meta(generic);
  486         -
                output.build()
  487         -
            };
  488         -
            if tmp.message.is_none() {
  489         -
                tmp.message = _error_message;
  490         -
            }
  491         -
            tmp
  492         -
        }),
  493         -
        _ => crate::operation::invoke::InvokeError::generic(generic),
  494         -
    })
  495         -
}
  496         -
  497         -
#[allow(clippy::unnecessary_wraps)]
  498         -
pub fn de_invoke_http_response(
  499         -
    _response_status: u16,
  500         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  501         -
    _response_body: &[u8],
  502         -
) -> std::result::Result<crate::operation::invoke::InvokeOutput, crate::operation::invoke::InvokeError> {
  503         -
    Ok({
  504         -
        #[allow(unused_mut)]
  505         -
        let mut output = crate::operation::invoke::builders::InvokeOutputBuilder::default();
  506         -
        output = output.set_executed_version(
  507         -
            crate::protocol_serde::shape_invoke_output::de_executed_version_header(_response_headers).map_err(|_| {
  508         -
                crate::operation::invoke::InvokeError::unhandled("Failed to parse ExecutedVersion from header `X-Amz-Executed-Version")
  509         -
            })?,
  510         -
        );
  511         -
        output = output.set_function_error(
  512         -
            crate::protocol_serde::shape_invoke_output::de_function_error_header(_response_headers)
  513         -
                .map_err(|_| crate::operation::invoke::InvokeError::unhandled("Failed to parse FunctionError from header `X-Amz-Function-Error"))?,
  514         -
        );
  515         -
        output = output.set_log_result(
  516         -
            crate::protocol_serde::shape_invoke_output::de_log_result_header(_response_headers)
  517         -
                .map_err(|_| crate::operation::invoke::InvokeError::unhandled("Failed to parse LogResult from header `X-Amz-Log-Result"))?,
  518         -
        );
  519         -
        output = output.set_payload(crate::protocol_serde::shape_invoke_output::de_payload_payload(_response_body)?);
  520         -
        output = output.set_status_code(Some(_response_status as _));
  521         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  522         -
        output.build()
  523         -
    })
  524         -
}
  525         -
  526         -
pub fn ser_invoke_headers(
  527         -
    input: &crate::operation::invoke::InvokeInput,
  528         -
    mut builder: ::http_1x::request::Builder,
  529         -
) -> std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  530         -
    if let ::std::option::Option::Some(inner_1) = &input.invocation_type {
  531         -
        let formatted_2 = inner_1.as_str();
  532         -
        let header_value = formatted_2;
  533         -
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
  534         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  535         -
                "invocation_type",
  536         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  537         -
            )
  538         -
        })?;
  539         -
        builder = builder.header("X-Amz-Invocation-Type", header_value);
  540         -
    }
  541         -
    if let ::std::option::Option::Some(inner_3) = &input.log_type {
  542         -
        let formatted_4 = inner_3.as_str();
  543         -
        let header_value = formatted_4;
  544         -
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
  545         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  546         -
                "log_type",
  547         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  548         -
            )
  549         -
        })?;
  550         -
        builder = builder.header("X-Amz-Log-Type", header_value);
  551         -
    }
  552         -
    if let ::std::option::Option::Some(inner_5) = &input.client_context {
  553         -
        let formatted_6 = inner_5.as_str();
  554         -
        let header_value = formatted_6;
  555         -
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
  556         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  557         -
                "client_context",
  558         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  559         -
            )
  560         -
        })?;
  561         -
        builder = builder.header("X-Amz-Client-Context", header_value);
  562         -
    }
  563         -
    Ok(builder)
  564         -
}