AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c

Files changed:

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

@@ -1,0 +166,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_deployment<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::Deployment>, ::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::DeploymentBuilder::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         -
                        "id" => {
   19         -
                            builder = builder.set_id(
   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         -
                        "status" => {
   26         -
                            builder = builder.set_status(
   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         -
                        "taskDefinition" => {
   33         -
                            builder = builder.set_task_definition(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   35         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "desiredCount" => {
   40         -
                            builder = builder.set_desired_count(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   42         -
                                    .map(i32::try_from)
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "pendingCount" => {
   47         -
                            builder = builder.set_pending_count(
   48         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   49         -
                                    .map(i32::try_from)
   50         -
                                    .transpose()?,
   51         -
                            );
   52         -
                        }
   53         -
                        "runningCount" => {
   54         -
                            builder = builder.set_running_count(
   55         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   56         -
                                    .map(i32::try_from)
   57         -
                                    .transpose()?,
   58         -
                            );
   59         -
                        }
   60         -
                        "failedTasks" => {
   61         -
                            builder = builder.set_failed_tasks(
   62         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   63         -
                                    .map(i32::try_from)
   64         -
                                    .transpose()?,
   65         -
                            );
   66         -
                        }
   67         -
                        "createdAt" => {
   68         -
                            builder = builder.set_created_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   69         -
                                tokens.next(),
   70         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   71         -
                            )?);
   72         -
                        }
   73         -
                        "updatedAt" => {
   74         -
                            builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   75         -
                                tokens.next(),
   76         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   77         -
                            )?);
   78         -
                        }
   79         -
                        "capacityProviderStrategy" => {
   80         -
                            builder = builder.set_capacity_provider_strategy(
   81         -
                                crate::protocol_serde::shape_capacity_provider_strategy::de_capacity_provider_strategy(tokens, _value)?,
   82         -
                            );
   83         -
                        }
   84         -
                        "launchType" => {
   85         -
                            builder = builder.set_launch_type(
   86         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   87         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::LaunchType::from(u.as_ref())))
   88         -
                                    .transpose()?,
   89         -
                            );
   90         -
                        }
   91         -
                        "platformVersion" => {
   92         -
                            builder = builder.set_platform_version(
   93         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   94         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   95         -
                                    .transpose()?,
   96         -
                            );
   97         -
                        }
   98         -
                        "platformFamily" => {
   99         -
                            builder = builder.set_platform_family(
  100         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  101         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  102         -
                                    .transpose()?,
  103         -
                            );
  104         -
                        }
  105         -
                        "networkConfiguration" => {
  106         -
                            builder = builder.set_network_configuration(
  107         -
                                crate::protocol_serde::shape_network_configuration::de_network_configuration(tokens, _value)?,
  108         -
                            );
  109         -
                        }
  110         -
                        "rolloutState" => {
  111         -
                            builder = builder.set_rollout_state(
  112         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  113         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::DeploymentRolloutState::from(u.as_ref())))
  114         -
                                    .transpose()?,
  115         -
                            );
  116         -
                        }
  117         -
                        "rolloutStateReason" => {
  118         -
                            builder = builder.set_rollout_state_reason(
  119         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  120         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  121         -
                                    .transpose()?,
  122         -
                            );
  123         -
                        }
  124         -
                        "serviceConnectConfiguration" => {
  125         -
                            builder = builder.set_service_connect_configuration(
  126         -
                                crate::protocol_serde::shape_service_connect_configuration::de_service_connect_configuration(tokens, _value)?,
  127         -
                            );
  128         -
                        }
  129         -
                        "serviceConnectResources" => {
  130         -
                            builder = builder.set_service_connect_resources(
  131         -
                                crate::protocol_serde::shape_service_connect_service_resource_list::de_service_connect_service_resource_list(
  132         -
                                    tokens, _value,
  133         -
                                )?,
  134         -
                            );
  135         -
                        }
  136         -
                        "volumeConfigurations" => {
  137         -
                            builder = builder.set_volume_configurations(
  138         -
                                crate::protocol_serde::shape_service_volume_configurations::de_service_volume_configurations(tokens, _value)?,
  139         -
                            );
  140         -
                        }
  141         -
                        "fargateEphemeralStorage" => {
  142         -
                            builder = builder.set_fargate_ephemeral_storage(
  143         -
                                crate::protocol_serde::shape_deployment_ephemeral_storage::de_deployment_ephemeral_storage(tokens, _value)?,
  144         -
                            );
  145         -
                        }
  146         -
                        "vpcLatticeConfigurations" => {
  147         -
                            builder = builder.set_vpc_lattice_configurations(
  148         -
                                crate::protocol_serde::shape_vpc_lattice_configurations::de_vpc_lattice_configurations(tokens, _value)?,
  149         -
                            );
  150         -
                        }
  151         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  152         -
                    },
  153         -
                    other => {
  154         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  155         -
                            "expected object key or end object, found: {other:?}"
  156         -
                        )))
  157         -
                    }
  158         -
                }
  159         -
            }
  160         -
            Ok(Some(builder.build()))
  161         -
        }
  162         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  163         -
            "expected start object or null",
  164         -
        )),
  165         -
    }
  166         -
}

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

