AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_managed_agent.rs

@@ -1,0 +60,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_managed_agent<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::ManagedAgent>, ::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::ManagedAgentBuilder::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         -
                        "lastStartedAt" => {
   19         -
                            builder = builder.set_last_started_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   20         -
                                tokens.next(),
   21         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   22         -
                            )?);
   23         -
                        }
   24         -
                        "name" => {
   25         -
                            builder = builder.set_name(
   26         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   27         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::ManagedAgentName::from(u.as_ref())))
   28         -
                                    .transpose()?,
   29         -
                            );
   30         -
                        }
   31         -
                        "reason" => {
   32         -
                            builder = builder.set_reason(
   33         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   34         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   35         -
                                    .transpose()?,
   36         -
                            );
   37         -
                        }
   38         -
                        "lastStatus" => {
   39         -
                            builder = builder.set_last_status(
   40         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   41         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   42         -
                                    .transpose()?,
   43         -
                            );
   44         -
                        }
   45         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   46         -
                    },
   47         -
                    other => {
   48         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   49         -
                            "expected object key or end object, found: {other:?}"
   50         -
                        )))
   51         -
                    }
   52         -
                }
   53         -
            }
   54         -
            Ok(Some(builder.build()))
   55         -
        }
   56         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   57         -
            "expected start object or null",
   58         -
        )),
   59         -
    }
   60         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_managed_agent_state_change.rs

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_managed_agent_state_change(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::ManagedAgentStateChange,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("containerName").string(input.container_name.as_str());
    8         -
    }
    9         -
    {
   10         -
        object.key("managedAgentName").string(input.managed_agent_name.as_str());
   11         -
    }
   12         -
    {
   13         -
        object.key("status").string(input.status.as_str());
   14         -
    }
   15         -
    if let Some(var_1) = &input.reason {
   16         -
        object.key("reason").string(var_1.as_str());
   17         -
    }
   18         -
    Ok(())
   19         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_managed_agents.rs

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_managed_agents<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::ManagedAgent>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   12         -
            let mut items = Vec::new();
   13         -
            loop {
   14         -
                match tokens.peek() {
   15         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   16         -
                        tokens.next().transpose().unwrap();
   17         -
                        break;
   18         -
                    }
   19         -
                    _ => {
   20         -
                        let value = crate::protocol_serde::shape_managed_agent::de_managed_agent(tokens, _value)?;
   21         -
                        if let Some(value) = value {
   22         -
                            items.push(value);
   23         -
                        } else {
   24         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25         -
                                "dense list cannot contain null values",
   26         -
                            ));
   27         -
                        }
   28         -
                    }
   29         -
                }
   30         -
            }
   31         -
            Ok(Some(items))
   32         -
        }
   33         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "expected start array or null",
   35         -
        )),
   36         -
    }
   37         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_managed_instances_network_configuration.rs

@@ -1,0 +64,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_managed_instances_network_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::ManagedInstancesNetworkConfiguration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.subnets {
    7         -
        let mut array_2 = object.key("subnets").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_groups {
   16         -
        let mut array_5 = object.key("securityGroups").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         -
    Ok(())
   25         -
}
   26         -
   27         -
pub(crate) fn de_managed_instances_network_configuration<'a, I>(
   28         -
    tokens: &mut ::std::iter::Peekable<I>,
   29         -
    _value: &'a [u8],
   30         -
) -> ::std::result::Result<Option<crate::types::ManagedInstancesNetworkConfiguration>, ::aws_smithy_json::deserialize::error::DeserializeError>
   31         -
where
   32         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   33         -
{
   34         -
    match tokens.next().transpose()? {
   35         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   36         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   37         -
            #[allow(unused_mut)]
   38         -
            let mut builder = crate::types::builders::ManagedInstancesNetworkConfigurationBuilder::default();
   39         -
            loop {
   40         -
                match tokens.next().transpose()? {
   41         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   42         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   43         -
                        "subnets" => {
   44         -
                            builder = builder.set_subnets(crate::protocol_serde::shape_string_list::de_string_list(tokens, _value)?);
   45         -
                        }
   46         -
                        "securityGroups" => {
   47         -
                            builder = builder.set_security_groups(crate::protocol_serde::shape_string_list::de_string_list(tokens, _value)?);
   48         -
                        }
   49         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   50         -
                    },
   51         -
                    other => {
   52         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   53         -
                            "expected object key or end object, found: {other:?}"
   54         -
                        )))
   55         -
                    }
   56         -
                }
   57         -
            }
   58         -
            Ok(Some(builder.build()))
   59         -
        }
   60         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   61         -
            "expected start object or null",
   62         -
        )),
   63         -
    }
   64         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_managed_instances_provider.rs

