AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

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

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

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

@@ -1,0 +76,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_start_task_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::start_task::StartTaskInput,
    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_instances {
   10         -
        let mut array_3 = object.key("containerInstances").start_array();
   11         -
        for item_4 in var_2 {
   12         -
            {
   13         -
                array_3.value().string(item_4.as_str());
   14         -
            }
   15         -
        }
   16         -
        array_3.finish();
   17         -
    }
   18         -
    if let Some(var_5) = &input.enable_ecs_managed_tags {
   19         -
        object.key("enableECSManagedTags").boolean(*var_5);
   20         -
    }
   21         -
    if let Some(var_6) = &input.enable_execute_command {
   22         -
        object.key("enableExecuteCommand").boolean(*var_6);
   23         -
    }
   24         -
    if let Some(var_7) = &input.group {
   25         -
        object.key("group").string(var_7.as_str());
   26         -
    }
   27         -
    if let Some(var_8) = &input.network_configuration {
   28         -
        #[allow(unused_mut)]
   29         -
        let mut object_9 = object.key("networkConfiguration").start_object();
   30         -
        crate::protocol_serde::shape_network_configuration::ser_network_configuration(&mut object_9, var_8)?;
   31         -
        object_9.finish();
   32         -
    }
   33         -
    if let Some(var_10) = &input.overrides {
   34         -
        #[allow(unused_mut)]
   35         -
        let mut object_11 = object.key("overrides").start_object();
   36         -
        crate::protocol_serde::shape_task_override::ser_task_override(&mut object_11, var_10)?;
   37         -
        object_11.finish();
   38         -
    }
   39         -
    if let Some(var_12) = &input.propagate_tags {
   40         -
        object.key("propagateTags").string(var_12.as_str());
   41         -
    }
   42         -
    if let Some(var_13) = &input.reference_id {
   43         -
        object.key("referenceId").string(var_13.as_str());
   44         -
    }
   45         -
    if let Some(var_14) = &input.started_by {
   46         -
        object.key("startedBy").string(var_14.as_str());
   47         -
    }
   48         -
    if let Some(var_15) = &input.tags {
   49         -
        let mut array_16 = object.key("tags").start_array();
   50         -
        for item_17 in var_15 {
   51         -
            {
   52         -
                #[allow(unused_mut)]
   53         -
                let mut object_18 = array_16.value().start_object();
   54         -
                crate::protocol_serde::shape_tag::ser_tag(&mut object_18, item_17)?;
   55         -
                object_18.finish();
   56         -
            }
   57         -
        }
   58         -
        array_16.finish();
   59         -
    }
   60         -
    if let Some(var_19) = &input.task_definition {
   61         -
        object.key("taskDefinition").string(var_19.as_str());
   62         -
    }
   63         -
    if let Some(var_20) = &input.volume_configurations {
   64         -
        let mut array_21 = object.key("volumeConfigurations").start_array();
   65         -
        for item_22 in var_20 {
   66         -
            {
   67         -
                #[allow(unused_mut)]
   68         -
                let mut object_23 = array_21.value().start_object();
   69         -
                crate::protocol_serde::shape_task_volume_configuration::ser_task_volume_configuration(&mut object_23, item_22)?;
   70         -
                object_23.finish();
   71         -
            }
   72         -
        }
   73         -
        array_21.finish();
   74         -
    }
   75         -
    Ok(())
   76         -
}

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

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

