AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

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

@@ -21,21 +158,170 @@
   41     41   
    "cluster",
   42     42   
    0,
   43     43   
);
   44     44   
static DEREGISTERCONTAINERINSTANCEINPUT_MEMBER_CONTAINER_INSTANCE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   45     45   
    ::aws_smithy_schema::ShapeId::from_static(
   46     46   
        "com.amazonaws.ecs.synthetic#DeregisterContainerInstanceInput$containerInstance",
   47     47   
        "com.amazonaws.ecs.synthetic",
   48     48   
        "DeregisterContainerInstanceInput",
   49     49   
    ),
   50     50   
    ::aws_smithy_schema::ShapeType::String,
   51         -
    "container_instance",
          51  +
    "containerInstance",
   52     52   
    1,
   53     53   
);
   54     54   
static DEREGISTERCONTAINERINSTANCEINPUT_MEMBER_FORCE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   55     55   
    ::aws_smithy_schema::ShapeId::from_static(
   56     56   
        "com.amazonaws.ecs.synthetic#DeregisterContainerInstanceInput$force",
   57     57   
        "com.amazonaws.ecs.synthetic",
   58     58   
        "DeregisterContainerInstanceInput",
   59     59   
    ),
   60     60   
    ::aws_smithy_schema::ShapeType::Boolean,
   61     61   
    "force",
   62     62   
    2,
   63     63   
);
   64     64   
static DEREGISTERCONTAINERINSTANCEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   65     65   
    DEREGISTERCONTAINERINSTANCEINPUT_SCHEMA_ID,
   66     66   
    ::aws_smithy_schema::ShapeType::Structure,
   67     67   
    &[
   68     68   
        &DEREGISTERCONTAINERINSTANCEINPUT_MEMBER_CLUSTER,
   69     69   
        &DEREGISTERCONTAINERINSTANCEINPUT_MEMBER_CONTAINER_INSTANCE,
   70     70   
        &DEREGISTERCONTAINERINSTANCEINPUT_MEMBER_FORCE,
   71     71   
    ],
   72     72   
);
   73     73   
impl DeregisterContainerInstanceInput {
   74     74   
    /// The schema for this shape.
   75     75   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DEREGISTERCONTAINERINSTANCEINPUT_SCHEMA;
   76     76   
}
   77     77   
impl ::aws_smithy_schema::serde::SerializableStruct for DeregisterContainerInstanceInput {
   78     78   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   79     79   
    fn serialize_members(
   80     80   
        &self,
   81     81   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   82     82   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   83     83   
        if let Some(ref val) = self.cluster {
   84     84   
            ser.write_string(&DEREGISTERCONTAINERINSTANCEINPUT_MEMBER_CLUSTER, val)?;
   85     85   
        }
   86     86   
        if let Some(ref val) = self.container_instance {
   87     87   
            ser.write_string(&DEREGISTERCONTAINERINSTANCEINPUT_MEMBER_CONTAINER_INSTANCE, val)?;
   88     88   
        }
   89     89   
        if let Some(ref val) = self.force {
   90     90   
            ser.write_boolean(&DEREGISTERCONTAINERINSTANCEINPUT_MEMBER_FORCE, *val)?;
   91     91   
        }
   92     92   
        Ok(())
   93     93   
    }
   94     94   
}
   95     95   
impl DeregisterContainerInstanceInput {
   96     96   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   97         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   98         -
        deserializer: &mut D,
          97  +
    pub fn deserialize(
          98  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   99     99   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  100    100   
        #[allow(unused_variables, unused_mut)]
  101    101   
        let mut builder = Self::builder();
  102    102   
        #[allow(
  103    103   
            unused_variables,
  104    104   
            unreachable_code,
  105    105   
            clippy::single_match,
  106    106   
            clippy::match_single_binding,
  107    107   
            clippy::diverging_sub_expression
  108    108   
        )]
  109         -
        deserializer.read_struct(&DEREGISTERCONTAINERINSTANCEINPUT_SCHEMA, (), |_, member, deser| {
         109  +
        deserializer.read_struct(&DEREGISTERCONTAINERINSTANCEINPUT_SCHEMA, &mut |member, deser| {
  110    110   
            match member.member_index() {
  111    111   
                Some(0) => {
  112    112   
                    builder.cluster = Some(deser.read_string(member)?);
  113    113   
                }
  114    114   
                Some(1) => {
  115    115   
                    builder.container_instance = Some(deser.read_string(member)?);
  116    116   
                }
  117    117   
                Some(2) => {
  118    118   
                    builder.force = Some(deser.read_boolean(member)?);
  119    119   
                }
  120    120   
                _ => {}
  121    121   
            }
  122    122   
            Ok(())
  123    123   
        })?;
         124  +
        builder.container_instance = builder.container_instance.or(Some(String::new()));
  124    125   
        builder
  125    126   
            .build()
  126    127   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  127    128   
    }
  128    129   
}
         130  +
