AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36 (ignoring whitespace)

Files changed:

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

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

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

@@ -1,0 +154,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_get_function_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::get_function::GetFunctionOutput, crate::operation::get_function::GetFunctionError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::get_function::GetFunctionError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::get_function::GetFunctionError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidParameterValueException" => crate::operation::get_function::GetFunctionError::InvalidParameterValueException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   26         -
                    _response_body,
   27         -
                    output,
   28         -
                )
   29         -
                .map_err(crate::operation::get_function::GetFunctionError::unhandled)?;
   30         -
                let output = output.meta(generic);
   31         -
                output.build()
   32         -
            };
   33         -
            if tmp.message.is_none() {
   34         -
                tmp.message = _error_message;
   35         -
            }
   36         -
            tmp
   37         -
        }),
   38         -
        "ResourceNotFoundException" => crate::operation::get_function::GetFunctionError::ResourceNotFoundException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::get_function::GetFunctionError::unhandled)?;
   45         -
                let output = output.meta(generic);
   46         -
                output.build()
   47         -
            };
   48         -
            if tmp.message.is_none() {
   49         -
                tmp.message = _error_message;
   50         -
            }
   51         -
            tmp
   52         -
        }),
   53         -
        "ServiceException" => crate::operation::get_function::GetFunctionError::ServiceException({
   54         -
            #[allow(unused_mut)]
   55         -
            let mut tmp = {
   56         -
                #[allow(unused_mut)]
   57         -
                let mut output = crate::types::error::builders::ServiceExceptionBuilder::default();
   58         -
                output = crate::protocol_serde::shape_service_exception::de_service_exception_json_err(_response_body, output)
   59         -
                    .map_err(crate::operation::get_function::GetFunctionError::unhandled)?;
   60         -
                let output = output.meta(generic);
   61         -
                output.build()
   62         -
            };
   63         -
            if tmp.message.is_none() {
   64         -
                tmp.message = _error_message;
   65         -
            }
   66         -
            tmp
   67         -
        }),
   68         -
        "TooManyRequestsException" => crate::operation::get_function::GetFunctionError::TooManyRequestsException({
   69         -
            #[allow(unused_mut)]
   70         -
            let mut tmp = {
   71         -
                #[allow(unused_mut)]
   72         -
                let mut output = crate::types::error::builders::TooManyRequestsExceptionBuilder::default();
   73         -
                output = crate::protocol_serde::shape_too_many_requests_exception::de_too_many_requests_exception_json_err(_response_body, output)
   74         -
                    .map_err(crate::operation::get_function::GetFunctionError::unhandled)?;
   75         -
                output = output.set_retry_after_seconds(
   76         -
                    crate::protocol_serde::shape_too_many_requests_exception::de_retry_after_seconds_header(_response_headers).map_err(|_| {
   77         -
                        crate::operation::get_function::GetFunctionError::unhandled("Failed to parse retryAfterSeconds from header `Retry-After")
   78         -
                    })?,
   79         -
                );
   80         -
                let output = output.meta(generic);
   81         -
                output.build()
   82         -
            };
   83         -
            if tmp.message.is_none() {
   84         -
                tmp.message = _error_message;
   85         -
            }
   86         -
            tmp
   87         -
        }),
   88         -
        _ => crate::operation::get_function::GetFunctionError::generic(generic),
   89         -
    })
   90         -
}
   91         -
   92         -
#[allow(clippy::unnecessary_wraps)]
   93         -
pub fn de_get_function_http_response(
   94         -
    _response_status: u16,
   95         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   96         -
    _response_body: &[u8],
   97         -
) -> std::result::Result<crate::operation::get_function::GetFunctionOutput, crate::operation::get_function::GetFunctionError> {
   98         -
    Ok({
   99         -
        #[allow(unused_mut)]
  100         -
        let mut output = crate::operation::get_function::builders::GetFunctionOutputBuilder::default();
  101         -
        output = crate::protocol_serde::shape_get_function::de_get_function(_response_body, output)
  102         -
            .map_err(crate::operation::get_function::GetFunctionError::unhandled)?;
  103         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  104         -
        output.build()
  105         -
    })
  106         -
}
  107         -
  108         -
