AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

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

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

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

@@ -7,7 +134,145 @@
   27     27   
    "com.amazonaws.ecs.synthetic",
   28     28   
    "ListClustersInput",
   29     29   
);
   30     30   
static LISTCLUSTERSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   31     31   
    ::aws_smithy_schema::ShapeId::from_static(
   32     32   
        "com.amazonaws.ecs.synthetic#ListClustersInput$nextToken",
   33     33   
        "com.amazonaws.ecs.synthetic",
   34     34   
        "ListClustersInput",
   35     35   
    ),
   36     36   
    ::aws_smithy_schema::ShapeType::String,
   37         -
    "next_token",
          37  +
    "nextToken",
   38     38   
    0,
   39     39   
);
   40     40   
static LISTCLUSTERSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   41     41   
    ::aws_smithy_schema::ShapeId::from_static(
   42     42   
        "com.amazonaws.ecs.synthetic#ListClustersInput$maxResults",
   43     43   
        "com.amazonaws.ecs.synthetic",
   44     44   
        "ListClustersInput",
   45     45   
    ),
   46     46   
    ::aws_smithy_schema::ShapeType::Integer,
   47         -
    "max_results",
          47  +
    "maxResults",
   48     48   
    1,
   49     49   
);
   50     50   
static LISTCLUSTERSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   51     51   
    LISTCLUSTERSINPUT_SCHEMA_ID,
   52     52   
    ::aws_smithy_schema::ShapeType::Structure,
   53     53   
    &[&LISTCLUSTERSINPUT_MEMBER_NEXT_TOKEN, &LISTCLUSTERSINPUT_MEMBER_MAX_RESULTS],
   54     54   
);
   55     55   
impl ListClustersInput {
   56     56   
    /// The schema for this shape.
   57     57   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTCLUSTERSINPUT_SCHEMA;
   58     58   
}
   59     59   
impl ::aws_smithy_schema::serde::SerializableStruct for ListClustersInput {
   60     60   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   61     61   
    fn serialize_members(
   62     62   
        &self,
   63     63   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   64     64   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   65     65   
        if let Some(ref val) = self.next_token {
   66     66   
            ser.write_string(&LISTCLUSTERSINPUT_MEMBER_NEXT_TOKEN, val)?;
   67     67   
        }
   68     68   
        if let Some(ref val) = self.max_results {
   69     69   
            ser.write_integer(&LISTCLUSTERSINPUT_MEMBER_MAX_RESULTS, *val)?;
   70     70   
        }
   71     71   
        Ok(())
   72     72   
    }
   73     73   
}
   74     74   
impl ListClustersInput {
   75     75   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   76         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   77         -
        deserializer: &mut D,
          76  +
    pub fn deserialize(
          77  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   78     78   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   79     79   
        #[allow(unused_variables, unused_mut)]
   80     80   
        let mut builder = Self::builder();
   81     81   
        #[allow(
   82     82   
            unused_variables,
   83     83   
            unreachable_code,
   84     84   
            clippy::single_match,
   85     85   
            clippy::match_single_binding,
   86     86   
            clippy::diverging_sub_expression
   87     87   
        )]
   88         -
        deserializer.read_struct(&LISTCLUSTERSINPUT_SCHEMA, (), |_, member, deser| {
          88  +
        deserializer.read_struct(&LISTCLUSTERSINPUT_SCHEMA, &mut |member, deser| {
   89     89   
            match member.member_index() {
   90     90   
                Some(0) => {
   91     91   
                    builder.next_token = Some(deser.read_string(member)?);
   92     92   
                }
   93     93   
                Some(1) => {
   94     94   
                    builder.max_results = Some(deser.read_integer(member)?);
   95     95   
                }
   96     96   
                _ => {}
   97     97   
            }
   98     98   
            Ok(())
   99     99   
        })?;
  100    100   
        builder
  101    101   
            .build()
  102    102   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  103    103   
    }
  104    104   
}
         105  +
impl ListClustersInput {
         106  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         107  +
    pub fn deserialize_with_response(
         108  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         109  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         110  +
        _status: u16,
         111  +
        _body: &[u8],
         112  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         113  +
        Self::deserialize(deserializer)
         114  +
    }
         115  +
}
  105    116   
impl ListClustersInput {
  106    117   
    /// Creates a new builder-style object to manufacture [`ListClustersInput`](crate::operation::list_clusters::ListClustersInput).
  107    118   
    pub fn builder() -> crate::operation::list_clusters::builders::ListClustersInputBuilder {
  108    119   
        crate::operation::list_clusters::builders::ListClustersInputBuilder::default()
  109    120   
    }
  110    121   
}
  111    122   
  112    123   
/// A builder for [`ListClustersInput`](crate::operation::list_clusters::ListClustersInput).
  113    124   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  114    125   
#[non_exhaustive]

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

@@ -6,6 +138,179 @@
   26     26   
    "com.amazonaws.ecs.synthetic",
   27     27   
    "ListClustersOutput",
   28     28   
);
   29     29   