impl DeregisterContainerInstanceInput {
         131  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         132  +
    pub fn deserialize_with_response(
         133  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         134  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         135  +
        _status: u16,
         136  +
        _body: &[u8],
         137  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         138  +
        Self::deserialize(deserializer)
         139  +
    }
         140  +
}
  129    141   
impl DeregisterContainerInstanceInput {
  130    142   
    /// Creates a new builder-style object to manufacture [`DeregisterContainerInstanceInput`](crate::operation::deregister_container_instance::DeregisterContainerInstanceInput).
  131    143   
    pub fn builder() -> crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceInputBuilder {
  132    144   
        crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceInputBuilder::default()
  133    145   
    }
  134    146   
}
  135    147   
  136    148   
/// A builder for [`DeregisterContainerInstanceInput`](crate::operation::deregister_container_instance::DeregisterContainerInstanceInput).
  137    149   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  138    150   
#[non_exhaustive]

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

@@ -1,1 +96,143 @@
   18     18   
    "com.amazonaws.ecs.synthetic",
   19     19   
    "DeregisterContainerInstanceOutput",
   20     20   
);
   21     21   
static DEREGISTERCONTAINERINSTANCEOUTPUT_MEMBER_CONTAINER_INSTANCE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   22     22   
    ::aws_smithy_schema::ShapeId::from_static(
   23     23   
        "com.amazonaws.ecs.synthetic#DeregisterContainerInstanceOutput$containerInstance",
   24     24   
        "com.amazonaws.ecs.synthetic",
   25     25   
        "DeregisterContainerInstanceOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28         -
    "container_instance",
          28  +
    "containerInstance",
   29     29   
    0,
   30     30   
);
          31  +
static DEREGISTERCONTAINERINSTANCEOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          32  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          33  +
    ::aws_smithy_schema::ShapeType::String,
          34  +
    "request_id",
          35  +
    1,
          36  +
)
          37  +
.with_http_header("x-amzn-requestid");
   31     38   
static DEREGISTERCONTAINERINSTANCEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    DEREGISTERCONTAINERINSTANCEOUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&DEREGISTERCONTAINERINSTANCEOUTPUT_MEMBER_CONTAINER_INSTANCE],
          41  +
    &[
          42  +
        &DEREGISTERCONTAINERINSTANCEOUTPUT_MEMBER_CONTAINER_INSTANCE,
          43  +
        &DEREGISTERCONTAINERINSTANCEOUTPUT_MEMBER__REQUEST_ID,
          44  +
    ],
   35     45   
);
   36     46   
impl DeregisterContainerInstanceOutput {
   37     47   
    /// The schema for this shape.
   38     48   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DEREGISTERCONTAINERINSTANCEOUTPUT_SCHEMA;
   39     49   
}
   40     50   
impl ::aws_smithy_schema::serde::SerializableStruct for DeregisterContainerInstanceOutput {
   41     51   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   42     52   
    fn serialize_members(
   43     53   
        &self,
   44     54   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   45     55   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   46     56   
        if let Some(ref val) = self.container_instance {
   47     57   
            ser.write_struct(&DEREGISTERCONTAINERINSTANCEOUTPUT_MEMBER_CONTAINER_INSTANCE, val)?;
   48     58   
        }
   49     59   
        Ok(())
   50     60   
    }
   51     61   
}
   52     62   
impl DeregisterContainerInstanceOutput {
   53     63   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          64  +
    pub fn deserialize(
          65  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     66   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     67   
        #[allow(unused_variables, unused_mut)]
   58     68   
        let mut builder = Self::builder();
   59     69   
        #[allow(
   60     70   
            unused_variables,
   61     71   
            unreachable_code,
   62     72   
            clippy::single_match,
   63     73   
            clippy::match_single_binding,
   64     74   
            clippy::diverging_sub_expression
   65     75   
        )]
   66         -
        deserializer.read_struct(&DEREGISTERCONTAINERINSTANCEOUTPUT_SCHEMA, (), |_, member, deser| {
          76  +
        deserializer.read_struct(&DEREGISTERCONTAINERINSTANCEOUTPUT_SCHEMA, &mut |member, deser| {
          77  +
            match member.member_index() {
          78  +
                Some(0) => {
          79  +
                    builder.container_instance = Some(crate::types::ContainerInstance::deserialize(deser)?);
          80  +
                }
          81  +
                Some(1) => {
          82  +
                    builder._request_id = Some(deser.read_string(member)?);
          83  +
                }
          84  +
                _ => {}
          85  +
            }
          86  +
            Ok(())
          87  +
        })?;
          88  +
        Ok(builder.build())
          89  +
    }
          90  +
}
          91  +