@@ -1,0 +52,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_managed_instances_provider<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::ManagedInstancesProvider>, ::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::ManagedInstancesProviderBuilder::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         -
                        "infrastructureRoleArn" => {
   19         -
                            builder = builder.set_infrastructure_role_arn(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "instanceLaunchTemplate" => {
   26         -
                            builder = builder.set_instance_launch_template(
   27         -
                                crate::protocol_serde::shape_instance_launch_template::de_instance_launch_template(tokens, _value)?,
   28         -
                            );
   29         -
                        }
   30         -
                        "propagateTags" => {
   31         -
                            builder = builder.set_propagate_tags(
   32         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   33         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::PropagateMiTags::from(u.as_ref())))
   34         -
                                    .transpose()?,
   35         -
                            );
   36         -
                        }
   37         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   38         -
                    },
   39         -
                    other => {
   40         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   41         -
                            "expected object key or end object, found: {other:?}"
   42         -
                        )))
   43         -
                    }
   44         -
                }
   45         -
            }
   46         -
            Ok(Some(builder.build()))
   47         -
        }
   48         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   49         -
            "expected start object or null",
   50         -
        )),
   51         -
    }
   52         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_managed_instances_storage_configuration.rs

@@ -1,0 +53,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_managed_instances_storage_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::ManagedInstancesStorageConfiguration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.storage_size_gib {
    7         -
        object.key("storageSizeGiB").number(
    8         -
            #[allow(clippy::useless_conversion)]
    9         -
            ::aws_smithy_types::Number::NegInt((*var_1).into()),
   10         -
        );
   11         -
    }
   12         -
    Ok(())
   13         -
}
   14         -
   15         -
pub(crate) fn de_managed_instances_storage_configuration<'a, I>(
   16         -
    tokens: &mut ::std::iter::Peekable<I>,
   17         -
    _value: &'a [u8],
   18         -
) -> ::std::result::Result<Option<crate::types::ManagedInstancesStorageConfiguration>, ::aws_smithy_json::deserialize::error::DeserializeError>
   19         -
where
   20         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   21         -
{
   22         -
    match tokens.next().transpose()? {
   23         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   24         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   25         -
            #[allow(unused_mut)]
   26         -
            let mut builder = crate::types::builders::ManagedInstancesStorageConfigurationBuilder::default();
   27         -
            loop {
   28         -
                match tokens.next().transpose()? {
   29         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   30         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   31         -
                        "storageSizeGiB" => {
   32         -
                            builder = builder.set_storage_size_gib(
   33         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   34         -
                                    .map(i32::try_from)
   35         -
                                    .transpose()?,
   36         -
                            );
   37         -
                        }
   38         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   39         -
                    },
   40         -
                    other => {
   41         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   42         -
                            "expected object key or end object, found: {other:?}"
   43         -
                        )))
   44         -
                    }
   45         -
                }
   46         -
            }
   47         -
            Ok(Some(builder.build()))
   48         -
        }
   49         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   50         -
            "expected start object or null",
   51         -
        )),
   52         -
    }
   53         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_managed_scaling.rs

@@ -1,0 +102,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_managed_scaling(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::ManagedScaling,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.status {
    7         -
        object.key("status").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.target_capacity {
   10         -
        object.key("targetCapacity").number(
   11         -
            #[allow(clippy::useless_conversion)]
   12         -
            ::aws_smithy_types::Number::NegInt((*var_2).into()),
   13         -
        );
   14         -
    }
   15         -
    if let Some(var_3) = &input.minimum_scaling_step_size {
   16         -
        object.key("minimumScalingStepSize").number(
   17         -
            #[allow(clippy::useless_conversion)]
   18         -
            ::aws_smithy_types::Number::NegInt((*var_3).into()),
   19         -
        );
   20         -
    }
   21         -
    if let Some(var_4) = &input.maximum_scaling_step_size {
   22         -
        object.key("maximumScalingStepSize").number(
   23         -
            #[allow(clippy::useless_conversion)]
   24         -
            ::aws_smithy_types::Number::NegInt((*var_4).into()),
   25         -
        );
   26         -
    }
   27         -
    if let Some(var_5) = &input.instance_warmup_period {
   28         -
        object.key("instanceWarmupPeriod").number(
   29         -
            #[allow(clippy::useless_conversion)]
   30         -
            ::aws_smithy_types::Number::NegInt((*var_5).into()),
   31         -
        );
   32         -
    }
   33         -
    Ok(())
   34         -
}
   35         -
   36         -
pub(crate) fn de_managed_scaling<'a, I>(
   37         -
    tokens: &mut ::std::iter::Peekable<I>,
   38         -
    _value: &'a [u8],
   39         -
) -> ::std::result::Result<Option<crate::types::ManagedScaling>, ::aws_smithy_json::deserialize::error::DeserializeError>
   40         -
