AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

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

@@ -1,0 +28,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_services_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_services::DescribeServicesInput,
    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.services {
   10         -
        let mut array_3 = object.key("services").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.include {
   19         -
        let mut array_6 = object.key("include").start_array();
   20         -
        for item_7 in var_5 {
   21         -
            {
   22         -
                array_6.value().string(item_7.as_str());
   23         -
            }
   24         -
        }
   25         -
        array_6.finish();
   26         -
    }
   27         -
    Ok(())
   28         -
}

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

@@ -1,0 +140,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_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::describe_task_definition::DescribeTaskDefinitionOutput,
    9         -
    crate::operation::describe_task_definition::DescribeTaskDefinitionError,
   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::describe_task_definition::DescribeTaskDefinitionError::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::describe_task_definition::DescribeTaskDefinitionError::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::describe_task_definition::DescribeTaskDefinitionError::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::describe_task_definition::DescribeTaskDefinitionError::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::describe_task_definition::DescribeTaskDefinitionError::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::describe_task_definition::DescribeTaskDefinitionError::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::describe_task_definition::DescribeTaskDefinitionError::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::describe_task_definition::DescribeTaskDefinitionError::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::describe_task_definition::DescribeTaskDefinitionError::generic(generic),
   73         -
    })
   74         -
}
   75         -
   76         -
#[allow(clippy::unnecessary_wraps)]
   77         -
pub fn de_describe_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::describe_task_definition::DescribeTaskDefinitionOutput,
   83         -
    crate::operation::describe_task_definition::DescribeTaskDefinitionError,
   84         -