impl DeregisterContainerInstanceOutput {
          92  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          93  +
    /// Header-bound members are read directly from headers, avoiding runtime
          94  +
    /// member iteration overhead. Body members are read via the deserializer.
          95  +
    pub fn deserialize_with_response(
          96  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          97  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          98  +
        _status: u16,
          99  +
        _body: &[u8],
         100  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         101  +
        #[allow(unused_variables, unused_mut)]
         102  +
        let mut builder = Self::builder();
         103  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         104  +
            builder._request_id = Some(val.to_string());
         105  +
        }
         106  +
        #[allow(
         107  +
            unused_variables,
         108  +
            unreachable_code,
         109  +
            clippy::single_match,
         110  +
            clippy::match_single_binding,
         111  +
            clippy::diverging_sub_expression
         112  +
        )]
         113  +
        deserializer.read_struct(&DEREGISTERCONTAINERINSTANCEOUTPUT_SCHEMA, &mut |member, deser| {
   67    114   
            match member.member_index() {
   68    115   
                Some(0) => {
   69    116   
                    builder.container_instance = Some(crate::types::ContainerInstance::deserialize(deser)?);
   70    117   
                }
   71    118   
                _ => {}
   72    119   
            }
   73    120   
            Ok(())
   74    121   
        })?;
   75    122   
        Ok(builder.build())
   76    123   
    }

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

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

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

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

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

@@ -1,1 +96,143 @@
   18     18   
    "com.amazonaws.ecs.synthetic",
   19     19   
    "DeregisterTaskDefinitionOutput",
   20     20   
);
   21     21   
static DEREGISTERTASKDEFINITIONOUTPUT_MEMBER_TASK_DEFINITION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   22     22   
    ::aws_smithy_schema::ShapeId::from_static(
   23     23   
        "com.amazonaws.ecs.synthetic#DeregisterTaskDefinitionOutput$taskDefinition",
   24     24   
        "com.amazonaws.ecs.synthetic",
   25     25   
        "DeregisterTaskDefinitionOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28         -
    "task_definition",
          28  +
    "taskDefinition",
   29     29   
    0,
   30     30   
);
          31  +
static DEREGISTERTASKDEFINITIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          32  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          33  +
    ::aws_smithy_schema::ShapeType::String,
          34  +
    "request_id",
          35  +
    1,
          36  +
)
          37  +
.with_http_header("x-amzn-requestid");
   31     38   
static DEREGISTERTASKDEFINITIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    DEREGISTERTASKDEFINITIONOUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&DEREGISTERTASKDEFINITIONOUTPUT_MEMBER_TASK_DEFINITION],
          41  +
    &[
          42  +
        &DEREGISTERTASKDEFINITIONOUTPUT_MEMBER_TASK_DEFINITION,
          43  +
        &DEREGISTERTASKDEFINITIONOUTPUT_MEMBER__REQUEST_ID,
          44  +
    ],
   35     45   
);
   36     46   
impl DeregisterTaskDefinitionOutput {
   37     47   
    /// The schema for this shape.
   38     48   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DEREGISTERTASKDEFINITIONOUTPUT_SCHEMA;
   39     49   
}
   40     50   
impl ::aws_smithy_schema::serde::SerializableStruct for DeregisterTaskDefinitionOutput {
   41     51   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   42     52   
    fn serialize_members(
   43     53   
        &self,
   44     54   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   45     55   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   46     56   
        if let Some(ref val) = self.task_definition {
   47     57   
            ser.write_struct(&DEREGISTERTASKDEFINITIONOUTPUT_MEMBER_TASK_DEFINITION, val)?;
   48     58   
        }
   49     59   
        Ok(())
   50     60   
    }
   51     61   
}
   52     62   