where
   41         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   42         -
{
   43         -
    match tokens.next().transpose()? {
   44         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   45         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   46         -
            #[allow(unused_mut)]
   47         -
            let mut builder = crate::types::builders::ManagedScalingBuilder::default();
   48         -
            loop {
   49         -
                match tokens.next().transpose()? {
   50         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   51         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   52         -
                        "status" => {
   53         -
                            builder = builder.set_status(
   54         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   55         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::ManagedScalingStatus::from(u.as_ref())))
   56         -
                                    .transpose()?,
   57         -
                            );
   58         -
                        }
   59         -
                        "targetCapacity" => {
   60         -
                            builder = builder.set_target_capacity(
   61         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   62         -
                                    .map(i32::try_from)
   63         -
                                    .transpose()?,
   64         -
                            );
   65         -
                        }
   66         -
                        "minimumScalingStepSize" => {
   67         -
                            builder = builder.set_minimum_scaling_step_size(
   68         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   69         -
                                    .map(i32::try_from)
   70         -
                                    .transpose()?,
   71         -
                            );
   72         -
                        }
   73         -
                        "maximumScalingStepSize" => {
   74         -
                            builder = builder.set_maximum_scaling_step_size(
   75         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   76         -
                                    .map(i32::try_from)
   77         -
                                    .transpose()?,
   78         -
                            );
   79         -
                        }
   80         -
                        "instanceWarmupPeriod" => {
   81         -
                            builder = builder.set_instance_warmup_period(
   82         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   83         -
                                    .map(i32::try_from)
   84         -
                                    .transpose()?,
   85         -
                            );
   86         -
                        }
   87         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   88         -
                    },
   89         -
                    other => {
   90         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   91         -
                            "expected object key or end object, found: {other:?}"
   92         -
                        )))
   93         -
                    }
   94         -
                }
   95         -
            }
   96         -
            Ok(Some(builder.build()))
   97         -
        }
   98         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   99         -
            "expected start object or null",
  100         -
        )),
  101         -
    }
  102         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_managed_storage_configuration.rs

@@ -1,0 +60,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_managed_storage_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::ManagedStorageConfiguration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.kms_key_id {
    7         -
        object.key("kmsKeyId").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.fargate_ephemeral_storage_kms_key_id {
   10         -
        object.key("fargateEphemeralStorageKmsKeyId").string(var_2.as_str());
   11         -
    }
   12         -
    Ok(())
   13         -
}
   14         -
   15         -
pub(crate) fn de_managed_storage_configuration<'a, I>(
   16         -
    tokens: &mut ::std::iter::Peekable<I>,
   17         -
    _value: &'a [u8],
   18         -
) -> ::std::result::Result<Option<crate::types::ManagedStorageConfiguration>, ::aws_smithy_json::deserialize::error::DeserializeError>
   19         -
where
   20         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   21         -
{
   22         -
    match tokens.next().transpose()? {
   23         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   24         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   25         -
            #[allow(unused_mut)]
   26         -
            let mut builder = crate::types::builders::ManagedStorageConfigurationBuilder::default();
   27         -
            loop {
   28         -
                match tokens.next().transpose()? {
   29         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   30         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   31         -
                        "kmsKeyId" => {
   32         -
                            builder = builder.set_kms_key_id(
   33         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   34         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   35         -
                                    .transpose()?,
   36         -
                            );
   37         -
                        }
   38         -
                        "fargateEphemeralStorageKmsKeyId" => {
   39         -
                            builder = builder.set_fargate_ephemeral_storage_kms_key_id(
   40         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   41         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   42         -
                                    .transpose()?,
   43         -
                            );
   44         -
                        }
   45         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   46         -
                    },
   47         -
                    other => {
   48         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   49         -
                            "expected object key or end object, found: {other:?}"
   50         -
                        )))
   51         -
                    }
   52         -
                }
   53         -
            }
   54         -
            Ok(Some(builder.build()))
   55         -
        }
   56         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   57         -
            "expected start object or null",
   58         -
        )),
   59         -
    }
   60         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_memory_gib_per_v_cpu_request.rs