@@ -1,0 +203,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_stop_service_deployment_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::stop_service_deployment::StopServiceDeploymentOutput,
    9         -
    crate::operation::stop_service_deployment::StopServiceDeploymentError,
   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::stop_service_deployment::StopServiceDeploymentError::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::stop_service_deployment::StopServiceDeploymentError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "AccessDeniedException" => crate::operation::stop_service_deployment::StopServiceDeploymentError::AccessDeniedException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   29         -
                    .map_err(crate::operation::stop_service_deployment::StopServiceDeploymentError::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         -
        "ClientException" => crate::operation::stop_service_deployment::StopServiceDeploymentError::ClientException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::ClientExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_client_exception::de_client_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::stop_service_deployment::StopServiceDeploymentError::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         -
        "ConflictException" => crate::operation::stop_service_deployment::StopServiceDeploymentError::ConflictException({
   54         -
            #[allow(unused_mut)]
   55         -
            let mut tmp = {
   56         -
                #[allow(unused_mut)]
   57         -
                let mut output = crate::types::error::builders::ConflictExceptionBuilder::default();
   58         -
                output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output)
   59         -
                    .map_err(crate::operation::stop_service_deployment::StopServiceDeploymentError::unhandled)?;
   60         -
                let output = output.meta(generic);
   61         -
                output.build()
   62         -
            };
   63         -
            if tmp.message.is_none() {
   64         -
                tmp.message = _error_message;
   65         -
            }
   66         -
            tmp
   67         -
        }),
   68         -
        "InvalidParameterException" => crate::operation::stop_service_deployment::StopServiceDeploymentError::InvalidParameterException({
   69         -
            #[allow(unused_mut)]
   70         -
            let mut tmp = {
   71         -
                #[allow(unused_mut)]
   72         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   73         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   74         -
                    .map_err(crate::operation::stop_service_deployment::StopServiceDeploymentError::unhandled)?;
   75         -
                let output = output.meta(generic);
   76         -
                output.build()
   77         -
            };
   78         -
            if tmp.message.is_none() {
   79         -
                tmp.message = _error_message;
   80         -
            }
   81         -
            tmp
   82         -
        }),
   83         -
        "ServerException" => crate::operation::stop_service_deployment::StopServiceDeploymentError::ServerException({
   84         -
            #[allow(unused_mut)]
   85         -
            let mut tmp = {
   86         -
                #[allow(unused_mut)]
   87         -
                let mut output = crate::types::error::builders::ServerExceptionBuilder::default();
   88         -
                output = crate::protocol_serde::shape_server_exception::de_server_exception_json_err(_response_body, output)
   89         -
                    .map_err(crate::operation::stop_service_deployment::StopServiceDeploymentError::unhandled)?;
   90         -
                let output = output.meta(generic);
   91         -
                output.build()
   92         -
            };
   93         -
            if tmp.message.is_none() {
   94         -
                tmp.message = _error_message;
   95         -
            }
   96         -
            tmp
   97         -
        }),
   98         -
        "ServiceDeploymentNotFoundException" => {
   99         -
            crate::operation::stop_service_deployment::StopServiceDeploymentError::ServiceDeploymentNotFoundException({
  100         -
                #[allow(unused_mut)]
  101         -
                let mut tmp = {
  102         -
                    #[allow(unused_mut)]
  103         -
                    let mut output = crate::types::error::builders::ServiceDeploymentNotFoundExceptionBuilder::default();
  104         -
                    output = crate::protocol_serde::shape_service_deployment_not_found_exception::de_service_deployment_not_found_exception_json_err(
  105         -
                        _response_body,
  106         -
                        output,
  107         -
                    )
  108         -
                    .map_err(crate::operation::stop_service_deployment::StopServiceDeploymentError::unhandled)?;
  109         -
                    let output = output.meta(generic);
  110         -
                    output.build()
  111         -
                };
  112         -
                if tmp.message.is_none() {
  113         -
                    tmp.message = _error_message;
  114         -
                }
  115         -
                tmp
  116         -
            })
  117         -
        }
  118         -
        "UnsupportedFeatureException" => crate::operation::stop_service_deployment::StopServiceDeploymentError::UnsupportedFeatureException({
  119         -
            #[allow(unused_mut)]
  120         -
            let mut tmp = {
  121         -
                #[allow(unused_mut)]
  122         -
                let mut output = crate::types::error::builders::UnsupportedFeatureExceptionBuilder::default();
  123         -
                output =
  124         -
                    crate::protocol_serde::shape_unsupported_feature_exception::de_unsupported_feature_exception_json_err(_response_body, output)
  125         -
                        .map_err(crate::operation::stop_service_deployment::StopServiceDeploymentError::unhandled)?;
  126         -
                let output = output.meta(generic);
  127         -
                output.build()
  128         -
            };
  129         -
            if tmp.message.is_none() {
  130         -
                tmp.message = _error_message;
  131         -
            }
  132         -
            tmp
  133         -
        }),
  134         -
        _ => crate::operation::stop_service_deployment::StopServiceDeploymentError::generic(generic),
  135         -
    })
  136         -
}
  137         -
  138         -