pub(crate) fn de_get_function(
  109         -
    _value: &[u8],
  110         -
    mut builder: crate::operation::get_function::builders::GetFunctionOutputBuilder,
  111         -
) -> ::std::result::Result<crate::operation::get_function::builders::GetFunctionOutputBuilder, ::aws_smithy_json::deserialize::error::DeserializeError>
  112         -
{
  113         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  114         -
    let tokens = &mut tokens_owned;
  115         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  116         -
    loop {
  117         -
        match tokens.next().transpose()? {
  118         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  119         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  120         -
                "Code" => {
  121         -
                    builder = builder.set_code(crate::protocol_serde::shape_function_code_location::de_function_code_location(
  122         -
                        tokens, _value,
  123         -
                    )?);
  124         -
                }
  125         -
                "Concurrency" => {
  126         -
                    builder = builder.set_concurrency(crate::protocol_serde::shape_concurrency::de_concurrency(tokens, _value)?);
  127         -
                }
  128         -
                "Configuration" => {
  129         -
                    builder = builder.set_configuration(crate::protocol_serde::shape_function_configuration::de_function_configuration(
  130         -
                        tokens, _value,
  131         -
                    )?);
  132         -
                }
  133         -
                "Tags" => {
  134         -
                    builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens, _value)?);
  135         -
                }
  136         -
                "TagsError" => {
  137         -
                    builder = builder.set_tags_error(crate::protocol_serde::shape_tags_error::de_tags_error(tokens, _value)?);
  138         -
                }
  139         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  140         -
            },
  141         -
            other => {
  142         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  143         -
                    "expected object key or end object, found: {other:?}"
  144         -
                )))
  145         -
            }
  146         -
        }
  147         -
    }
  148         -
    if tokens.next().is_some() {
  149         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  150         -
            "found more JSON tokens after completing parsing",
  151         -
        ));
  152         -
    }
  153         -
    Ok(builder)
  154         -
}

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

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

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

@@ -1,0 +158,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_get_function_concurrency_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::get_function_concurrency::GetFunctionConcurrencyOutput,
    9         -
    crate::operation::get_function_concurrency::GetFunctionConcurrencyError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::get_function_concurrency::GetFunctionConcurrencyError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => {
   19         -
            return Err(crate::operation::get_function_concurrency::GetFunctionConcurrencyError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "InvalidParameterValueException" => {
   28         -
            crate::operation::get_function_concurrency::GetFunctionConcurrencyError::InvalidParameterValueException({
   29         -
                #[allow(unused_mut)]
   30         -
                let mut tmp = {
   31         -
                    #[allow(unused_mut)]
   32         -
                    let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   33         -
                    output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   34         -
                        _response_body,
   35         -
                        output,
   36         -
                    )
   37         -
                    .map_err(crate::operation::get_function_concurrency::GetFunctionConcurrencyError::unhandled)?;
   38         -
                    let output = output.meta(generic);
   39         -
                    output.build()
   40         -
                };
   41         -
                if tmp.message.is_none() {
   42         -
                    tmp.message = _error_message;
   43         -
                }
   44         -
                tmp
   45         -
            })
   46         -
        }
   47         -
        "ResourceNotFoundException" => crate::operation::get_function_concurrency::GetFunctionConcurrencyError::ResourceNotFoundException({
   48         -
            #[allow(unused_mut)]
   49         -
            let mut tmp = {
   50         -
                #[allow(unused_mut)]
   51         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   52         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   53         -
                    .map_err(crate::operation::get_function_concurrency::GetFunctionConcurrencyError::unhandled)?;
   54         -
                let output = output.meta(generic);
   55         -
                output.build()
   56         -
            };
   57         -
            if tmp.message.is_none() {
   58         -
                tmp.message = _error_message;
   59         -
            }
   60         -
            tmp
   61         -
        }),
   62         -
        "ServiceException" => crate::operation::get_function_concurrency::GetFunctionConcurrencyError::ServiceException({
   63         -
            #[allow(unused_mut)]
   64         -
            let mut tmp = {
   65         -
                #[allow(unused_mut)]
   66         -
                let mut output = crate::types::error::builders::ServiceExceptionBuilder::default();
   67         -
                output = crate::protocol_serde::shape_service_exception::de_service_exception_json_err(_response_body, output)
   68         -
                    .map_err(crate::operation::get_function_concurrency::GetFunctionConcurrencyError::unhandled)?;
   69         -
                let output = output.meta(generic);
   70         -
                output.build()
   71         -
            };
   72         -
            if tmp.message.is_none() {
   73         -
                tmp.message = _error_message;
   74         -
            }
   75         -
            tmp
   76         -
        }),
   77         -
        "TooManyRequestsException" => crate::operation::get_function_concurrency::GetFunctionConcurrencyError::TooManyRequestsException({
   78         -
            #[allow(unused_mut)]
   79         -
            let mut tmp = {
   80         -
                #[allow(unused_mut)]
   81         -
                let mut output = crate::types::error::builders::TooManyRequestsExceptionBuilder::default();
   82         -
                output = crate::protocol_serde::shape_too_many_requests_exception::de_too_many_requests_exception_json_err(_response_body, output)
   83         -
                    .map_err(crate::operation::get_function_concurrency::GetFunctionConcurrencyError::unhandled)?;
   84         -
                output = output.set_retry_after_seconds(
   85         -
                    crate::protocol_serde::shape_too_many_requests_exception::de_retry_after_seconds_header(_response_headers).map_err(|_| {
   86         -
                        crate::operation::get_function_concurrency::GetFunctionConcurrencyError::unhandled(
   87         -
                            "Failed to parse retryAfterSeconds from header `Retry-After",
   88         -
                        )
   89         -
                    })?,
   90         -
                );
   91         -
                let output = output.meta(generic);
   92         -
                output.build()
   93         -
            };
   94         -
            if tmp.message.is_none() {
   95         -
                tmp.message = _error_message;
   96         -
            }
   97         -
            tmp
   98         -
        }),
   99         -
        _ => crate::operation::get_function_concurrency::GetFunctionConcurrencyError::generic(generic),
  100         -
    })
  101         -
}
  102         -
  103         -
