AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ecs/src/operation/describe_container_instances.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `DescribeContainerInstances`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeContainerInstances;
    6      6   
impl DescribeContainerInstances {
    7      7   
    /// Creates a new `DescribeContainerInstances`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::describe_container_instances::DescribeContainerInstancesInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_container_instances::DescribeContainerInstancesOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::describe_container_instances::DescribeContainerInstancesInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_container_instances::DescribeContainerInstancesOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_container_instances::DescribeContainerInstancesError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -118,124 +247,364 @@
  138    144   
                crate::operation::describe_container_instances::DescribeContainerInstancesError,
  139    145   
            >::new());
  140    146   
  141    147   
        ::std::borrow::Cow::Owned(rcb)
  142    148   
    }
  143    149   
}
  144    150   
  145    151   
#[derive(Debug)]
  146    152   
struct DescribeContainerInstancesResponseDeserializer;
  147    153   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeContainerInstancesResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         154  +
    fn deserialize_nonstreaming_with_config(
  149    155   
        &self,
  150    156   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         157  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    158   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    159   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    160   
        #[allow(unused_mut)]
  156    161   
        let mut force_error = false;
  157    162   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_describe_container_instances::de_describe_container_instances_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_describe_container_instances::de_describe_container_instances_http_response(status, headers, body)
         163  +
        if !success && status != 200 || force_error {
         164  +
            let headers = response.headers();
         165  +
            let body = response.body().bytes().expect("body loaded");
         166  +
            #[allow(unused_mut)]
         167  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         168  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         169  +
            })?;
         170  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         171  +
            let generic = generic_builder.build();
         172  +
            let error_code = match generic.code() {
         173  +
                ::std::option::Option::Some(code) => code,
         174  +
                ::std::option::Option::None => {
         175  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         176  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         177  +
                            crate::operation::describe_container_instances::DescribeContainerInstancesError::unhandled(generic),
         178  +
                        ),
         179  +
                    ))
         180  +
                }
         181  +
            };
         182  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         183  +
            let protocol = _cfg
         184  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         185  +
                .expect("a SharedClientProtocol is required");
         186  +
            let err = match error_code {
         187  +
                "ClientException" => crate::operation::describe_container_instances::DescribeContainerInstancesError::ClientException({
         188  +
                    let mut tmp = match protocol
         189  +
                        .deserialize_response(response, crate::types::error::ClientException::SCHEMA, _cfg)
         190  +
                        .and_then(|mut deser| {
         191  +
                            crate::types::error::ClientException::deserialize_with_response(
         192  +
                                &mut *deser,
         193  +
                                response.headers(),
         194  +
                                response.status().into(),
         195  +
                                body,
         196  +
                            )
         197  +
                        }) {
         198  +
                        ::std::result::Result::Ok(val) => val,
         199  +
                        ::std::result::Result::Err(e) => {
         200  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         201  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         202  +
                            ))
         203  +
                        }
         204  +
                    };
         205  +
                    tmp.meta = generic;
         206  +
                    if tmp.message.is_none() {
         207  +
                        tmp.message = _error_message;
         208  +
                    }
         209  +
                    tmp
         210  +
                }),
         211  +
                "ClusterNotFoundException" => {
         212  +
                    crate::operation::describe_container_instances::DescribeContainerInstancesError::ClusterNotFoundException({
         213  +
                        let mut tmp = match protocol
         214  +
                            .deserialize_response(response, crate::types::error::ClusterNotFoundException::SCHEMA, _cfg)
         215  +
                            .and_then(|mut deser| {
         216  +
                                crate::types::error::ClusterNotFoundException::deserialize_with_response(
         217  +
                                    &mut *deser,
         218  +
                                    response.headers(),
         219  +
                                    response.status().into(),
         220  +
                                    body,
         221  +
                                )
         222  +
                            }) {
         223  +
                            ::std::result::Result::Ok(val) => val,
         224  +
                            ::std::result::Result::Err(e) => {
         225  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         226  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         227  +
                                ))
         228  +
                            }
         229  +
                        };
         230  +
                        tmp.meta = generic;
         231  +
                        if tmp.message.is_none() {
         232  +
                            tmp.message = _error_message;
         233  +
                        }
         234  +
                        tmp
         235  +
                    })
         236  +
                }
         237  +
                "InvalidParameterException" => {
         238  +
                    crate::operation::describe_container_instances::DescribeContainerInstancesError::InvalidParameterException({
         239  +
                        let mut tmp = match protocol
         240  +
                            .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         241  +
                            .and_then(|mut deser| {
         242  +
                                crate::types::error::InvalidParameterException::deserialize_with_response(
         243  +
                                    &mut *deser,
         244  +
                                    response.headers(),
         245  +
                                    response.status().into(),
         246  +
                                    body,
         247  +
                                )
         248  +
                            }) {
         249  +
                            ::std::result::Result::Ok(val) => val,
         250  +
                            ::std::result::Result::Err(e) => {
         251  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         252  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         253  +
                                ))
         254  +
                            }
         255  +
                        };
         256  +
                        tmp.meta = generic;
         257  +
                        if tmp.message.is_none() {
         258  +
                            tmp.message = _error_message;
         259  +
                        }
         260  +
                        tmp
         261  +
                    })
         262  +
                }
         263  +
                "ServerException" => crate::operation::describe_container_instances::DescribeContainerInstancesError::ServerException({
         264  +
                    let mut tmp = match protocol
         265  +
                        .deserialize_response(response, crate::types::error::ServerException::SCHEMA, _cfg)
         266  +
                        .and_then(|mut deser| {
         267  +
                            crate::types::error::ServerException::deserialize_with_response(
         268  +
                                &mut *deser,
         269  +
                                response.headers(),
         270  +
                                response.status().into(),
         271  +
                                body,
         272  +
                            )
         273  +
                        }) {
         274  +
                        ::std::result::Result::Ok(val) => val,
         275  +
                        ::std::result::Result::Err(e) => {
         276  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         277  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         278  +
                            ))
         279  +
                        }
         280  +
                    };
         281  +
                    tmp.meta = generic;
         282  +
                    if tmp.message.is_none() {
         283  +
                        tmp.message = _error_message;
         284  +
                    }
         285  +
                    tmp
         286  +
                }),
         287  +
                _ => crate::operation::describe_container_instances::DescribeContainerInstancesError::generic(generic),
  162    288   
            };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         289  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         290  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         291  +
            ))
         292  +
        } else {
         293  +
            let protocol = _cfg
         294  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         295  +
                .expect("a SharedClientProtocol is required");
         296  +
            let mut deser = protocol
         297  +
                .deserialize_response(response, DescribeContainerInstances::OUTPUT_SCHEMA, _cfg)
         298  +
                .map_err(|e| {
         299  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         300  +
                })?;
         301  +
            let body = response.body().bytes().expect("body loaded");
         302  +
            let output = crate::operation::describe_container_instances::DescribeContainerInstancesOutput::deserialize_with_response(
         303  +
                &mut *deser,
         304  +
                response.headers(),
         305  +
                response.status().into(),
         306  +
                body,
         307  +
            )
         308  +
            .map_err(|e| {
         309  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         310  +
            })?;
         311  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         312  +
        }
  164    313   
    }
  165    314   
}
  166    315   
#[derive(Debug)]
  167    316   