> {
   85         -
    Ok({
   86         -
        #[allow(unused_mut)]
   87         -
        let mut output = crate::operation::describe_task_definition::builders::DescribeTaskDefinitionOutputBuilder::default();
   88         -
        output = crate::protocol_serde::shape_describe_task_definition::de_describe_task_definition(_response_body, output)
   89         -
            .map_err(crate::operation::describe_task_definition::DescribeTaskDefinitionError::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_describe_task_definition_input(
   96         -
    input: &crate::operation::describe_task_definition::DescribeTaskDefinitionInput,
   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_describe_task_definition_input::ser_describe_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_describe_task_definition(
  106         -
    _value: &[u8],
  107         -
    mut builder: crate::operation::describe_task_definition::builders::DescribeTaskDefinitionOutputBuilder,
  108         -
) -> ::std::result::Result<
  109         -
    crate::operation::describe_task_definition::builders::DescribeTaskDefinitionOutputBuilder,
  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         -
                "tags" => {
  123         -
                    builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens, _value)?);
  124         -
                }
  125         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  126         -
            },
  127         -
            other => {
  128         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  129         -
                    "expected object key or end object, found: {other:?}"
  130         -
                )))
  131         -
            }
  132         -
        }
  133         -
    }
  134         -
    if tokens.next().is_some() {
  135         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  136         -
            "found more JSON tokens after completing parsing",
  137         -
        ));
  138         -
    }
  139         -
    Ok(builder)
  140         -
}

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

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_task_definition_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_task_definition::DescribeTaskDefinitionInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.task_definition {
    7         -
        object.key("taskDefinition").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.include {
   10         -
        let mut array_3 = object.key("include").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         -
    Ok(())
   19         -
}

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

@@ -1,0 +206,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_task_sets_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::describe_task_sets::DescribeTaskSetsOutput, crate::operation::describe_task_sets::DescribeTaskSetsError> {
    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::describe_task_sets::DescribeTaskSetsError::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::describe_task_sets::DescribeTaskSetsError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "AccessDeniedException" => crate::operation::describe_task_sets::DescribeTaskSetsError::AccessDeniedException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::describe_task_sets::DescribeTaskSetsError::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         -
        "ClientException" => crate::operation::describe_task_sets::DescribeTaskSetsError::ClientException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::ClientExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_client_exception::de_client_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::describe_task_sets::DescribeTaskSetsError::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         -
        "ClusterNotFoundException" => crate::operation::describe_task_sets::DescribeTaskSetsError::ClusterNotFoundException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::ClusterNotFoundExceptionBuilder::default();
   55         -
                output = crate::protocol_serde::shape_cluster_not_found_exception::de_cluster_not_found_exception_json_err(_response_body, output)
   56         -
                    .map_err(crate::operation::describe_task_sets::DescribeTaskSetsError::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         -
        "InvalidParameterException" => crate::operation::describe_task_sets::DescribeTaskSetsError::InvalidParameterException({
   66         -
            #[allow(unused_mut)]
   67         -
            let mut tmp = {
   68         -
                #[allow(unused_mut)]
   69         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   70         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   71         -
                    .map_err(crate::operation::describe_task_sets::DescribeTaskSetsError::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         -
        "ServerException" => crate::operation::describe_task_sets::DescribeTaskSetsError::ServerException({
   81         -
            #[allow(unused_mut)]
   82         -
            let mut tmp = {
   83         -
                #[allow(unused_mut)]
   84         -
                let mut output = crate::types::error::builders::ServerExceptionBuilder::default();
   85         -
                output = crate::protocol_serde::shape_server_exception::de_server_exception_json_err(_response_body, output)
   86         -
                    .map_err(crate::operation::describe_task_sets::DescribeTaskSetsError::unhandled)?;
   87         -
                let output = output.meta(generic);
   88         -
                output.build()
   89         -
            };
   90         -
            if tmp.message.is_none() {
   91         -
                tmp.message = _error_message;
   92         -
            }
   93         -
            tmp
   94         -
        }),
   95         -
        "ServiceNotActiveException" => crate::operation::describe_task_sets::DescribeTaskSetsError::ServiceNotActiveException({
   96         -
            #[allow(unused_mut)]
   97         -
            let mut tmp = {
   98         -
                #[allow(unused_mut)]
   99         -
                let mut output = crate::types::error::builders::ServiceNotActiveExceptionBuilder::default();
  100         -
                output = crate::protocol_serde::shape_service_not_active_exception::de_service_not_active_exception_json_err(_response_body, output)
  101         -
                    .map_err(crate::operation::describe_task_sets::DescribeTaskSetsError::unhandled)?;
  102         -
                let output = output.meta(generic);
  103         -
                output.build()
  104         -
            };
  105         -
            if tmp.message.is_none() {
  106         -
                tmp.message = _error_message;
  107         -
            }
  108         -
            tmp
  109         -
        }),
  110         -
        "ServiceNotFoundException" => crate::operation::describe_task_sets::DescribeTaskSetsError::ServiceNotFoundException({
  111         -
            #[allow(unused_mut)]
  112         -
            let mut tmp = {
  113         -
                #[allow(unused_mut)]
  114         -
                let mut output = crate::types::error::builders::ServiceNotFoundExceptionBuilder::default();
  115         -
                output = crate::protocol_serde::shape_service_not_found_exception::de_service_not_found_exception_json_err(_response_body, output)
  116         -
                    .map_err(crate::operation::describe_task_sets::DescribeTaskSetsError::unhandled)?;
  117         -
                let output = output.meta(generic);
  118         -
                output.build()
  119         -
            };
  120         -
            if tmp.message.is_none() {
  121         -
                tmp.message = _error_message;
  122         -
            }
  123         -
            tmp
  124         -
        }),
  125         -
        "UnsupportedFeatureException" => crate::operation::describe_task_sets::DescribeTaskSetsError::UnsupportedFeatureException({
  126         -
            #[allow(unused_mut)]
  127         -
            let mut tmp = {
  128         -
                #[allow(unused_mut)]
  129         -
                let mut output = crate::types::error::builders::UnsupportedFeatureExceptionBuilder::default();
  130         -
                output =
  131         -
                    crate::protocol_serde::shape_unsupported_feature_exception::de_unsupported_feature_exception_json_err(_response_body, output)
  132         -
                        .map_err(crate::operation::describe_task_sets::DescribeTaskSetsError::unhandled)?;
  133         -
                let output = output.meta(generic);
  134         -
                output.build()
  135         -
            };
  136         -
            if tmp.message.is_none() {
  137         -
                tmp.message = _error_message;
  138         -
            }
  139         -
            tmp
  140         -
        }),
  141         -
        _ => crate::operation::describe_task_sets::DescribeTaskSetsError::generic(generic),
  142         -
    })
  143         -
}
  144         -
  145         -
#[allow(clippy::unnecessary_wraps)]
  146         -
pub fn de_describe_task_sets_http_response(
  147         -
    _response_status: u16,
  148         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  149         -
    _response_body: &[u8],
  150         -
) -> std::result::Result<crate::operation::describe_task_sets::DescribeTaskSetsOutput, crate::operation::describe_task_sets::DescribeTaskSetsError> {
  151         -
    Ok({
  152         -
        #[allow(unused_mut)]
  153         -
        let mut output = crate::operation::describe_task_sets::builders::DescribeTaskSetsOutputBuilder::default();
  154         -
        output = crate::protocol_serde::shape_describe_task_sets::de_describe_task_sets(_response_body, output)
  155         -
            .map_err(crate::operation::describe_task_sets::DescribeTaskSetsError::unhandled)?;
  156         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  157         -
        output.build()
  158         -
    })
  159         -
}
  160         -
  161         -
pub fn ser_describe_task_sets_input(
  162         -
    input: &crate::operation::describe_task_sets::DescribeTaskSetsInput,
  163         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  164         -
    let mut out = String::new();
  165         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  166         -
    crate::protocol_serde::shape_describe_task_sets_input::ser_describe_task_sets_input_input(&mut object, input)?;
  167         -
    object.finish();
  168         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  169         -
}
  170         -
  171         -
pub(crate) fn de_describe_task_sets(
  172         -
    _value: &[u8],
  173         -
    mut builder: crate::operation::describe_task_sets::builders::DescribeTaskSetsOutputBuilder,
  174         -
) -> ::std::result::Result<
  175         -
    crate::operation::describe_task_sets::builders::DescribeTaskSetsOutputBuilder,
  176         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  177         -
> {
  178         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  179         -
    let tokens = &mut tokens_owned;
  180         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  181         -
    loop {
  182         -
        match tokens.next().transpose()? {
  183         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  184         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  185         -
                "taskSets" => {
  186         -
                    builder = builder.set_task_sets(crate::protocol_serde::shape_task_sets::de_task_sets(tokens, _value)?);
  187         -
                }
  188         -
                "failures" => {
  189         -
                    builder = builder.set_failures(crate::protocol_serde::shape_failures::de_failures(tokens, _value)?);
  190         -
                }
  191         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  192         -
            },
  193         -
            other => {
  194         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  195         -
                    "expected object key or end object, found: {other:?}"
  196         -
                )))
  197         -
            }
  198         -
        }
  199         -
    }
  200         -
    if tokens.next().is_some() {
  201         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  202         -
            "found more JSON tokens after completing parsing",
  203         -
        ));
  204         -
    }
  205         -
    Ok(builder)
  206         -
}

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