@@ -1,0 +66,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_deployment_alarms(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::DeploymentAlarms,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        let mut array_1 = object.key("alarmNames").start_array();
    8         -
        for item_2 in &input.alarm_names {
    9         -
            {
   10         -
                array_1.value().string(item_2.as_str());
   11         -
            }
   12         -
        }
   13         -
        array_1.finish();
   14         -
    }
   15         -
    {
   16         -
        object.key("rollback").boolean(input.rollback);
   17         -
    }
   18         -
    {
   19         -
        object.key("enable").boolean(input.enable);
   20         -
    }
   21         -
    Ok(())
   22         -
}
   23         -
   24         -
pub(crate) fn de_deployment_alarms<'a, I>(
   25         -
    tokens: &mut ::std::iter::Peekable<I>,
   26         -
    _value: &'a [u8],
   27         -
) -> ::std::result::Result<Option<crate::types::DeploymentAlarms>, ::aws_smithy_json::deserialize::error::DeserializeError>
   28         -
where
   29         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   30         -
{
   31         -
    match tokens.next().transpose()? {
   32         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   33         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   34         -
            #[allow(unused_mut)]
   35         -
            let mut builder = crate::types::builders::DeploymentAlarmsBuilder::default();
   36         -
            loop {
   37         -
                match tokens.next().transpose()? {
   38         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   39         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   40         -
                        "alarmNames" => {
   41         -
                            builder = builder.set_alarm_names(crate::protocol_serde::shape_string_list::de_string_list(tokens, _value)?);
   42         -
                        }
   43         -
                        "rollback" => {
   44         -
                            builder = builder.set_rollback(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
   45         -
                        }
   46         -
                        "enable" => {
   47         -
                            builder = builder.set_enable(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
   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(crate::serde_util::deployment_alarms_correct_errors(builder).build().map_err(
   59         -
                |err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err),
   60         -
            )?))
   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_deployment_circuit_breaker.rs

@@ -1,0 +52,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_deployment_circuit_breaker(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::DeploymentCircuitBreaker,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("enable").boolean(input.enable);
    8         -
    }
    9         -
    {
   10         -
        object.key("rollback").boolean(input.rollback);
   11         -
    }
   12         -
    Ok(())
   13         -
}
   14         -
   15         -
pub(crate) fn de_deployment_circuit_breaker<'a, I>(
   16         -
    tokens: &mut ::std::iter::Peekable<I>,
   17         -
    _value: &'a [u8],
   18         -
) -> ::std::result::Result<Option<crate::types::DeploymentCircuitBreaker>, ::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::DeploymentCircuitBreakerBuilder::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         -
                        "enable" => {
   32         -
                            builder = builder.set_enable(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
   33         -
                        }
   34         -
                        "rollback" => {
   35         -
                            builder = builder.set_rollback(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
   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(crate::serde_util::deployment_circuit_breaker_correct_errors(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_deployment_configuration.rs

@@ -1,0 +126,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_deployment_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::DeploymentConfiguration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.deployment_circuit_breaker {
    7         -
        #[allow(unused_mut)]
    8         -
        let mut object_2 = object.key("deploymentCircuitBreaker").start_object();
    9         -
        crate::protocol_serde::shape_deployment_circuit_breaker::ser_deployment_circuit_breaker(&mut object_2, var_1)?;
   10         -
        object_2.finish();
   11         -
    }
   12         -
    if let Some(var_3) = &input.maximum_percent {
   13         -
        object.key("maximumPercent").number(
   14         -
            #[allow(clippy::useless_conversion)]
   15         -
            ::aws_smithy_types::Number::NegInt((*var_3).into()),
   16         -
        );
   17         -
    }
   18         -
    if let Some(var_4) = &input.minimum_healthy_percent {
   19         -
        object.key("minimumHealthyPercent").number(
   20         -
            #[allow(clippy::useless_conversion)]
   21         -
            ::aws_smithy_types::Number::NegInt((*var_4).into()),
   22         -
        );
   23         -
    }
   24         -
    if let Some(var_5) = &input.alarms {
   25         -
        #[allow(unused_mut)]
   26         -
        let mut object_6 = object.key("alarms").start_object();
   27         -
        crate::protocol_serde::shape_deployment_alarms::ser_deployment_alarms(&mut object_6, var_5)?;
   28         -
        object_6.finish();
   29         -
    }
   30         -
    if let Some(var_7) = &input.strategy {
   31         -
        object.key("strategy").string(var_7.as_str());
   32         -
    }
   33         -
    if let Some(var_8) = &input.bake_time_in_minutes {
   34         -
        object.key("bakeTimeInMinutes").number(
   35         -
            #[allow(clippy::useless_conversion)]
   36         -
            ::aws_smithy_types::Number::NegInt((*var_8).into()),
   37         -
        );
   38         -
    }
   39         -
    if let Some(var_9) = &input.lifecycle_hooks {
   40         -
        let mut array_10 = object.key("lifecycleHooks").start_array();
   41         -
        for item_11 in var_9 {
   42         -
            {
   43         -
                #[allow(unused_mut)]
   44         -
                let mut object_12 = array_10.value().start_object();
   45         -
                crate::protocol_serde::shape_deployment_lifecycle_hook::ser_deployment_lifecycle_hook(&mut object_12, item_11)?;
   46         -
                object_12.finish();
   47         -
            }
   48         -
        }
   49         -
        array_10.finish();
   50         -
    }
   51         -
    Ok(())
   52         -
}
   53         -
   54         -
pub(crate) fn de_deployment_configuration<'a, I>(
   55         -
    tokens: &mut ::std::iter::Peekable<I>,
   56         -
    _value: &'a [u8],
   57         -
) -> ::std::result::Result<Option<crate::types::DeploymentConfiguration>, ::aws_smithy_json::deserialize::error::DeserializeError>
   58         -
where
   59         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   60         -
{
   61         -
    match tokens.next().transpose()? {
   62         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   63         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   64         -
            #[allow(unused_mut)]
   65         -
            let mut builder = crate::types::builders::DeploymentConfigurationBuilder::default();
   66         -
            loop {
   67         -
                match tokens.next().transpose()? {
   68         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   69         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   70         -
                        "deploymentCircuitBreaker" => {
   71         -
                            builder = builder.set_deployment_circuit_breaker(
   72         -
                                crate::protocol_serde::shape_deployment_circuit_breaker::de_deployment_circuit_breaker(tokens, _value)?,
   73         -
                            );
   74         -
                        }
   75         -
                        "maximumPercent" => {
   76         -
                            builder = builder.set_maximum_percent(
   77         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   78         -
                                    .map(i32::try_from)
   79         -
                                    .transpose()?,
   80         -
                            );
   81         -
                        }
   82         -
                        "minimumHealthyPercent" => {
   83         -
                            builder = builder.set_minimum_healthy_percent(
   84         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   85         -
                                    .map(i32::try_from)
   86         -
                                    .transpose()?,
   87         -
                            );
   88         -
                        }
   89         -
                        "alarms" => {
   90         -
                            builder = builder.set_alarms(crate::protocol_serde::shape_deployment_alarms::de_deployment_alarms(tokens, _value)?);
   91         -
                        }
   92         -
                        "strategy" => {
   93         -
                            builder = builder.set_strategy(
   94         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   95         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::DeploymentStrategy::from(u.as_ref())))
   96         -
                                    .transpose()?,
   97         -
                            );
   98         -
                        }
   99         -
                        "bakeTimeInMinutes" => {
  100         -
                            builder = builder.set_bake_time_in_minutes(
  101         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  102         -
                                    .map(i32::try_from)
  103         -
                                    .transpose()?,
  104         -
                            );
  105         -
                        }
  106         -
                        "lifecycleHooks" => {
  107         -
                            builder = builder.set_lifecycle_hooks(
  108         -
                                crate::protocol_serde::shape_deployment_lifecycle_hook_list::de_deployment_lifecycle_hook_list(tokens, _value)?,
  109         -
                            );
  110         -
                        }
  111         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  112         -
                    },
  113         -
                    other => {
  114         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  115         -
                            "expected object key or end object, found: {other:?}"
  116         -
                        )))
  117         -
                    }
  118         -
                }
  119         -
            }
  120         -
            Ok(Some(builder.build()))
  121         -
        }
  122         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  123         -
            "expected start object or null",
  124         -
        )),
  125         -
    }
  126         -
}

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