@@ -1,0 +60,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_memory_gib_per_v_cpu_request(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::MemoryGiBPerVCpuRequest,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.min {
    7         -
        object.key("min").number(
    8         -
            #[allow(clippy::useless_conversion)]
    9         -
            ::aws_smithy_types::Number::Float((*var_1).into()),
   10         -
        );
   11         -
    }
   12         -
    if let Some(var_2) = &input.max {
   13         -
        object.key("max").number(
   14         -
            #[allow(clippy::useless_conversion)]
   15         -
            ::aws_smithy_types::Number::Float((*var_2).into()),
   16         -
        );
   17         -
    }
   18         -
    Ok(())
   19         -
}
   20         -
   21         -
pub(crate) fn de_memory_gib_per_v_cpu_request<'a, I>(
   22         -
    tokens: &mut ::std::iter::Peekable<I>,
   23         -
    _value: &'a [u8],
   24         -
) -> ::std::result::Result<Option<crate::types::MemoryGiBPerVCpuRequest>, ::aws_smithy_json::deserialize::error::DeserializeError>
   25         -
where
   26         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   27         -
{
   28         -
    match tokens.next().transpose()? {
   29         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   30         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   31         -
            #[allow(unused_mut)]
   32         -
            let mut builder = crate::types::builders::MemoryGiBPerVCpuRequestBuilder::default();
   33         -
            loop {
   34         -
                match tokens.next().transpose()? {
   35         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   36         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   37         -
                        "min" => {
   38         -
                            builder = builder
   39         -
                                .set_min(::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy()));
   40         -
                        }
   41         -
                        "max" => {
   42         -
                            builder = builder
   43         -
                                .set_max(::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy()));
   44         -
                        }
   45         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   46         -
                    },
   47         -
                    other => {
   48         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   49         -
                            "expected object key or end object, found: {other:?}"
   50         -
                        )))
   51         -
                    }
   52         -
                }
   53         -
            }
   54         -
            Ok(Some(builder.build()))
   55         -
        }
   56         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   57         -
            "expected start object or null",
   58         -
        )),
   59         -
    }
   60         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_memory_mib_request.rs

@@ -1,0 +68,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_memory_mib_request(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::MemoryMiBRequest,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("min").number(
    8         -
            #[allow(clippy::useless_conversion)]
    9         -
            ::aws_smithy_types::Number::NegInt((input.min).into()),
   10         -
        );
   11         -
    }
   12         -
    if let Some(var_1) = &input.max {
   13         -
        object.key("max").number(
   14         -
            #[allow(clippy::useless_conversion)]
   15         -
            ::aws_smithy_types::Number::NegInt((*var_1).into()),
   16         -
        );
   17         -
    }
   18         -
    Ok(())
   19         -
}
   20         -
   21         -
pub(crate) fn de_memory_mib_request<'a, I>(
   22         -
    tokens: &mut ::std::iter::Peekable<I>,
   23         -
    _value: &'a [u8],
   24         -
) -> ::std::result::Result<Option<crate::types::MemoryMiBRequest>, ::aws_smithy_json::deserialize::error::DeserializeError>
   25         -
where
   26         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   27         -
{
   28         -
    match tokens.next().transpose()? {
   29         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   30         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   31         -
            #[allow(unused_mut)]
   32         -
            let mut builder = crate::types::builders::MemoryMiBRequestBuilder::default();
   33         -
            loop {
   34         -
                match tokens.next().transpose()? {
   35         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   36         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   37         -
                        "min" => {
   38         -
                            builder = builder.set_min(
   39         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   40         -
                                    .map(i32::try_from)
   41         -
                                    .transpose()?,
   42         -
                            );
   43         -
                        }
   44         -
                        "max" => {
   45         -
                            builder = builder.set_max(
   46         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   47         -
                                    .map(i32::try_from)
   48         -
                                    .transpose()?,
   49         -
                            );
   50         -
                        }
   51         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   52         -
                    },
   53         -
                    other => {
   54         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   55         -
                            "expected object key or end object, found: {other:?}"
   56         -
                        )))
   57         -
                    }
   58         -
                }
   59         -
            }
   60         -
            Ok(Some(crate::serde_util::memory_mib_request_correct_errors(builder).build().map_err(
   61         -
                |err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err),
   62         -
            )?))
   63         -
        }
   64         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   65         -
            "expected start object or null",
   66         -
        )),
   67         -
    }
   68         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_missing_version_exception.rs

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

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_mount_point.rs