static LISTCLUSTERSOUTPUT_MEMBER_CLUSTER_ARNS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   30     30   
    ::aws_smithy_schema::ShapeId::from_static(
   31     31   
        "com.amazonaws.ecs.synthetic#ListClustersOutput$clusterArns",
   32     32   
        "com.amazonaws.ecs.synthetic",
   33     33   
        "ListClustersOutput",
   34     34   
    ),
   35     35   
    ::aws_smithy_schema::ShapeType::List,
   36         -
    "cluster_arns",
          36  +
    "clusterArns",
   37     37   
    0,
   38     38   
);
   39     39   
static LISTCLUSTERSOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   40     40   
    ::aws_smithy_schema::ShapeId::from_static(
   41     41   
        "com.amazonaws.ecs.synthetic#ListClustersOutput$nextToken",
   42     42   
        "com.amazonaws.ecs.synthetic",
   43     43   
        "ListClustersOutput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::String,
   46         -
    "next_token",
          46  +
    "nextToken",
   47     47   
    1,
   48     48   
);
          49  +
static LISTCLUSTERSOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          50  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          51  +
    ::aws_smithy_schema::ShapeType::String,
          52  +
    "request_id",
          53  +
    2,
          54  +
)
          55  +
.with_http_header("x-amzn-requestid");
   49     56   
static LISTCLUSTERSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   50     57   
    LISTCLUSTERSOUTPUT_SCHEMA_ID,
   51     58   
    ::aws_smithy_schema::ShapeType::Structure,
   52         -
    &[&LISTCLUSTERSOUTPUT_MEMBER_CLUSTER_ARNS, &LISTCLUSTERSOUTPUT_MEMBER_NEXT_TOKEN],
          59  +
    &[
          60  +
        &LISTCLUSTERSOUTPUT_MEMBER_CLUSTER_ARNS,
          61  +
        &LISTCLUSTERSOUTPUT_MEMBER_NEXT_TOKEN,
          62  +
        &LISTCLUSTERSOUTPUT_MEMBER__REQUEST_ID,
          63  +
    ],
   53     64   
);
   54     65   
impl ListClustersOutput {
   55     66   
    /// The schema for this shape.
   56     67   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTCLUSTERSOUTPUT_SCHEMA;
   57     68   
}
   58     69   
impl ::aws_smithy_schema::serde::SerializableStruct for ListClustersOutput {
   59     70   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   60     71   
    fn serialize_members(
   61     72   
        &self,
   62     73   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   63     74   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   64     75   
        if let Some(ref val) = self.cluster_arns {
   65     76   
            ser.write_list(
   66     77   
                &LISTCLUSTERSOUTPUT_MEMBER_CLUSTER_ARNS,
   67     78   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   68     79   
                    for item in val {
   69     80   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
   70     81   
                    }
   71     82   
                    Ok(())
   72     83   
                },
   73     84   
            )?;
   74     85   
        }
   75     86   
        if let Some(ref val) = self.next_token {
   76     87   
            ser.write_string(&LISTCLUSTERSOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   77     88   
        }
   78     89   
        Ok(())
   79     90   
    }
   80     91   
}
   81     92   
impl ListClustersOutput {
   82     93   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   83         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   84         -
        deserializer: &mut D,
          94  +
    pub fn deserialize(
          95  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   85     96   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   86     97   
        #[allow(unused_variables, unused_mut)]
   87     98   
        let mut builder = Self::builder();
   88     99   
        #[allow(
   89    100   
            unused_variables,
   90    101   
            unreachable_code,
   91    102   
            clippy::single_match,
   92    103   
            clippy::match_single_binding,
   93    104   
            clippy::diverging_sub_expression
   94    105   
        )]
   95         -
        deserializer.read_struct(&LISTCLUSTERSOUTPUT_SCHEMA, (), |_, member, deser| {
         106  +
        deserializer.read_struct(&LISTCLUSTERSOUTPUT_SCHEMA, &mut |member, deser| {
         107  +
            match member.member_index() {
         108  +
                Some(0) => {
         109  +
                    builder.cluster_arns = Some(deser.read_string_list(member)?);
         110  +
                }
         111  +
                Some(1) => {
         112  +
                    builder.next_token = Some(deser.read_string(member)?);
         113  +
                }
         114  +
                Some(2) => {
         115  +
                    builder._request_id = Some(deser.read_string(member)?);
         116  +
                }
         117  +
                _ => {}
         118  +
            }
         119  +
            Ok(())
         120  +
        })?;
         121  +
        Ok(builder.build())
         122  +
    }
         123  +
}
         124  +
impl ListClustersOutput {
         125  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         126  +
    /// Header-bound members are read directly from headers, avoiding runtime
         127  +
    /// member iteration overhead. Body members are read via the deserializer.
         128  +
    pub fn deserialize_with_response(
         129  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         130  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         131  +
        _status: u16,
         132  +
        _body: &[u8],
         133  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         134  +
        #[allow(unused_variables, unused_mut)]
         135  +
        let mut builder = Self::builder();
         136  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         137  +
            builder._request_id = Some(val.to_string());
         138  +
        }
         139  +
        #[allow(
         140  +
            unused_variables,
         141  +
            unreachable_code,
         142  +
            clippy::single_match,
         143  +
            clippy::match_single_binding,
         144  +
            clippy::diverging_sub_expression
         145  +
        )]
         146  +
        deserializer.read_struct(&LISTCLUSTERSOUTPUT_SCHEMA, &mut |member, deser| {
   96    147   
            match member.member_index() {
   97    148   
                Some(0) => {
   98         -
                    builder.cluster_arns = Some({
   99         -
                        let container = if let Some(cap) = deser.container_size() {
  100         -
                            Vec::with_capacity(cap)
  101         -
                        } else {
  102         -
                            Vec::new()
  103         -
                        };
  104         -
                        deser.read_list(member, container, |mut list, deser| {
  105         -
                            list.push(deser.read_string(member)?);
  106         -
                            Ok(list)
  107         -
                        })?
  108         -
                    });
         149  +
                    builder.cluster_arns = Some(deser.read_string_list(member)?);
  109    150   
                }
  110    151   
                Some(1) => {
  111    152   
                    builder.next_token = Some(deser.read_string(member)?);
  112    153   
                }
  113    154   
                _ => {}
  114    155   
            }
  115    156   
            Ok(())
  116    157   
        })?;
  117    158   
        Ok(builder.build())
  118    159   
    }

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

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

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