struct DescribeContainerInstancesRequestSerializer;
  168    317   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeContainerInstancesRequestSerializer {
  169    318   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    319   
    fn serialize_input(
  171    320   
        &self,
  172    321   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    322   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    323   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    324   
        let input = input
  176    325   
            .downcast::<crate::operation::describe_container_instances::DescribeContainerInstancesInput>()
  177    326   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::describe_container_instances::DescribeContainerInstancesInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                ::std::write!(output, "/").expect("formatting should succeed");
  190         -
                ::std::result::Result::Ok(())
  191         -
            }
  192         -
            #[allow(clippy::unnecessary_wraps)]
  193         -
            fn update_http_builder(
  194         -
                input: &crate::operation::describe_container_instances::DescribeContainerInstancesInput,
  195         -
                builder: ::http_1x::request::Builder,
  196         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  197         -
                let mut uri = ::std::string::String::new();
  198         -
                uri_base(input, &mut uri)?;
  199         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  200         -
            }
  201         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  202         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  203         -
            builder = _header_serialization_settings.set_default_header(
  204         -
                builder,
  205         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  206         -
                "AmazonEC2ContainerServiceV20141113.DescribeContainerInstances",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  211         -
            crate::protocol_serde::shape_describe_container_instances::ser_describe_container_instances_input(&input)?,
  212         -
        );
  213         -
        if let Some(content_length) = body.content_length() {
  214         -
            let content_length = content_length.to_string();
  215         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  216         -
        }
  217         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         327  +
        let protocol = _cfg
         328  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         329  +
            .expect("a SharedClientProtocol is required");
         330  +
        let mut request = protocol
         331  +
            .serialize_request(&input, DescribeContainerInstances::INPUT_SCHEMA, "", _cfg)
         332  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         333  +
         334  +
        return ::std::result::Result::Ok(request);
  218    335   
    }
  219    336   
}
  220    337   
#[derive(Debug)]
  221    338   
struct DescribeContainerInstancesEndpointParamsInterceptor;
  222    339   
  223    340   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeContainerInstancesEndpointParamsInterceptor {
  224    341   
    fn name(&self) -> &'static str {
  225    342   
        "DescribeContainerInstancesEndpointParamsInterceptor"
  226    343   
    }
  227    344   

tmp-codegen-diff/aws-sdk/sdk/ecs/src/operation/describe_container_instances/_describe_container_instances_input.rs

@@ -23,23 +83,83 @@
   43     43   
    "cluster",
   44     44   
    0,
   45     45   
);
   46     46   
static DESCRIBECONTAINERINSTANCESINPUT_MEMBER_CONTAINER_INSTANCES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   47     47   
    ::aws_smithy_schema::ShapeId::from_static(
   48     48   
        "com.amazonaws.ecs.synthetic#DescribeContainerInstancesInput$containerInstances",
   49     49   
        "com.amazonaws.ecs.synthetic",
   50     50   
        "DescribeContainerInstancesInput",
   51     51   
    ),
   52     52   
    ::aws_smithy_schema::ShapeType::List,
   53         -
    "container_instances",
          53  +
    "containerInstances",
   54     54   
    1,
   55     55   
);
   56     56   
static DESCRIBECONTAINERINSTANCESINPUT_MEMBER_INCLUDE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   57     57   
    ::aws_smithy_schema::ShapeId::from_static(
   58     58   
        "com.amazonaws.ecs.synthetic#DescribeContainerInstancesInput$include",
   59     59   
        "com.amazonaws.ecs.synthetic",
   60     60   
        "DescribeContainerInstancesInput",
   61     61   
    ),
   62     62   
    ::aws_smithy_schema::ShapeType::List,
   63     63   
    "include",
@@ -85,85 +196,195 @@
  105    105   
                    }
  106    106   
                    Ok(())
  107    107   
                },
  108    108   
            )?;
  109    109   
        }
  110    110   
        Ok(())
  111    111   
    }
  112    112   
}
  113    113   
impl DescribeContainerInstancesInput {
  114    114   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  115         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  116         -
        deserializer: &mut D,
         115  +
    pub fn deserialize(
         116  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  117    117   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  118    118   
        #[allow(unused_variables, unused_mut)]
  119    119   
        let mut builder = Self::builder();
  120    120   
        #[allow(
  121    121   
            unused_variables,
  122    122   
            unreachable_code,
  123    123   
            clippy::single_match,
  124    124   
            clippy::match_single_binding,
  125    125   
            clippy::diverging_sub_expression
  126    126   
        )]
  127         -
        deserializer.read_struct(&DESCRIBECONTAINERINSTANCESINPUT_SCHEMA, (), |_, member, deser| {
         127  +
        deserializer.read_struct(&DESCRIBECONTAINERINSTANCESINPUT_SCHEMA, &mut |member, deser| {
  128    128   
            match member.member_index() {
  129    129   
                Some(0) => {
  130    130   
                    builder.cluster = Some(deser.read_string(member)?);
  131    131   
                }
  132    132   
                Some(1) => {
  133         -
                    builder.container_instances = Some({
  134         -
                        let container = if let Some(cap) = deser.container_size() {
  135         -
                            Vec::with_capacity(cap)
  136         -
                        } else {
  137         -
                            Vec::new()
  138         -
                        };
  139         -
                        deser.read_list(member, container, |mut list, deser| {
  140         -
                            list.push(deser.read_string(member)?);
  141         -
                            Ok(list)
  142         -
                        })?
  143         -
                    });
         133  +
                    builder.container_instances = Some(deser.read_string_list(member)?);
  144    134   
                }
  145    135   
                Some(2) => {
  146    136   
                    builder.include = Some({
  147         -
                        let container = if let Some(cap) = deser.container_size() {
  148         -
                            Vec::with_capacity(cap)
  149         -
                        } else {
  150         -
                            Vec::new()
  151         -
                        };
  152         -
                        deser.read_list(member, container, |mut list, deser| {
  153         -
                            list.push(crate::types::ContainerInstanceField::from(deser.read_string(member)?.as_str()));
  154         -
                            Ok(list)
  155         -
                        })?
         137  +
                        let mut container = Vec::new();
         138  +
                        deser.read_list(member, &mut |deser| {
         139  +
                            container.push(crate::types::ContainerInstanceField::from(deser.read_string(member)?.as_str()));
         140  +
                            Ok(())
         141  +
                        })?;
         142  +
                        container
  156    143   
                    });
  157    144   
                }
  158    145   
                _ => {}
  159    146   
            }
  160    147   
            Ok(())
  161    148   
        })?;
         149  +
        builder.container_instances = builder.container_instances.or(Some(Vec::new()));
  162    150   
        builder
  163    151   
            .build()
  164    152   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  165    153   
    }
  166    154   
}
         155  +
impl DescribeContainerInstancesInput {
         156  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         157  +
    pub fn deserialize_with_response(
         158  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         159  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         160  +
        _status: u16,
         161  +
        _body: &[u8],
         162  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         163  +
        Self::deserialize(deserializer)
         164  +
    }
         165  +
}
  167    166   
impl DescribeContainerInstancesInput {
  168    167   
    /// Creates a new builder-style object to manufacture [`DescribeContainerInstancesInput`](crate::operation::describe_container_instances::DescribeContainerInstancesInput).
  169    168   
    pub fn builder() -> crate::operation::describe_container_instances::builders::DescribeContainerInstancesInputBuilder {
  170    169   
        crate::operation::describe_container_instances::builders::DescribeContainerInstancesInputBuilder::default()
  171    170   
    }
  172    171   
}
  173    172   
  174    173   
/// A builder for [`DescribeContainerInstancesInput`](crate::operation::describe_container_instances::DescribeContainerInstancesInput).
  175    174   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  176    175   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/ecs/src/operation/describe_container_instances/_describe_container_instances_output.rs

@@ -8,8 +163,219 @@
   28     28   
    "com.amazonaws.ecs.synthetic",
   29     29   
    "DescribeContainerInstancesOutput",
   30     30   
);
   31     31   
static DESCRIBECONTAINERINSTANCESOUTPUT_MEMBER_CONTAINER_INSTANCES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   32     32   
    ::aws_smithy_schema::ShapeId::from_static(
   33     33   
        "com.amazonaws.ecs.synthetic#DescribeContainerInstancesOutput$containerInstances",
   34     34   
        "com.amazonaws.ecs.synthetic",
   35     35   
        "DescribeContainerInstancesOutput",
   36     36   
    ),
   37     37   
    ::aws_smithy_schema::ShapeType::List,
   38         -
    "container_instances",
          38  +
    "containerInstances",
   39     39   
    0,
   40     40   
);
   41     41   