@@ -1,0 +52,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_deployment_controller(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::DeploymentController,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("type").string(input.r#type.as_str());
    8         -
    }
    9         -
    Ok(())
   10         -
}
   11         -
   12         -
pub(crate) fn de_deployment_controller<'a, I>(
   13         -
    tokens: &mut ::std::iter::Peekable<I>,
   14         -
    _value: &'a [u8],
   15         -
) -> ::std::result::Result<Option<crate::types::DeploymentController>, ::aws_smithy_json::deserialize::error::DeserializeError>
   16         -
where
   17         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   18         -
{
   19         -
    match tokens.next().transpose()? {
   20         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   21         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   22         -
            #[allow(unused_mut)]
   23         -
            let mut builder = crate::types::builders::DeploymentControllerBuilder::default();
   24         -
            loop {
   25         -
                match tokens.next().transpose()? {
   26         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   27         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   28         -
                        "type" => {
   29         -
                            builder = builder.set_type(
   30         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   31         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::DeploymentControllerType::from(u.as_ref())))
   32         -
                                    .transpose()?,
   33         -
                            );
   34         -
                        }
   35         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   36         -
                    },
   37         -
                    other => {
   38         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   39         -
                            "expected object key or end object, found: {other:?}"
   40         -
                        )))
   41         -
                    }
   42         -
                }
   43         -
            }
   44         -
            Ok(Some(crate::serde_util::deployment_controller_correct_errors(builder).build().map_err(
   45         -
                |err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err),
   46         -
            )?))
   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_deployment_ephemeral_storage.rs