@@ -1,0 +31,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_task_sets_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_task_sets::DescribeTaskSetsInput,
    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.service {
   10         -
        object.key("service").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.task_sets {
   13         -
        let mut array_4 = object.key("taskSets").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.include {
   22         -
        let mut array_7 = object.key("include").start_array();
   23         -
        for item_8 in var_6 {
   24         -
            {
   25         -
                array_7.value().string(item_8.as_str());
   26         -
            }
   27         -
        }
   28         -
        array_7.finish();
   29         -
    }
   30         -
    Ok(())
   31         -
}

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

@@ -1,0 +145,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_describe_tasks_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::describe_tasks::DescribeTasksOutput, crate::operation::describe_tasks::DescribeTasksError> {
    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::describe_tasks::DescribeTasksError::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::describe_tasks::DescribeTasksError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "ClientException" => crate::operation::describe_tasks::DescribeTasksError::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::describe_tasks::DescribeTasksError::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::describe_tasks::DescribeTasksError::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::describe_tasks::DescribeTasksError::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::describe_tasks::DescribeTasksError::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::describe_tasks::DescribeTasksError::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::describe_tasks::DescribeTasksError::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::describe_tasks::DescribeTasksError::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::describe_tasks::DescribeTasksError::generic(generic),
   81         -
    })
   82         -
}
   83         -
   84         -
#[allow(clippy::unnecessary_wraps)]
   85         -
