AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

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

@@ -1,0 +106,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_update_function_configuration_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::update_function_configuration::UpdateFunctionConfigurationInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.dead_letter_config {
    7         -
        #[allow(unused_mut)]
    8         -
        let mut object_2 = object.key("DeadLetterConfig").start_object();
    9         -
        crate::protocol_serde::shape_dead_letter_config::ser_dead_letter_config(&mut object_2, var_1)?;
   10         -
        object_2.finish();
   11         -
    }
   12         -
    if let Some(var_3) = &input.description {
   13         -
        object.key("Description").string(var_3.as_str());
   14         -
    }
   15         -
    if let Some(var_4) = &input.environment {
   16         -
        #[allow(unused_mut)]
   17         -
        let mut object_5 = object.key("Environment").start_object();
   18         -
        crate::protocol_serde::shape_environment::ser_environment(&mut object_5, var_4)?;
   19         -
        object_5.finish();
   20         -
    }
   21         -
    if let Some(var_6) = &input.ephemeral_storage {
   22         -
        #[allow(unused_mut)]
   23         -
        let mut object_7 = object.key("EphemeralStorage").start_object();
   24         -
        crate::protocol_serde::shape_ephemeral_storage::ser_ephemeral_storage(&mut object_7, var_6)?;
   25         -
        object_7.finish();
   26         -
    }
   27         -
    if let Some(var_8) = &input.file_system_configs {
   28         -
        let mut array_9 = object.key("FileSystemConfigs").start_array();
   29         -
        for item_10 in var_8 {
   30         -
            {
   31         -
                #[allow(unused_mut)]
   32         -
                let mut object_11 = array_9.value().start_object();
   33         -
                crate::protocol_serde::shape_file_system_config::ser_file_system_config(&mut object_11, item_10)?;
   34         -
                object_11.finish();
   35         -
            }
   36         -
        }
   37         -
        array_9.finish();
   38         -
    }
   39         -
    if let Some(var_12) = &input.handler {
   40         -
        object.key("Handler").string(var_12.as_str());
   41         -
    }
   42         -
    if let Some(var_13) = &input.image_config {
   43         -
        #[allow(unused_mut)]
   44         -
        let mut object_14 = object.key("ImageConfig").start_object();
   45         -
        crate::protocol_serde::shape_image_config::ser_image_config(&mut object_14, var_13)?;
   46         -
        object_14.finish();
   47         -
    }
   48         -
    if let Some(var_15) = &input.kms_key_arn {
   49         -
        object.key("KMSKeyArn").string(var_15.as_str());
   50         -
    }
   51         -
    if let Some(var_16) = &input.layers {
   52         -
        let mut array_17 = object.key("Layers").start_array();
   53         -
        for item_18 in var_16 {
   54         -
            {
   55         -
                array_17.value().string(item_18.as_str());
   56         -
            }
   57         -
        }
   58         -
        array_17.finish();
   59         -
    }
   60         -
    if let Some(var_19) = &input.logging_config {
   61         -
        #[allow(unused_mut)]
   62         -
        let mut object_20 = object.key("LoggingConfig").start_object();
   63         -
        crate::protocol_serde::shape_logging_config::ser_logging_config(&mut object_20, var_19)?;
   64         -
        object_20.finish();
   65         -
    }
   66         -
    if let Some(var_21) = &input.memory_size {
   67         -
        object.key("MemorySize").number(
   68         -
            #[allow(clippy::useless_conversion)]
   69         -
            ::aws_smithy_types::Number::NegInt((*var_21).into()),
   70         -
        );
   71         -
    }
   72         -
    if let Some(var_22) = &input.revision_id {
   73         -
        object.key("RevisionId").string(var_22.as_str());
   74         -
    }
   75         -
    if let Some(var_23) = &input.role {
   76         -
        object.key("Role").string(var_23.as_str());
   77         -
    }
   78         -
    if let Some(var_24) = &input.runtime {
   79         -
        object.key("Runtime").string(var_24.as_str());
   80         -
    }
   81         -
    if let Some(var_25) = &input.snap_start {
   82         -
        #[allow(unused_mut)]
   83         -
        let mut object_26 = object.key("SnapStart").start_object();
   84         -
        crate::protocol_serde::shape_snap_start::ser_snap_start(&mut object_26, var_25)?;
   85         -
        object_26.finish();
   86         -
    }
   87         -
    if let Some(var_27) = &input.timeout {
   88         -
        object.key("Timeout").number(
   89         -
            #[allow(clippy::useless_conversion)]
   90         -
            ::aws_smithy_types::Number::NegInt((*var_27).into()),
   91         -
        );
   92         -
    }
   93         -
    if let Some(var_28) = &input.tracing_config {
   94         -
        #[allow(unused_mut)]
   95         -
        let mut object_29 = object.key("TracingConfig").start_object();
   96         -
        crate::protocol_serde::shape_tracing_config::ser_tracing_config(&mut object_29, var_28)?;
   97         -
        object_29.finish();
   98         -
    }
   99         -
    if let Some(var_30) = &input.vpc_config {
  100         -
        #[allow(unused_mut)]
  101         -
        let mut object_31 = object.key("VpcConfig").start_object();
  102         -
        crate::protocol_serde::shape_vpc_config::ser_vpc_config(&mut object_31, var_30)?;
  103         -
        object_31.finish();
  104         -
    }
  105         -
    Ok(())
  106         -
}

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

