AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c

Files changed:

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

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_deregister_task_definition_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::deregister_task_definition::DeregisterTaskDefinitionInput,
    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         -
    Ok(())
   10         -
}

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

@@ -1,0 +180,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_capacity_providers_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_capacity_providers::DescribeCapacityProvidersOutput,
    9         -
    crate::operation::describe_capacity_providers::DescribeCapacityProvidersError,
   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_capacity_providers::DescribeCapacityProvidersError::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_capacity_providers::DescribeCapacityProvidersError::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_capacity_providers::DescribeCapacityProvidersError::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_capacity_providers::DescribeCapacityProvidersError::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         -
        "ClusterNotFoundException" => crate::operation::describe_capacity_providers::DescribeCapacityProvidersError::ClusterNotFoundException({
   43         -
            #[allow(unused_mut)]
   44         -
            let mut tmp = {
   45         -
                #[allow(unused_mut)]
   46         -
                let mut output = crate::types::error::builders::ClusterNotFoundExceptionBuilder::default();
   47         -
                output = crate::protocol_serde::shape_cluster_not_found_exception::de_cluster_not_found_exception_json_err(_response_body, output)
   48         -
                    .map_err(crate::operation::describe_capacity_providers::DescribeCapacityProvidersError::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         -
        "InvalidParameterException" => crate::operation::describe_capacity_providers::DescribeCapacityProvidersError::InvalidParameterException({
   58         -
            #[allow(unused_mut)]
   59         -
            let mut tmp = {
   60         -
                #[allow(unused_mut)]
   61         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   62         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   63         -
                    .map_err(crate::operation::describe_capacity_providers::DescribeCapacityProvidersError::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         -
        "ServerException" => crate::operation::describe_capacity_providers::DescribeCapacityProvidersError::ServerException({
   73         -
            #[allow(unused_mut)]
   74         -
            let mut tmp = {
   75         -
                #[allow(unused_mut)]
   76         -
                let mut output = crate::types::error::builders::ServerExceptionBuilder::default();
   77         -
                output = crate::protocol_serde::shape_server_exception::de_server_exception_json_err(_response_body, output)
   78         -
                    .map_err(crate::operation::describe_capacity_providers::DescribeCapacityProvidersError::unhandled)?;
   79         -
                let output = output.meta(generic);
   80         -
                output.build()
   81         -
            };
   82         -
            if tmp.message.is_none() {
   83         -
                tmp.message = _error_message;
   84         -
            }
   85         -
            tmp
   86         -
        }),
   87         -
        "UnsupportedFeatureException" => {
   88         -
            crate::operation::describe_capacity_providers::DescribeCapacityProvidersError::UnsupportedFeatureException({
   89         -
                #[allow(unused_mut)]
   90         -
                let mut tmp = {
   91         -
                    #[allow(unused_mut)]
   92         -
                    let mut output = crate::types::error::builders::UnsupportedFeatureExceptionBuilder::default();
   93         -
                    output =
   94         -
                        crate::protocol_serde::shape_unsupported_feature_exception::de_unsupported_feature_exception_json_err(_response_body, output)
   95         -
                            .map_err(crate::operation::describe_capacity_providers::DescribeCapacityProvidersError::unhandled)?;
   96         -
                    let output = output.meta(generic);
   97         -
                    output.build()
   98         -
                };
   99         -
                if tmp.message.is_none() {
  100         -
                    tmp.message = _error_message;
  101         -
                }
  102         -
                tmp
  103         -
            })
  104         -
        }
  105         -
        _ => crate::operation::describe_capacity_providers::DescribeCapacityProvidersError::generic(generic),
  106         -
    })
  107         -
}
  108         -
  109         -
#[allow(clippy::unnecessary_wraps)]
  110         -
pub fn de_describe_capacity_providers_http_response(
  111         -
    _response_status: u16,
  112         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  113         -
    _response_body: &[u8],
  114         -
) -> std::result::Result<
  115         -
    crate::operation::describe_capacity_providers::DescribeCapacityProvidersOutput,
  116         -
    crate::operation::describe_capacity_providers::DescribeCapacityProvidersError,
  117         -
> {
  118         -
    Ok({
  119         -
        #[allow(unused_mut)]
  120         -
        let mut output = crate::operation::describe_capacity_providers::builders::DescribeCapacityProvidersOutputBuilder::default();
  121         -
        output = crate::protocol_serde::shape_describe_capacity_providers::de_describe_capacity_providers(_response_body, output)
  122         -
            .map_err(crate::operation::describe_capacity_providers::DescribeCapacityProvidersError::unhandled)?;
  123         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  124         -
        output.build()
  125         -
    })
  126         -
}
  127         -
  128         -
pub fn ser_describe_capacity_providers_input(
  129         -
    input: &crate::operation::describe_capacity_providers::DescribeCapacityProvidersInput,
  130         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  131         -
    let mut out = String::new();
  132         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  133         -
    crate::protocol_serde::shape_describe_capacity_providers_input::ser_describe_capacity_providers_input_input(&mut object, input)?;
  134         -
    object.finish();
  135         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  136         -
}
  137         -
  138         -
pub(crate) fn de_describe_capacity_providers(
  139         -
    _value: &[u8],
  140         -
    mut builder: crate::operation::describe_capacity_providers::builders::DescribeCapacityProvidersOutputBuilder,
  141         -
) -> ::std::result::Result<
  142         -
    crate::operation::describe_capacity_providers::builders::DescribeCapacityProvidersOutputBuilder,
  143         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  144         -
> {
  145         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  146         -
    let tokens = &mut tokens_owned;
  147         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  148         -
    loop {
  149         -
        match tokens.next().transpose()? {
  150         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  151         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  152         -
                "capacityProviders" => {
  153         -
                    builder = builder.set_capacity_providers(crate::protocol_serde::shape_capacity_providers::de_capacity_providers(tokens, _value)?);
  154         -
                }
  155         -
                "failures" => {
  156         -
                    builder = builder.set_failures(crate::protocol_serde::shape_failures::de_failures(tokens, _value)?);
  157         -
                }
  158         -
                "nextToken" => {
  159         -
                    builder = builder.set_next_token(
  160         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  161         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  162         -
                            .transpose()?,
  163         -
                    );
  164         -
                }
  165         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  166         -
            },
  167         -
            other => {
  168         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  169         -
                    "expected object key or end object, found: {other:?}"
  170         -
                )))
  171         -
            }
  172         -
        }
  173         -
    }
  174         -
    if tokens.next().is_some() {
  175         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  176         -
            "found more JSON tokens after completing parsing",
  177         -
        ));
  178         -
    }
  179         -
    Ok(builder)
  180         -
}

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

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_capacity_providers_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_capacity_providers::DescribeCapacityProvidersInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.capacity_providers {
    7         -
        let mut array_2 = object.key("capacityProviders").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                array_2.value().string(item_3.as_str());
   11         -
            }
   12         -
        }
   13         -
        array_2.finish();
   14         -
    }
   15         -
    if let Some(var_4) = &input.cluster {
   16         -
        object.key("cluster").string(var_4.as_str());
   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         -
    if let Some(var_8) = &input.max_results {
   28         -
        object.key("maxResults").number(
   29         -
            #[allow(clippy::useless_conversion)]
   30         -
            ::aws_smithy_types::Number::NegInt((*var_8).into()),
   31         -
        );
   32         -
    }
   33         -
    if let Some(var_9) = &input.next_token {
   34         -
        object.key("nextToken").string(var_9.as_str());
   35         -
    }
   36         -
    Ok(())
   37         -
}

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