#[allow(clippy::unnecessary_wraps)]
  139         -
pub fn de_stop_service_deployment_http_response(
  140         -
    _response_status: u16,
  141         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  142         -
    _response_body: &[u8],
  143         -
) -> std::result::Result<
  144         -
    crate::operation::stop_service_deployment::StopServiceDeploymentOutput,
  145         -
    crate::operation::stop_service_deployment::StopServiceDeploymentError,
  146         -
> {
  147         -
    Ok({
  148         -
        #[allow(unused_mut)]
  149         -
        let mut output = crate::operation::stop_service_deployment::builders::StopServiceDeploymentOutputBuilder::default();
  150         -
        output = crate::protocol_serde::shape_stop_service_deployment::de_stop_service_deployment(_response_body, output)
  151         -
            .map_err(crate::operation::stop_service_deployment::StopServiceDeploymentError::unhandled)?;
  152         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  153         -
        output.build()
  154         -
    })
  155         -
}
  156         -
  157         -
pub fn ser_stop_service_deployment_input(
  158         -
    input: &crate::operation::stop_service_deployment::StopServiceDeploymentInput,
  159         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  160         -
    let mut out = String::new();
  161         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  162         -
    crate::protocol_serde::shape_stop_service_deployment_input::ser_stop_service_deployment_input_input(&mut object, input)?;
  163         -
    object.finish();
  164         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  165         -
}
  166         -
  167         -
pub(crate) fn de_stop_service_deployment(
  168         -
    _value: &[u8],
  169         -
    mut builder: crate::operation::stop_service_deployment::builders::StopServiceDeploymentOutputBuilder,
  170         -
) -> ::std::result::Result<
  171         -
    crate::operation::stop_service_deployment::builders::StopServiceDeploymentOutputBuilder,
  172         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  173         -
> {
  174         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  175         -
    let tokens = &mut tokens_owned;
  176         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  177         -
    loop {
  178         -
        match tokens.next().transpose()? {
  179         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  180         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  181         -
                "serviceDeploymentArn" => {
  182         -
                    builder = builder.set_service_deployment_arn(
  183         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  184         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  185         -
                            .transpose()?,
  186         -
                    );
  187         -
                }
  188         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  189         -
            },
  190         -
            other => {
  191         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  192         -
                    "expected object key or end object, found: {other:?}"
  193         -
                )))
  194         -
            }
  195         -
        }
  196         -
    }
  197         -
    if tokens.next().is_some() {
  198         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  199         -
            "found more JSON tokens after completing parsing",
  200         -
        ));
  201         -
    }
  202         -
    Ok(builder)
  203         -
}

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

@@ -1,0 +13,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_stop_service_deployment_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::stop_service_deployment::StopServiceDeploymentInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.service_deployment_arn {
    7         -
        object.key("serviceDeploymentArn").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.stop_type {
   10         -
        object.key("stopType").string(var_2.as_str());
   11         -
    }
   12         -
    Ok(())
   13         -
}

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

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

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

@@ -1,0 +16,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_stop_task_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::stop_task::StopTaskInput,
    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.task {
   10         -
        object.key("task").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.reason {
   13         -
        object.key("reason").string(var_3.as_str());
   14         -
    }
   15         -
    Ok(())
   16         -
}

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

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

@@ -1,0 +48,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_string_map<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<
    6         -
    Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    7         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
    8         -
>
    9         -