impl DeregisterTaskDefinitionOutput {
   53     63   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          64  +
    pub fn deserialize(
          65  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     66   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     67   
        #[allow(unused_variables, unused_mut)]
   58     68   
        let mut builder = Self::builder();
   59     69   
        #[allow(
   60     70   
            unused_variables,
   61     71   
            unreachable_code,
   62     72   
            clippy::single_match,
   63     73   
            clippy::match_single_binding,
   64     74   
            clippy::diverging_sub_expression
   65     75   
        )]
   66         -
        deserializer.read_struct(&DEREGISTERTASKDEFINITIONOUTPUT_SCHEMA, (), |_, member, deser| {
          76  +
        deserializer.read_struct(&DEREGISTERTASKDEFINITIONOUTPUT_SCHEMA, &mut |member, deser| {
          77  +
            match member.member_index() {
          78  +
                Some(0) => {
          79  +
                    builder.task_definition = Some(crate::types::TaskDefinition::deserialize(deser)?);
          80  +
                }
          81  +
                Some(1) => {
          82  +
                    builder._request_id = Some(deser.read_string(member)?);
          83  +
                }
          84  +
                _ => {}
          85  +
            }
          86  +
            Ok(())
          87  +
        })?;
          88  +
        Ok(builder.build())
          89  +
    }
          90  +
}
          91  +
impl DeregisterTaskDefinitionOutput {
          92  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          93  +
    /// Header-bound members are read directly from headers, avoiding runtime
          94  +
    /// member iteration overhead. Body members are read via the deserializer.
          95  +
    pub fn deserialize_with_response(
          96  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          97  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          98  +
        _status: u16,
          99  +
        _body: &[u8],
         100  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         101  +
        #[allow(unused_variables, unused_mut)]
         102  +
        let mut builder = Self::builder();
         103  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         104  +
            builder._request_id = Some(val.to_string());
         105  +
        }
         106  +
        #[allow(
         107  +
            unused_variables,
         108  +
            unreachable_code,
         109  +
            clippy::single_match,
         110  +
            clippy::match_single_binding,
         111  +
            clippy::diverging_sub_expression
         112  +
        )]
         113  +
        deserializer.read_struct(&DEREGISTERTASKDEFINITIONOUTPUT_SCHEMA, &mut |member, deser| {
   67    114   
            match member.member_index() {
   68    115   
                Some(0) => {
   69    116   
                    builder.task_definition = Some(crate::types::TaskDefinition::deserialize(deser)?);
   70    117   
                }
   71    118   
                _ => {}
   72    119   
            }
   73    120   
            Ok(())
   74    121   
        })?;
   75    122   
        Ok(builder.build())
   76    123   
    }

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

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

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

@@ -29,29 +246,244 @@
   49     49   
    "com.amazonaws.ecs.synthetic",
   50     50   
    "DescribeCapacityProvidersInput",
   51     51   
);
   52     52   
static DESCRIBECAPACITYPROVIDERSINPUT_MEMBER_CAPACITY_PROVIDERS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.ecs.synthetic#DescribeCapacityProvidersInput$capacityProviders",
   55     55   
        "com.amazonaws.ecs.synthetic",
   56     56   
        "DescribeCapacityProvidersInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::List,
   59         -
    "capacity_providers",
          59  +
    "capacityProviders",
   60     60   
    0,
   61     61   
);
   62     62   
static DESCRIBECAPACITYPROVIDERSINPUT_MEMBER_CLUSTER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   63     63   
    ::aws_smithy_schema::ShapeId::from_static(
   64     64   
        "com.amazonaws.ecs.synthetic#DescribeCapacityProvidersInput$cluster",
   65     65   
        "com.amazonaws.ecs.synthetic",
   66     66   
        "DescribeCapacityProvidersInput",
   67     67   
    ),
   68     68   
    ::aws_smithy_schema::ShapeType::String,
   69     69   
    "cluster",
   70     70   
    1,
   71     71   
);
   72     72   
static DESCRIBECAPACITYPROVIDERSINPUT_MEMBER_INCLUDE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.ecs.synthetic#DescribeCapacityProvidersInput$include",
   75     75   
        "com.amazonaws.ecs.synthetic",
   76     76   
        "DescribeCapacityProvidersInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::List,
   79     79   
    "include",
   80     80   
    2,
   81     81   
);
   82     82   
static DESCRIBECAPACITYPROVIDERSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   83     83   
    ::aws_smithy_schema::ShapeId::from_static(
   84     84   
        "com.amazonaws.ecs.synthetic#DescribeCapacityProvidersInput$maxResults",
   85     85   
        "com.amazonaws.ecs.synthetic",
   86     86   
        "DescribeCapacityProvidersInput",
   87     87   
    ),
   88     88   
    ::aws_smithy_schema::ShapeType::Integer,
   89         -
    "max_results",
          89  +
    "maxResults",
   90     90   
    3,
   91     91   
);
   92     92   
static DESCRIBECAPACITYPROVIDERSINPUT_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#DescribeCapacityProvidersInput$nextToken",
   95     95   
        "com.amazonaws.ecs.synthetic",
   96     96   
        "DescribeCapacityProvidersInput",
   97     97   
    ),
   98     98   
    ::aws_smithy_schema::ShapeType::String,
   99         -
    "next_token",
          99  +
    "nextToken",
  100    100   
    4,
  101    101   
);
  102    102   
static DESCRIBECAPACITYPROVIDERSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  103    103   
    DESCRIBECAPACITYPROVIDERSINPUT_SCHEMA_ID,
  104    104   
    ::aws_smithy_schema::ShapeType::Structure,
  105    105   
    &[
  106    106   
        &DESCRIBECAPACITYPROVIDERSINPUT_MEMBER_CAPACITY_PROVIDERS,
  107    107   
        &DESCRIBECAPACITYPROVIDERSINPUT_MEMBER_CLUSTER,
  108    108   
        &DESCRIBECAPACITYPROVIDERSINPUT_MEMBER_INCLUDE,
  109    109   
        &DESCRIBECAPACITYPROVIDERSINPUT_MEMBER_MAX_RESULTS,
  110    110   
        &DESCRIBECAPACITYPROVIDERSINPUT_MEMBER_NEXT_TOKEN,
  111    111   
    ],
  112    112   
);
  113    113   
impl DescribeCapacityProvidersInput {
  114    114   
    /// The schema for this shape.
  115    115   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBECAPACITYPROVIDERSINPUT_SCHEMA;
  116    116   
}
  117    117   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeCapacityProvidersInput {
  118    118   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  119    119   
    fn serialize_members(
  120    120   
        &self,
  121    121   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  122    122   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  123    123   
        if let Some(ref val) = self.capacity_providers {
  124    124   
            ser.write_list(
  125    125   
                &DESCRIBECAPACITYPROVIDERSINPUT_MEMBER_CAPACITY_PROVIDERS,
  126    126   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  127    127   
                    for item in val {
  128    128   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
  129    129   
                    }
  130    130   
                    Ok(())
  131    131   
                },
  132    132   
            )?;
  133    133   
        }
  134    134   
        if let Some(ref val) = self.cluster {
  135    135   
            ser.write_string(&DESCRIBECAPACITYPROVIDERSINPUT_MEMBER_CLUSTER, val)?;
  136    136   
        }
  137    137   
        if let Some(ref val) = self.include {
  138    138   
            ser.write_list(
  139    139   
                &DESCRIBECAPACITYPROVIDERSINPUT_MEMBER_INCLUDE,
  140    140   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  141    141   
                    for item in val {
  142    142   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item.as_str())?;
  143    143   
                    }
  144    144   
                    Ok(())
  145    145   
                },
  146    146   
            )?;
  147    147   
        }
  148    148   
        if let Some(ref val) = self.max_results {
  149    149   
            ser.write_integer(&DESCRIBECAPACITYPROVIDERSINPUT_MEMBER_MAX_RESULTS, *val)?;
  150    150   
        }
  151    151   
        if let Some(ref val) = self.next_token {
  152    152   
            ser.write_string(&DESCRIBECAPACITYPROVIDERSINPUT_MEMBER_NEXT_TOKEN, val)?;
  153    153   
        }
  154    154   
        Ok(())
  155    155   
    }
  156    156   
}
  157    157   