@@ -1,0 +130,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_clusters_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_clusters::DescribeClustersOutput, crate::operation::describe_clusters::DescribeClustersError> {
    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_clusters::DescribeClustersError::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_clusters::DescribeClustersError::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_clusters::DescribeClustersError::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_clusters::DescribeClustersError::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         -
        "InvalidParameterException" => crate::operation::describe_clusters::DescribeClustersError::InvalidParameterException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::describe_clusters::DescribeClustersError::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         -
        "ServerException" => crate::operation::describe_clusters::DescribeClustersError::ServerException({
   51         -
            #[allow(unused_mut)]
   52         -
            let mut tmp = {
   53         -
                #[allow(unused_mut)]
   54         -
                let mut output = crate::types::error::builders::ServerExceptionBuilder::default();
   55         -
                output = crate::protocol_serde::shape_server_exception::de_server_exception_json_err(_response_body, output)
   56         -
                    .map_err(crate::operation::describe_clusters::DescribeClustersError::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         -
        _ => crate::operation::describe_clusters::DescribeClustersError::generic(generic),
   66         -
    })
   67         -
}
   68         -
   69         -
#[allow(clippy::unnecessary_wraps)]
   70         -
pub fn de_describe_clusters_http_response(
   71         -
    _response_status: u16,
   72         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   73         -
    _response_body: &[u8],
   74         -
) -> std::result::Result<crate::operation::describe_clusters::DescribeClustersOutput, crate::operation::describe_clusters::DescribeClustersError> {
   75         -
    Ok({
   76         -
        #[allow(unused_mut)]
   77         -
        let mut output = crate::operation::describe_clusters::builders::DescribeClustersOutputBuilder::default();
   78         -
        output = crate::protocol_serde::shape_describe_clusters::de_describe_clusters(_response_body, output)
   79         -
            .map_err(crate::operation::describe_clusters::DescribeClustersError::unhandled)?;
   80         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   81         -
        output.build()
   82         -
    })
   83         -
}
   84         -
   85         -
pub fn ser_describe_clusters_input(
   86         -
    input: &crate::operation::describe_clusters::DescribeClustersInput,
   87         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   88         -
    let mut out = String::new();
   89         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   90         -
    crate::protocol_serde::shape_describe_clusters_input::ser_describe_clusters_input_input(&mut object, input)?;
   91         -
    object.finish();
   92         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   93         -
}
   94         -
   95         -
pub(crate) fn de_describe_clusters(
   96         -
    _value: &[u8],
   97         -
    mut builder: crate::operation::describe_clusters::builders::DescribeClustersOutputBuilder,
   98         -
) -> ::std::result::Result<
   99         -
    crate::operation::describe_clusters::builders::DescribeClustersOutputBuilder,
  100         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  101         -
> {
  102         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  103         -
    let tokens = &mut tokens_owned;
  104         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  105         -
    loop {
  106         -
        match tokens.next().transpose()? {
  107         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  108         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  109         -
                "clusters" => {
  110         -
                    builder = builder.set_clusters(crate::protocol_serde::shape_clusters::de_clusters(tokens, _value)?);
  111         -
                }
  112         -
                "failures" => {
  113         -
                    builder = builder.set_failures(crate::protocol_serde::shape_failures::de_failures(tokens, _value)?);
  114         -
                }
  115         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  116         -
            },
  117         -
            other => {
  118         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  119         -
                    "expected object key or end object, found: {other:?}"
  120         -
                )))
  121         -
            }
  122         -
        }
  123         -
    }
  124         -
    if tokens.next().is_some() {
  125         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  126         -
            "found more JSON tokens after completing parsing",
  127         -
        ));
  128         -
    }
  129         -
    Ok(builder)
  130         -
}

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