@@ -1,0 +211,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_update_function_event_invoke_config_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigOutput,
    9         -
    crate::operation::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError,
   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::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError::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::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError::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::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError::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::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError::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         -
        "ResourceConflictException" => {
   44         -
            crate::operation::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError::ResourceConflictException({
   45         -
                #[allow(unused_mut)]
   46         -
                let mut tmp = {
   47         -
                    #[allow(unused_mut)]
   48         -
                    let mut output = crate::types::error::builders::ResourceConflictExceptionBuilder::default();
   49         -
                    output =
   50         -
                        crate::protocol_serde::shape_resource_conflict_exception::de_resource_conflict_exception_json_err(_response_body, output)
   51         -
                            .map_err(crate::operation::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError::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         -
        "ResourceNotFoundException" => {
   62         -
            crate::operation::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError::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::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError::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::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError::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::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError::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::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError::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::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError::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::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError::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::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError::generic(generic),
  120         -
    })
  121         -
}
  122         -
  123         -
#[allow(clippy::unnecessary_wraps)]
  124         -
pub fn de_update_function_event_invoke_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::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigOutput,
  130         -
    crate::operation::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError,
  131         -
> {
  132         -
    Ok({
  133         -
        #[allow(unused_mut)]
  134         -
        let mut output = crate::operation::update_function_event_invoke_config::builders::UpdateFunctionEventInvokeConfigOutputBuilder::default();
  135         -
        output = crate::protocol_serde::shape_update_function_event_invoke_config::de_update_function_event_invoke_config(_response_body, output)
  136         -
            .map_err(crate::operation::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigError::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 fn ser_update_function_event_invoke_config_input(
  143         -
    input: &crate::operation::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigInput,
  144         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  145         -
    let mut out = String::new();
  146         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  147         -
    crate::protocol_serde::shape_update_function_event_invoke_config_input::ser_update_function_event_invoke_config_input_input(&mut object, input)?;
  148         -
    object.finish();
  149         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  150         -
}
  151         -
  152         -
pub(crate) fn de_update_function_event_invoke_config(
  153         -
    _value: &[u8],
  154         -
    mut builder: crate::operation::update_function_event_invoke_config::builders::UpdateFunctionEventInvokeConfigOutputBuilder,
  155         -
) -> ::std::result::Result<
  156         -
    crate::operation::update_function_event_invoke_config::builders::UpdateFunctionEventInvokeConfigOutputBuilder,
  157         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  158         -
> {
  159         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  160         -
    let tokens = &mut tokens_owned;
  161         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  162         -
    loop {
  163         -
        match tokens.next().transpose()? {
  164         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  165         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  166         -
                "DestinationConfig" => {
  167         -
                    builder = builder.set_destination_config(crate::protocol_serde::shape_destination_config::de_destination_config(tokens, _value)?);
  168         -
                }
  169         -
                "FunctionArn" => {
  170         -
                    builder = builder.set_function_arn(
  171         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  172         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  173         -
                            .transpose()?,
  174         -
                    );
  175         -
                }
  176         -
                "LastModified" => {
  177         -
                    builder = builder.set_last_modified(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
  178         -
                        tokens.next(),
  179         -
                        ::aws_smithy_types::date_time::Format::EpochSeconds,
  180         -
                    )?);
  181         -
                }
  182         -
                "MaximumEventAgeInSeconds" => {
  183         -
                    builder = builder.set_maximum_event_age_in_seconds(
  184         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  185         -
                            .map(i32::try_from)
  186         -
                            .transpose()?,
  187         -
                    );
  188         -
                }
  189         -
                "MaximumRetryAttempts" => {
  190         -
                    builder = builder.set_maximum_retry_attempts(
  191         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  192         -
                            .map(i32::try_from)
  193         -
                            .transpose()?,
  194         -
                    );
  195         -
                }
  196         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  197         -
            },
  198         -
            other => {
  199         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  200         -
                    "expected object key or end object, found: {other:?}"
  201         -
                )))
  202         -
            }
  203         -
        }
  204         -
    }
  205         -
    if tokens.next().is_some() {
  206         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  207         -
            "found more JSON tokens after completing parsing",
  208         -
        ));
  209         -
    }
  210         -
    Ok(builder)
  211         -
}

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

@@ -1,0 +25,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_update_function_event_invoke_config_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::update_function_event_invoke_config::UpdateFunctionEventInvokeConfigInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.destination_config {
    7         -
        #[allow(unused_mut)]
    8         -
        let mut object_2 = object.key("DestinationConfig").start_object();
    9         -
        crate::protocol_serde::shape_destination_config::ser_destination_config(&mut object_2, var_1)?;
   10         -
        object_2.finish();
   11         -
    }
   12         -
    if let Some(var_3) = &input.maximum_event_age_in_seconds {
   13         -
        object.key("MaximumEventAgeInSeconds").number(
   14         -
            #[allow(clippy::useless_conversion)]
   15         -
            ::aws_smithy_types::Number::NegInt((*var_3).into()),
   16         -
        );
   17         -
    }
   18         -
    if let Some(var_4) = &input.maximum_retry_attempts {
   19         -
        object.key("MaximumRetryAttempts").number(
   20         -
            #[allow(clippy::useless_conversion)]
   21         -
            ::aws_smithy_types::Number::NegInt((*var_4).into()),
   22         -
        );
   23         -
    }
   24         -
    Ok(())
   25         -
}

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