pub fn de_describe_tasks_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::describe_tasks::DescribeTasksOutput, crate::operation::describe_tasks::DescribeTasksError> {
   90         -
    Ok({
   91         -
        #[allow(unused_mut)]
   92         -
        let mut output = crate::operation::describe_tasks::builders::DescribeTasksOutputBuilder::default();
   93         -
        output = crate::protocol_serde::shape_describe_tasks::de_describe_tasks(_response_body, output)
   94         -
            .map_err(crate::operation::describe_tasks::DescribeTasksError::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_describe_tasks_input(
  101         -
    input: &crate::operation::describe_tasks::DescribeTasksInput,
  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_describe_tasks_input::ser_describe_tasks_input_input(&mut object, input)?;
  106         -
    object.finish();
  107         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  108         -
}
  109         -
  110         -
pub(crate) fn de_describe_tasks(
  111         -
    _value: &[u8],
  112         -
    mut builder: crate::operation::describe_tasks::builders::DescribeTasksOutputBuilder,
  113         -
) -> ::std::result::Result<
  114         -
    crate::operation::describe_tasks::builders::DescribeTasksOutputBuilder,
  115         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  116         -
> {
  117         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  118         -
    let tokens = &mut tokens_owned;
  119         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  120         -
    loop {
  121         -
        match tokens.next().transpose()? {
  122         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  123         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  124         -
                "tasks" => {
  125         -
                    builder = builder.set_tasks(crate::protocol_serde::shape_tasks::de_tasks(tokens, _value)?);
  126         -
                }
  127         -
                "failures" => {
  128         -
                    builder = builder.set_failures(crate::protocol_serde::shape_failures::de_failures(tokens, _value)?);
  129         -
                }
  130         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  131         -
            },
  132         -
            other => {
  133         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  134         -
                    "expected object key or end object, found: {other:?}"
  135         -
                )))
  136         -
            }
  137         -
        }
  138         -
    }
  139         -
    if tokens.next().is_some() {
  140         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  141         -
            "found more JSON tokens after completing parsing",
  142         -
        ));
  143         -
    }
  144         -
    Ok(builder)
  145         -
}

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

@@ -1,0 +28,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_tasks_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_tasks::DescribeTasksInput,
    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.tasks {
   10         -
        let mut array_3 = object.key("tasks").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.include {
   19         -
        let mut array_6 = object.key("include").start_array();
   20         -
        for item_7 in var_5 {
   21         -
            {
   22         -
                array_6.value().string(item_7.as_str());
   23         -
            }
   24         -
        }
   25         -
        array_6.finish();
   26         -
    }
   27         -
    Ok(())
   28         -
}

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

@@ -1,0 +76,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_device(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::Device,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("hostPath").string(input.host_path.as_str());
    8         -
    }
    9         -
    if let Some(var_1) = &input.container_path {
   10         -
        object.key("containerPath").string(var_1.as_str());
   11         -
    }
   12         -
    if let Some(var_2) = &input.permissions {
   13         -
        let mut array_3 = object.key("permissions").start_array();
   14         -
        for item_4 in var_2 {
   15         -
            {
   16         -
                array_3.value().string(item_4.as_str());
   17         -
            }
   18         -
        }
   19         -
        array_3.finish();
   20         -
    }
   21         -
    Ok(())
   22         -
}
   23         -
   24         -
pub(crate) fn de_device<'a, I>(
   25         -
    tokens: &mut ::std::iter::Peekable<I>,
   26         -
    _value: &'a [u8],
   27         -
) -> ::std::result::Result<Option<crate::types::Device>, ::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::DeviceBuilder::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         -
                        "hostPath" => {
   41         -
                            builder = builder.set_host_path(
   42         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   43         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   44         -
                                    .transpose()?,
   45         -
                            );
   46         -
                        }
   47         -
                        "containerPath" => {
   48         -
                            builder = builder.set_container_path(
   49         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   50         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   51         -
                                    .transpose()?,
   52         -
                            );
   53         -
                        }
   54         -
                        "permissions" => {
   55         -
                            builder = builder.set_permissions(crate::protocol_serde::shape_device_cgroup_permissions::de_device_cgroup_permissions(
   56         -
                                tokens, _value,
   57         -
                            )?);
   58         -
                        }
   59         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   60         -
                    },
   61         -
                    other => {
   62         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   63         -
                            "expected object key or end object, found: {other:?}"
   64         -
                        )))
   65         -
                    }
   66         -
                }
   67         -
            }
   68         -
            Ok(Some(crate::serde_util::device_correct_errors(builder).build().map_err(|err| {
   69         -
                ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err)
   70         -
            })?))
   71         -
        }
   72         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   73         -
            "expected start object or null",
   74         -
        )),
   75         -
    }
   76         -
}

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