@@ -1,0 +25,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_clusters_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_clusters::DescribeClustersInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.clusters {
    7         -
        let mut array_2 = object.key("clusters").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                array_2.value().string(item_3.as_str());
   11         -
            }
   12         -
        }
   13         -
        array_2.finish();
   14         -
    }
   15         -
    if let Some(var_4) = &input.include {
   16         -
        let mut array_5 = object.key("include").start_array();
   17         -
        for item_6 in var_4 {
   18         -
            {
   19         -
                array_5.value().string(item_6.as_str());
   20         -
            }
   21         -
        }
   22         -
        array_5.finish();
   23         -
    }
   24         -
    Ok(())
   25         -
}

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

@@ -1,0 +152,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_container_instances_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_container_instances::DescribeContainerInstancesOutput,
    9         -
    crate::operation::describe_container_instances::DescribeContainerInstancesError,
   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_container_instances::DescribeContainerInstancesError::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::describe_container_instances::DescribeContainerInstancesError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "ClientException" => crate::operation::describe_container_instances::DescribeContainerInstancesError::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::describe_container_instances::DescribeContainerInstancesError::unhandled)?;
   30         -
                let output = output.meta(generic);
   31         -
                output.build()
   32         -
            };
   33         -
            if tmp.message.is_none() {
   34         -
                tmp.message = _error_message;
   35         -
            }
   36         -
            tmp
   37         -
        }),
   38         -
        "ClusterNotFoundException" => crate::operation::describe_container_instances::DescribeContainerInstancesError::ClusterNotFoundException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::ClusterNotFoundExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_cluster_not_found_exception::de_cluster_not_found_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::describe_container_instances::DescribeContainerInstancesError::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" => crate::operation::describe_container_instances::DescribeContainerInstancesError::InvalidParameterException({
   54         -
            #[allow(unused_mut)]
   55         -
            let mut tmp = {
   56         -
                #[allow(unused_mut)]
   57         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   58         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   59         -
                    .map_err(crate::operation::describe_container_instances::DescribeContainerInstancesError::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         -
        "ServerException" => crate::operation::describe_container_instances::DescribeContainerInstancesError::ServerException({
   69         -
            #[allow(unused_mut)]
   70         -
            let mut tmp = {
   71         -
                #[allow(unused_mut)]
   72         -
                let mut output = crate::types::error::builders::ServerExceptionBuilder::default();
   73         -
                output = crate::protocol_serde::shape_server_exception::de_server_exception_json_err(_response_body, output)
   74         -
                    .map_err(crate::operation::describe_container_instances::DescribeContainerInstancesError::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         -
        _ => crate::operation::describe_container_instances::DescribeContainerInstancesError::generic(generic),
   84         -
    })
   85         -
}
   86         -
   87         -
#[allow(clippy::unnecessary_wraps)]
   88         -
pub fn de_describe_container_instances_http_response(
   89         -
    _response_status: u16,
   90         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   91         -
    _response_body: &[u8],
   92         -
) -> std::result::Result<
   93         -
    crate::operation::describe_container_instances::DescribeContainerInstancesOutput,
   94         -
    crate::operation::describe_container_instances::DescribeContainerInstancesError,
   95         -
> {
   96         -
    Ok({
   97         -
        #[allow(unused_mut)]
   98         -
        let mut output = crate::operation::describe_container_instances::builders::DescribeContainerInstancesOutputBuilder::default();
   99         -
        output = crate::protocol_serde::shape_describe_container_instances::de_describe_container_instances(_response_body, output)
  100         -
            .map_err(crate::operation::describe_container_instances::DescribeContainerInstancesError::unhandled)?;
  101         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  102         -
        output.build()
  103         -
    })
  104         -
}
  105         -
  106         -
pub fn ser_describe_container_instances_input(
  107         -
    input: &crate::operation::describe_container_instances::DescribeContainerInstancesInput,
  108         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  109         -
    let mut out = String::new();
  110         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  111         -
    crate::protocol_serde::shape_describe_container_instances_input::ser_describe_container_instances_input_input(&mut object, input)?;
  112         -
    object.finish();
  113         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  114         -
}
  115         -
  116         -
pub(crate) fn de_describe_container_instances(
  117         -
    _value: &[u8],
  118         -
    mut builder: crate::operation::describe_container_instances::builders::DescribeContainerInstancesOutputBuilder,
  119         -
) -> ::std::result::Result<
  120         -
    crate::operation::describe_container_instances::builders::DescribeContainerInstancesOutputBuilder,
  121         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  122         -
> {
  123         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  124         -
    let tokens = &mut tokens_owned;
  125         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  126         -
    loop {
  127         -
        match tokens.next().transpose()? {
  128         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  129         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  130         -
                "containerInstances" => {
  131         -
                    builder =
  132         -
                        builder.set_container_instances(crate::protocol_serde::shape_container_instances::de_container_instances(tokens, _value)?);
  133         -
                }
  134         -
                "failures" => {
  135         -
                    builder = builder.set_failures(crate::protocol_serde::shape_failures::de_failures(tokens, _value)?);
  136         -
                }
  137         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  138         -
            },
  139         -
            other => {
  140         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  141         -
                    "expected object key or end object, found: {other:?}"
  142         -
                )))
  143         -
            }
  144         -
        }
  145         -
    }
  146         -
    if tokens.next().is_some() {
  147         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  148         -
            "found more JSON tokens after completing parsing",
  149         -
        ));
  150         -
    }
  151         -
    Ok(builder)
  152         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_describe_container_instances_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_container_instances_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_container_instances::DescribeContainerInstancesInput,
    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.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_service_deployments.rs