@@ -1,0 +223,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_update_function_url_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::update_function_url_config::UpdateFunctionUrlConfigOutput,
    9         -
    crate::operation::update_function_url_config::UpdateFunctionUrlConfigError,
   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::update_function_url_config::UpdateFunctionUrlConfigError::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::update_function_url_config::UpdateFunctionUrlConfigError::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::update_function_url_config::UpdateFunctionUrlConfigError::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::update_function_url_config::UpdateFunctionUrlConfigError::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         -
        "ResourceConflictException" => crate::operation::update_function_url_config::UpdateFunctionUrlConfigError::ResourceConflictException({
   48         -
            #[allow(unused_mut)]
   49         -
            let mut tmp = {
   50         -
                #[allow(unused_mut)]
   51         -
                let mut output = crate::types::error::builders::ResourceConflictExceptionBuilder::default();
   52         -
                output = crate::protocol_serde::shape_resource_conflict_exception::de_resource_conflict_exception_json_err(_response_body, output)
   53         -
                    .map_err(crate::operation::update_function_url_config::UpdateFunctionUrlConfigError::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         -
        "ResourceNotFoundException" => crate::operation::update_function_url_config::UpdateFunctionUrlConfigError::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 = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   68         -
                    .map_err(crate::operation::update_function_url_config::UpdateFunctionUrlConfigError::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         -
        "ServiceException" => crate::operation::update_function_url_config::UpdateFunctionUrlConfigError::ServiceException({
   78         -
            #[allow(unused_mut)]
   79         -
            let mut tmp = {
   80         -
                #[allow(unused_mut)]
   81         -
                let mut output = crate::types::error::builders::ServiceExceptionBuilder::default();
   82         -
                output = crate::protocol_serde::shape_service_exception::de_service_exception_json_err(_response_body, output)
   83         -
                    .map_err(crate::operation::update_function_url_config::UpdateFunctionUrlConfigError::unhandled)?;
   84         -
                let output = output.meta(generic);
   85         -
                output.build()
   86         -
            };
   87         -
            if tmp.message.is_none() {
   88         -
                tmp.message = _error_message;
   89         -
            }
   90         -
            tmp
   91         -
        }),
   92         -
        "TooManyRequestsException" => crate::operation::update_function_url_config::UpdateFunctionUrlConfigError::TooManyRequestsException({
   93         -
            #[allow(unused_mut)]
   94         -
            let mut tmp = {
   95         -
                #[allow(unused_mut)]
   96         -
                let mut output = crate::types::error::builders::TooManyRequestsExceptionBuilder::default();
   97         -
                output = crate::protocol_serde::shape_too_many_requests_exception::de_too_many_requests_exception_json_err(_response_body, output)
   98         -
                    .map_err(crate::operation::update_function_url_config::UpdateFunctionUrlConfigError::unhandled)?;
   99         -
                output = output.set_retry_after_seconds(
  100         -
                    crate::protocol_serde::shape_too_many_requests_exception::de_retry_after_seconds_header(_response_headers).map_err(|_| {
  101         -
                        crate::operation::update_function_url_config::UpdateFunctionUrlConfigError::unhandled(
  102         -
                            "Failed to parse retryAfterSeconds from header `Retry-After",
  103         -
                        )
  104         -
                    })?,
  105         -
                );
  106         -
                let output = output.meta(generic);
  107         -
                output.build()
  108         -
            };
  109         -
            if tmp.message.is_none() {
  110         -
                tmp.message = _error_message;
  111         -
            }
  112         -
            tmp
  113         -
        }),
  114         -
        _ => crate::operation::update_function_url_config::UpdateFunctionUrlConfigError::generic(generic),
  115         -
    })
  116         -
}
  117         -
  118         -
#[allow(clippy::unnecessary_wraps)]
  119         -
pub fn de_update_function_url_config_http_response(
  120         -
    _response_status: u16,
  121         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  122         -
    _response_body: &[u8],
  123         -
) -> std::result::Result<
  124         -
    crate::operation::update_function_url_config::UpdateFunctionUrlConfigOutput,
  125         -
    crate::operation::update_function_url_config::UpdateFunctionUrlConfigError,
  126         -
> {
  127         -
    Ok({
  128         -
        #[allow(unused_mut)]
  129         -
        let mut output = crate::operation::update_function_url_config::builders::UpdateFunctionUrlConfigOutputBuilder::default();
  130         -
        output = crate::protocol_serde::shape_update_function_url_config::de_update_function_url_config(_response_body, output)
  131         -
            .map_err(crate::operation::update_function_url_config::UpdateFunctionUrlConfigError::unhandled)?;
  132         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  133         -
        crate::serde_util::update_function_url_config_output_output_correct_errors(output)
  134         -
            .build()
  135         -
            .map_err(crate::operation::update_function_url_config::UpdateFunctionUrlConfigError::unhandled)?
  136         -
    })
  137         -
}
  138         -
  139         -
pub fn ser_update_function_url_config_input(
  140         -
    input: &crate::operation::update_function_url_config::UpdateFunctionUrlConfigInput,
  141         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  142         -
    let mut out = String::new();
  143         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  144         -
    crate::protocol_serde::shape_update_function_url_config_input::ser_update_function_url_config_input_input(&mut object, input)?;
  145         -
    object.finish();
  146         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  147         -
}
  148         -
  149         -
pub(crate) fn de_update_function_url_config(
  150         -
    _value: &[u8],
  151         -
    mut builder: crate::operation::update_function_url_config::builders::UpdateFunctionUrlConfigOutputBuilder,
  152         -
) -> ::std::result::Result<
  153         -
    crate::operation::update_function_url_config::builders::UpdateFunctionUrlConfigOutputBuilder,
  154         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  155         -
> {
  156         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  157         -
    let tokens = &mut tokens_owned;
  158         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  159         -
    loop {
  160         -
        match tokens.next().transpose()? {
  161         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  162         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  163         -
                "AuthType" => {
  164         -
                    builder = builder.set_auth_type(
  165         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  166         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::FunctionUrlAuthType::from(u.as_ref())))
  167         -
                            .transpose()?,
  168         -
                    );
  169         -
                }
  170         -
                "Cors" => {
  171         -
                    builder = builder.set_cors(crate::protocol_serde::shape_cors::de_cors(tokens, _value)?);
  172         -
                }
  173         -
                "CreationTime" => {
  174         -
                    builder = builder.set_creation_time(
  175         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  176         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  177         -
                            .transpose()?,
  178         -
                    );
  179         -
                }
  180         -
                "FunctionArn" => {
  181         -
                    builder = builder.set_function_arn(
  182         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  183         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  184         -
                            .transpose()?,
  185         -
                    );
  186         -
                }
  187         -
                "FunctionUrl" => {
  188         -
                    builder = builder.set_function_url(
  189         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  190         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  191         -
                            .transpose()?,
  192         -
                    );
  193         -
                }
  194         -
                "InvokeMode" => {
  195         -
                    builder = builder.set_invoke_mode(
  196         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  197         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::InvokeMode::from(u.as_ref())))
  198         -
                            .transpose()?,
  199         -
                    );
  200         -
                }
  201         -
                "LastModifiedTime" => {
  202         -
                    builder = builder.set_last_modified_time(
  203         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  204         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  205         -
                            .transpose()?,
  206         -
                    );
  207         -
                }
  208         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  209         -
            },
  210         -
            other => {
  211         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  212         -
                    "expected object key or end object, found: {other:?}"
  213         -
                )))
  214         -
            }
  215         -
        }
  216         -
    }
  217         -
    if tokens.next().is_some() {
  218         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  219         -
            "found more JSON tokens after completing parsing",
  220         -
        ));
  221         -
    }
  222         -
    Ok(builder)
  223         -
}

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

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_update_function_url_config_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::update_function_url_config::UpdateFunctionUrlConfigInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.auth_type {
    7         -
        object.key("AuthType").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.cors {
   10         -
        #[allow(unused_mut)]
   11         -
        let mut object_3 = object.key("Cors").start_object();
   12         -
        crate::protocol_serde::shape_cors::ser_cors(&mut object_3, var_2)?;
   13         -
        object_3.finish();
   14         -
    }
   15         -
    if let Some(var_4) = &input.invoke_mode {
   16         -
        object.key("InvokeMode").string(var_4.as_str());
   17         -
    }
   18         -
    Ok(())
   19         -
}

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