@@ -1,0 +66,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_mount_point(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::MountPoint,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.source_volume {
    7         -
        object.key("sourceVolume").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.container_path {
   10         -
        object.key("containerPath").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.read_only {
   13         -
        object.key("readOnly").boolean(*var_3);
   14         -
    }
   15         -
    Ok(())
   16         -
}
   17         -
   18         -
pub(crate) fn de_mount_point<'a, I>(
   19         -
    tokens: &mut ::std::iter::Peekable<I>,
   20         -
    _value: &'a [u8],
   21         -
) -> ::std::result::Result<Option<crate::types::MountPoint>, ::aws_smithy_json::deserialize::error::DeserializeError>
   22         -
where
   23         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   24         -
{
   25         -
    match tokens.next().transpose()? {
   26         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   27         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   28         -
            #[allow(unused_mut)]
   29         -
            let mut builder = crate::types::builders::MountPointBuilder::default();
   30         -
            loop {
   31         -
                match tokens.next().transpose()? {
   32         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   33         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   34         -
                        "sourceVolume" => {
   35         -
                            builder = builder.set_source_volume(
   36         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   37         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   38         -
                                    .transpose()?,
   39         -
                            );
   40         -
                        }
   41         -
                        "containerPath" => {
   42         -
                            builder = builder.set_container_path(
   43         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   44         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   45         -
                                    .transpose()?,
   46         -
                            );
   47         -
                        }
   48         -
                        "readOnly" => {
   49         -
                            builder = builder.set_read_only(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
   50         -
                        }
   51         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   52         -
                    },
   53         -
                    other => {
   54         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   55         -
                            "expected object key or end object, found: {other:?}"
   56         -
                        )))
   57         -
                    }
   58         -
                }
   59         -
            }
   60         -
            Ok(Some(builder.build()))
   61         -
        }
   62         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   63         -
            "expected start object or null",
   64         -
        )),
   65         -
    }
   66         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_mount_point_list.rs

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_mount_point_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::MountPoint>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   12         -
            let mut items = Vec::new();
   13         -
            loop {
   14         -
                match tokens.peek() {
   15         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   16         -
                        tokens.next().transpose().unwrap();
   17         -
                        break;
   18         -
                    }
   19         -
                    _ => {
   20         -
                        let value = crate::protocol_serde::shape_mount_point::de_mount_point(tokens, _value)?;
   21         -
                        if let Some(value) = value {
   22         -
                            items.push(value);
   23         -
                        } else {
   24         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25         -
                                "dense list cannot contain null values",
   26         -
                            ));
   27         -
                        }
   28         -
                    }
   29         -
                }
   30         -
            }
   31         -
            Ok(Some(items))
   32         -
        }
   33         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "expected start array or null",
   35         -
        )),
   36         -
    }
   37         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_namespace_not_found_exception.rs

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

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_network_bandwidth_gbps_request.rs

@@ -1,0 +60,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_network_bandwidth_gbps_request(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::NetworkBandwidthGbpsRequest,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.min {
    7         -
        object.key("min").number(
    8         -
            #[allow(clippy::useless_conversion)]
    9         -
            ::aws_smithy_types::Number::Float((*var_1).into()),
   10         -
        );
   11         -
    }
   12         -
    if let Some(var_2) = &input.max {
   13         -
        object.key("max").number(
   14         -
            #[allow(clippy::useless_conversion)]
   15         -
            ::aws_smithy_types::Number::Float((*var_2).into()),
   16         -
        );
   17         -
    }
   18         -
    Ok(())
   19         -
}
   20         -
   21         -
pub(crate) fn de_network_bandwidth_gbps_request<'a, I>(
   22         -
    tokens: &mut ::std::iter::Peekable<I>,
   23         -
    _value: &'a [u8],
   24         -
) -> ::std::result::Result<Option<crate::types::NetworkBandwidthGbpsRequest>, ::aws_smithy_json::deserialize::error::DeserializeError>
   25         -