@@ -1,0 +200,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_service_deployments_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_service_deployments::DescribeServiceDeploymentsOutput,
    9         -
    crate::operation::describe_service_deployments::DescribeServiceDeploymentsError,
   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_service_deployments::DescribeServiceDeploymentsError::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::describe_service_deployments::DescribeServiceDeploymentsError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "AccessDeniedException" => crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::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::describe_service_deployments::DescribeServiceDeploymentsError::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::describe_service_deployments::DescribeServiceDeploymentsError::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::describe_service_deployments::DescribeServiceDeploymentsError::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         -
        "ClusterNotFoundException" => crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::ClusterNotFoundException({
   54         -
            #[allow(unused_mut)]
   55         -
            let mut tmp = {
   56         -
                #[allow(unused_mut)]
   57         -
                let mut output = crate::types::error::builders::ClusterNotFoundExceptionBuilder::default();
   58         -
                output = crate::protocol_serde::shape_cluster_not_found_exception::de_cluster_not_found_exception_json_err(_response_body, output)
   59         -
                    .map_err(crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::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::describe_service_deployments::DescribeServiceDeploymentsError::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::describe_service_deployments::DescribeServiceDeploymentsError::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::describe_service_deployments::DescribeServiceDeploymentsError::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::describe_service_deployments::DescribeServiceDeploymentsError::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         -
        "ServiceNotFoundException" => crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::ServiceNotFoundException({
   99         -
            #[allow(unused_mut)]
  100         -
            let mut tmp = {
  101         -
                #[allow(unused_mut)]
  102         -
                let mut output = crate::types::error::builders::ServiceNotFoundExceptionBuilder::default();
  103         -
                output = crate::protocol_serde::shape_service_not_found_exception::de_service_not_found_exception_json_err(_response_body, output)
  104         -
                    .map_err(crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::unhandled)?;
  105         -
                let output = output.meta(generic);
  106         -
                output.build()
  107         -
            };
  108         -
            if tmp.message.is_none() {
  109         -
                tmp.message = _error_message;
  110         -
            }
  111         -
            tmp
  112         -
        }),
  113         -
        "UnsupportedFeatureException" => {
  114         -
            crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::UnsupportedFeatureException({
  115         -
                #[allow(unused_mut)]
  116         -
                let mut tmp = {
  117         -
                    #[allow(unused_mut)]
  118         -
                    let mut output = crate::types::error::builders::UnsupportedFeatureExceptionBuilder::default();
  119         -
                    output =
  120         -
                        crate::protocol_serde::shape_unsupported_feature_exception::de_unsupported_feature_exception_json_err(_response_body, output)
  121         -
                            .map_err(crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::unhandled)?;
  122         -
                    let output = output.meta(generic);
  123         -
                    output.build()
  124         -
                };
  125         -
                if tmp.message.is_none() {
  126         -
                    tmp.message = _error_message;
  127         -
                }
  128         -
                tmp
  129         -
            })
  130         -
        }
  131         -
        _ => crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::generic(generic),
  132         -
    })
  133         -
}
  134         -
  135         -
#[allow(clippy::unnecessary_wraps)]
  136         -
pub fn de_describe_service_deployments_http_response(
  137         -
    _response_status: u16,
  138         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  139         -
    _response_body: &[u8],
  140         -
) -> std::result::Result<
  141         -
    crate::operation::describe_service_deployments::DescribeServiceDeploymentsOutput,
  142         -
    crate::operation::describe_service_deployments::DescribeServiceDeploymentsError,
  143         -
> {
  144         -
    Ok({
  145         -
        #[allow(unused_mut)]
  146         -
        let mut output = crate::operation::describe_service_deployments::builders::DescribeServiceDeploymentsOutputBuilder::default();
  147         -
        output = crate::protocol_serde::shape_describe_service_deployments::de_describe_service_deployments(_response_body, output)
  148         -
            .map_err(crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::unhandled)?;
  149         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  150         -
        output.build()
  151         -
    })
  152         -
}
  153         -
  154         -
pub fn ser_describe_service_deployments_input(
  155         -
    input: &crate::operation::describe_service_deployments::DescribeServiceDeploymentsInput,
  156         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  157         -
    let mut out = String::new();
  158         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  159         -
    crate::protocol_serde::shape_describe_service_deployments_input::ser_describe_service_deployments_input_input(&mut object, input)?;
  160         -
    object.finish();
  161         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  162         -
}
  163         -
  164         -
pub(crate) fn de_describe_service_deployments(
  165         -
    _value: &[u8],
  166         -
    mut builder: crate::operation::describe_service_deployments::builders::DescribeServiceDeploymentsOutputBuilder,
  167         -
) -> ::std::result::Result<
  168         -
    crate::operation::describe_service_deployments::builders::DescribeServiceDeploymentsOutputBuilder,
  169         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  170         -
> {
  171         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  172         -
    let tokens = &mut tokens_owned;
  173         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  174         -
    loop {
  175         -
        match tokens.next().transpose()? {
  176         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  177         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  178         -
                "serviceDeployments" => {
  179         -
                    builder =
  180         -
                        builder.set_service_deployments(crate::protocol_serde::shape_service_deployments::de_service_deployments(tokens, _value)?);
  181         -
                }
  182         -
                "failures" => {
  183         -
                    builder = builder.set_failures(crate::protocol_serde::shape_failures::de_failures(tokens, _value)?);
  184         -
                }
  185         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  186         -
            },
  187         -
            other => {
  188         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  189         -
                    "expected object key or end object, found: {other:?}"
  190         -
                )))
  191         -
            }
  192         -
        }
  193         -
    }
  194         -
    if tokens.next().is_some() {
  195         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  196         -
            "found more JSON tokens after completing parsing",
  197         -
        ));
  198         -
    }
  199         -
    Ok(builder)
  200         -
}

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