@@ -45,45 +206,217 @@
   65     65   
    "filter",
   66     66   
    1,
   67     67   
);
   68     68   
static LISTCONTAINERINSTANCESINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   69     69   
    ::aws_smithy_schema::ShapeId::from_static(
   70     70   
        "com.amazonaws.ecs.synthetic#ListContainerInstancesInput$nextToken",
   71     71   
        "com.amazonaws.ecs.synthetic",
   72     72   
        "ListContainerInstancesInput",
   73     73   
    ),
   74     74   
    ::aws_smithy_schema::ShapeType::String,
   75         -
    "next_token",
          75  +
    "nextToken",
   76     76   
    2,
   77     77   
);
   78     78   
static LISTCONTAINERINSTANCESINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   79     79   
    ::aws_smithy_schema::ShapeId::from_static(
   80     80   
        "com.amazonaws.ecs.synthetic#ListContainerInstancesInput$maxResults",
   81     81   
        "com.amazonaws.ecs.synthetic",
   82     82   
        "ListContainerInstancesInput",
   83     83   
    ),
   84     84   
    ::aws_smithy_schema::ShapeType::Integer,
   85         -
    "max_results",
          85  +
    "maxResults",
   86     86   
    3,
   87     87   
);
   88     88   
static LISTCONTAINERINSTANCESINPUT_MEMBER_STATUS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   89     89   
    ::aws_smithy_schema::ShapeId::from_static(
   90     90   
        "com.amazonaws.ecs.synthetic#ListContainerInstancesInput$status",
   91     91   
        "com.amazonaws.ecs.synthetic",
   92     92   
        "ListContainerInstancesInput",
   93     93   
    ),
   94     94   
    ::aws_smithy_schema::ShapeType::String,
   95     95   
    "status",
   96     96   
    4,
   97     97   
);
   98     98   
static LISTCONTAINERINSTANCESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   99     99   
    LISTCONTAINERINSTANCESINPUT_SCHEMA_ID,
  100    100   
    ::aws_smithy_schema::ShapeType::Structure,
  101    101   
    &[
  102    102   
        &LISTCONTAINERINSTANCESINPUT_MEMBER_CLUSTER,
  103    103   
        &LISTCONTAINERINSTANCESINPUT_MEMBER_FILTER,
  104    104   
        &LISTCONTAINERINSTANCESINPUT_MEMBER_NEXT_TOKEN,
  105    105   
        &LISTCONTAINERINSTANCESINPUT_MEMBER_MAX_RESULTS,
  106    106   
        &LISTCONTAINERINSTANCESINPUT_MEMBER_STATUS,
  107    107   
    ],
  108    108   
);
  109    109   
impl ListContainerInstancesInput {
  110    110   
    /// The schema for this shape.
  111    111   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTCONTAINERINSTANCESINPUT_SCHEMA;
  112    112   
}
  113    113   
impl ::aws_smithy_schema::serde::SerializableStruct for ListContainerInstancesInput {
  114    114   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  115    115   
    fn serialize_members(
  116    116   
        &self,
  117    117   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  118    118   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  119    119   
        if let Some(ref val) = self.cluster {
  120    120   
            ser.write_string(&LISTCONTAINERINSTANCESINPUT_MEMBER_CLUSTER, val)?;
  121    121   
        }
  122    122   
        if let Some(ref val) = self.filter {
  123    123   
            ser.write_string(&LISTCONTAINERINSTANCESINPUT_MEMBER_FILTER, val)?;
  124    124   
        }
  125    125   
        if let Some(ref val) = self.next_token {
  126    126   
            ser.write_string(&LISTCONTAINERINSTANCESINPUT_MEMBER_NEXT_TOKEN, val)?;
  127    127   
        }
  128    128   
        if let Some(ref val) = self.max_results {
  129    129   
            ser.write_integer(&LISTCONTAINERINSTANCESINPUT_MEMBER_MAX_RESULTS, *val)?;
  130    130   
        }
  131    131   
        if let Some(ref val) = self.status {
  132    132   
            ser.write_string(&LISTCONTAINERINSTANCESINPUT_MEMBER_STATUS, val.as_str())?;
  133    133   
        }
  134    134   
        Ok(())
  135    135   
    }
  136    136   
}
  137    137   