@@ -1,0 +28,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_vpc_config(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::VpcConfig,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.subnet_ids {
    7         -
        let mut array_2 = object.key("SubnetIds").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.security_group_ids {
   16         -
        let mut array_5 = object.key("SecurityGroupIds").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.ipv6_allowed_for_dual_stack {
   25         -
        object.key("Ipv6AllowedForDualStack").boolean(*var_7);
   26         -
    }
   27         -
    Ok(())
   28         -
}

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

@@ -1,0 +51,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_vpc_config_response<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::VpcConfigResponse>, ::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::VpcConfigResponseBuilder::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         -
                        "SubnetIds" => {
   19         -
                            builder = builder.set_subnet_ids(crate::protocol_serde::shape_subnet_ids::de_subnet_ids(tokens, _value)?);
   20         -
                        }
   21         -
                        "SecurityGroupIds" => {
   22         -
                            builder = builder
   23         -
                                .set_security_group_ids(crate::protocol_serde::shape_security_group_ids::de_security_group_ids(tokens, _value)?);
   24         -
                        }
   25         -
                        "VpcId" => {
   26         -
                            builder = builder.set_vpc_id(
   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         -
                        "Ipv6AllowedForDualStack" => {
   33         -
                            builder =
   34         -
                                builder.set_ipv6_allowed_for_dual_stack(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
   35         -
                        }
   36         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   37         -
                    },
   38         -
                    other => {
   39         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   40         -
                            "expected object key or end object, found: {other:?}"
   41         -
                        )))
   42         -
                    }
   43         -
                }
   44         -
            }
   45         -
            Ok(Some(builder.build()))
   46         -
        }
   47         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   48         -
            "expected start object or null",
   49         -
        )),
   50         -
    }
   51         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/serde_util.rs

@@ -1,0 +229,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn create_code_signing_config_output_output_correct_errors(
    3         -
    mut builder: crate::operation::create_code_signing_config::builders::CreateCodeSigningConfigOutputBuilder,
    4         -
) -> crate::operation::create_code_signing_config::builders::CreateCodeSigningConfigOutputBuilder {
    5         -
    if builder.code_signing_config.is_none() {
    6         -
        builder.code_signing_config = {
    7         -
            let builder = crate::types::builders::CodeSigningConfigBuilder::default();
    8         -
            crate::serde_util::code_signing_config_correct_errors(builder).build().ok()
    9         -
        }
   10         -
    }
   11         -
    builder
   12         -
}
   13         -
   14         -
pub(crate) fn create_function_url_config_output_output_correct_errors(
   15         -
    mut builder: crate::operation::create_function_url_config::builders::CreateFunctionUrlConfigOutputBuilder,
   16         -
) -> crate::operation::create_function_url_config::builders::CreateFunctionUrlConfigOutputBuilder {
   17         -
    if builder.function_url.is_none() {
   18         -
        builder.function_url = Some(Default::default())
   19         -
    }
   20         -
    if builder.function_arn.is_none() {
   21         -
        builder.function_arn = Some(Default::default())
   22         -
    }
   23         -
    if builder.auth_type.is_none() {
   24         -
        builder.auth_type = "no value was set".parse::<crate::types::FunctionUrlAuthType>().ok()
   25         -
    }
   26         -
    if builder.creation_time.is_none() {
   27         -
        builder.creation_time = Some(Default::default())
   28         -
    }
   29         -
    builder
   30         -
}
   31         -
   32         -