@@ -1,0 +16,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_service_deployments_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_service_deployments::DescribeServiceDeploymentsInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.service_deployment_arns {
    7         -
        let mut array_2 = object.key("serviceDeploymentArns").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                array_2.value().string(item_3.as_str());
   11         -
            }
   12         -
        }
   13         -
        array_2.finish();
   14         -
    }
   15         -
    Ok(())
   16         -
}

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

@@ -1,0 +201,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_service_revisions_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_service_revisions::DescribeServiceRevisionsOutput,
    9         -
    crate::operation::describe_service_revisions::DescribeServiceRevisionsError,
   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_service_revisions::DescribeServiceRevisionsError::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_service_revisions::DescribeServiceRevisionsError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "AccessDeniedException" => crate::operation::describe_service_revisions::DescribeServiceRevisionsError::AccessDeniedException({
   28         -
            #[allow(unused_mut)]
   29         -
            let mut tmp = {
   30         -
                #[allow(unused_mut)]
   31         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   32         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   33         -
                    .map_err(crate::operation::describe_service_revisions::DescribeServiceRevisionsError::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         -
        "ClientException" => crate::operation::describe_service_revisions::DescribeServiceRevisionsError::ClientException({
   43         -
            #[allow(unused_mut)]
   44         -
            let mut tmp = {
   45         -
                #[allow(unused_mut)]
   46         -
                let mut output = crate::types::error::builders::ClientExceptionBuilder::default();
   47         -
                output = crate::protocol_serde::shape_client_exception::de_client_exception_json_err(_response_body, output)
   48         -
                    .map_err(crate::operation::describe_service_revisions::DescribeServiceRevisionsError::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         -
        "ClusterNotFoundException" => crate::operation::describe_service_revisions::DescribeServiceRevisionsError::ClusterNotFoundException({
   58         -
            #[allow(unused_mut)]
   59         -
            let mut tmp = {
   60         -
                #[allow(unused_mut)]
   61         -
                let mut output = crate::types::error::builders::ClusterNotFoundExceptionBuilder::default();
   62         -
                output = crate::protocol_serde::shape_cluster_not_found_exception::de_cluster_not_found_exception_json_err(_response_body, output)
   63         -
                    .map_err(crate::operation::describe_service_revisions::DescribeServiceRevisionsError::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         -
        "InvalidParameterException" => crate::operation::describe_service_revisions::DescribeServiceRevisionsError::InvalidParameterException({
   73         -
            #[allow(unused_mut)]
   74         -
            let mut tmp = {
   75         -
                #[allow(unused_mut)]
   76         -
                let mut output = crate::types::error::builders::InvalidParameterExceptionBuilder::default();
   77         -
                output = crate::protocol_serde::shape_invalid_parameter_exception::de_invalid_parameter_exception_json_err(_response_body, output)
   78         -
                    .map_err(crate::operation::describe_service_revisions::DescribeServiceRevisionsError::unhandled)?;
   79         -
                let output = output.meta(generic);
   80         -
                output.build()
   81         -
            };
   82         -
            if tmp.message.is_none() {
   83         -
                tmp.message = _error_message;
   84         -
            }
   85         -
            tmp
   86         -
        }),
   87         -
        "ServerException" => crate::operation::describe_service_revisions::DescribeServiceRevisionsError::ServerException({
   88         -
            #[allow(unused_mut)]
   89         -
            let mut tmp = {
   90         -
                #[allow(unused_mut)]
   91         -
                let mut output = crate::types::error::builders::ServerExceptionBuilder::default();
   92         -
                output = crate::protocol_serde::shape_server_exception::de_server_exception_json_err(_response_body, output)
   93         -
                    .map_err(crate::operation::describe_service_revisions::DescribeServiceRevisionsError::unhandled)?;
   94         -
                let output = output.meta(generic);
   95         -
                output.build()
   96         -
            };
   97         -
            if tmp.message.is_none() {
   98         -
                tmp.message = _error_message;
   99         -
            }
  100         -
            tmp
  101         -
        }),
  102         -
        "ServiceNotFoundException" => crate::operation::describe_service_revisions::DescribeServiceRevisionsError::ServiceNotFoundException({
  103         -
            #[allow(unused_mut)]
  104         -
            let mut tmp = {
  105         -
                #[allow(unused_mut)]
  106         -
                let mut output = crate::types::error::builders::ServiceNotFoundExceptionBuilder::default();
  107         -
                output = crate::protocol_serde::shape_service_not_found_exception::de_service_not_found_exception_json_err(_response_body, output)
  108         -
                    .map_err(crate::operation::describe_service_revisions::DescribeServiceRevisionsError::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         -
        "UnsupportedFeatureException" => crate::operation::describe_service_revisions::DescribeServiceRevisionsError::UnsupportedFeatureException({
  118         -
            #[allow(unused_mut)]
  119         -
            let mut tmp = {
  120         -
                #[allow(unused_mut)]
  121         -
                let mut output = crate::types::error::builders::UnsupportedFeatureExceptionBuilder::default();
  122         -
                output =
  123         -
                    crate::protocol_serde::shape_unsupported_feature_exception::de_unsupported_feature_exception_json_err(_response_body, output)
  124         -
                        .map_err(crate::operation::describe_service_revisions::DescribeServiceRevisionsError::unhandled)?;
  125         -
                let output = output.meta(generic);
  126         -
                output.build()
  127         -
            };
  128         -
            if tmp.message.is_none() {
  129         -
                tmp.message = _error_message;
  130         -
            }
  131         -
            tmp
  132         -
        }),
  133         -
        _ => crate::operation::describe_service_revisions::DescribeServiceRevisionsError::generic(generic),
  134         -
    })
  135         -
}
  136         -
  137         -
#[allow(clippy::unnecessary_wraps)]
  138         -
pub fn de_describe_service_revisions_http_response(
  139         -
    _response_status: u16,
  140         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  141         -
    _response_body: &[u8],
  142         -
) -> std::result::Result<
  143         -
    crate::operation::describe_service_revisions::DescribeServiceRevisionsOutput,
  144         -
    crate::operation::describe_service_revisions::DescribeServiceRevisionsError,
  145         -
> {
  146         -
    Ok({
  147         -
        #[allow(unused_mut)]
  148         -
        let mut output = crate::operation::describe_service_revisions::builders::DescribeServiceRevisionsOutputBuilder::default();
  149         -
        output = crate::protocol_serde::shape_describe_service_revisions::de_describe_service_revisions(_response_body, output)
  150         -
            .map_err(crate::operation::describe_service_revisions::DescribeServiceRevisionsError::unhandled)?;
  151         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  152         -
        output.build()
  153         -
    })
  154         -
}
  155         -
  156         -
pub fn ser_describe_service_revisions_input(
  157         -
    input: &crate::operation::describe_service_revisions::DescribeServiceRevisionsInput,
  158         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  159         -
    let mut out = String::new();
  160         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  161         -
    crate::protocol_serde::shape_describe_service_revisions_input::ser_describe_service_revisions_input_input(&mut object, input)?;
  162         -
    object.finish();
  163         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  164         -
}
  165         -
  166         -
pub(crate) fn de_describe_service_revisions(
  167         -
    _value: &[u8],
  168         -
    mut builder: crate::operation::describe_service_revisions::builders::DescribeServiceRevisionsOutputBuilder,
  169         -
) -> ::std::result::Result<
  170         -
    crate::operation::describe_service_revisions::builders::DescribeServiceRevisionsOutputBuilder,
  171         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  172         -
> {
  173         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  174         -
    let tokens = &mut tokens_owned;
  175         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  176         -
    loop {
  177         -
        match tokens.next().transpose()? {
  178         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  179         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  180         -
                "serviceRevisions" => {
  181         -
                    builder = builder.set_service_revisions(crate::protocol_serde::shape_service_revisions::de_service_revisions(tokens, _value)?);
  182         -
                }
  183         -
                "failures" => {
  184         -
                    builder = builder.set_failures(crate::protocol_serde::shape_failures::de_failures(tokens, _value)?);
  185         -
                }
  186         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  187         -
            },
  188         -
            other => {
  189         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  190         -
                    "expected object key or end object, found: {other:?}"
  191         -
                )))
  192         -
            }
  193         -
        }
  194         -
    }
  195         -
    if tokens.next().is_some() {
  196         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  197         -
            "found more JSON tokens after completing parsing",
  198         -
        ));
  199         -
    }
  200         -
    Ok(builder)
  201         -
}

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

@@ -1,0 +16,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_describe_service_revisions_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::describe_service_revisions::DescribeServiceRevisionsInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.service_revision_arns {
    7         -
        let mut array_2 = object.key("serviceRevisionArns").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                array_2.value().string(item_3.as_str());
   11         -
            }
   12         -
        }
   13         -
        array_2.finish();
   14         -
    }
   15         -
    Ok(())
   16         -
}

tmp-codegen-diff/aws-sdk/sdk/ecs/src/protocol_serde/shape_describe_services.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_services_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_services::DescribeServicesOutput, crate::operation::describe_services::DescribeServicesError> {
    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_services::DescribeServicesError::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_services::DescribeServicesError::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_services::DescribeServicesError::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_services::DescribeServicesError::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_services::DescribeServicesError::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_services::DescribeServicesError::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_services::DescribeServicesError::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_services::DescribeServicesError::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_services::DescribeServicesError::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_services::DescribeServicesError::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_services::DescribeServicesError::generic(generic),
   81         -
    })
   82         -
}
   83         -
   84         -
#[allow(clippy::unnecessary_wraps)]
   85         -
pub fn de_describe_services_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_services::DescribeServicesOutput, crate::operation::describe_services::DescribeServicesError> {
   90         -
    Ok({
   91         -
        #[allow(unused_mut)]
   92         -
        let mut output = crate::operation::describe_services::builders::DescribeServicesOutputBuilder::default();
   93         -
        output = crate::protocol_serde::shape_describe_services::de_describe_services(_response_body, output)
   94         -
            .map_err(crate::operation::describe_services::DescribeServicesError::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_services_input(
  101         -
    input: &crate::operation::describe_services::DescribeServicesInput,
  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_services_input::ser_describe_services_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_services(
  111         -
    _value: &[u8],
  112         -
    mut builder: crate::operation::describe_services::builders::DescribeServicesOutputBuilder,
  113         -
) -> ::std::result::Result<
  114         -
    crate::operation::describe_services::builders::DescribeServicesOutputBuilder,
  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         -
                "services" => {
  125         -
                    builder = builder.set_services(crate::protocol_serde::shape_services::de_services(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         -
}