impl ListContainerInstancesInput {
  138    138   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  139         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  140         -
        deserializer: &mut D,
         139  +
    pub fn deserialize(
         140  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  141    141   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  142    142   
        #[allow(unused_variables, unused_mut)]
  143    143   
        let mut builder = Self::builder();
  144    144   
        #[allow(
  145    145   
            unused_variables,
  146    146   
            unreachable_code,
  147    147   
            clippy::single_match,
  148    148   
            clippy::match_single_binding,
  149    149   
            clippy::diverging_sub_expression
  150    150   
        )]
  151         -
        deserializer.read_struct(&LISTCONTAINERINSTANCESINPUT_SCHEMA, (), |_, member, deser| {
         151  +
        deserializer.read_struct(&LISTCONTAINERINSTANCESINPUT_SCHEMA, &mut |member, deser| {
  152    152   
            match member.member_index() {
  153    153   
                Some(0) => {
  154    154   
                    builder.cluster = Some(deser.read_string(member)?);
  155    155   
                }
  156    156   
                Some(1) => {
  157    157   
                    builder.filter = Some(deser.read_string(member)?);
  158    158   
                }
  159    159   
                Some(2) => {
  160    160   
                    builder.next_token = Some(deser.read_string(member)?);
  161    161   
                }
  162    162   
                Some(3) => {
  163    163   
                    builder.max_results = Some(deser.read_integer(member)?);
  164    164   
                }
  165    165   
                Some(4) => {
  166    166   
                    builder.status = Some(crate::types::ContainerInstanceStatus::from(deser.read_string(member)?.as_str()));
  167    167   
                }
  168    168   
                _ => {}
  169    169   
            }
  170    170   
            Ok(())
  171    171   
        })?;
  172    172   
        builder
  173    173   
            .build()
  174    174   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  175    175   
    }
  176    176   
}
         177  +
impl ListContainerInstancesInput {
         178  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         179  +
    pub fn deserialize_with_response(
         180  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         181  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         182  +
        _status: u16,
         183  +
        _body: &[u8],
         184  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         185  +
        Self::deserialize(deserializer)
         186  +
    }
         187  +
}
  177    188   
impl ListContainerInstancesInput {
  178    189   
    /// Creates a new builder-style object to manufacture [`ListContainerInstancesInput`](crate::operation::list_container_instances::ListContainerInstancesInput).
  179    190   
    pub fn builder() -> crate::operation::list_container_instances::builders::ListContainerInstancesInputBuilder {
  180    191   
        crate::operation::list_container_instances::builders::ListContainerInstancesInputBuilder::default()
  181    192   
    }
  182    193   
}
  183    194   
  184    195   
/// A builder for [`ListContainerInstancesInput`](crate::operation::list_container_instances::ListContainerInstancesInput).
  185    196   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  186    197   
#[non_exhaustive]

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

@@ -6,6 +141,179 @@
   26     26   
    "com.amazonaws.ecs.synthetic",
   27     27   
    "ListContainerInstancesOutput",
   28     28   
);
   29     29   
static LISTCONTAINERINSTANCESOUTPUT_MEMBER_CONTAINER_INSTANCE_ARNS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   30     30   
    ::aws_smithy_schema::ShapeId::from_static(
   31     31   
        "com.amazonaws.ecs.synthetic#ListContainerInstancesOutput$containerInstanceArns",
   32     32   
        "com.amazonaws.ecs.synthetic",
   33     33   
        "ListContainerInstancesOutput",
   34     34   
    ),
   35     35   
    ::aws_smithy_schema::ShapeType::List,
   36         -
    "container_instance_arns",
          36  +
    "containerInstanceArns",
   37     37   
    0,
   38     38   
);
   39     39   
static LISTCONTAINERINSTANCESOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   40     40   
    ::aws_smithy_schema::ShapeId::from_static(
   41     41   
        "com.amazonaws.ecs.synthetic#ListContainerInstancesOutput$nextToken",
   42     42   
        "com.amazonaws.ecs.synthetic",
   43     43   
        "ListContainerInstancesOutput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::String,
   46         -
    "next_token",
          46  +
    "nextToken",
   47     47   
    1,
   48     48   
);
          49  +
static LISTCONTAINERINSTANCESOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          50  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          51  +
    ::aws_smithy_schema::ShapeType::String,
          52  +
    "request_id",
          53  +
    2,
          54  +
)
          55  +
.with_http_header("x-amzn-requestid");
   49     56   
static LISTCONTAINERINSTANCESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   50     57   
    LISTCONTAINERINSTANCESOUTPUT_SCHEMA_ID,
   51     58   
    ::aws_smithy_schema::ShapeType::Structure,
   52     59   
    &[
   53     60   
        &LISTCONTAINERINSTANCESOUTPUT_MEMBER_CONTAINER_INSTANCE_ARNS,
   54     61   
        &LISTCONTAINERINSTANCESOUTPUT_MEMBER_NEXT_TOKEN,
          62  +
        &LISTCONTAINERINSTANCESOUTPUT_MEMBER__REQUEST_ID,
   55     63   
    ],
   56     64   
);
   57     65   
impl ListContainerInstancesOutput {
   58     66   
    /// The schema for this shape.
   59     67   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTCONTAINERINSTANCESOUTPUT_SCHEMA;
   60     68   
}
   61     69   