pub(crate) fn get_code_signing_config_output_output_correct_errors(
   33         -
    mut builder: crate::operation::get_code_signing_config::builders::GetCodeSigningConfigOutputBuilder,
   34         -
) -> crate::operation::get_code_signing_config::builders::GetCodeSigningConfigOutputBuilder {
   35         -
    if builder.code_signing_config.is_none() {
   36         -
        builder.code_signing_config = {
   37         -
            let builder = crate::types::builders::CodeSigningConfigBuilder::default();
   38         -
            crate::serde_util::code_signing_config_correct_errors(builder).build().ok()
   39         -
        }
   40         -
    }
   41         -
    builder
   42         -
}
   43         -
   44         -
pub(crate) fn get_function_code_signing_config_output_output_correct_errors(
   45         -
    mut builder: crate::operation::get_function_code_signing_config::builders::GetFunctionCodeSigningConfigOutputBuilder,
   46         -
) -> crate::operation::get_function_code_signing_config::builders::GetFunctionCodeSigningConfigOutputBuilder {
   47         -
    if builder.code_signing_config_arn.is_none() {
   48         -
        builder.code_signing_config_arn = Some(Default::default())
   49         -
    }
   50         -
    if builder.function_name.is_none() {
   51         -
        builder.function_name = Some(Default::default())
   52         -
    }
   53         -
    builder
   54         -
}
   55         -
   56         -
pub(crate) fn get_function_url_config_output_output_correct_errors(
   57         -
    mut builder: crate::operation::get_function_url_config::builders::GetFunctionUrlConfigOutputBuilder,
   58         -
) -> crate::operation::get_function_url_config::builders::GetFunctionUrlConfigOutputBuilder {
   59         -
    if builder.function_url.is_none() {
   60         -
        builder.function_url = Some(Default::default())
   61         -
    }
   62         -
    if builder.function_arn.is_none() {
   63         -
        builder.function_arn = Some(Default::default())
   64         -
    }
   65         -
    if builder.auth_type.is_none() {
   66         -
        builder.auth_type = "no value was set".parse::<crate::types::FunctionUrlAuthType>().ok()
   67         -
    }
   68         -
    if builder.creation_time.is_none() {
   69         -
        builder.creation_time = Some(Default::default())
   70         -
    }
   71         -
    if builder.last_modified_time.is_none() {
   72         -
        builder.last_modified_time = Some(Default::default())
   73         -
    }
   74         -
    builder
   75         -
}
   76         -
   77         -
pub(crate) fn list_function_url_configs_output_output_correct_errors(
   78         -
    mut builder: crate::operation::list_function_url_configs::builders::ListFunctionUrlConfigsOutputBuilder,
   79         -
) -> crate::operation::list_function_url_configs::builders::ListFunctionUrlConfigsOutputBuilder {
   80         -
    if builder.function_url_configs.is_none() {
   81         -
        builder.function_url_configs = Some(Default::default())
   82         -
    }
   83         -
    builder
   84         -
}
   85         -
   86         -
pub(crate) fn put_function_code_signing_config_output_output_correct_errors(
   87         -
    mut builder: crate::operation::put_function_code_signing_config::builders::PutFunctionCodeSigningConfigOutputBuilder,
   88         -
) -> crate::operation::put_function_code_signing_config::builders::PutFunctionCodeSigningConfigOutputBuilder {
   89         -
    if builder.code_signing_config_arn.is_none() {
   90         -
        builder.code_signing_config_arn = Some(Default::default())
   91         -
    }
   92         -
    if builder.function_name.is_none() {
   93         -
        builder.function_name = Some(Default::default())
   94         -
    }
   95         -
    builder
   96         -
}
   97         -
   98         -
pub(crate) fn put_runtime_management_config_output_output_correct_errors(
   99         -
    mut builder: crate::operation::put_runtime_management_config::builders::PutRuntimeManagementConfigOutputBuilder,
  100         -
) -> crate::operation::put_runtime_management_config::builders::PutRuntimeManagementConfigOutputBuilder {
  101         -
    if builder.update_runtime_on.is_none() {
  102         -
        builder.update_runtime_on = "no value was set".parse::<crate::types::UpdateRuntimeOn>().ok()
  103         -
    }
  104         -
    if builder.function_arn.is_none() {
  105         -
        builder.function_arn = Some(Default::default())
  106         -
    }
  107         -
    builder
  108         -
}
  109         -
  110         -
pub(crate) fn update_code_signing_config_output_output_correct_errors(
  111         -
    mut builder: crate::operation::update_code_signing_config::builders::UpdateCodeSigningConfigOutputBuilder,
  112         -
) -> crate::operation::update_code_signing_config::builders::UpdateCodeSigningConfigOutputBuilder {
  113         -
    if builder.code_signing_config.is_none() {
  114         -
        builder.code_signing_config = {
  115         -
            let builder = crate::types::builders::CodeSigningConfigBuilder::default();
  116         -
            crate::serde_util::code_signing_config_correct_errors(builder).build().ok()
  117         -
        }
  118         -
    }
  119         -
    builder
  120         -
}
  121         -
  122         -