#[allow(clippy::unnecessary_wraps)]
  104         -
pub fn de_get_function_concurrency_http_response(
  105         -
    _response_status: u16,
  106         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  107         -
    _response_body: &[u8],
  108         -
) -> std::result::Result<
  109         -
    crate::operation::get_function_concurrency::GetFunctionConcurrencyOutput,
  110         -
    crate::operation::get_function_concurrency::GetFunctionConcurrencyError,
  111         -
> {
  112         -
    Ok({
  113         -
        #[allow(unused_mut)]
  114         -
        let mut output = crate::operation::get_function_concurrency::builders::GetFunctionConcurrencyOutputBuilder::default();
  115         -
        output = crate::protocol_serde::shape_get_function_concurrency::de_get_function_concurrency(_response_body, output)
  116         -
            .map_err(crate::operation::get_function_concurrency::GetFunctionConcurrencyError::unhandled)?;
  117         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  118         -
        output.build()
  119         -
    })
  120         -
}
  121         -
  122         -
pub(crate) fn de_get_function_concurrency(
  123         -
    _value: &[u8],
  124         -
    mut builder: crate::operation::get_function_concurrency::builders::GetFunctionConcurrencyOutputBuilder,
  125         -
) -> ::std::result::Result<
  126         -
    crate::operation::get_function_concurrency::builders::GetFunctionConcurrencyOutputBuilder,
  127         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  128         -
> {
  129         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  130         -
    let tokens = &mut tokens_owned;
  131         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  132         -
    loop {
  133         -
        match tokens.next().transpose()? {
  134         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  135         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  136         -
                "ReservedConcurrentExecutions" => {
  137         -
                    builder = builder.set_reserved_concurrent_executions(
  138         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  139         -
                            .map(i32::try_from)
  140         -
                            .transpose()?,
  141         -
                    );
  142         -
                }
  143         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  144         -
            },
  145         -
            other => {
  146         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  147         -
                    "expected object key or end object, found: {other:?}"
  148         -
                )))
  149         -
            }
  150         -
        }
  151         -
    }
  152         -
    if tokens.next().is_some() {
  153         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  154         -
            "found more JSON tokens after completing parsing",
  155         -
        ));
  156         -
    }
  157         -
    Ok(builder)
  158         -
}

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