impl ::aws_smithy_schema::serde::SerializableStruct for ListContainerInstancesOutput {
   62     70   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   63     71   
    fn serialize_members(
   64     72   
        &self,
   65     73   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   66     74   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   67     75   
        if let Some(ref val) = self.container_instance_arns {
   68     76   
            ser.write_list(
   69     77   
                &LISTCONTAINERINSTANCESOUTPUT_MEMBER_CONTAINER_INSTANCE_ARNS,
   70     78   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   71     79   
                    for item in val {
   72     80   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
   73     81   
                    }
   74     82   
                    Ok(())
   75     83   
                },
   76     84   
            )?;
   77     85   
        }
   78     86   
        if let Some(ref val) = self.next_token {
   79     87   
            ser.write_string(&LISTCONTAINERINSTANCESOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   80     88   
        }
   81     89   
        Ok(())
   82     90   
    }
   83     91   
}
   84     92   
impl ListContainerInstancesOutput {
   85     93   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   86         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   87         -
        deserializer: &mut D,
          94  +
    pub fn deserialize(
          95  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   88     96   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   89     97   
        #[allow(unused_variables, unused_mut)]
   90     98   
        let mut builder = Self::builder();
   91     99   
        #[allow(
   92    100   
            unused_variables,
   93    101   
            unreachable_code,
   94    102   
            clippy::single_match,
   95    103   
            clippy::match_single_binding,
   96    104   
            clippy::diverging_sub_expression
   97    105   
        )]
   98         -
        deserializer.read_struct(&LISTCONTAINERINSTANCESOUTPUT_SCHEMA, (), |_, member, deser| {
         106  +
        deserializer.read_struct(&LISTCONTAINERINSTANCESOUTPUT_SCHEMA, &mut |member, deser| {
         107  +
            match member.member_index() {
         108  +
                Some(0) => {
         109  +
                    builder.container_instance_arns = Some(deser.read_string_list(member)?);
         110  +
                }
         111  +
                Some(1) => {
         112  +
                    builder.next_token = Some(deser.read_string(member)?);
         113  +
                }
         114  +
                Some(2) => {
         115  +
                    builder._request_id = Some(deser.read_string(member)?);
         116  +
                }
         117  +
                _ => {}
         118  +
            }
         119  +
            Ok(())
         120  +
        })?;
         121  +
        Ok(builder.build())
         122  +
    }
         123  +
}
         124  +
impl ListContainerInstancesOutput {
         125  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         126  +
    /// Header-bound members are read directly from headers, avoiding runtime
         127  +
    /// member iteration overhead. Body members are read via the deserializer.
         128  +
    pub fn deserialize_with_response(
         129  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         130  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         131  +
        _status: u16,
         132  +
        _body: &[u8],
         133  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         134  +
        #[allow(unused_variables, unused_mut)]
         135  +
        let mut builder = Self::builder();
         136  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         137  +
            builder._request_id = Some(val.to_string());
         138  +
        }
         139  +
        #[allow(
         140  +
            unused_variables,
         141  +
            unreachable_code,
         142  +
            clippy::single_match,
         143  +
            clippy::match_single_binding,
         144  +
            clippy::diverging_sub_expression
         145  +
        )]
         146  +
        deserializer.read_struct(&LISTCONTAINERINSTANCESOUTPUT_SCHEMA, &mut |member, deser| {
   99    147   
            match member.member_index() {
  100    148   
                Some(0) => {
  101         -
                    builder.container_instance_arns = Some({
  102         -
                        let container = if let Some(cap) = deser.container_size() {
  103         -
                            Vec::with_capacity(cap)
  104         -
                        } else {
  105         -
                            Vec::new()
  106         -
                        };
  107         -
                        deser.read_list(member, container, |mut list, deser| {
  108         -
                            list.push(deser.read_string(member)?);
  109         -
                            Ok(list)
  110         -
                        })?
  111         -
                    });
         149  +
                    builder.container_instance_arns = Some(deser.read_string_list(member)?);
  112    150   
                }
  113    151   
                Some(1) => {
  114    152   
                    builder.next_token = Some(deser.read_string(member)?);
  115    153   
                }
  116    154   
                _ => {}
  117    155   
            }
  118    156   
            Ok(())
  119    157   
        })?;
  120    158   
        Ok(builder.build())
  121    159   
    }

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

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `ListServiceDeployments`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListServiceDeployments;
    6      6   