where
   10         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   11         -
{
   12         -
    match tokens.next().transpose()? {
   13         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   14         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   15         -
            let mut map = ::std::collections::HashMap::new();
   16         -
            loop {
   17         -
                match tokens.next().transpose()? {
   18         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   19         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   20         -
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
   21         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   22         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   23         -
                            .transpose()?;
   24         -
                        match value {
   25         -
                            Some(value) => {
   26         -
                                map.insert(key, value);
   27         -
                            }
   28         -
                            None => {
   29         -
                                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   30         -
                                    "dense map cannot contain null values",
   31         -
                                ))
   32         -
                            }
   33         -
                        }
   34         -
                    }
   35         -
                    other => {
   36         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   37         -
                            "expected object key or end object, found: {other:?}"
   38         -
                        )))
   39         -
                    }
   40         -
                }
   41         -
            }
   42         -
            Ok(Some(map))
   43         -
        }
   44         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   45         -
            "expected start object or null",
   46         -
        )),
   47         -
    }
   48         -
}

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

@@ -1,0 +155,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_submit_attachment_state_changes_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::submit_attachment_state_changes::SubmitAttachmentStateChangesOutput,
    9         -
    crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesError,
   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::submit_attachment_state_changes::SubmitAttachmentStateChangesError::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::submit_attachment_state_changes::SubmitAttachmentStateChangesError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "AccessDeniedException" => crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesError::AccessDeniedException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   29         -
                    .map_err(crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesError::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         -
        "ClientException" => crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesError::ClientException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::ClientExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_client_exception::de_client_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesError::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::submit_attachment_state_changes::SubmitAttachmentStateChangesError::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::submit_attachment_state_changes::SubmitAttachmentStateChangesError::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::submit_attachment_state_changes::SubmitAttachmentStateChangesError::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::submit_attachment_state_changes::SubmitAttachmentStateChangesError::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::submit_attachment_state_changes::SubmitAttachmentStateChangesError::generic(generic),
   87         -
    })
   88         -
}
   89         -
   90         -
#[allow(clippy::unnecessary_wraps)]
   91         -
pub fn de_submit_attachment_state_changes_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::submit_attachment_state_changes::SubmitAttachmentStateChangesOutput,
   97         -
    crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesError,
   98         -
> {
   99         -
    Ok({
  100         -
        #[allow(unused_mut)]
  101         -
        let mut output = crate::operation::submit_attachment_state_changes::builders::SubmitAttachmentStateChangesOutputBuilder::default();
  102         -
        output = crate::protocol_serde::shape_submit_attachment_state_changes::de_submit_attachment_state_changes(_response_body, output)
  103         -
            .map_err(crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesError::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_submit_attachment_state_changes_input(
  110         -
    input: &crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesInput,
  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_submit_attachment_state_changes_input::ser_submit_attachment_state_changes_input_input(&mut object, input)?;
  115         -
    object.finish();
  116         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  117         -
}
  118         -
  119         -
pub(crate) fn de_submit_attachment_state_changes(
  120         -
    _value: &[u8],
  121         -
    mut builder: crate::operation::submit_attachment_state_changes::builders::SubmitAttachmentStateChangesOutputBuilder,
  122         -
) -> ::std::result::Result<
  123         -
    crate::operation::submit_attachment_state_changes::builders::SubmitAttachmentStateChangesOutputBuilder,
  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         -
                "acknowledgment" => {
  134         -
                    builder = builder.set_acknowledgment(
  135         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  136         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  137         -
                            .transpose()?,
  138         -
                    );
  139         -
                }
  140         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  141         -
            },
  142         -
            other => {
  143         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  144         -
                    "expected object key or end object, found: {other:?}"
  145         -
                )))
  146         -
            }
  147         -
        }
  148         -
    }
  149         -
    if tokens.next().is_some() {
  150         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  151         -
            "found more JSON tokens after completing parsing",
  152         -
        ));
  153         -
    }
  154         -
    Ok(builder)
  155         -
}

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