pub(crate) fn update_function_url_config_output_output_correct_errors(
  123         -
    mut builder: crate::operation::update_function_url_config::builders::UpdateFunctionUrlConfigOutputBuilder,
  124         -
) -> crate::operation::update_function_url_config::builders::UpdateFunctionUrlConfigOutputBuilder {
  125         -
    if builder.function_url.is_none() {
  126         -
        builder.function_url = Some(Default::default())
  127         -
    }
  128         -
    if builder.function_arn.is_none() {
  129         -
        builder.function_arn = Some(Default::default())
  130         -
    }
  131         -
    if builder.auth_type.is_none() {
  132         -
        builder.auth_type = "no value was set".parse::<crate::types::FunctionUrlAuthType>().ok()
  133         -
    }
  134         -
    if builder.creation_time.is_none() {
  135         -
        builder.creation_time = Some(Default::default())
  136         -
    }
  137         -
    if builder.last_modified_time.is_none() {
  138         -
        builder.last_modified_time = Some(Default::default())
  139         -
    }
  140         -
    builder
  141         -
}
  142         -
  143         -
pub(crate) fn code_signing_config_correct_errors(
  144         -
    mut builder: crate::types::builders::CodeSigningConfigBuilder,
  145         -
) -> crate::types::builders::CodeSigningConfigBuilder {
  146         -
    if builder.code_signing_config_id.is_none() {
  147         -
        builder.code_signing_config_id = Some(Default::default())
  148         -
    }
  149         -
    if builder.code_signing_config_arn.is_none() {
  150         -
        builder.code_signing_config_arn = Some(Default::default())
  151         -
    }
  152         -
    if builder.allowed_publishers.is_none() {
  153         -
        builder.allowed_publishers = {
  154         -
            let builder = crate::types::builders::AllowedPublishersBuilder::default();
  155         -
            crate::serde_util::allowed_publishers_correct_errors(builder).build().ok()
  156         -
        }
  157         -
    }
  158         -
    if builder.code_signing_policies.is_none() {
  159         -
        builder.code_signing_policies = {
  160         -
            let builder = crate::types::builders::CodeSigningPoliciesBuilder::default();
  161         -
            Some(builder.build())
  162         -
        }
  163         -
    }
  164         -
    if builder.last_modified.is_none() {
  165         -
        builder.last_modified = Some(Default::default())
  166         -
    }
  167         -
    builder
  168         -
}
  169         -
  170         -
pub(crate) fn ephemeral_storage_correct_errors(
  171         -
    mut builder: crate::types::builders::EphemeralStorageBuilder,
  172         -
) -> crate::types::builders::EphemeralStorageBuilder {
  173         -
    if builder.size.is_none() {
  174         -
        builder.size = Some(Default::default())
  175         -
    }
  176         -
    builder
  177         -
}
  178         -
  179         -
pub(crate) fn tags_error_correct_errors(mut builder: crate::types::builders::TagsErrorBuilder) -> crate::types::builders::TagsErrorBuilder {
  180         -
    if builder.error_code.is_none() {
  181         -
        builder.error_code = Some(Default::default())
  182         -
    }
  183         -
    if builder.message.is_none() {
  184         -
        builder.message = Some(Default::default())
  185         -
    }
  186         -
    builder
  187         -
}
  188         -
  189         -
pub(crate) fn allowed_publishers_correct_errors(
  190         -
    mut builder: crate::types::builders::AllowedPublishersBuilder,
  191         -
) -> crate::types::builders::AllowedPublishersBuilder {
  192         -
    if builder.signing_profile_version_arns.is_none() {
  193         -
        builder.signing_profile_version_arns = Some(Default::default())
  194         -
    }
  195         -
    builder
  196         -
}
  197         -
  198         -
pub(crate) fn file_system_config_correct_errors(
  199         -
    mut builder: crate::types::builders::FileSystemConfigBuilder,
  200         -
) -> crate::types::builders::FileSystemConfigBuilder {
  201         -
    if builder.arn.is_none() {
  202         -
        builder.arn = Some(Default::default())
  203         -
    }
  204         -
    if builder.local_mount_path.is_none() {
  205         -
        builder.local_mount_path = Some(Default::default())
  206         -
    }
  207         -
    builder
  208         -
}
  209         -
  210         -