impl ListServiceDeployments {
    7      7   
    /// Creates a new `ListServiceDeployments`
    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 = crate::operation::list_service_deployments::ListServiceDeploymentsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_service_deployments::ListServiceDeploymentsOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::list_service_deployments::ListServiceDeploymentsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_service_deployments::ListServiceDeploymentsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_service_deployments::ListServiceDeploymentsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +247,408 @@
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct ListServiceDeploymentsResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListServiceDeploymentsResponseDeserializer {
  148    152   
    fn deserialize_nonstreaming(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        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    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::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_list_service_deployments::de_list_service_deployments_http_error(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         175  +
                            crate::operation::list_service_deployments::ListServiceDeploymentsError::unhandled(generic),
         176  +
                        ),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "AccessDeniedException" => crate::operation::list_service_deployments::ListServiceDeploymentsError::AccessDeniedException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         190  +
                                &mut *deser,
         191  +
                                response.headers(),
         192  +
                                response.status().into(),
         193  +
                                body,
         194  +
                            )
         195  +
                        }) {
         196  +
                        ::std::result::Result::Ok(val) => val,
         197  +
                        ::std::result::Result::Err(e) => {
         198  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         199  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         200  +
                            ))
         201  +
                        }
         202  +
                    };
         203  +
                    tmp.meta = generic;
         204  +
                    if tmp.message.is_none() {
         205  +
                        tmp.message = _error_message;
         206  +
                    }
         207  +
                    tmp
         208  +
                }),
         209  +
                "ClientException" => crate::operation::list_service_deployments::ListServiceDeploymentsError::ClientException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::ClientException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::ClientException::deserialize_with_response(
         214  +
                                &mut *deser,
         215  +
                                response.headers(),
         216  +
                                response.status().into(),
         217  +
                                body,
         218  +
                            )
         219  +
                        }) {
         220  +
                        ::std::result::Result::Ok(val) => val,
         221  +
                        ::std::result::Result::Err(e) => {
         222  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         223  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         224  +
                            ))
         225  +
                        }
         226  +
                    };
         227  +
                    tmp.meta = generic;
         228  +
                    if tmp.message.is_none() {
         229  +
                        tmp.message = _error_message;
         230  +
                    }
         231  +
                    tmp
         232  +
                }),
         233  +
                "InvalidParameterException" => crate::operation::list_service_deployments::ListServiceDeploymentsError::InvalidParameterException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         238  +
                                &mut *deser,
         239  +
                                response.headers(),
         240  +
                                response.status().into(),
         241  +
                                body,
         242  +
                            )
         243  +
                        }) {
         244  +
                        ::std::result::Result::Ok(val) => val,
         245  +
                        ::std::result::Result::Err(e) => {
         246  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         247  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         248  +
                            ))
         249  +
                        }
         250  +
                    };
         251  +
                    tmp.meta = generic;
         252  +
                    if tmp.message.is_none() {
         253  +
                        tmp.message = _error_message;
         254  +
                    }
         255  +
                    tmp
         256  +
                }),
         257  +
                "ServerException" => crate::operation::list_service_deployments::ListServiceDeploymentsError::ServerException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::ServerException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::ServerException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    if tmp.message.is_none() {
         277  +
                        tmp.message = _error_message;
         278  +
                    }
         279  +
                    tmp
         280  +
                }),
         281  +
                "ServiceNotFoundException" => crate::operation::list_service_deployments::ListServiceDeploymentsError::ServiceNotFoundException({
         282  +
                    let mut tmp = match protocol
         283  +
                        .deserialize_response(response, crate::types::error::ServiceNotFoundException::SCHEMA, _cfg)
         284  +
                        .and_then(|mut deser| {
         285  +
                            crate::types::error::ServiceNotFoundException::deserialize_with_response(
         286  +
                                &mut *deser,
         287  +
                                response.headers(),
         288  +
                                response.status().into(),
         289  +
                                body,
         290  +
                            )
         291  +
                        }) {
         292  +
                        ::std::result::Result::Ok(val) => val,
         293  +
                        ::std::result::Result::Err(e) => {
         294  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         295  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         296  +
                            ))
         297  +
                        }
         298  +
                    };
         299  +
                    tmp.meta = generic;
         300  +
                    if tmp.message.is_none() {
         301  +
                        tmp.message = _error_message;
         302  +
                    }
         303  +
                    tmp
         304  +
                }),
         305  +
                "UnsupportedFeatureException" => {
         306  +
                    crate::operation::list_service_deployments::ListServiceDeploymentsError::UnsupportedFeatureException({
         307  +
                        let mut tmp = match protocol
         308  +
                            .deserialize_response(response, crate::types::error::UnsupportedFeatureException::SCHEMA, _cfg)
         309  +
                            .and_then(|mut deser| {
         310  +
                                crate::types::error::UnsupportedFeatureException::deserialize_with_response(
         311  +
                                    &mut *deser,
         312  +
                                    response.headers(),
         313  +
                                    response.status().into(),
         314  +
                                    body,
         315  +
                                )
         316  +
                            }) {
         317  +
                            ::std::result::Result::Ok(val) => val,
         318  +
                            ::std::result::Result::Err(e) => {
         319  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         320  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         321  +
                                ))
         322  +
                            }
         323  +
                        };
         324  +
                        tmp.meta = generic;
         325  +
                        if tmp.message.is_none() {
         326  +
                            tmp.message = _error_message;
         327  +
                        }
         328  +
                        tmp
         329  +
                    })
         330  +
                }
         331  +
                _ => crate::operation::list_service_deployments::ListServiceDeploymentsError::generic(generic),
         332  +
            };
         333  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         334  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         335  +
            ))
  160    336   
        } else {
  161         -
            crate::protocol_serde::shape_list_service_deployments::de_list_service_deployments_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         337  +
            let protocol = _cfg
         338  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         339  +
                .expect("a SharedClientProtocol is required");
         340  +
            let mut deser = protocol
         341  +
                .deserialize_response(response, ListServiceDeployments::OUTPUT_SCHEMA, _cfg)
         342  +
                .map_err(|e| {
         343  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         344  +
                })?;
         345  +
            let body = response.body().bytes().expect("body loaded");
         346  +
            let output = crate::operation::list_service_deployments::ListServiceDeploymentsOutput::deserialize_with_response(
         347  +
                &mut *deser,
         348  +
                response.headers(),
         349  +
                response.status().into(),
         350  +
                body,
         351  +
            )
         352  +
            .map_err(|e| {
         353  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         354  +
            })?;
         355  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         356  +
        }
  164    357   
    }
  165    358   
}
  166    359   