static DESCRIBECONTAINERINSTANCESOUTPUT_MEMBER_FAILURES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   42     42   
    ::aws_smithy_schema::ShapeId::from_static(
   43     43   
        "com.amazonaws.ecs.synthetic#DescribeContainerInstancesOutput$failures",
   44     44   
        "com.amazonaws.ecs.synthetic",
   45     45   
        "DescribeContainerInstancesOutput",
   46     46   
    ),
   47     47   
    ::aws_smithy_schema::ShapeType::List,
   48     48   
    "failures",
   49     49   
    1,
   50     50   
);
          51  +
static DESCRIBECONTAINERINSTANCESOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          52  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          53  +
    ::aws_smithy_schema::ShapeType::String,
          54  +
    "request_id",
          55  +
    2,
          56  +
)
          57  +
.with_http_header("x-amzn-requestid");
   51     58   
static DESCRIBECONTAINERINSTANCESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   52     59   
    DESCRIBECONTAINERINSTANCESOUTPUT_SCHEMA_ID,
   53     60   
    ::aws_smithy_schema::ShapeType::Structure,
   54     61   
    &[
   55     62   
        &DESCRIBECONTAINERINSTANCESOUTPUT_MEMBER_CONTAINER_INSTANCES,
   56     63   
        &DESCRIBECONTAINERINSTANCESOUTPUT_MEMBER_FAILURES,
          64  +
        &DESCRIBECONTAINERINSTANCESOUTPUT_MEMBER__REQUEST_ID,
   57     65   
    ],
   58     66   
);
   59     67   
impl DescribeContainerInstancesOutput {
   60     68   
    /// The schema for this shape.
   61     69   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBECONTAINERINSTANCESOUTPUT_SCHEMA;
   62     70   
}
   63     71   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeContainerInstancesOutput {
   64     72   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   65     73   
    fn serialize_members(
   66     74   
        &self,
   67     75   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   68     76   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   69     77   
        if let Some(ref val) = self.container_instances {
   70     78   
            ser.write_list(
   71     79   
                &DESCRIBECONTAINERINSTANCESOUTPUT_MEMBER_CONTAINER_INSTANCES,
   72     80   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   73     81   
                    for item in val {
   74     82   
                        ser.write_struct(crate::types::ContainerInstance::SCHEMA, item)?;
   75     83   
                    }
   76     84   
                    Ok(())
   77     85   
                },
   78     86   
            )?;
   79     87   
        }
   80     88   
        if let Some(ref val) = self.failures {
   81     89   
            ser.write_list(
   82     90   
                &DESCRIBECONTAINERINSTANCESOUTPUT_MEMBER_FAILURES,
   83     91   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   84     92   
                    for item in val {
   85     93   
                        ser.write_struct(crate::types::Failure::SCHEMA, item)?;
   86     94   
                    }
   87     95   
                    Ok(())
   88     96   
                },
   89     97   
            )?;
   90     98   
        }
   91     99   
        Ok(())
   92    100   
    }
   93    101   
}
   94    102   
impl DescribeContainerInstancesOutput {
   95    103   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   96         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   97         -
        deserializer: &mut D,
         104  +
    pub fn deserialize(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   98    106   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   99    107   
        #[allow(unused_variables, unused_mut)]
  100    108   
        let mut builder = Self::builder();
  101    109   
        #[allow(
  102    110   
            unused_variables,
  103    111   
            unreachable_code,
  104    112   
            clippy::single_match,
  105    113   
            clippy::match_single_binding,
  106    114   
            clippy::diverging_sub_expression
  107    115   
        )]
  108         -
        deserializer.read_struct(&DESCRIBECONTAINERINSTANCESOUTPUT_SCHEMA, (), |_, member, deser| {
         116  +
        deserializer.read_struct(&DESCRIBECONTAINERINSTANCESOUTPUT_SCHEMA, &mut |member, deser| {
  109    117   
            match member.member_index() {
  110    118   
                Some(0) => {
  111    119   
                    builder.container_instances = Some({
  112         -
                        let container = if let Some(cap) = deser.container_size() {
  113         -
                            Vec::with_capacity(cap)
  114         -
                        } else {
  115         -
                            Vec::new()
  116         -
                        };
  117         -
                        deser.read_list(member, container, |mut list, deser| {
  118         -
                            list.push(crate::types::ContainerInstance::deserialize(deser)?);
  119         -
                            Ok(list)
  120         -
                        })?
         120  +
                        let mut container = Vec::new();
         121  +
                        deser.read_list(member, &mut |deser| {
         122  +
                            container.push(crate::types::ContainerInstance::deserialize(deser)?);
         123  +
                            Ok(())
         124  +
                        })?;
         125  +
                        container
  121    126   
                    });
  122    127   
                }
  123    128   
                Some(1) => {
  124    129   
                    builder.failures = Some({
  125         -
                        let container = if let Some(cap) = deser.container_size() {
  126         -
                            Vec::with_capacity(cap)
  127         -
                        } else {
  128         -
                            Vec::new()
  129         -
                        };
  130         -
                        deser.read_list(member, container, |mut list, deser| {
  131         -
                            list.push(crate::types::Failure::deserialize(deser)?);
  132         -
                            Ok(list)
  133         -
                        })?
         130  +
                        let mut container = Vec::new();
         131  +
                        deser.read_list(member, &mut |deser| {
         132  +
                            container.push(crate::types::Failure::deserialize(deser)?);
         133  +
                            Ok(())
         134  +
                        })?;
         135  +
                        container
         136  +
                    });
         137  +
                }
         138  +
                Some(2) => {
         139  +
                    builder._request_id = Some(deser.read_string(member)?);
         140  +
                }
         141  +
                _ => {}
         142  +
            }
         143  +
            Ok(())
         144  +
        })?;
         145  +
        Ok(builder.build())
         146  +
    }
         147  +
}
         148  +
impl DescribeContainerInstancesOutput {
         149  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         150  +
    /// Header-bound members are read directly from headers, avoiding runtime
         151  +
    /// member iteration overhead. Body members are read via the deserializer.
         152  +
    pub fn deserialize_with_response(
         153  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         154  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         155  +
        _status: u16,
         156  +
        _body: &[u8],
         157  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         158  +
        #[allow(unused_variables, unused_mut)]
         159  +
        let mut builder = Self::builder();
         160  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         161  +
            builder._request_id = Some(val.to_string());
         162  +
        }
         163  +
        #[allow(
         164  +
            unused_variables,
         165  +
            unreachable_code,
         166  +
            clippy::single_match,
         167  +
            clippy::match_single_binding,
         168  +
            clippy::diverging_sub_expression
         169  +
        )]
         170  +
        deserializer.read_struct(&DESCRIBECONTAINERINSTANCESOUTPUT_SCHEMA, &mut |member, deser| {
         171  +
            match member.member_index() {
         172  +
                Some(0) => {
         173  +
                    builder.container_instances = Some({
         174  +
                        let mut container = Vec::new();
         175  +
                        deser.read_list(member, &mut |deser| {
         176  +
                            container.push(crate::types::ContainerInstance::deserialize(deser)?);
         177  +
                            Ok(())
         178  +
                        })?;
         179  +
                        container
         180  +
                    });
         181  +
                }
         182  +
                Some(1) => {
         183  +
                    builder.failures = Some({
         184  +
                        let mut container = Vec::new();
         185  +
                        deser.read_list(member, &mut |deser| {
         186  +
                            container.push(crate::types::Failure::deserialize(deser)?);
         187  +
                            Ok(())
         188  +
                        })?;
         189  +
                        container
  134    190   
                    });
  135    191   
                }
  136    192   
                _ => {}
  137    193   
            }
  138    194   
            Ok(())
  139    195   
        })?;
  140    196   
        Ok(builder.build())
  141    197   
    }
  142    198   
}
  143    199   