@@ -1,0 +40,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_deployment_ephemeral_storage<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::DeploymentEphemeralStorage>, ::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::DeploymentEphemeralStorageBuilder::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         -
                        "kmsKeyId" => {
   19         -
                            builder = builder.set_kms_key_id(
   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         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   26         -
                    },
   27         -
                    other => {
   28         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   29         -
                            "expected object key or end object, found: {other:?}"
   30         -
                        )))
   31         -
                    }
   32         -
                }
   33         -
            }
   34         -
            Ok(Some(builder.build()))
   35         -
        }
   36         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   37         -
            "expected start object or null",
   38         -
        )),
   39         -
    }
   40         -
}

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

@@ -1,0 +82,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_deployment_lifecycle_hook(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::DeploymentLifecycleHook,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.hook_target_arn {
    7         -
        object.key("hookTargetArn").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.role_arn {
   10         -
        object.key("roleArn").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.lifecycle_stages {
   13         -
        let mut array_4 = object.key("lifecycleStages").start_array();
   14         -
        for item_5 in var_3 {
   15         -
            {
   16         -
                array_4.value().string(item_5.as_str());
   17         -
            }
   18         -
        }
   19         -
        array_4.finish();
   20         -
    }
   21         -
    if let Some(var_6) = &input.hook_details {
   22         -
        object.key("hookDetails").document(var_6);
   23         -
    }
   24         -
    Ok(())
   25         -
}
   26         -
   27         -
pub(crate) fn de_deployment_lifecycle_hook<'a, I>(
   28         -
    tokens: &mut ::std::iter::Peekable<I>,
   29         -
    _value: &'a [u8],
   30         -
) -> ::std::result::Result<Option<crate::types::DeploymentLifecycleHook>, ::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::DeploymentLifecycleHookBuilder::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         -
                        "hookTargetArn" => {
   44         -
                            builder = builder.set_hook_target_arn(
   45         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   46         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   47         -
                                    .transpose()?,
   48         -
                            );
   49         -
                        }
   50         -
                        "roleArn" => {
   51         -
                            builder = builder.set_role_arn(
   52         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   53         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   54         -
                                    .transpose()?,
   55         -
                            );
   56         -
                        }
   57         -
                        "lifecycleStages" => {
   58         -
                            builder = builder.set_lifecycle_stages(
   59         -
                                crate::protocol_serde::shape_deployment_lifecycle_hook_stage_list::de_deployment_lifecycle_hook_stage_list(
   60         -
                                    tokens, _value,
   61         -
                                )?,
   62         -
                            );
   63         -
                        }
   64         -
                        "hookDetails" => {
   65         -
                            builder = builder.set_hook_details(Some(::aws_smithy_json::deserialize::token::expect_document(tokens)?));
   66         -
                        }
   67         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   68         -
                    },
   69         -
                    other => {
   70         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   71         -
                            "expected object key or end object, found: {other:?}"
   72         -
                        )))
   73         -
                    }
   74         -
                }
   75         -
            }
   76         -
            Ok(Some(builder.build()))
   77         -
        }
   78         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   79         -
            "expected start object or null",
   80         -
        )),
   81         -
    }
   82         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_deployment_lifecycle_hook_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_deployment_lifecycle_hook_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::DeploymentLifecycleHook>>, ::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_deployment_lifecycle_hook::de_deployment_lifecycle_hook(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_deployment_lifecycle_hook_stage_list.rs

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

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

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_deployments<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::Deployment>>, ::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_deployment::de_deployment(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_deregister_container_instance.rs

@@ -1,0 +151,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_deregister_container_instance_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::deregister_container_instance::DeregisterContainerInstanceOutput,
    9         -
    crate::operation::deregister_container_instance::DeregisterContainerInstanceError,
   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::deregister_container_instance::DeregisterContainerInstanceError::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::deregister_container_instance::DeregisterContainerInstanceError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "ClientException" => crate::operation::deregister_container_instance::DeregisterContainerInstanceError::ClientException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::ClientExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_client_exception::de_client_exception_json_err(_response_body, output)
   29         -
                    .map_err(crate::operation::deregister_container_instance::DeregisterContainerInstanceError::unhandled)?;
   30         -
                let output = output.meta(generic);
   31         -
                output.build()
   32         -
            };
   33         -
            if tmp.message.is_none() {
   34         -
                tmp.message = _error_message;
   35         -
            }
   36         -
            tmp
   37         -
        }),
   38         -
        "ClusterNotFoundException" => crate::operation::deregister_container_instance::DeregisterContainerInstanceError::ClusterNotFoundException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::ClusterNotFoundExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_cluster_not_found_exception::de_cluster_not_found_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::deregister_container_instance::DeregisterContainerInstanceError::unhandled)?;
   45         -
                let output = output.meta(generic);
   46         -
                output.build()
   47         -
            };
   48         -
            if tmp.message.is_none() {
   49         -
                tmp.message = _error_message;
   50         -
            }
   51         -
            tmp
   52         -
        }),
   53         -
        "InvalidParameterException" => {
   54         -
            crate::operation::deregister_container_instance::DeregisterContainerInstanceError::InvalidParameterException({
   55         -
                #[allow(unused_mut)]
   56         -
                let mut tmp = {
   57         -
                    #[allow(unused_mut)]
   58         -
                    let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   59         -
                    output =
   60         -
                        crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   61         -
                            .map_err(crate::operation::deregister_container_instance::DeregisterContainerInstanceError::unhandled)?;
   62         -
                    let output = output.meta(generic);
   63         -
                    output.build()
   64         -
                };
   65         -
                if tmp.message.is_none() {
   66         -
                    tmp.message = _error_message;
   67         -
                }
   68         -
                tmp
   69         -
            })
   70         -
        }
   71         -
        "ServerException" => crate::operation::deregister_container_instance::DeregisterContainerInstanceError::ServerException({
   72         -
            #[allow(unused_mut)]
   73         -
            let mut tmp = {
   74         -
                #[allow(unused_mut)]
   75         -
                let mut output = crate::types::error::builders::ServerExceptionBuilder::default();
   76         -
                output = crate::protocol_serde::shape_server_exception::de_server_exception_json_err(_response_body, output)
   77         -
                    .map_err(crate::operation::deregister_container_instance::DeregisterContainerInstanceError::unhandled)?;
   78         -
                let output = output.meta(generic);
   79         -
                output.build()
   80         -
            };
   81         -
            if tmp.message.is_none() {
   82         -
                tmp.message = _error_message;
   83         -
            }
   84         -
            tmp
   85         -
        }),
   86         -
        _ => crate::operation::deregister_container_instance::DeregisterContainerInstanceError::generic(generic),
   87         -
    })
   88         -
}
   89         -
   90         -