pub(crate) fn function_url_config_correct_errors(
  211         -
    mut builder: crate::types::builders::FunctionUrlConfigBuilder,
  212         -
) -> crate::types::builders::FunctionUrlConfigBuilder {
  213         -
    if builder.function_url.is_none() {
  214         -
        builder.function_url = Some(Default::default())
  215         -
    }
  216         -
    if builder.function_arn.is_none() {
  217         -
        builder.function_arn = Some(Default::default())
  218         -
    }
  219         -
    if builder.creation_time.is_none() {
  220         -
        builder.creation_time = Some(Default::default())
  221         -
    }
  222         -
    if builder.last_modified_time.is_none() {
  223         -
        builder.last_modified_time = Some(Default::default())
  224         -
    }
  225         -
    if builder.auth_type.is_none() {
  226         -
        builder.auth_type = "no value was set".parse::<crate::types::FunctionUrlAuthType>().ok()
  227         -
    }
  228         -
    builder
  229         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/serialization_settings.rs

@@ -1,0 +89,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/*
    3         -
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    4         -
 * SPDX-License-Identifier: Apache-2.0
    5         -
 */
    6         -
    7         -
#![allow(dead_code)]
    8         -
    9         -
use aws_smithy_http::header::set_request_header_if_absent;
   10         -
use aws_smithy_types::config_bag::{Storable, StoreReplace};
   11         -
use http_1x::header::{HeaderName, CONTENT_LENGTH, CONTENT_TYPE};
   12         -
   13         -
/// Configuration for how default protocol headers are serialized
   14         -
#[derive(Clone, Debug, Default)]
   15         -
pub(crate) struct HeaderSerializationSettings {
   16         -
    omit_default_content_length: bool,
   17         -
    omit_default_content_type: bool,
   18         -
}
   19         -
   20         -
impl HeaderSerializationSettings {
   21         -
    /// Creates new [`HeaderSerializationSettings`]
   22         -
    pub(crate) fn new() -> Self {
   23         -
        Default::default()
   24         -
    }
   25         -
   26         -
    /// Omit the default `Content-Length` header during serialization
   27         -
    pub(crate) fn omit_default_content_length(self) -> Self {
   28         -
        Self {
   29         -
            omit_default_content_length: true,
   30         -
            ..self
   31         -
        }
   32         -
    }
   33         -
   34         -
    /// Omit the default `Content-Type` header during serialization
   35         -
    pub(crate) fn omit_default_content_type(self) -> Self {
   36         -
        Self {
   37         -
            omit_default_content_type: true,
   38         -
            ..self
   39         -
        }
   40         -
    }
   41         -
   42         -
    /// Returns true if the given default header name should be serialized
   43         -
    fn include_header(&self, header: &HeaderName) -> bool {
   44         -
        (!self.omit_default_content_length || header != CONTENT_LENGTH) && (!self.omit_default_content_type || header != CONTENT_TYPE)
   45         -
    }
   46         -
   47         -
    /// Sets a default header on the given request builder if it should be serialized
   48         -
    pub(crate) fn set_default_header(
   49         -
        &self,
   50         -
        mut request: http_1x::request::Builder,
   51         -
        header_name: HeaderName,
   52         -
        value: &str,
   53         -
    ) -> http_1x::request::Builder {
   54         -
        if self.include_header(&header_name) {
   55         -
            request = set_request_header_if_absent(request, header_name, value);
   56         -
        }
   57         -
        request
   58         -
    }
   59         -
}
   60         -
   61         -
impl Storable for HeaderSerializationSettings {
   62         -
    type Storer = StoreReplace<Self>;
   63         -
}
   64         -
   65         -
#[cfg(test)]
   66         -
mod tests {
   67         -
    use super::*;
   68         -
   69         -
    #[test]
   70         -
    fn test_include_header() {
   71         -
        let settings = HeaderSerializationSettings::default();
   72         -
        assert!(settings.include_header(&CONTENT_LENGTH));
   73         -
        assert!(settings.include_header(&CONTENT_TYPE));
   74         -
   75         -
        let settings = HeaderSerializationSettings::default().omit_default_content_length();
   76         -
        assert!(!settings.include_header(&CONTENT_LENGTH));
   77         -
        assert!(settings.include_header(&CONTENT_TYPE));
   78         -
   79         -
        let settings = HeaderSerializationSettings::default().omit_default_content_type();
   80         -
        assert!(settings.include_header(&CONTENT_LENGTH));
   81         -
        assert!(!settings.include_header(&CONTENT_TYPE));
   82         -
   83         -
        let settings = HeaderSerializationSettings::default()
   84         -
            .omit_default_content_type()
   85         -
            .omit_default_content_length();
   86         -
        assert!(!settings.include_header(&CONTENT_LENGTH));
   87         -
        assert!(!settings.include_header(&CONTENT_TYPE));
   88         -
    }
   89         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/types/_account_limit.rs

@@ -15,15 +194,205 @@
   35     35   
    /// <p>The maximum number of simultaneous function executions, minus the capacity that's reserved for individual functions with <code>PutFunctionConcurrency</code>.</p>
   36     36   
    pub fn unreserved_concurrent_executions(&self) -> ::std::option::Option<i32> {
   37     37   
        self.unreserved_concurrent_executions
   38     38   
    }
   39     39   
}
   40     40   
static ACCOUNTLIMIT_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
   41     41   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.lambda#AccountLimit", "com.amazonaws.lambda", "AccountLimit");
   42     42   
static ACCOUNTLIMIT_MEMBER_TOTAL_CODE_SIZE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   43     43   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.lambda#AccountLimit$TotalCodeSize", "com.amazonaws.lambda", "AccountLimit"),
   44     44   
    ::aws_smithy_schema::ShapeType::Long,
   45         -
    "total_code_size",
          45  +
    "TotalCodeSize",
   46     46   
    0,
   47     47   
);
   48     48   
static ACCOUNTLIMIT_MEMBER_CODE_SIZE_UNZIPPED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   49     49   
    ::aws_smithy_schema::ShapeId::from_static(
   50     50   
        "com.amazonaws.lambda#AccountLimit$CodeSizeUnzipped",
   51     51   
        "com.amazonaws.lambda",
   52     52   
        "AccountLimit",
   53     53   
    ),
   54     54   
    ::aws_smithy_schema::ShapeType::Long,
   55         -
    "code_size_unzipped",
          55  +
    "CodeSizeUnzipped",
   56     56   
    1,
   57     57   
);
   58     58   
static ACCOUNTLIMIT_MEMBER_CODE_SIZE_ZIPPED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   59     59   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.lambda#AccountLimit$CodeSizeZipped", "com.amazonaws.lambda", "AccountLimit"),
   60     60   
    ::aws_smithy_schema::ShapeType::Long,
   61         -
    "code_size_zipped",
          61  +
    "CodeSizeZipped",
   62     62   
    2,
   63     63   
);
   64     64   
static ACCOUNTLIMIT_MEMBER_CONCURRENT_EXECUTIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   65     65   
    ::aws_smithy_schema::ShapeId::from_static(
   66     66   
        "com.amazonaws.lambda#AccountLimit$ConcurrentExecutions",
   67     67   
        "com.amazonaws.lambda",
   68     68   
        "AccountLimit",
   69     69   
    ),
   70     70   
    ::aws_smithy_schema::ShapeType::Integer,
   71         -
    "concurrent_executions",
          71  +
    "ConcurrentExecutions",
   72     72   
    3,
   73     73   
);
   74     74   