impl ::aws_types::request_id::RequestId for DescribeContainerInstancesOutput {

tmp-codegen-diff/aws-sdk/sdk/ecs/src/operation/describe_service_deployments.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `DescribeServiceDeployments`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeServiceDeployments;
    6      6   
impl DescribeServiceDeployments {
    7      7   
    /// Creates a new `DescribeServiceDeployments`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::describe_service_deployments::DescribeServiceDeploymentsInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_service_deployments::DescribeServiceDeploymentsOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::describe_service_deployments::DescribeServiceDeploymentsInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_service_deployments::DescribeServiceDeploymentsOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_service_deployments::DescribeServiceDeploymentsError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -118,124 +247,440 @@
  138    144   
                crate::operation::describe_service_deployments::DescribeServiceDeploymentsError,
  139    145   
            >::new());
  140    146   
  141    147   
        ::std::borrow::Cow::Owned(rcb)
  142    148   
    }
  143    149   
}
  144    150   
  145    151   
#[derive(Debug)]
  146    152   
struct DescribeServiceDeploymentsResponseDeserializer;
  147    153   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeServiceDeploymentsResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         154  +
    fn deserialize_nonstreaming_with_config(
  149    155   
        &self,
  150    156   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         157  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    158   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    159   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    160   
        #[allow(unused_mut)]
  156    161   
        let mut force_error = false;
  157    162   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_describe_service_deployments::de_describe_service_deployments_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_describe_service_deployments::de_describe_service_deployments_http_response(status, headers, body)
         163  +
        if !success && status != 200 || force_error {
         164  +
            let headers = response.headers();
         165  +
            let body = response.body().bytes().expect("body loaded");
         166  +
            #[allow(unused_mut)]
         167  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         168  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         169  +
            })?;
         170  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         171  +
            let generic = generic_builder.build();
         172  +
            let error_code = match generic.code() {
         173  +
                ::std::option::Option::Some(code) => code,
         174  +
                ::std::option::Option::None => {
         175  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         176  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         177  +
                            crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::unhandled(generic),
         178  +
                        ),
         179  +
                    ))
         180  +
                }
         181  +
            };
         182  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         183  +
            let protocol = _cfg
         184  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         185  +
                .expect("a SharedClientProtocol is required");
         186  +
            let err = match error_code {
         187  +
                "AccessDeniedException" => crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::AccessDeniedException({
         188  +
                    let mut tmp = match protocol
         189  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         190  +
                        .and_then(|mut deser| {
         191  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         192  +
                                &mut *deser,
         193  +
                                response.headers(),
         194  +
                                response.status().into(),
         195  +
                                body,
         196  +
                            )
         197  +
                        }) {
         198  +
                        ::std::result::Result::Ok(val) => val,
         199  +
                        ::std::result::Result::Err(e) => {
         200  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         201  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         202  +
                            ))
         203  +
                        }
  162    204   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         205  +
                    tmp.meta = generic;
         206  +
                    if tmp.message.is_none() {
         207  +
                        tmp.message = _error_message;
         208  +
                    }
         209  +
                    tmp
         210  +
                }),
         211  +
                "ClientException" => crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::ClientException({
         212  +
                    let mut tmp = match protocol
         213  +
                        .deserialize_response(response, crate::types::error::ClientException::SCHEMA, _cfg)
         214  +
                        .and_then(|mut deser| {
         215  +
                            crate::types::error::ClientException::deserialize_with_response(
         216  +
                                &mut *deser,
         217  +
                                response.headers(),
         218  +
                                response.status().into(),
         219  +
                                body,
         220  +
                            )
         221  +
                        }) {
         222  +
                        ::std::result::Result::Ok(val) => val,
         223  +
                        ::std::result::Result::Err(e) => {
         224  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         225  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         226  +
                            ))
         227  +
                        }
         228  +
                    };
         229  +
                    tmp.meta = generic;
         230  +
                    if tmp.message.is_none() {
         231  +
                        tmp.message = _error_message;
         232  +
                    }
         233  +
                    tmp
         234  +
                }),
         235  +
                "ClusterNotFoundException" => {
         236  +
                    crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::ClusterNotFoundException({
         237  +
                        let mut tmp = match protocol
         238  +
                            .deserialize_response(response, crate::types::error::ClusterNotFoundException::SCHEMA, _cfg)
         239  +
                            .and_then(|mut deser| {
         240  +
                                crate::types::error::ClusterNotFoundException::deserialize_with_response(
         241  +
                                    &mut *deser,
         242  +
                                    response.headers(),
         243  +
                                    response.status().into(),
         244  +
                                    body,
         245  +
                                )
         246  +
                            }) {
         247  +
                            ::std::result::Result::Ok(val) => val,
         248  +
                            ::std::result::Result::Err(e) => {
         249  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         250  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         251  +
                                ))
         252  +
                            }
         253  +
                        };
         254  +
                        tmp.meta = generic;
         255  +
                        if tmp.message.is_none() {
         256  +
                            tmp.message = _error_message;
         257  +
                        }
         258  +
                        tmp
         259  +
                    })
         260  +
                }
         261  +
                "InvalidParameterException" => {
         262  +
                    crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::InvalidParameterException({
         263  +
                        let mut tmp = match protocol
         264  +
                            .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         265  +
                            .and_then(|mut deser| {
         266  +
                                crate::types::error::InvalidParameterException::deserialize_with_response(
         267  +
                                    &mut *deser,
         268  +
                                    response.headers(),
         269  +
                                    response.status().into(),
         270  +
                                    body,
         271  +
                                )
         272  +
                            }) {
         273  +
                            ::std::result::Result::Ok(val) => val,
         274  +
                            ::std::result::Result::Err(e) => {
         275  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         276  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         277  +
                                ))
         278  +
                            }
         279  +
                        };
         280  +
                        tmp.meta = generic;
         281  +
                        if tmp.message.is_none() {
         282  +
                            tmp.message = _error_message;
         283  +
                        }
         284  +
                        tmp
         285  +
                    })
         286  +
                }
         287  +
                "ServerException" => crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::ServerException({
         288  +
                    let mut tmp = match protocol
         289  +
                        .deserialize_response(response, crate::types::error::ServerException::SCHEMA, _cfg)
         290  +
                        .and_then(|mut deser| {
         291  +
                            crate::types::error::ServerException::deserialize_with_response(
         292  +
                                &mut *deser,
         293  +
                                response.headers(),
         294  +
                                response.status().into(),
         295  +
                                body,
         296  +
                            )
         297  +
                        }) {
         298  +
                        ::std::result::Result::Ok(val) => val,
         299  +
                        ::std::result::Result::Err(e) => {
         300  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         301  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         302  +
                            ))
         303  +
                        }
         304  +
                    };
         305  +
                    tmp.meta = generic;
         306  +
                    if tmp.message.is_none() {
         307  +
                        tmp.message = _error_message;
         308  +
                    }
         309  +
                    tmp
         310  +
                }),
         311  +
                "ServiceNotFoundException" => {
         312  +
                    crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::ServiceNotFoundException({
         313  +
                        let mut tmp = match protocol
         314  +
                            .deserialize_response(response, crate::types::error::ServiceNotFoundException::SCHEMA, _cfg)
         315  +
                            .and_then(|mut deser| {
         316  +
                                crate::types::error::ServiceNotFoundException::deserialize_with_response(
         317  +
                                    &mut *deser,
         318  +
                                    response.headers(),
         319  +
                                    response.status().into(),
         320  +
                                    body,
         321  +
                                )
         322  +
                            }) {
         323  +
                            ::std::result::Result::Ok(val) => val,
         324  +
                            ::std::result::Result::Err(e) => {
         325  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         326  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         327  +
                                ))
         328  +
                            }
         329  +
                        };
         330  +
                        tmp.meta = generic;
         331  +
                        if tmp.message.is_none() {
         332  +
                            tmp.message = _error_message;
         333  +
                        }
         334  +
                        tmp
         335  +
                    })
         336  +
                }
         337  +
                "UnsupportedFeatureException" => {
         338  +
                    crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::UnsupportedFeatureException({
         339  +
                        let mut tmp = match protocol
         340  +
                            .deserialize_response(response, crate::types::error::UnsupportedFeatureException::SCHEMA, _cfg)
         341  +
                            .and_then(|mut deser| {
         342  +
                                crate::types::error::UnsupportedFeatureException::deserialize_with_response(
         343  +
                                    &mut *deser,
         344  +
                                    response.headers(),
         345  +
                                    response.status().into(),
         346  +
                                    body,
         347  +
                                )
         348  +
                            }) {
         349  +
                            ::std::result::Result::Ok(val) => val,
         350  +
                            ::std::result::Result::Err(e) => {
         351  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         352  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         353  +
                                ))
         354  +
                            }
         355  +
                        };
         356  +
                        tmp.meta = generic;
         357  +
                        if tmp.message.is_none() {
         358  +
                            tmp.message = _error_message;
         359  +
                        }
         360  +
                        tmp
         361  +
                    })
         362  +
                }
         363  +
                _ => crate::operation::describe_service_deployments::DescribeServiceDeploymentsError::generic(generic),
         364  +
            };
         365  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         366  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         367  +
            ))
         368  +
        } else {
         369  +
            let protocol = _cfg
         370  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         371  +
                .expect("a SharedClientProtocol is required");
         372  +
            let mut deser = protocol
         373  +
                .deserialize_response(response, DescribeServiceDeployments::OUTPUT_SCHEMA, _cfg)
         374  +
                .map_err(|e| {
         375  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         376  +
                })?;
         377  +
            let body = response.body().bytes().expect("body loaded");
         378  +
            let output = crate::operation::describe_service_deployments::DescribeServiceDeploymentsOutput::deserialize_with_response(
         379  +
                &mut *deser,
         380  +
                response.headers(),
         381  +
                response.status().into(),
         382  +
                body,
         383  +
            )
         384  +
            .map_err(|e| {
         385  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         386  +
            })?;
         387  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         388  +
        }
  164    389   
    }
  165    390   
}
  166    391   