@@ -1,0 +367,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_get_function_configuration_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::get_function_configuration::GetFunctionConfigurationOutput,
    9         -
    crate::operation::get_function_configuration::GetFunctionConfigurationError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::get_function_configuration::GetFunctionConfigurationError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => {
   19         -
            return Err(crate::operation::get_function_configuration::GetFunctionConfigurationError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "InvalidParameterValueException" => {
   28         -
            crate::operation::get_function_configuration::GetFunctionConfigurationError::InvalidParameterValueException({
   29         -
                #[allow(unused_mut)]
   30         -
                let mut tmp = {
   31         -
                    #[allow(unused_mut)]
   32         -
                    let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   33         -
                    output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   34         -
                        _response_body,
   35         -
                        output,
   36         -
                    )
   37         -
                    .map_err(crate::operation::get_function_configuration::GetFunctionConfigurationError::unhandled)?;
   38         -
                    let output = output.meta(generic);
   39         -
                    output.build()
   40         -
                };
   41         -
                if tmp.message.is_none() {
   42         -
                    tmp.message = _error_message;
   43         -
                }
   44         -
                tmp
   45         -
            })
   46         -
        }
   47         -
        "ResourceNotFoundException" => crate::operation::get_function_configuration::GetFunctionConfigurationError::ResourceNotFoundException({
   48         -
            #[allow(unused_mut)]
   49         -
            let mut tmp = {
   50         -
                #[allow(unused_mut)]
   51         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   52         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   53         -
                    .map_err(crate::operation::get_function_configuration::GetFunctionConfigurationError::unhandled)?;
   54         -
                let output = output.meta(generic);
   55         -
                output.build()
   56         -
            };
   57         -
            if tmp.message.is_none() {
   58         -
                tmp.message = _error_message;
   59         -
            }
   60         -
            tmp
   61         -
        }),
   62         -
        "ServiceException" => crate::operation::get_function_configuration::GetFunctionConfigurationError::ServiceException({
   63         -
            #[allow(unused_mut)]
   64         -
            let mut tmp = {
   65         -
                #[allow(unused_mut)]
   66         -
                let mut output = crate::types::error::builders::ServiceExceptionBuilder::default();
   67         -
                output = crate::protocol_serde::shape_service_exception::de_service_exception_json_err(_response_body, output)
   68         -
                    .map_err(crate::operation::get_function_configuration::GetFunctionConfigurationError::unhandled)?;
   69         -
                let output = output.meta(generic);
   70         -
                output.build()
   71         -
            };
   72         -
            if tmp.message.is_none() {
   73         -
                tmp.message = _error_message;
   74         -
            }
   75         -
            tmp
   76         -
        }),
   77         -
        "TooManyRequestsException" => crate::operation::get_function_configuration::GetFunctionConfigurationError::TooManyRequestsException({
   78         -
            #[allow(unused_mut)]
   79         -
            let mut tmp = {
   80         -
                #[allow(unused_mut)]
   81         -
                let mut output = crate::types::error::builders::TooManyRequestsExceptionBuilder::default();
   82         -
                output = crate::protocol_serde::shape_too_many_requests_exception::de_too_many_requests_exception_json_err(_response_body, output)
   83         -
                    .map_err(crate::operation::get_function_configuration::GetFunctionConfigurationError::unhandled)?;
   84         -
                output = output.set_retry_after_seconds(
   85         -
                    crate::protocol_serde::shape_too_many_requests_exception::de_retry_after_seconds_header(_response_headers).map_err(|_| {
   86         -
                        crate::operation::get_function_configuration::GetFunctionConfigurationError::unhandled(
   87         -
                            "Failed to parse retryAfterSeconds from header `Retry-After",
   88         -
                        )
   89         -
                    })?,
   90         -
                );
   91         -
                let output = output.meta(generic);
   92         -
                output.build()
   93         -
            };
   94         -
            if tmp.message.is_none() {
   95         -
                tmp.message = _error_message;
   96         -
            }
   97         -
            tmp
   98         -
        }),
   99         -
        _ => crate::operation::get_function_configuration::GetFunctionConfigurationError::generic(generic),
  100         -
    })
  101         -
}
  102         -
  103         -
#[allow(clippy::unnecessary_wraps)]
  104         -
pub fn de_get_function_configuration_http_response(
  105         -
    _response_status: u16,
  106         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  107         -
    _response_body: &[u8],
  108         -
) -> std::result::Result<
  109         -
    crate::operation::get_function_configuration::GetFunctionConfigurationOutput,
  110         -
    crate::operation::get_function_configuration::GetFunctionConfigurationError,
  111         -
> {
  112         -
    Ok({
  113         -
        #[allow(unused_mut)]
  114         -
        let mut output = crate::operation::get_function_configuration::builders::GetFunctionConfigurationOutputBuilder::default();
  115         -
        output = crate::protocol_serde::shape_get_function_configuration::de_get_function_configuration(_response_body, output)
  116         -
            .map_err(crate::operation::get_function_configuration::GetFunctionConfigurationError::unhandled)?;
  117         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  118         -
        output.build()
  119         -
    })
  120         -
}
  121         -
  122         -