@@ -1,0 +39,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_device_cgroup_permissions<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::DeviceCgroupPermission>>, ::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::DeviceCgroupPermission::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_devices_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_devices_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::Device>>, ::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_device::de_device(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_discover_poll_endpoint.rs

@@ -1,0 +136,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_discover_poll_endpoint_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::discover_poll_endpoint::DiscoverPollEndpointOutput,
    9         -
    crate::operation::discover_poll_endpoint::DiscoverPollEndpointError,
   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::discover_poll_endpoint::DiscoverPollEndpointError::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::discover_poll_endpoint::DiscoverPollEndpointError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "ClientException" => crate::operation::discover_poll_endpoint::DiscoverPollEndpointError::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::discover_poll_endpoint::DiscoverPollEndpointError::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         -
        "ServerException" => crate::operation::discover_poll_endpoint::DiscoverPollEndpointError::ServerException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::ServerExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_server_exception::de_server_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::discover_poll_endpoint::DiscoverPollEndpointError::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         -
        _ => crate::operation::discover_poll_endpoint::DiscoverPollEndpointError::generic(generic),
   54         -
    })
   55         -
}
   56         -
   57         -
#[allow(clippy::unnecessary_wraps)]
   58         -
pub fn de_discover_poll_endpoint_http_response(
   59         -
    _response_status: u16,
   60         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   61         -
    _response_body: &[u8],
   62         -
) -> std::result::Result<
   63         -
    crate::operation::discover_poll_endpoint::DiscoverPollEndpointOutput,
   64         -
    crate::operation::discover_poll_endpoint::DiscoverPollEndpointError,
   65         -
> {
   66         -
    Ok({
   67         -
        #[allow(unused_mut)]
   68         -
        let mut output = crate::operation::discover_poll_endpoint::builders::DiscoverPollEndpointOutputBuilder::default();
   69         -
        output = crate::protocol_serde::shape_discover_poll_endpoint::de_discover_poll_endpoint(_response_body, output)
   70         -
            .map_err(crate::operation::discover_poll_endpoint::DiscoverPollEndpointError::unhandled)?;
   71         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   72         -
        output.build()
   73         -
    })
   74         -
}
   75         -
   76         -
pub fn ser_discover_poll_endpoint_input(
   77         -
    input: &crate::operation::discover_poll_endpoint::DiscoverPollEndpointInput,
   78         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   79         -
    let mut out = String::new();
   80         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   81         -
    crate::protocol_serde::shape_discover_poll_endpoint_input::ser_discover_poll_endpoint_input_input(&mut object, input)?;
   82         -
    object.finish();
   83         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   84         -
}
   85         -
   86         -
pub(crate) fn de_discover_poll_endpoint(
   87         -
    _value: &[u8],
   88         -
    mut builder: crate::operation::discover_poll_endpoint::builders::DiscoverPollEndpointOutputBuilder,
   89         -
) -> ::std::result::Result<
   90         -
    crate::operation::discover_poll_endpoint::builders::DiscoverPollEndpointOutputBuilder,
   91         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   92         -