#[allow(clippy::unnecessary_wraps)]
   91         -
pub fn de_deregister_container_instance_http_response(
   92         -
    _response_status: u16,
   93         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   94         -
    _response_body: &[u8],
   95         -
) -> std::result::Result<
   96         -
    crate::operation::deregister_container_instance::DeregisterContainerInstanceOutput,
   97         -
    crate::operation::deregister_container_instance::DeregisterContainerInstanceError,
   98         -
> {
   99         -
    Ok({
  100         -
        #[allow(unused_mut)]
  101         -
        let mut output = crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceOutputBuilder::default();
  102         -
        output = crate::protocol_serde::shape_deregister_container_instance::de_deregister_container_instance(_response_body, output)
  103         -
            .map_err(crate::operation::deregister_container_instance::DeregisterContainerInstanceError::unhandled)?;
  104         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  105         -
        output.build()
  106         -
    })
  107         -
}
  108         -
  109         -
pub fn ser_deregister_container_instance_input(
  110         -
    input: &crate::operation::deregister_container_instance::DeregisterContainerInstanceInput,
  111         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  112         -
    let mut out = String::new();
  113         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  114         -
    crate::protocol_serde::shape_deregister_container_instance_input::ser_deregister_container_instance_input_input(&mut object, input)?;
  115         -
    object.finish();
  116         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  117         -
}
  118         -
  119         -