pub(crate) fn de_get_function_configuration(
  123         -
    _value: &[u8],
  124         -
    mut builder: crate::operation::get_function_configuration::builders::GetFunctionConfigurationOutputBuilder,
  125         -
) -> ::std::result::Result<
  126         -
    crate::operation::get_function_configuration::builders::GetFunctionConfigurationOutputBuilder,
  127         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  128         -
> {
  129         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  130         -
    let tokens = &mut tokens_owned;
  131         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  132         -
    loop {
  133         -
        match tokens.next().transpose()? {
  134         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  135         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  136         -
                "Architectures" => {
  137         -
                    builder = builder.set_architectures(crate::protocol_serde::shape_architectures_list::de_architectures_list(tokens, _value)?);
  138         -
                }
  139         -
                "CodeSha256" => {
  140         -
                    builder = builder.set_code_sha256(
  141         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  142         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  143         -
                            .transpose()?,
  144         -
                    );
  145         -
                }
  146         -
                "CodeSize" => {
  147         -
                    builder = builder.set_code_size(
  148         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  149         -
                            .map(i64::try_from)
  150         -
                            .transpose()?,
  151         -
                    );
  152         -
                }
  153         -
                "DeadLetterConfig" => {
  154         -
                    builder = builder.set_dead_letter_config(crate::protocol_serde::shape_dead_letter_config::de_dead_letter_config(tokens, _value)?);
  155         -
                }
  156         -
                "Description" => {
  157         -
                    builder = builder.set_description(
  158         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  159         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  160         -
                            .transpose()?,
  161         -
                    );
  162         -
                }
  163         -
                "Environment" => {
  164         -
                    builder = builder.set_environment(crate::protocol_serde::shape_environment_response::de_environment_response(
  165         -
                        tokens, _value,
  166         -
                    )?);
  167         -
                }
  168         -
                "EphemeralStorage" => {
  169         -
                    builder = builder.set_ephemeral_storage(crate::protocol_serde::shape_ephemeral_storage::de_ephemeral_storage(tokens, _value)?);
  170         -
                }
  171         -
                "FileSystemConfigs" => {
  172         -
                    builder = builder.set_file_system_configs(crate::protocol_serde::shape_file_system_config_list::de_file_system_config_list(
  173         -
                        tokens, _value,
  174         -
                    )?);
  175         -
                }
  176         -
                "FunctionArn" => {
  177         -
                    builder = builder.set_function_arn(
  178         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  179         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  180         -
                            .transpose()?,
  181         -
                    );
  182         -
                }
  183         -
                "FunctionName" => {
  184         -
                    builder = builder.set_function_name(
  185         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  186         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  187         -
                            .transpose()?,
  188         -
                    );
  189         -
                }
  190         -
                "Handler" => {
  191         -
                    builder = builder.set_handler(
  192         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  193         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  194         -
                            .transpose()?,
  195         -
                    );
  196         -
                }
  197         -
                "ImageConfigResponse" => {
  198         -
                    builder = builder.set_image_config_response(crate::protocol_serde::shape_image_config_response::de_image_config_response(
  199         -
                        tokens, _value,
  200         -
                    )?);
  201         -
                }
  202         -
                "KMSKeyArn" => {
  203         -
                    builder = builder.set_kms_key_arn(
  204         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  205         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  206         -
                            .transpose()?,
  207         -
                    );
  208         -
                }
  209         -
                "LastModified" => {
  210         -
                    builder = builder.set_last_modified(
  211         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  212         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  213         -
                            .transpose()?,
  214         -
                    );
  215         -
                }
  216         -
                "LastUpdateStatus" => {
  217         -
                    builder = builder.set_last_update_status(
  218         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  219         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::LastUpdateStatus::from(u.as_ref())))
  220         -
                            .transpose()?,
  221         -
                    );
  222         -
                }
  223         -
                "LastUpdateStatusReason" => {
  224         -
                    builder = builder.set_last_update_status_reason(
  225         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  226         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  227         -
                            .transpose()?,
  228         -
                    );
  229         -
                }
  230         -
                "LastUpdateStatusReasonCode" => {
  231         -
                    builder = builder.set_last_update_status_reason_code(
  232         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  233         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::LastUpdateStatusReasonCode::from(u.as_ref())))
  234         -
                            .transpose()?,
  235         -
                    );
  236         -
                }
  237         -
                "Layers" => {
  238         -
                    builder = builder.set_layers(crate::protocol_serde::shape_layers_reference_list::de_layers_reference_list(
  239         -
                        tokens, _value,
  240         -
                    )?);
  241         -
                }
  242         -
                "LoggingConfig" => {
  243         -
                    builder = builder.set_logging_config(crate::protocol_serde::shape_logging_config::de_logging_config(tokens, _value)?);
  244         -
                }
  245         -
                "MasterArn" => {
  246         -
                    builder = builder.set_master_arn(
  247         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  248         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  249         -
                            .transpose()?,
  250         -
                    );
  251         -
                }
  252         -
                "MemorySize" => {
  253         -
                    builder = builder.set_memory_size(
  254         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  255         -
                            .map(i32::try_from)
  256         -
                            .transpose()?,
  257         -
                    );
  258         -
                }
  259         -
                "PackageType" => {
  260         -
                    builder = builder.set_package_type(
  261         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  262         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::PackageType::from(u.as_ref())))
  263         -
                            .transpose()?,
  264         -
                    );
  265         -
                }
  266         -
                "RevisionId" => {
  267         -
                    builder = builder.set_revision_id(
  268         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  269         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  270         -
                            .transpose()?,
  271         -
                    );
  272         -
                }
  273         -
                "Role" => {
  274         -
                    builder = builder.set_role(
  275         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  276         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  277         -
                            .transpose()?,
  278         -
                    );
  279         -
                }
  280         -
                "Runtime" => {
  281         -
                    builder = builder.set_runtime(
  282         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  283         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::Runtime::from(u.as_ref())))
  284         -
                            .transpose()?,
  285         -
                    );
  286         -
                }
  287         -
                "RuntimeVersionConfig" => {
  288         -
                    builder = builder.set_runtime_version_config(crate::protocol_serde::shape_runtime_version_config::de_runtime_version_config(
  289         -
                        tokens, _value,
  290         -
                    )?);
  291         -
                }
  292         -
                "SigningJobArn" => {
  293         -
                    builder = builder.set_signing_job_arn(
  294         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  295         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  296         -
                            .transpose()?,
  297         -
                    );
  298         -
                }
  299         -
                "SigningProfileVersionArn" => {
  300         -
                    builder = builder.set_signing_profile_version_arn(
  301         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  302         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  303         -
                            .transpose()?,
  304         -
                    );
  305         -
                }
  306         -
                "SnapStart" => {
  307         -
                    builder = builder.set_snap_start(crate::protocol_serde::shape_snap_start_response::de_snap_start_response(tokens, _value)?);
  308         -
                }
  309         -
                "State" => {
  310         -
                    builder = builder.set_state(
  311         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  312         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::State::from(u.as_ref())))
  313         -
                            .transpose()?,
  314         -
                    );
  315         -
                }
  316         -
                "StateReason" => {
  317         -
                    builder = builder.set_state_reason(
  318         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  319         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  320         -
                            .transpose()?,
  321         -
                    );
  322         -
                }
  323         -
                "StateReasonCode" => {
  324         -
                    builder = builder.set_state_reason_code(
  325         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  326         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::StateReasonCode::from(u.as_ref())))
  327         -
                            .transpose()?,
  328         -
                    );
  329         -
                }
  330         -
                "Timeout" => {
  331         -
                    builder = builder.set_timeout(
  332         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  333         -
                            .map(i32::try_from)
  334         -
                            .transpose()?,
  335         -
                    );
  336         -
                }
  337         -
                "TracingConfig" => {
  338         -
                    builder = builder.set_tracing_config(crate::protocol_serde::shape_tracing_config_response::de_tracing_config_response(
  339         -
                        tokens, _value,
  340         -
                    )?);
  341         -
                }
  342         -
                "Version" => {
  343         -
                    builder = builder.set_version(
  344         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  345         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  346         -
                            .transpose()?,
  347         -
                    );
  348         -
                }
  349         -
                "VpcConfig" => {
  350         -
                    builder = builder.set_vpc_config(crate::protocol_serde::shape_vpc_config_response::de_vpc_config_response(tokens, _value)?);
  351         -
                }
  352         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  353         -
            },
  354         -
            other => {
  355         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  356         -
                    "expected object key or end object, found: {other:?}"
  357         -
                )))
  358         -
            }
  359         -
        }
  360         -
    }
  361         -
    if tokens.next().is_some() {
  362         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  363         -
            "found more JSON tokens after completing parsing",
  364         -
        ));
  365         -
    }
  366         -
    Ok(builder)
  367         -
}