#[derive(Debug)]
  167    360   
struct ListServiceDeploymentsRequestSerializer;
  168    361   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListServiceDeploymentsRequestSerializer {
  169    362   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    363   
    fn serialize_input(
  171    364   
        &self,
  172    365   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    366   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    367   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    368   
        let input = input
  176    369   
            .downcast::<crate::operation::list_service_deployments::ListServiceDeploymentsInput>()
  177    370   
            .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::list_service_deployments::ListServiceDeploymentsInput,
  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::list_service_deployments::ListServiceDeploymentsInput,
  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.ListServiceDeployments",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  211         -
            crate::protocol_serde::shape_list_service_deployments::ser_list_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())
         371  +
        let protocol = _cfg
         372  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         373  +
            .expect("a SharedClientProtocol is required");
         374  +
        let mut request = protocol
         375  +
            .serialize_request(&input, ListServiceDeployments::INPUT_SCHEMA, "", _cfg)
         376  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         377  +
         378  +
        return ::std::result::Result::Ok(request);
  218    379   
    }
  219    380   
}
  220    381   
#[derive(Debug)]
  221    382   
struct ListServiceDeploymentsEndpointParamsInterceptor;
  222    383   
  223    384   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListServiceDeploymentsEndpointParamsInterceptor {
  224    385   
    fn name(&self) -> &'static str {
  225    386   
        "ListServiceDeploymentsEndpointParamsInterceptor"
  226    387   
    }
  227    388   

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

@@ -59,59 +245,254 @@
   79     79   
    "status",
   80     80   
    2,
   81     81   
);
   82     82   
static LISTSERVICEDEPLOYMENTSINPUT_MEMBER_CREATED_AT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   83     83   
    ::aws_smithy_schema::ShapeId::from_static(
   84     84   
        "com.amazonaws.ecs.synthetic#ListServiceDeploymentsInput$createdAt",
   85     85   
        "com.amazonaws.ecs.synthetic",
   86     86   
        "ListServiceDeploymentsInput",
   87     87   
    ),
   88     88   
    ::aws_smithy_schema::ShapeType::Structure,
   89         -
    "created_at",
          89  +
    "createdAt",
   90     90   
    3,
   91     91   
);
   92     92   
static LISTSERVICEDEPLOYMENTSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   93     93   
    ::aws_smithy_schema::ShapeId::from_static(
   94     94   
        "com.amazonaws.ecs.synthetic#ListServiceDeploymentsInput$nextToken",
   95     95   
        "com.amazonaws.ecs.synthetic",
   96     96   
        "ListServiceDeploymentsInput",
   97     97   
    ),
   98     98   
    ::aws_smithy_schema::ShapeType::String,
   99         -
    "next_token",
          99  +
    "nextToken",
  100    100   
    4,
  101    101   
);
  102    102   
static LISTSERVICEDEPLOYMENTSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  103    103   
    ::aws_smithy_schema::ShapeId::from_static(
  104    104   
        "com.amazonaws.ecs.synthetic#ListServiceDeploymentsInput$maxResults",
  105    105   
        "com.amazonaws.ecs.synthetic",
  106    106   
        "ListServiceDeploymentsInput",
  107    107   
    ),
  108    108   
    ::aws_smithy_schema::ShapeType::Integer,
  109         -
    "max_results",
         109  +
    "maxResults",
  110    110   
    5,
  111    111   
);
  112    112   
static LISTSERVICEDEPLOYMENTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  113    113   
    LISTSERVICEDEPLOYMENTSINPUT_SCHEMA_ID,
  114    114   
    ::aws_smithy_schema::ShapeType::Structure,
  115    115   
    &[
  116    116   
        &LISTSERVICEDEPLOYMENTSINPUT_MEMBER_SERVICE,
  117    117   
        &LISTSERVICEDEPLOYMENTSINPUT_MEMBER_CLUSTER,
  118    118   
        &LISTSERVICEDEPLOYMENTSINPUT_MEMBER_STATUS,
  119    119   
        &LISTSERVICEDEPLOYMENTSINPUT_MEMBER_CREATED_AT,
  120    120   
        &LISTSERVICEDEPLOYMENTSINPUT_MEMBER_NEXT_TOKEN,
  121    121   
        &LISTSERVICEDEPLOYMENTSINPUT_MEMBER_MAX_RESULTS,
  122    122   
    ],
  123    123   
);
  124    124   
impl ListServiceDeploymentsInput {
  125    125   
    /// The schema for this shape.
  126    126   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTSERVICEDEPLOYMENTSINPUT_SCHEMA;
  127    127   
}
  128    128   