#[derive(Debug)]
  167    392   
struct DescribeServiceDeploymentsRequestSerializer;
  168    393   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeServiceDeploymentsRequestSerializer {
  169    394   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    395   
    fn serialize_input(
  171    396   
        &self,
  172    397   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    398   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    399   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    400   
        let input = input
  176    401   
            .downcast::<crate::operation::describe_service_deployments::DescribeServiceDeploymentsInput>()
  177    402   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::describe_service_deployments::DescribeServiceDeploymentsInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                ::std::write!(output, "/").expect("formatting should succeed");
  190         -
                ::std::result::Result::Ok(())
  191         -
            }
  192         -
            #[allow(clippy::unnecessary_wraps)]
  193         -
            fn update_http_builder(
  194         -
                input: &crate::operation::describe_service_deployments::DescribeServiceDeploymentsInput,
  195         -
                builder: ::http_1x::request::Builder,
  196         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  197         -
                let mut uri = ::std::string::String::new();
  198         -
                uri_base(input, &mut uri)?;
  199         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  200         -
            }
  201         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  202         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  203         -
            builder = _header_serialization_settings.set_default_header(
  204         -
                builder,
  205         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  206         -
                "AmazonEC2ContainerServiceV20141113.DescribeServiceDeployments",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  211         -
            crate::protocol_serde::shape_describe_service_deployments::ser_describe_service_deployments_input(&input)?,
  212         -
        );
  213         -
        if let Some(content_length) = body.content_length() {
  214         -
            let content_length = content_length.to_string();
  215         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  216         -
        }
  217         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         403  +
        let protocol = _cfg
         404  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         405  +
            .expect("a SharedClientProtocol is required");
         406  +
        let mut request = protocol
         407  +
            .serialize_request(&input, DescribeServiceDeployments::INPUT_SCHEMA, "", _cfg)
         408  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         409  +
         410  +
        return ::std::result::Result::Ok(request);
  218    411   
    }
  219    412   
}
  220    413   
#[derive(Debug)]
  221    414   
struct DescribeServiceDeploymentsEndpointParamsInterceptor;
  222    415   
  223    416   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeServiceDeploymentsEndpointParamsInterceptor {
  224    417   
    fn name(&self) -> &'static str {
  225    418   
        "DescribeServiceDeploymentsEndpointParamsInterceptor"
  226    419   
    }
  227    420   

tmp-codegen-diff/aws-sdk/sdk/ecs/src/operation/describe_service_deployments/_describe_service_deployments_input.rs

@@ -1,1 +130,132 @@
   21     21   
    "com.amazonaws.ecs.synthetic",
   22     22   
    "DescribeServiceDeploymentsInput",
   23     23   
);
   24     24   
static DESCRIBESERVICEDEPLOYMENTSINPUT_MEMBER_SERVICE_DEPLOYMENT_ARNS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   25     25   
    ::aws_smithy_schema::ShapeId::from_static(
   26     26   
        "com.amazonaws.ecs.synthetic#DescribeServiceDeploymentsInput$serviceDeploymentArns",
   27     27   
        "com.amazonaws.ecs.synthetic",
   28     28   
        "DescribeServiceDeploymentsInput",
   29     29   
    ),
   30     30   
    ::aws_smithy_schema::ShapeType::List,
   31         -
    "service_deployment_arns",
          31  +
    "serviceDeploymentArns",
   32     32   
    0,
   33     33   
);
   34     34   
static DESCRIBESERVICEDEPLOYMENTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   35     35   
    DESCRIBESERVICEDEPLOYMENTSINPUT_SCHEMA_ID,
   36     36   
    ::aws_smithy_schema::ShapeType::Structure,
   37     37   
    &[&DESCRIBESERVICEDEPLOYMENTSINPUT_MEMBER_SERVICE_DEPLOYMENT_ARNS],
   38     38   
);
   39     39   
impl DescribeServiceDeploymentsInput {
   40     40   
    /// The schema for this shape.
   41     41   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBESERVICEDEPLOYMENTSINPUT_SCHEMA;
   42     42   
}
   43     43   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeServiceDeploymentsInput {
   44     44   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   45     45   
    fn serialize_members(
   46     46   
        &self,
   47     47   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   48     48   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   49     49   
        if let Some(ref val) = self.service_deployment_arns {
   50     50   
            ser.write_list(
   51     51   
                &DESCRIBESERVICEDEPLOYMENTSINPUT_MEMBER_SERVICE_DEPLOYMENT_ARNS,
   52     52   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   53     53   
                    for item in val {
   54     54   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
   55     55   
                    }
   56     56   
                    Ok(())
   57     57   
                },
   58     58   
            )?;
   59     59   
        }
   60     60   
        Ok(())
   61     61   
    }
   62     62   
}
   63     63   
impl DescribeServiceDeploymentsInput {
   64     64   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   65         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   66         -
        deserializer: &mut D,
          65  +
    pub fn deserialize(
          66  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   67     67   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   68     68   
        #[allow(unused_variables, unused_mut)]
   69     69   
        let mut builder = Self::builder();
   70     70   
        #[allow(
   71     71   
            unused_variables,
   72     72   
            unreachable_code,
   73     73   
            clippy::single_match,
   74     74   
            clippy::match_single_binding,
   75     75   
            clippy::diverging_sub_expression
   76     76   
        )]
   77         -
        deserializer.read_struct(&DESCRIBESERVICEDEPLOYMENTSINPUT_SCHEMA, (), |_, member, deser| {
          77  +
        deserializer.read_struct(&DESCRIBESERVICEDEPLOYMENTSINPUT_SCHEMA, &mut |member, deser| {
   78     78   
            match member.member_index() {
   79     79   
                Some(0) => {
   80         -
                    builder.service_deployment_arns = Some({
   81         -
                        let container = if let Some(cap) = deser.container_size() {
   82         -
                            Vec::with_capacity(cap)
   83         -
                        } else {
   84         -
                            Vec::new()
   85         -
                        };
   86         -
                        deser.read_list(member, container, |mut list, deser| {
   87         -
                            list.push(deser.read_string(member)?);
   88         -
                            Ok(list)
   89         -
                        })?
   90         -
                    });
          80  +
                    builder.service_deployment_arns = Some(deser.read_string_list(member)?);
   91     81   
                }
   92     82   
                _ => {}
   93     83   
            }
   94     84   
            Ok(())
   95     85   
        })?;
          86  +
        builder.service_deployment_arns = builder.service_deployment_arns.or(Some(Vec::new()));
   96     87   
        builder
   97     88   
            .build()
   98     89   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   99     90   
    }
  100     91   
}
          92  +