pub(crate) fn de_deregister_container_instance(
  120         -
    _value: &[u8],
  121         -
    mut builder: crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceOutputBuilder,
  122         -
) -> ::std::result::Result<
  123         -
    crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceOutputBuilder,
  124         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  125         -
> {
  126         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  127         -
    let tokens = &mut tokens_owned;
  128         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  129         -
    loop {
  130         -
        match tokens.next().transpose()? {
  131         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  132         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  133         -
                "containerInstance" => {
  134         -
                    builder = builder.set_container_instance(crate::protocol_serde::shape_container_instance::de_container_instance(tokens, _value)?);
  135         -
                }
  136         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  137         -
            },
  138         -
            other => {
  139         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  140         -
                    "expected object key or end object, found: {other:?}"
  141         -
                )))
  142         -
            }
  143         -
        }
  144         -
    }
  145         -
    if tokens.next().is_some() {
  146         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  147         -
            "found more JSON tokens after completing parsing",
  148         -
        ));
  149         -
    }
  150         -
    Ok(builder)
  151         -
}

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

@@ -1,0 +16,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_deregister_container_instance_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::deregister_container_instance::DeregisterContainerInstanceInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.cluster {
    7         -
        object.key("cluster").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.container_instance {
   10         -
        object.key("containerInstance").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.force {
   13         -
        object.key("force").boolean(*var_3);
   14         -
    }
   15         -
    Ok(())
   16         -
}

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

@@ -1,0 +137,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_deregister_task_definition_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::deregister_task_definition::DeregisterTaskDefinitionOutput,
    9         -
    crate::operation::deregister_task_definition::DeregisterTaskDefinitionError,
   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::deregister_task_definition::DeregisterTaskDefinitionError::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::deregister_task_definition::DeregisterTaskDefinitionError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "ClientException" => crate::operation::deregister_task_definition::DeregisterTaskDefinitionError::ClientException({
   28         -
            #[allow(unused_mut)]
   29         -
            let mut tmp = {
   30         -
                #[allow(unused_mut)]
   31         -
                let mut output = crate::types::error::builders::ClientExceptionBuilder::default();
   32         -
                output = crate::protocol_serde::shape_client_exception::de_client_exception_json_err(_response_body, output)
   33         -
                    .map_err(crate::operation::deregister_task_definition::DeregisterTaskDefinitionError::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         -
        "InvalidParameterException" => crate::operation::deregister_task_definition::DeregisterTaskDefinitionError::InvalidParameterException({
   43         -
            #[allow(unused_mut)]
   44         -
            let mut tmp = {
   45         -
                #[allow(unused_mut)]
   46         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   47         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   48         -
                    .map_err(crate::operation::deregister_task_definition::DeregisterTaskDefinitionError::unhandled)?;
   49         -
                let output = output.meta(generic);
   50         -
                output.build()
   51         -
            };
   52         -
            if tmp.message.is_none() {
   53         -
                tmp.message = _error_message;
   54         -
            }
   55         -
            tmp
   56         -
        }),
   57         -
        "ServerException" => crate::operation::deregister_task_definition::DeregisterTaskDefinitionError::ServerException({
   58         -
            #[allow(unused_mut)]
   59         -
            let mut tmp = {
   60         -
                #[allow(unused_mut)]
   61         -
                let mut output = crate::types::error::builders::ServerExceptionBuilder::default();
   62         -
                output = crate::protocol_serde::shape_server_exception::de_server_exception_json_err(_response_body, output)
   63         -
                    .map_err(crate::operation::deregister_task_definition::DeregisterTaskDefinitionError::unhandled)?;
   64         -
                let output = output.meta(generic);
   65         -
                output.build()
   66         -
            };
   67         -
            if tmp.message.is_none() {
   68         -
                tmp.message = _error_message;
   69         -
            }
   70         -
            tmp
   71         -
        }),
   72         -
        _ => crate::operation::deregister_task_definition::DeregisterTaskDefinitionError::generic(generic),
   73         -
    })
   74         -
}
   75         -
   76         -
#[allow(clippy::unnecessary_wraps)]
   77         -
pub fn de_deregister_task_definition_http_response(
   78         -
    _response_status: u16,
   79         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   80         -
    _response_body: &[u8],
   81         -
) -> std::result::Result<
   82         -
    crate::operation::deregister_task_definition::DeregisterTaskDefinitionOutput,
   83         -
    crate::operation::deregister_task_definition::DeregisterTaskDefinitionError,
   84         -
> {
   85         -
    Ok({
   86         -
        #[allow(unused_mut)]
   87         -
        let mut output = crate::operation::deregister_task_definition::builders::DeregisterTaskDefinitionOutputBuilder::default();
   88         -
        output = crate::protocol_serde::shape_deregister_task_definition::de_deregister_task_definition(_response_body, output)
   89         -
            .map_err(crate::operation::deregister_task_definition::DeregisterTaskDefinitionError::unhandled)?;
   90         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   91         -
        output.build()
   92         -
    })
   93         -
}
   94         -
   95         -
pub fn ser_deregister_task_definition_input(
   96         -
    input: &crate::operation::deregister_task_definition::DeregisterTaskDefinitionInput,
   97         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   98         -
    let mut out = String::new();
   99         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  100         -
    crate::protocol_serde::shape_deregister_task_definition_input::ser_deregister_task_definition_input_input(&mut object, input)?;
  101         -
    object.finish();
  102         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  103         -
}
  104         -
  105         -
pub(crate) fn de_deregister_task_definition(
  106         -
    _value: &[u8],
  107         -
    mut builder: crate::operation::deregister_task_definition::builders::DeregisterTaskDefinitionOutputBuilder,
  108         -
) -> ::std::result::Result<
  109         -
    crate::operation::deregister_task_definition::builders::DeregisterTaskDefinitionOutputBuilder,
  110         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  111         -
> {
  112         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  113         -
    let tokens = &mut tokens_owned;
  114         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  115         -
    loop {
  116         -
        match tokens.next().transpose()? {
  117         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  118         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  119         -
                "taskDefinition" => {
  120         -
                    builder = builder.set_task_definition(crate::protocol_serde::shape_task_definition::de_task_definition(tokens, _value)?);
  121         -
                }
  122         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  123         -
            },
  124         -
            other => {
  125         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  126         -
                    "expected object key or end object, found: {other:?}"
  127         -
                )))
  128         -
            }
  129         -
        }
  130         -
    }
  131         -
    if tokens.next().is_some() {
  132         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  133         -
            "found more JSON tokens after completing parsing",
  134         -
        ));
  135         -
    }
  136         -
    Ok(builder)
  137         -
}