@@ -1,0 +22,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_submit_attachment_state_changes_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesInput,
    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.attachments {
   10         -
        let mut array_3 = object.key("attachments").start_array();
   11         -
        for item_4 in var_2 {
   12         -
            {
   13         -
                #[allow(unused_mut)]
   14         -
                let mut object_5 = array_3.value().start_object();
   15         -
                crate::protocol_serde::shape_attachment_state_change::ser_attachment_state_change(&mut object_5, item_4)?;
   16         -
                object_5.finish();
   17         -
            }
   18         -
        }
   19         -
        array_3.finish();
   20         -
    }
   21         -
    Ok(())
   22         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_submit_container_state_change.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_submit_container_state_change_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::submit_container_state_change::SubmitContainerStateChangeOutput,
    9         -
    crate::operation::submit_container_state_change::SubmitContainerStateChangeError,
   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::submit_container_state_change::SubmitContainerStateChangeError::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::submit_container_state_change::SubmitContainerStateChangeError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "AccessDeniedException" => crate::operation::submit_container_state_change::SubmitContainerStateChangeError::AccessDeniedException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   29         -
                    .map_err(crate::operation::submit_container_state_change::SubmitContainerStateChangeError::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         -
        "ClientException" => crate::operation::submit_container_state_change::SubmitContainerStateChangeError::ClientException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::ClientExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_client_exception::de_client_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::submit_container_state_change::SubmitContainerStateChangeError::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         -
        "ServerException" => crate::operation::submit_container_state_change::SubmitContainerStateChangeError::ServerException({
   54         -
            #[allow(unused_mut)]
   55         -
            let mut tmp = {
   56         -
                #[allow(unused_mut)]
   57         -
                let mut output = crate::types::error::builders::ServerExceptionBuilder::default();
   58         -
                output = crate::protocol_serde::shape_server_exception::de_server_exception_json_err(_response_body, output)
   59         -
                    .map_err(crate::operation::submit_container_state_change::SubmitContainerStateChangeError::unhandled)?;
   60         -
                let output = output.meta(generic);
   61         -
                output.build()
   62         -
            };
   63         -
            if tmp.message.is_none() {
   64         -
                tmp.message = _error_message;
   65         -
            }
   66         -
            tmp
   67         -
        }),
   68         -
        _ => crate::operation::submit_container_state_change::SubmitContainerStateChangeError::generic(generic),
   69         -
    })
   70         -
}
   71         -
   72         -
#[allow(clippy::unnecessary_wraps)]
   73         -
pub fn de_submit_container_state_change_http_response(
   74         -
    _response_status: u16,
   75         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   76         -
    _response_body: &[u8],
   77         -
) -> std::result::Result<
   78         -
    crate::operation::submit_container_state_change::SubmitContainerStateChangeOutput,
   79         -
    crate::operation::submit_container_state_change::SubmitContainerStateChangeError,
   80         -
> {
   81         -
    Ok({
   82         -
        #[allow(unused_mut)]
   83         -
        let mut output = crate::operation::submit_container_state_change::builders::SubmitContainerStateChangeOutputBuilder::default();
   84         -
        output = crate::protocol_serde::shape_submit_container_state_change::de_submit_container_state_change(_response_body, output)
   85         -
            .map_err(crate::operation::submit_container_state_change::SubmitContainerStateChangeError::unhandled)?;
   86         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   87         -
        output.build()
   88         -
    })
   89         -
}
   90         -
   91         -
pub fn ser_submit_container_state_change_input(
   92         -
    input: &crate::operation::submit_container_state_change::SubmitContainerStateChangeInput,
   93         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   94         -
    let mut out = String::new();
   95         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   96         -
    crate::protocol_serde::shape_submit_container_state_change_input::ser_submit_container_state_change_input_input(&mut object, input)?;
   97         -
    object.finish();
   98         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   99         -
}
  100         -
  101         -
pub(crate) fn de_submit_container_state_change(
  102         -
    _value: &[u8],
  103         -
    mut builder: crate::operation::submit_container_state_change::builders::SubmitContainerStateChangeOutputBuilder,
  104         -
) -> ::std::result::Result<
  105         -
    crate::operation::submit_container_state_change::builders::SubmitContainerStateChangeOutputBuilder,
  106         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  107         -
> {
  108         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  109         -
    let tokens = &mut tokens_owned;
  110         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  111         -
    loop {
  112         -
        match tokens.next().transpose()? {
  113         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  114         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  115         -
                "acknowledgment" => {
  116         -
                    builder = builder.set_acknowledgment(
  117         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  118         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  119         -
                            .transpose()?,
  120         -
                    );
  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         -
}