impl DescribeServiceDeploymentsInput {
          93  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          94  +
    pub fn deserialize_with_response(
          95  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          96  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          97  +
        _status: u16,
          98  +
        _body: &[u8],
          99  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         100  +
        Self::deserialize(deserializer)
         101  +
    }
         102  +
}
  101    103   
impl DescribeServiceDeploymentsInput {
  102    104   
    /// Creates a new builder-style object to manufacture [`DescribeServiceDeploymentsInput`](crate::operation::describe_service_deployments::DescribeServiceDeploymentsInput).
  103    105   
    pub fn builder() -> crate::operation::describe_service_deployments::builders::DescribeServiceDeploymentsInputBuilder {
  104    106   
        crate::operation::describe_service_deployments::builders::DescribeServiceDeploymentsInputBuilder::default()
  105    107   
    }
  106    108   
}
  107    109   
  108    110   
/// A builder for [`DescribeServiceDeploymentsInput`](crate::operation::describe_service_deployments::DescribeServiceDeploymentsInput).
  109    111   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  110    112   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/ecs/src/operation/describe_service_deployments/_describe_service_deployments_output.rs

@@ -10,10 +165,221 @@
   30     30   
    "com.amazonaws.ecs.synthetic",
   31     31   
    "DescribeServiceDeploymentsOutput",
   32     32   
);
   33     33   
static DESCRIBESERVICEDEPLOYMENTSOUTPUT_MEMBER_SERVICE_DEPLOYMENTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   34     34   
    ::aws_smithy_schema::ShapeId::from_static(
   35     35   
        "com.amazonaws.ecs.synthetic#DescribeServiceDeploymentsOutput$serviceDeployments",
   36     36   
        "com.amazonaws.ecs.synthetic",
   37     37   
        "DescribeServiceDeploymentsOutput",
   38     38   
    ),
   39     39   
    ::aws_smithy_schema::ShapeType::List,
   40         -
    "service_deployments",
          40  +
    "serviceDeployments",
   41     41   
    0,
   42     42   
);
   43     43   
static DESCRIBESERVICEDEPLOYMENTSOUTPUT_MEMBER_FAILURES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   44     44   
    ::aws_smithy_schema::ShapeId::from_static(
   45     45   
        "com.amazonaws.ecs.synthetic#DescribeServiceDeploymentsOutput$failures",
   46     46   
        "com.amazonaws.ecs.synthetic",
   47     47   
        "DescribeServiceDeploymentsOutput",
   48     48   
    ),
   49     49   
    ::aws_smithy_schema::ShapeType::List,
   50     50   
    "failures",
   51     51   
    1,
   52     52   
);
          53  +
static DESCRIBESERVICEDEPLOYMENTSOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          54  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          55  +
    ::aws_smithy_schema::ShapeType::String,
          56  +
    "request_id",
          57  +
    2,
          58  +
)
          59  +
.with_http_header("x-amzn-requestid");
   53     60   
static DESCRIBESERVICEDEPLOYMENTSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   54     61   
    DESCRIBESERVICEDEPLOYMENTSOUTPUT_SCHEMA_ID,
   55     62   
    ::aws_smithy_schema::ShapeType::Structure,
   56     63   
    &[
   57     64   
        &DESCRIBESERVICEDEPLOYMENTSOUTPUT_MEMBER_SERVICE_DEPLOYMENTS,
   58     65   
        &DESCRIBESERVICEDEPLOYMENTSOUTPUT_MEMBER_FAILURES,
          66  +
        &DESCRIBESERVICEDEPLOYMENTSOUTPUT_MEMBER__REQUEST_ID,
   59     67   
    ],
   60     68   
);
   61     69   
impl DescribeServiceDeploymentsOutput {
   62     70   
    /// The schema for this shape.
   63     71   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBESERVICEDEPLOYMENTSOUTPUT_SCHEMA;
   64     72   
}
   65     73   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeServiceDeploymentsOutput {
   66     74   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   67     75   
    fn serialize_members(
   68     76   
        &self,
   69     77   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   70     78   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   71     79   
        if let Some(ref val) = self.service_deployments {
   72     80   
            ser.write_list(
   73     81   
                &DESCRIBESERVICEDEPLOYMENTSOUTPUT_MEMBER_SERVICE_DEPLOYMENTS,
   74     82   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   75     83   
                    for item in val {
   76     84   
                        ser.write_struct(crate::types::ServiceDeployment::SCHEMA, item)?;
   77     85   
                    }
   78     86   
                    Ok(())
   79     87   
                },
   80     88   
            )?;
   81     89   
        }
   82     90   
        if let Some(ref val) = self.failures {
   83     91   
            ser.write_list(
   84     92   
                &DESCRIBESERVICEDEPLOYMENTSOUTPUT_MEMBER_FAILURES,
   85     93   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   86     94   
                    for item in val {
   87     95   
                        ser.write_struct(crate::types::Failure::SCHEMA, item)?;
   88     96   
                    }
   89     97   
                    Ok(())
   90     98   
                },
   91     99   
            )?;
   92    100   
        }
   93    101   
        Ok(())
   94    102   
    }
   95    103   
}
   96    104   
impl DescribeServiceDeploymentsOutput {
   97    105   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   98         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   99         -
        deserializer: &mut D,
         106  +
    pub fn deserialize(
         107  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  100    108   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  101    109   
        #[allow(unused_variables, unused_mut)]
  102    110   
        let mut builder = Self::builder();
  103    111   
        #[allow(
  104    112   
            unused_variables,
  105    113   
            unreachable_code,
  106    114   
            clippy::single_match,
  107    115   
            clippy::match_single_binding,
  108    116   
            clippy::diverging_sub_expression
  109    117   
        )]
  110         -
        deserializer.read_struct(&DESCRIBESERVICEDEPLOYMENTSOUTPUT_SCHEMA, (), |_, member, deser| {
         118  +
        deserializer.read_struct(&DESCRIBESERVICEDEPLOYMENTSOUTPUT_SCHEMA, &mut |member, deser| {
  111    119   
            match member.member_index() {
  112    120   
                Some(0) => {
  113    121   
                    builder.service_deployments = Some({
  114         -
                        let container = if let Some(cap) = deser.container_size() {
  115         -
                            Vec::with_capacity(cap)
  116         -
                        } else {
  117         -
                            Vec::new()
  118         -
                        };
  119         -
                        deser.read_list(member, container, |mut list, deser| {
  120         -
                            list.push(crate::types::ServiceDeployment::deserialize(deser)?);
  121         -
                            Ok(list)
  122         -
                        })?
         122  +
                        let mut container = Vec::new();
         123  +
                        deser.read_list(member, &mut |deser| {
         124  +
                            container.push(crate::types::ServiceDeployment::deserialize(deser)?);
         125  +
                            Ok(())
         126  +
                        })?;
         127  +
                        container
  123    128   
                    });
  124    129   
                }
  125    130   
                Some(1) => {
  126    131   
                    builder.failures = Some({
  127         -
                        let container = if let Some(cap) = deser.container_size() {
  128         -
                            Vec::with_capacity(cap)
  129         -
                        } else {
  130         -
                            Vec::new()
  131         -
                        };
  132         -
                        deser.read_list(member, container, |mut list, deser| {
  133         -
                            list.push(crate::types::Failure::deserialize(deser)?);
  134         -
                            Ok(list)
  135         -
                        })?
         132  +
                        let mut container = Vec::new();
         133  +
                        deser.read_list(member, &mut |deser| {
         134  +
                            container.push(crate::types::Failure::deserialize(deser)?);
         135  +
                            Ok(())
         136  +
                        })?;
         137  +
                        container
         138  +
                    });
         139  +
                }
         140  +
                Some(2) => {
         141  +
                    builder._request_id = Some(deser.read_string(member)?);
         142  +
                }
         143  +
                _ => {}
         144  +
            }
         145  +
            Ok(())
         146  +
        })?;
         147  +
        Ok(builder.build())
         148  +
    }
         149  +
}
         150  +