> {
   93         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   94         -
    let tokens = &mut tokens_owned;
   95         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   96         -
    loop {
   97         -
        match tokens.next().transpose()? {
   98         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   99         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  100         -
                "endpoint" => {
  101         -
                    builder = builder.set_endpoint(
  102         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  103         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  104         -
                            .transpose()?,
  105         -
                    );
  106         -
                }
  107         -
                "telemetryEndpoint" => {
  108         -
                    builder = builder.set_telemetry_endpoint(
  109         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  110         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  111         -
                            .transpose()?,
  112         -
                    );
  113         -
                }
  114         -
                "serviceConnectEndpoint" => {
  115         -
                    builder = builder.set_service_connect_endpoint(
  116         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  117         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  118         -
                            .transpose()?,
  119         -
                    );
  120         -
                }
  121         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  122         -
            },
  123         -
            other => {
  124         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  125         -
                    "expected object key or end object, found: {other:?}"
  126         -
                )))
  127         -
            }
  128         -
        }
  129         -
    }
  130         -
    if tokens.next().is_some() {
  131         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  132         -
            "found more JSON tokens after completing parsing",
  133         -
        ));
  134         -
    }
  135         -
    Ok(builder)
  136         -
}

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

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

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_docker_labels_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_docker_labels_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_docker_volume_configuration.rs

@@ -1,0 +92,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_docker_volume_configuration(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::DockerVolumeConfiguration,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.scope {
    7         -
        object.key("scope").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.autoprovision {
   10         -
        object.key("autoprovision").boolean(*var_2);
   11         -
    }
   12         -
    if let Some(var_3) = &input.driver {
   13         -
        object.key("driver").string(var_3.as_str());
   14         -
    }
   15         -
    if let Some(var_4) = &input.driver_opts {
   16         -
        #[allow(unused_mut)]
   17         -
        let mut object_5 = object.key("driverOpts").start_object();
   18         -
        for (key_6, value_7) in var_4 {
   19         -
            {
   20         -
                object_5.key(key_6.as_str()).string(value_7.as_str());
   21         -
            }
   22         -
        }
   23         -
        object_5.finish();
   24         -
    }
   25         -
    if let Some(var_8) = &input.labels {
   26         -
        #[allow(unused_mut)]
   27         -
        let mut object_9 = object.key("labels").start_object();
   28         -
        for (key_10, value_11) in var_8 {
   29         -
            {
   30         -
                object_9.key(key_10.as_str()).string(value_11.as_str());
   31         -
            }
   32         -
        }
   33         -
        object_9.finish();
   34         -
    }
   35         -
    Ok(())
   36         -
}
   37         -
   38         -
pub(crate) fn de_docker_volume_configuration<'a, I>(
   39         -
    tokens: &mut ::std::iter::Peekable<I>,
   40         -
    _value: &'a [u8],
   41         -
) -> ::std::result::Result<Option<crate::types::DockerVolumeConfiguration>, ::aws_smithy_json::deserialize::error::DeserializeError>
   42         -
where
   43         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   44         -
{
   45         -
    match tokens.next().transpose()? {
   46         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   47         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   48         -
            #[allow(unused_mut)]
   49         -
            let mut builder = crate::types::builders::DockerVolumeConfigurationBuilder::default();
   50         -
            loop {
   51         -
                match tokens.next().transpose()? {
   52         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   53         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   54         -
                        "scope" => {
   55         -
                            builder = builder.set_scope(
   56         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   57         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::Scope::from(u.as_ref())))
   58         -
                                    .transpose()?,
   59         -
                            );
   60         -
                        }
   61         -
                        "autoprovision" => {
   62         -
                            builder = builder.set_autoprovision(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
   63         -
                        }
   64         -
                        "driver" => {
   65         -
                            builder = builder.set_driver(
   66         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   67         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   68         -
                                    .transpose()?,
   69         -
                            );
   70         -
                        }
   71         -
                        "driverOpts" => {
   72         -
                            builder = builder.set_driver_opts(crate::protocol_serde::shape_string_map::de_string_map(tokens, _value)?);
   73         -
                        }
   74         -
                        "labels" => {
   75         -
                            builder = builder.set_labels(crate::protocol_serde::shape_string_map::de_string_map(tokens, _value)?);
   76         -
                        }
   77         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   78         -
                    },
   79         -
                    other => {
   80         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   81         -
                            "expected object key or end object, found: {other:?}"
   82         -
                        )))
   83         -
                    }
   84         -
                }
   85         -
            }
   86         -
            Ok(Some(builder.build()))
   87         -
        }
   88         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   89         -
            "expected start object or null",
   90         -
        )),
   91         -
    }
   92         -
}