where
   26         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   27         -
{
   28         -
    match tokens.next().transpose()? {
   29         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   30         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   31         -
            #[allow(unused_mut)]
   32         -
            let mut builder = crate::types::builders::NetworkBandwidthGbpsRequestBuilder::default();
   33         -
            loop {
   34         -
                match tokens.next().transpose()? {
   35         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   36         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   37         -
                        "min" => {
   38         -
                            builder = builder
   39         -
                                .set_min(::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy()));
   40         -
                        }
   41         -
                        "max" => {
   42         -
                            builder = builder
   43         -
                                .set_max(::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy()));
   44         -
                        }
   45         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   46         -
                    },
   47         -
                    other => {
   48         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   49         -
                            "expected object key or end object, found: {other:?}"
   50         -
                        )))
   51         -
                    }
   52         -
                }
   53         -
            }
   54         -
            Ok(Some(builder.build()))
   55         -
        }
   56         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   57         -
            "expected start object or null",
   58         -
        )),
   59         -
    }
   60         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_network_binding.rs

@@ -1,0 +106,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_network_binding(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::NetworkBinding,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.bind_ip {
    7         -
        object.key("bindIP").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.container_port {
   10         -
        object.key("containerPort").number(
   11         -
            #[allow(clippy::useless_conversion)]
   12         -
            ::aws_smithy_types::Number::NegInt((*var_2).into()),
   13         -
        );
   14         -
    }
   15         -
    if let Some(var_3) = &input.host_port {
   16         -
        object.key("hostPort").number(
   17         -
            #[allow(clippy::useless_conversion)]
   18         -
            ::aws_smithy_types::Number::NegInt((*var_3).into()),
   19         -
        );
   20         -
    }
   21         -
    if let Some(var_4) = &input.protocol {
   22         -
        object.key("protocol").string(var_4.as_str());
   23         -
    }
   24         -
    if let Some(var_5) = &input.container_port_range {
   25         -
        object.key("containerPortRange").string(var_5.as_str());
   26         -
    }
   27         -
    if let Some(var_6) = &input.host_port_range {
   28         -
        object.key("hostPortRange").string(var_6.as_str());
   29         -
    }
   30         -
    Ok(())
   31         -
}
   32         -
   33         -
pub(crate) fn de_network_binding<'a, I>(
   34         -
    tokens: &mut ::std::iter::Peekable<I>,
   35         -
    _value: &'a [u8],
   36         -
) -> ::std::result::Result<Option<crate::types::NetworkBinding>, ::aws_smithy_json::deserialize::error::DeserializeError>
   37         -
where
   38         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   39         -
{
   40         -
    match tokens.next().transpose()? {
   41         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   42         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   43         -
            #[allow(unused_mut)]
   44         -
            let mut builder = crate::types::builders::NetworkBindingBuilder::default();
   45         -
            loop {
   46         -
                match tokens.next().transpose()? {
   47         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   48         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   49         -
                        "bindIP" => {
   50         -
                            builder = builder.set_bind_ip(
   51         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   52         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   53         -
                                    .transpose()?,
   54         -
                            );
   55         -
                        }
   56         -
                        "containerPort" => {
   57         -
                            builder = builder.set_container_port(
   58         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   59         -
                                    .map(i32::try_from)
   60         -
                                    .transpose()?,
   61         -
                            );
   62         -
                        }
   63         -
                        "hostPort" => {
   64         -
                            builder = builder.set_host_port(
   65         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   66         -
                                    .map(i32::try_from)
   67         -
                                    .transpose()?,
   68         -
                            );
   69         -
                        }
   70         -
                        "protocol" => {
   71         -
                            builder = builder.set_protocol(
   72         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   73         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::TransportProtocol::from(u.as_ref())))
   74         -
                                    .transpose()?,
   75         -
                            );
   76         -
                        }
   77         -
                        "containerPortRange" => {
   78         -
                            builder = builder.set_container_port_range(
   79         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   80         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   81         -
                                    .transpose()?,
   82         -
                            );
   83         -
                        }
   84         -
                        "hostPortRange" => {
   85         -
                            builder = builder.set_host_port_range(
   86         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   87         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   88         -
                                    .transpose()?,
   89         -
                            );
   90         -
                        }
   91         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   92         -
                    },
   93         -
                    other => {
   94         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   95         -
                            "expected object key or end object, found: {other:?}"
   96         -
                        )))
   97         -
                    }
   98         -
                }
   99         -
            }
  100         -
            Ok(Some(builder.build()))
  101         -
        }
  102         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  103         -
            "expected start object or null",
  104         -
        )),
  105         -
    }
  106         -
}