impl DescribeServiceDeploymentsOutput {
         151  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         152  +
    /// Header-bound members are read directly from headers, avoiding runtime
         153  +
    /// member iteration overhead. Body members are read via the deserializer.
         154  +
    pub fn deserialize_with_response(
         155  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         156  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         157  +
        _status: u16,
         158  +
        _body: &[u8],
         159  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         160  +
        #[allow(unused_variables, unused_mut)]
         161  +
        let mut builder = Self::builder();
         162  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         163  +
            builder._request_id = Some(val.to_string());
         164  +
        }
         165  +
        #[allow(
         166  +
            unused_variables,
         167  +
            unreachable_code,
         168  +
            clippy::single_match,
         169  +
            clippy::match_single_binding,
         170  +
            clippy::diverging_sub_expression
         171  +
        )]
         172  +
        deserializer.read_struct(&DESCRIBESERVICEDEPLOYMENTSOUTPUT_SCHEMA, &mut |member, deser| {
         173  +
            match member.member_index() {
         174  +
                Some(0) => {
         175  +
                    builder.service_deployments = Some({
         176  +
                        let mut container = Vec::new();
         177  +
                        deser.read_list(member, &mut |deser| {
         178  +
                            container.push(crate::types::ServiceDeployment::deserialize(deser)?);
         179  +
                            Ok(())
         180  +
                        })?;
         181  +
                        container
         182  +
                    });
         183  +
                }
         184  +
                Some(1) => {
         185  +
                    builder.failures = Some({
         186  +
                        let mut container = Vec::new();
         187  +
                        deser.read_list(member, &mut |deser| {
         188  +
                            container.push(crate::types::Failure::deserialize(deser)?);
         189  +
                            Ok(())
         190  +
                        })?;
         191  +
                        container
  136    192   
                    });
  137    193   
                }
  138    194   
                _ => {}
  139    195   
            }
  140    196   
            Ok(())
  141    197   
        })?;
  142    198   
        Ok(builder.build())
  143    199   
    }
  144    200   
}
  145    201   
impl ::aws_types::request_id::RequestId for DescribeServiceDeploymentsOutput {

tmp-codegen-diff/aws-sdk/sdk/ecs/src/operation/describe_service_revisions.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `DescribeServiceRevisions`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeServiceRevisions;
    6      6   
impl DescribeServiceRevisions {
    7      7   
    /// Creates a new `DescribeServiceRevisions`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::describe_service_revisions::DescribeServiceRevisionsInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_service_revisions::DescribeServiceRevisionsOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::describe_service_revisions::DescribeServiceRevisionsInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_service_revisions::DescribeServiceRevisionsOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_service_revisions::DescribeServiceRevisionsError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -118,124 +247,440 @@
  138    144   
                crate::operation::describe_service_revisions::DescribeServiceRevisionsError,
  139    145   
            >::new());
  140    146   
  141    147   
        ::std::borrow::Cow::Owned(rcb)
  142    148   
    }
  143    149   
}
  144    150   
  145    151   
#[derive(Debug)]
  146    152   