static ACCOUNTLIMIT_MEMBER_UNRESERVED_CONCURRENT_EXECUTIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   75     75   
    ::aws_smithy_schema::ShapeId::from_static(
   76     76   
        "com.amazonaws.lambda#AccountLimit$UnreservedConcurrentExecutions",
   77     77   
        "com.amazonaws.lambda",
   78     78   
        "AccountLimit",
   79     79   
    ),
   80     80   
    ::aws_smithy_schema::ShapeType::Integer,
   81         -
    "unreserved_concurrent_executions",
          81  +
    "UnreservedConcurrentExecutions",
   82     82   
    4,
   83     83   
);
   84     84   
static ACCOUNTLIMIT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   85     85   
    ACCOUNTLIMIT_SCHEMA_ID,
   86     86   
    ::aws_smithy_schema::ShapeType::Structure,
   87     87   
    &[
   88     88   
        &ACCOUNTLIMIT_MEMBER_TOTAL_CODE_SIZE,
   89     89   
        &ACCOUNTLIMIT_MEMBER_CODE_SIZE_UNZIPPED,
   90     90   
        &ACCOUNTLIMIT_MEMBER_CODE_SIZE_ZIPPED,
   91     91   
        &ACCOUNTLIMIT_MEMBER_CONCURRENT_EXECUTIONS,
   92     92   
        &ACCOUNTLIMIT_MEMBER_UNRESERVED_CONCURRENT_EXECUTIONS,
   93     93   
    ],
   94     94   
);
   95     95   
impl AccountLimit {
   96     96   
    /// The schema for this shape.
   97     97   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ACCOUNTLIMIT_SCHEMA;
   98     98   
}
   99     99   
impl ::aws_smithy_schema::serde::SerializableStruct for AccountLimit {
  100    100   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  101    101   
    fn serialize_members(
  102    102   
        &self,
  103    103   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  104    104   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  105    105   
        {
  106    106   
            let val = &self.total_code_size;
  107    107   
            ser.write_long(&ACCOUNTLIMIT_MEMBER_TOTAL_CODE_SIZE, *val)?;
  108    108   
        }
  109    109   
        {
  110    110   
            let val = &self.code_size_unzipped;
  111    111   
            ser.write_long(&ACCOUNTLIMIT_MEMBER_CODE_SIZE_UNZIPPED, *val)?;
  112    112   
        }
  113    113   
        {
  114    114   
            let val = &self.code_size_zipped;
  115    115   
            ser.write_long(&ACCOUNTLIMIT_MEMBER_CODE_SIZE_ZIPPED, *val)?;
  116    116   
        }
  117    117   
        {
  118    118   
            let val = &self.concurrent_executions;
  119    119   
            ser.write_integer(&ACCOUNTLIMIT_MEMBER_CONCURRENT_EXECUTIONS, *val)?;
  120    120   
        }
  121    121   
        if let Some(ref val) = self.unreserved_concurrent_executions {
  122    122   
            ser.write_integer(&ACCOUNTLIMIT_MEMBER_UNRESERVED_CONCURRENT_EXECUTIONS, *val)?;
  123    123   
        }
  124    124   
        Ok(())
  125    125   
    }
  126    126   
}
  127    127   
impl AccountLimit {
  128    128   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  129         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  130         -
        deserializer: &mut D,
         129  +
    pub fn deserialize(
         130  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  131    131   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  132    132   
        #[allow(unused_variables, unused_mut)]
  133    133   
        let mut builder = Self::builder();
  134    134   
        #[allow(
  135    135   
            unused_variables,
  136    136   
            unreachable_code,
  137    137   
            clippy::single_match,
  138    138   
            clippy::match_single_binding,
  139    139   
            clippy::diverging_sub_expression
  140    140   
        )]
  141         -
        deserializer.read_struct(&ACCOUNTLIMIT_SCHEMA, (), |_, member, deser| {
         141  +
        deserializer.read_struct(&ACCOUNTLIMIT_SCHEMA, &mut |member, deser| {
  142    142   
            match member.member_index() {
  143    143   
                Some(0) => {
  144    144   
                    builder.total_code_size = Some(deser.read_long(member)?);
  145    145   
                }
  146    146   
                Some(1) => {
  147    147   
                    builder.code_size_unzipped = Some(deser.read_long(member)?);
  148    148   
                }
  149    149   
                Some(2) => {
  150    150   
                    builder.code_size_zipped = Some(deser.read_long(member)?);
  151    151   
                }
  152    152   
                Some(3) => {
  153    153   
                    builder.concurrent_executions = Some(deser.read_integer(member)?);
  154    154   
                }
  155    155   
                Some(4) => {
  156    156   
                    builder.unreserved_concurrent_executions = Some(deser.read_integer(member)?);
  157    157   
                }
  158    158   
                _ => {}
  159    159   
            }
  160    160   
            Ok(())
  161    161   
        })?;
  162    162   
        Ok(builder.build())
  163    163   
    }
  164    164   
}
         165  +
impl AccountLimit {
         166  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         167  +
    pub fn deserialize_with_response(
         168  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         169  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         170  +
        _status: u16,
         171  +
        _body: &[u8],
         172  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         173  +
        Self::deserialize(deserializer)
         174  +
    }
         175  +
}
  165    176   
impl AccountLimit {
  166    177   
    /// Creates a new builder-style object to manufacture [`AccountLimit`](crate::types::AccountLimit).
  167    178   
    pub fn builder() -> crate::types::builders::AccountLimitBuilder {
  168    179   
        crate::types::builders::AccountLimitBuilder::default()
  169    180   
    }
  170    181   
}
  171    182   
  172    183   
/// A builder for [`AccountLimit`](crate::types::AccountLimit).
  173    184   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  174    185   
#[non_exhaustive]