impl DescribeCapacityProvidersInput {
  158    158   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  159         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  160         -
        deserializer: &mut D,
         159  +
    pub fn deserialize(
         160  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  161    161   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  162    162   
        #[allow(unused_variables, unused_mut)]
  163    163   
        let mut builder = Self::builder();
  164    164   
        #[allow(
  165    165   
            unused_variables,
  166    166   
            unreachable_code,
  167    167   
            clippy::single_match,
  168    168   
            clippy::match_single_binding,
  169    169   
            clippy::diverging_sub_expression
  170    170   
        )]
  171         -
        deserializer.read_struct(&DESCRIBECAPACITYPROVIDERSINPUT_SCHEMA, (), |_, member, deser| {
         171  +
        deserializer.read_struct(&DESCRIBECAPACITYPROVIDERSINPUT_SCHEMA, &mut |member, deser| {
  172    172   
            match member.member_index() {
  173    173   
                Some(0) => {
  174         -
                    builder.capacity_providers = Some({
  175         -
                        let container = if let Some(cap) = deser.container_size() {
  176         -
                            Vec::with_capacity(cap)
  177         -
                        } else {
  178         -
                            Vec::new()
  179         -
                        };
  180         -
                        deser.read_list(member, container, |mut list, deser| {
  181         -
                            list.push(deser.read_string(member)?);
  182         -
                            Ok(list)
  183         -
                        })?
  184         -
                    });
         174  +
                    builder.capacity_providers = Some(deser.read_string_list(member)?);
  185    175   
                }
  186    176   
                Some(1) => {
  187    177   
                    builder.cluster = Some(deser.read_string(member)?);
  188    178   
                }
  189    179   
                Some(2) => {
  190    180   
                    builder.include = Some({
  191         -
                        let container = if let Some(cap) = deser.container_size() {
  192         -
                            Vec::with_capacity(cap)
  193         -
                        } else {
  194         -
                            Vec::new()
  195         -
                        };
  196         -
                        deser.read_list(member, container, |mut list, deser| {
  197         -
                            list.push(crate::types::CapacityProviderField::from(deser.read_string(member)?.as_str()));
  198         -
                            Ok(list)
  199         -
                        })?
         181  +
                        let mut container = Vec::new();
         182  +
                        deser.read_list(member, &mut |deser| {
         183  +
                            container.push(crate::types::CapacityProviderField::from(deser.read_string(member)?.as_str()));
         184  +
                            Ok(())
         185  +
                        })?;
         186  +
                        container
  200    187   
                    });
  201    188   
                }
  202    189   
                Some(3) => {
  203    190   
                    builder.max_results = Some(deser.read_integer(member)?);
  204    191   
                }
  205    192   
                Some(4) => {
  206    193   
                    builder.next_token = Some(deser.read_string(member)?);
  207    194   
                }
  208    195   
                _ => {}
  209    196   
            }
  210    197   
            Ok(())
  211    198   
        })?;
  212    199   
        builder
  213    200   
            .build()
  214    201   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  215    202   
    }
  216    203   
}
         204  +
impl DescribeCapacityProvidersInput {
         205  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         206  +
    pub fn deserialize_with_response(
         207  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         208  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         209  +
        _status: u16,
         210  +
        _body: &[u8],
         211  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         212  +
        Self::deserialize(deserializer)
         213  +
    }
         214  +
}
  217    215   
impl DescribeCapacityProvidersInput {
  218    216   
    /// Creates a new builder-style object to manufacture [`DescribeCapacityProvidersInput`](crate::operation::describe_capacity_providers::DescribeCapacityProvidersInput).
  219    217   
    pub fn builder() -> crate::operation::describe_capacity_providers::builders::DescribeCapacityProvidersInputBuilder {
  220    218   
        crate::operation::describe_capacity_providers::builders::DescribeCapacityProvidersInputBuilder::default()
  221    219   
    }
  222    220   
}
  223    221   
  224    222   
/// A builder for [`DescribeCapacityProvidersInput`](crate::operation::describe_capacity_providers::DescribeCapacityProvidersInput).
  225    223   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  226    224   
#[non_exhaustive]

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

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

tmp-codegen-diff/aws-sdk/sdk/ecs/src/operation/describe_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 `DescribeClusters`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeClusters;
    6      6   