struct DescribeServiceRevisionsResponseDeserializer;
  147    153   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeServiceRevisionsResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         154  +
    fn deserialize_nonstreaming_with_config(
  149    155   
        &self,
  150    156   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         157  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    158   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    159   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    160   
        #[allow(unused_mut)]
  156    161   
        let mut force_error = false;
  157    162   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_describe_service_revisions::de_describe_service_revisions_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_describe_service_revisions::de_describe_service_revisions_http_response(status, headers, body)
         163  +
        if !success && status != 200 || force_error {
         164  +
            let headers = response.headers();
         165  +
            let body = response.body().bytes().expect("body loaded");
         166  +
            #[allow(unused_mut)]
         167  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         168  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         169  +
            })?;
         170  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         171  +
            let generic = generic_builder.build();
         172  +
            let error_code = match generic.code() {
         173  +
                ::std::option::Option::Some(code) => code,
         174  +
                ::std::option::Option::None => {
         175  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         176  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         177  +
                            crate::operation::describe_service_revisions::DescribeServiceRevisionsError::unhandled(generic),
         178  +
                        ),
         179  +
                    ))
         180  +
                }
         181  +
            };
         182  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         183  +
            let protocol = _cfg
         184  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         185  +
                .expect("a SharedClientProtocol is required");
         186  +
            let err = match error_code {
         187  +
                "AccessDeniedException" => crate::operation::describe_service_revisions::DescribeServiceRevisionsError::AccessDeniedException({
         188  +
                    let mut tmp = match protocol
         189  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         190  +
                        .and_then(|mut deser| {
         191  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         192  +
                                &mut *deser,
         193  +
                                response.headers(),
         194  +
                                response.status().into(),
         195  +
                                body,
         196  +
                            )
         197  +
                        }) {
         198  +
                        ::std::result::Result::Ok(val) => val,
         199  +
                        ::std::result::Result::Err(e) => {
         200  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         201  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         202  +
                            ))
         203  +
                        }
  162    204   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         205  +
                    tmp.meta = generic;
         206  +
                    if tmp.message.is_none() {
         207  +
                        tmp.message = _error_message;
         208  +
                    }
         209  +
                    tmp
         210  +
                }),
         211  +
                "ClientException" => crate::operation::describe_service_revisions::DescribeServiceRevisionsError::ClientException({
         212  +
                    let mut tmp = match protocol
         213  +
                        .deserialize_response(response, crate::types::error::ClientException::SCHEMA, _cfg)
         214  +
                        .and_then(|mut deser| {
         215  +
                            crate::types::error::ClientException::deserialize_with_response(
         216  +
                                &mut *deser,
         217  +
                                response.headers(),
         218  +
                                response.status().into(),
         219  +
                                body,
         220  +
                            )
         221  +
                        }) {
         222  +
                        ::std::result::Result::Ok(val) => val,
         223  +
                        ::std::result::Result::Err(e) => {
         224  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         225  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         226  +
                            ))
         227  +
                        }
         228  +
                    };
         229  +
                    tmp.meta = generic;
         230  +
                    if tmp.message.is_none() {
         231  +
                        tmp.message = _error_message;
         232  +
                    }
         233  +
                    tmp
         234  +
                }),
         235  +
                "ClusterNotFoundException" => {
         236  +
                    crate::operation::describe_service_revisions::DescribeServiceRevisionsError::ClusterNotFoundException({
         237  +
                        let mut tmp = match protocol
         238  +
                            .deserialize_response(response, crate::types::error::ClusterNotFoundException::SCHEMA, _cfg)
         239  +
                            .and_then(|mut deser| {
         240  +
                                crate::types::error::ClusterNotFoundException::deserialize_with_response(
         241  +
                                    &mut *deser,
         242  +
                                    response.headers(),
         243  +
                                    response.status().into(),
         244  +
                                    body,
         245  +
                                )
         246  +
                            }) {
         247  +
                            ::std::result::Result::Ok(val) => val,
         248  +
                            ::std::result::Result::Err(e) => {
         249  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         250  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         251  +
                                ))
         252  +
                            }
         253  +
                        };
         254  +
                        tmp.meta = generic;
         255  +
                        if tmp.message.is_none() {
         256  +
                            tmp.message = _error_message;
         257  +
                        }
         258  +
                        tmp
         259  +
                    })
         260  +
                }
         261  +
                "InvalidParameterException" => {
         262  +
                    crate::operation::describe_service_revisions::DescribeServiceRevisionsError::InvalidParameterException({
         263  +
                        let mut tmp = match protocol
         264  +
                            .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         265  +
                            .and_then(|mut deser| {
         266  +
                                crate::types::error::InvalidParameterException::deserialize_with_response(
         267  +
                                    &mut *deser,
         268  +
                                    response.headers(),
         269  +
                                    response.status().into(),
         270  +
                                    body,
         271  +
                                )
         272  +
                            }) {
         273  +
                            ::std::result::Result::Ok(val) => val,
         274  +
                            ::std::result::Result::Err(e) => {
         275  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         276  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         277  +
                                ))
         278  +
                            }
         279  +
                        };
         280  +
                        tmp.meta = generic;
         281  +
                        if tmp.message.is_none() {
         282  +
                            tmp.message = _error_message;
         283  +
                        }
         284  +
                        tmp
         285  +
                    })
         286  +
                }
         287  +
                "ServerException" => crate::operation::describe_service_revisions::DescribeServiceRevisionsError::ServerException({
         288  +
                    let mut tmp = match protocol
         289  +
                        .deserialize_response(response, crate::types::error::ServerException::SCHEMA, _cfg)
         290  +
                        .and_then(|mut deser| {
         291  +
                            crate::types::error::ServerException::deserialize_with_response(
         292  +
                                &mut *deser,
         293  +
                                response.headers(),
         294  +
                                response.status().into(),
         295  +
                                body,
         296  +
                            )
         297  +
                        }) {
         298  +
                        ::std::result::Result::Ok(val) => val,
         299  +
                        ::std::result::Result::Err(e) => {
         300  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         301  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         302  +
                            ))
         303  +
                        }
         304  +
                    };
         305  +
                    tmp.meta = generic;
         306  +
                    if tmp.message.is_none() {
         307  +
                        tmp.message = _error_message;
         308  +
                    }
         309  +
                    tmp
         310  +
                }),
         311  +
                "ServiceNotFoundException" => {
         312  +
                    crate::operation::describe_service_revisions::DescribeServiceRevisionsError::ServiceNotFoundException({
         313  +
                        let mut tmp = match protocol
         314  +
                            .deserialize_response(response, crate::types::error::ServiceNotFoundException::SCHEMA, _cfg)
         315  +
                            .and_then(|mut deser| {
         316  +
                                crate::types::error::ServiceNotFoundException::deserialize_with_response(
         317  +
                                    &mut *deser,
         318  +
                                    response.headers(),
         319  +
                                    response.status().into(),
         320  +
                                    body,
         321  +
                                )
         322  +
                            }) {
         323  +
                            ::std::result::Result::Ok(val) => val,
         324  +
                            ::std::result::Result::Err(e) => {
         325  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         326  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         327  +
                                ))
         328  +
                            }
         329  +
                        };
         330  +
                        tmp.meta = generic;
         331  +
                        if tmp.message.is_none() {
         332  +
                            tmp.message = _error_message;
         333  +
                        }
         334  +
                        tmp
         335  +
                    })
         336  +
                }
         337  +
                "UnsupportedFeatureException" => {
         338  +
                    crate::operation::describe_service_revisions::DescribeServiceRevisionsError::UnsupportedFeatureException({
         339  +
                        let mut tmp = match protocol
         340  +
                            .deserialize_response(response, crate::types::error::UnsupportedFeatureException::SCHEMA, _cfg)
         341  +
                            .and_then(|mut deser| {
         342  +
                                crate::types::error::UnsupportedFeatureException::deserialize_with_response(
         343  +
                                    &mut *deser,
         344  +
                                    response.headers(),
         345  +
                                    response.status().into(),
         346  +
                                    body,
         347  +
                                )
         348  +
                            }) {
         349  +
                            ::std::result::Result::Ok(val) => val,
         350  +
                            ::std::result::Result::Err(e) => {
         351  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         352  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         353  +
                                ))
         354  +
                            }
         355  +
                        };
         356  +
                        tmp.meta = generic;
         357  +
                        if tmp.message.is_none() {
         358  +
                            tmp.message = _error_message;
         359  +
                        }
         360  +
                        tmp
         361  +
                    })
         362  +
                }
         363  +
                _ => crate::operation::describe_service_revisions::DescribeServiceRevisionsError::generic(generic),
         364  +
            };
         365  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         366  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         367  +
            ))
         368  +
        } else {
         369  +
            let protocol = _cfg
         370  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         371  +
                .expect("a SharedClientProtocol is required");
         372  +
            let mut deser = protocol
         373  +
                .deserialize_response(response, DescribeServiceRevisions::OUTPUT_SCHEMA, _cfg)
         374  +
                .map_err(|e| {
         375  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         376  +
                })?;
         377  +
            let body = response.body().bytes().expect("body loaded");
         378  +
            let output = crate::operation::describe_service_revisions::DescribeServiceRevisionsOutput::deserialize_with_response(
         379  +
                &mut *deser,
         380  +
                response.headers(),
         381  +
                response.status().into(),
         382  +
                body,
         383  +
            )
         384  +
            .map_err(|e| {
         385  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         386  +
            })?;
         387  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         388  +
        }
  164    389   
    }
  165    390   
}
  166    391   
#[derive(Debug)]
  167    392   
struct DescribeServiceRevisionsRequestSerializer;
  168    393   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeServiceRevisionsRequestSerializer {
  169    394   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    395   
    fn serialize_input(
  171    396   
        &self,
  172    397   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    398   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    399   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    400   
        let input = input
  176    401   
            .downcast::<crate::operation::describe_service_revisions::DescribeServiceRevisionsInput>()
  177    402   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::describe_service_revisions::DescribeServiceRevisionsInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                ::std::write!(output, "/").expect("formatting should succeed");
  190         -
                ::std::result::Result::Ok(())
  191         -
            }
  192         -
            #[allow(clippy::unnecessary_wraps)]
  193         -
            fn update_http_builder(
  194         -
                input: &crate::operation::describe_service_revisions::DescribeServiceRevisionsInput,
  195         -
                builder: ::http_1x::request::Builder,
  196         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  197         -
                let mut uri = ::std::string::String::new();
  198         -
                uri_base(input, &mut uri)?;
  199         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  200         -
            }
  201         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  202         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  203         -
            builder = _header_serialization_settings.set_default_header(
  204         -
                builder,
  205         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  206         -
                "AmazonEC2ContainerServiceV20141113.DescribeServiceRevisions",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  211         -
            crate::protocol_serde::shape_describe_service_revisions::ser_describe_service_revisions_input(&input)?,
  212         -
        );
  213         -
        if let Some(content_length) = body.content_length() {
  214         -
            let content_length = content_length.to_string();
  215         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  216         -
        }
  217         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         403  +
        let protocol = _cfg
         404  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         405  +
            .expect("a SharedClientProtocol is required");
         406  +
        let mut request = protocol
         407  +
            .serialize_request(&input, DescribeServiceRevisions::INPUT_SCHEMA, "", _cfg)
         408  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         409  +
         410  +
        return ::std::result::Result::Ok(request);
  218    411   
    }
  219    412   
}
  220    413   
#[derive(Debug)]
  221    414   
struct DescribeServiceRevisionsEndpointParamsInterceptor;
  222    415   
  223    416   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeServiceRevisionsEndpointParamsInterceptor {
  224    417   
    fn name(&self) -> &'static str {
  225    418   
        "DescribeServiceRevisionsEndpointParamsInterceptor"
  226    419   
    }
  227    420