impl ::aws_smithy_schema::serde::SerializableStruct for ListServiceDeploymentsInput {
  129    129   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  130    130   
    fn serialize_members(
  131    131   
        &self,
  132    132   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  133    133   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  134    134   
        if let Some(ref val) = self.service {
  135    135   
            ser.write_string(&LISTSERVICEDEPLOYMENTSINPUT_MEMBER_SERVICE, val)?;
  136    136   
        }
  137    137   
        if let Some(ref val) = self.cluster {
  138    138   
            ser.write_string(&LISTSERVICEDEPLOYMENTSINPUT_MEMBER_CLUSTER, val)?;
  139    139   
        }
  140    140   
        if let Some(ref val) = self.status {
  141    141   
            ser.write_list(
  142    142   
                &LISTSERVICEDEPLOYMENTSINPUT_MEMBER_STATUS,
  143    143   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  144    144   
                    for item in val {
  145    145   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item.as_str())?;
  146    146   
                    }
  147    147   
                    Ok(())
  148    148   
                },
  149    149   
            )?;
  150    150   
        }
  151    151   
        if let Some(ref val) = self.created_at {
  152    152   
            ser.write_struct(&LISTSERVICEDEPLOYMENTSINPUT_MEMBER_CREATED_AT, val)?;
  153    153   
        }
  154    154   
        if let Some(ref val) = self.next_token {
  155    155   
            ser.write_string(&LISTSERVICEDEPLOYMENTSINPUT_MEMBER_NEXT_TOKEN, val)?;
  156    156   
        }
  157    157   
        if let Some(ref val) = self.max_results {
  158    158   
            ser.write_integer(&LISTSERVICEDEPLOYMENTSINPUT_MEMBER_MAX_RESULTS, *val)?;
  159    159   
        }
  160    160   
        Ok(())
  161    161   
    }
  162    162   
}
  163    163   
impl ListServiceDeploymentsInput {
  164    164   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  165         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  166         -
        deserializer: &mut D,
         165  +
    pub fn deserialize(
         166  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  167    167   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  168    168   
        #[allow(unused_variables, unused_mut)]
  169    169   
        let mut builder = Self::builder();
  170    170   
        #[allow(
  171    171   
            unused_variables,
  172    172   
            unreachable_code,
  173    173   
            clippy::single_match,
  174    174   
            clippy::match_single_binding,
  175    175   
            clippy::diverging_sub_expression
  176    176   
        )]
  177         -
        deserializer.read_struct(&LISTSERVICEDEPLOYMENTSINPUT_SCHEMA, (), |_, member, deser| {
         177  +
        deserializer.read_struct(&LISTSERVICEDEPLOYMENTSINPUT_SCHEMA, &mut |member, deser| {
  178    178   
            match member.member_index() {
  179    179   
                Some(0) => {
  180    180   
                    builder.service = Some(deser.read_string(member)?);
  181    181   
                }
  182    182   
                Some(1) => {
  183    183   
                    builder.cluster = Some(deser.read_string(member)?);
  184    184   
                }
  185    185   
                Some(2) => {
  186    186   
                    builder.status = Some({
  187         -
                        let container = if let Some(cap) = deser.container_size() {
  188         -
                            Vec::with_capacity(cap)
  189         -
                        } else {
  190         -
                            Vec::new()
  191         -
                        };
  192         -
                        deser.read_list(member, container, |mut list, deser| {
  193         -
                            list.push(crate::types::ServiceDeploymentStatus::from(deser.read_string(member)?.as_str()));
  194         -
                            Ok(list)
  195         -
                        })?
         187  +
                        let mut container = Vec::new();
         188  +
                        deser.read_list(member, &mut |deser| {
         189  +
                            container.push(crate::types::ServiceDeploymentStatus::from(deser.read_string(member)?.as_str()));
         190  +
                            Ok(())
         191  +
                        })?;
         192  +
                        container
  196    193   
                    });
  197    194   
                }
  198    195   
                Some(3) => {
  199    196   
                    builder.created_at = Some(crate::types::CreatedAt::deserialize(deser)?);
  200    197   
                }
  201    198   
                Some(4) => {
  202    199   
                    builder.next_token = Some(deser.read_string(member)?);
  203    200   
                }
  204    201   
                Some(5) => {
  205    202   
                    builder.max_results = Some(deser.read_integer(member)?);
  206    203   
                }
  207    204   
                _ => {}
  208    205   
            }
  209    206   
            Ok(())
  210    207   
        })?;
         208  +
        builder.service = builder.service.or(Some(String::new()));
  211    209   
        builder
  212    210   
            .build()
  213    211   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  214    212   
    }
  215    213   
}
         214  +
impl ListServiceDeploymentsInput {
         215  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         216  +
    pub fn deserialize_with_response(
         217  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         218  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         219  +
        _status: u16,
         220  +
        _body: &[u8],
         221  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         222  +
        Self::deserialize(deserializer)
         223  +
    }
         224  +
}
  216    225   
impl ListServiceDeploymentsInput {
  217    226   
    /// Creates a new builder-style object to manufacture [`ListServiceDeploymentsInput`](crate::operation::list_service_deployments::ListServiceDeploymentsInput).
  218    227   
    pub fn builder() -> crate::operation::list_service_deployments::builders::ListServiceDeploymentsInputBuilder {
  219    228   
        crate::operation::list_service_deployments::builders::ListServiceDeploymentsInputBuilder::default()
  220    229   
    }
  221    230   
}
  222    231   
  223    232   
/// A builder for [`ListServiceDeploymentsInput`](crate::operation::list_service_deployments::ListServiceDeploymentsInput).
  224    233   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  225    234   
#[non_exhaustive]

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

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

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

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