impl DescribeClusters {
    7      7   
    /// Creates a new `DescribeClusters`
    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::describe_clusters::DescribeClustersInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_clusters::DescribeClustersOutput::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::describe_clusters::DescribeClustersInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::describe_clusters::DescribeClustersOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::describe_clusters::DescribeClustersError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +242,331 @@
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct DescribeClustersResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeClustersResponseDeserializer {
  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_describe_clusters::de_describe_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::describe_clusters::DescribeClustersError::unhandled(
         172  +
                            generic,
         173  +
                        )),
         174  +
                    ))
         175  +
                }
         176  +
            };
         177  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         178  +
            let protocol = _cfg
         179  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         180  +
                .expect("a SharedClientProtocol is required");
         181  +
            let err = match error_code {
         182  +
                "ClientException" => crate::operation::describe_clusters::DescribeClustersError::ClientException({
         183  +
                    let mut tmp = match protocol
         184  +
                        .deserialize_response(response, crate::types::error::ClientException::SCHEMA, _cfg)
         185  +
                        .and_then(|mut deser| {
         186  +
                            crate::types::error::ClientException::deserialize_with_response(
         187  +
                                &mut *deser,
         188  +
                                response.headers(),
         189  +
                                response.status().into(),
         190  +
                                body,
         191  +
                            )
         192  +
                        }) {
         193  +
                        ::std::result::Result::Ok(val) => val,
         194  +
                        ::std::result::Result::Err(e) => {
         195  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         196  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         197  +
                            ))
         198  +
                        }
         199  +
                    };
         200  +
                    tmp.meta = generic;
         201  +
                    if tmp.message.is_none() {
         202  +
                        tmp.message = _error_message;
         203  +
                    }
         204  +
                    tmp
         205  +
                }),
         206  +
                "InvalidParameterException" => crate::operation::describe_clusters::DescribeClustersError::InvalidParameterException({
         207  +
                    let mut tmp = match protocol
         208  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         209  +
                        .and_then(|mut deser| {
         210  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         211  +
                                &mut *deser,
         212  +
                                response.headers(),
         213  +
                                response.status().into(),
         214  +
                                body,
         215  +
                            )
         216  +
                        }) {
         217  +
                        ::std::result::Result::Ok(val) => val,
         218  +
                        ::std::result::Result::Err(e) => {
         219  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         220  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         221  +
                            ))
         222  +
                        }
         223  +
                    };
         224  +
                    tmp.meta = generic;
         225  +
                    if tmp.message.is_none() {
         226  +
                        tmp.message = _error_message;
         227  +
                    }
         228  +
                    tmp
         229  +
                }),
         230  +
                "ServerException" => crate::operation::describe_clusters::DescribeClustersError::ServerException({
         231  +
                    let mut tmp = match protocol
         232  +
                        .deserialize_response(response, crate::types::error::ServerException::SCHEMA, _cfg)
         233  +
                        .and_then(|mut deser| {
         234  +
                            crate::types::error::ServerException::deserialize_with_response(
         235  +
                                &mut *deser,
         236  +
                                response.headers(),
         237  +
                                response.status().into(),
         238  +
                                body,
         239  +
                            )
         240  +
                        }) {
         241  +
                        ::std::result::Result::Ok(val) => val,
         242  +
                        ::std::result::Result::Err(e) => {
         243  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         244  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         245  +
                            ))
         246  +
                        }
         247  +
                    };
         248  +
                    tmp.meta = generic;
         249  +
                    if tmp.message.is_none() {
         250  +
                        tmp.message = _error_message;
         251  +
                    }
         252  +
                    tmp
         253  +
                }),
         254  +
                _ => crate::operation::describe_clusters::DescribeClustersError::generic(generic),
         255  +
            };
         256  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         257  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         258  +
            ))
  157    259   
        } else {
  158         -
            crate::protocol_serde::shape_describe_clusters::de_describe_clusters_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         260  +
            let protocol = _cfg
         261  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         262  +
                .expect("a SharedClientProtocol is required");
         263  +
            let mut deser = protocol
         264  +
                .deserialize_response(response, DescribeClusters::OUTPUT_SCHEMA, _cfg)
         265  +
                .map_err(|e| {
         266  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         267  +
                })?;
         268  +
            let body = response.body().bytes().expect("body loaded");
         269  +
            let output = crate::operation::describe_clusters::DescribeClustersOutput::deserialize_with_response(
         270  +
                &mut *deser,
         271  +
                response.headers(),
         272  +
                response.status().into(),
         273  +
                body,
         274  +
            )
         275  +
            .map_err(|e| {
         276  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         277  +
            })?;
         278  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         279  +
        }
  161    280   
    }
  162    281   
}
  163    282   
#[derive(Debug)]
  164    283   
struct DescribeClustersRequestSerializer;
  165    284   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeClustersRequestSerializer {
  166    285   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    286   
    fn serialize_input(
  168    287   
        &self,
  169    288   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    289   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    290   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    291   
        let input = input
  173    292   
            .downcast::<crate::operation::describe_clusters::DescribeClustersInput>()
  174    293   
            .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::describe_clusters::DescribeClustersInput,
  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::describe_clusters::DescribeClustersInput,
  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.DescribeClusters",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_describe_clusters::ser_describe_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())
         294  +
        let protocol = _cfg
         295  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         296  +
            .expect("a SharedClientProtocol is required");
         297  +
        let mut request = protocol
         298  +
            .serialize_request(&input, DescribeClusters::INPUT_SCHEMA, "", _cfg)
         299  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         300  +
         301  +
        return ::std::result::Result::Ok(request);
  213    302   
    }
  214    303   
}
  215    304   
#[derive(Debug)]
  216    305   
struct DescribeClustersEndpointParamsInterceptor;
  217    306   
  218    307   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeClustersEndpointParamsInterceptor {
  219    308   
    fn name(&self) -> &'static str {
  220    309   
        "DescribeClustersEndpointParamsInterceptor"
  221    310   
    }
  222    311   

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

@@ -72,72 +180,178 @@
   92     92   
                    }
   93     93   
                    Ok(())
   94     94   
                },
   95     95   
            )?;
   96     96   
        }
   97     97   
        Ok(())
   98     98   
    }
   99     99   
}
  100    100   
impl DescribeClustersInput {
  101    101   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  102         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  103         -
        deserializer: &mut D,
         102  +
    pub fn deserialize(
         103  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  104    104   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  105    105   
        #[allow(unused_variables, unused_mut)]
  106    106   
        let mut builder = Self::builder();
  107    107   
        #[allow(
  108    108   
            unused_variables,
  109    109   
            unreachable_code,
  110    110   
            clippy::single_match,
  111    111   
            clippy::match_single_binding,
  112    112   
            clippy::diverging_sub_expression
  113    113   
        )]
  114         -
        deserializer.read_struct(&DESCRIBECLUSTERSINPUT_SCHEMA, (), |_, member, deser| {
         114  +
        deserializer.read_struct(&DESCRIBECLUSTERSINPUT_SCHEMA, &mut |member, deser| {
  115    115   
            match member.member_index() {
  116    116   
                Some(0) => {
  117         -
                    builder.clusters = Some({
  118         -
                        let container = if let Some(cap) = deser.container_size() {
  119         -
                            Vec::with_capacity(cap)
  120         -
                        } else {
  121         -
                            Vec::new()
  122         -
                        };
  123         -
                        deser.read_list(member, container, |mut list, deser| {
  124         -
                            list.push(deser.read_string(member)?);
  125         -
                            Ok(list)
  126         -
                        })?
  127         -
                    });
         117  +
                    builder.clusters = Some(deser.read_string_list(member)?);
  128    118   
                }
  129    119   
                Some(1) => {
  130    120   
                    builder.include = Some({
  131         -
                        let container = if let Some(cap) = deser.container_size() {
  132         -
                            Vec::with_capacity(cap)
  133         -
                        } else {
  134         -
                            Vec::new()
  135         -
                        };
  136         -
                        deser.read_list(member, container, |mut list, deser| {
  137         -
                            list.push(crate::types::ClusterField::from(deser.read_string(member)?.as_str()));
  138         -
                            Ok(list)
  139         -
                        })?
         121  +
                        let mut container = Vec::new();
         122  +
                        deser.read_list(member, &mut |deser| {
         123  +
                            container.push(crate::types::ClusterField::from(deser.read_string(member)?.as_str()));
         124  +
                            Ok(())
         125  +
                        })?;
         126  +
                        container
  140    127   
                    });
  141    128   
                }
  142    129   
                _ => {}
  143    130   
            }
  144    131   
            Ok(())
  145    132   
        })?;
  146    133   
        builder
  147    134   
            .build()
  148    135   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  149    136   
    }
  150    137   
}
         138  +
impl DescribeClustersInput {
         139  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         140  +
    pub fn deserialize_with_response(
         141  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         142  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         143  +
        _status: u16,
         144  +
        _body: &[u8],
         145  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         146  +
        Self::deserialize(deserializer)
         147  +
    }
         148  +
}
  151    149   
impl DescribeClustersInput {
  152    150   
    /// Creates a new builder-style object to manufacture [`DescribeClustersInput`](crate::operation::describe_clusters::DescribeClustersInput).
  153    151   
    pub fn builder() -> crate::operation::describe_clusters::builders::DescribeClustersInputBuilder {
  154    152   
        crate::operation::describe_clusters::builders::DescribeClustersInputBuilder::default()
  155    153   
    }
  156    154   
}
  157    155   
  158    156   
/// A builder for [`DescribeClustersInput`](crate::operation::describe_clusters::DescribeClustersInput).
  159    157   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  160    158   
#[non_exhaustive]

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

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