AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12

Files changed:

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

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

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

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

@@ -188,188 +428,428 @@
  208    208   
}
  209    209   
static RUNTASKINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
  210    210   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ecs.synthetic#RunTaskInput", "com.amazonaws.ecs.synthetic", "RunTaskInput");
  211    211   
static RUNTASKINPUT_MEMBER_CAPACITY_PROVIDER_STRATEGY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  212    212   
    ::aws_smithy_schema::ShapeId::from_static(
  213    213   
        "com.amazonaws.ecs.synthetic#RunTaskInput$capacityProviderStrategy",
  214    214   
        "com.amazonaws.ecs.synthetic",
  215    215   
        "RunTaskInput",
  216    216   
    ),
  217    217   
    ::aws_smithy_schema::ShapeType::List,
  218         -
    "capacity_provider_strategy",
         218  +
    "capacityProviderStrategy",
  219    219   
    0,
  220    220   
);
  221    221   
static RUNTASKINPUT_MEMBER_CLUSTER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  222    222   
    ::aws_smithy_schema::ShapeId::from_static(
  223    223   
        "com.amazonaws.ecs.synthetic#RunTaskInput$cluster",
  224    224   
        "com.amazonaws.ecs.synthetic",
  225    225   
        "RunTaskInput",
  226    226   
    ),
  227    227   
    ::aws_smithy_schema::ShapeType::String,
  228    228   
    "cluster",
  229    229   
    1,
  230    230   
);
  231    231   
static RUNTASKINPUT_MEMBER_COUNT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  232    232   
    ::aws_smithy_schema::ShapeId::from_static(
  233    233   
        "com.amazonaws.ecs.synthetic#RunTaskInput$count",
  234    234   
        "com.amazonaws.ecs.synthetic",
  235    235   
        "RunTaskInput",
  236    236   
    ),
  237    237   
    ::aws_smithy_schema::ShapeType::Integer,
  238    238   
    "count",
  239    239   
    2,
  240    240   
);
  241    241   
static RUNTASKINPUT_MEMBER_ENABLE_ECS_MANAGED_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  242    242   
    ::aws_smithy_schema::ShapeId::from_static(
  243    243   
        "com.amazonaws.ecs.synthetic#RunTaskInput$enableECSManagedTags",
  244    244   
        "com.amazonaws.ecs.synthetic",
  245    245   
        "RunTaskInput",
  246    246   
    ),
  247    247   
    ::aws_smithy_schema::ShapeType::Boolean,
  248         -
    "enable_ecs_managed_tags",
         248  +
    "enableECSManagedTags",
  249    249   
    3,
  250    250   
);
  251    251   
static RUNTASKINPUT_MEMBER_ENABLE_EXECUTE_COMMAND: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  252    252   
    ::aws_smithy_schema::ShapeId::from_static(
  253    253   
        "com.amazonaws.ecs.synthetic#RunTaskInput$enableExecuteCommand",
  254    254   
        "com.amazonaws.ecs.synthetic",
  255    255   
        "RunTaskInput",
  256    256   
    ),
  257    257   
    ::aws_smithy_schema::ShapeType::Boolean,
  258         -
    "enable_execute_command",
         258  +
    "enableExecuteCommand",
  259    259   
    4,
  260    260   
);
  261    261   
static RUNTASKINPUT_MEMBER_GROUP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  262    262   
    ::aws_smithy_schema::ShapeId::from_static(
  263    263   
        "com.amazonaws.ecs.synthetic#RunTaskInput$group",
  264    264   
        "com.amazonaws.ecs.synthetic",
  265    265   
        "RunTaskInput",
  266    266   
    ),
  267    267   
    ::aws_smithy_schema::ShapeType::String,
  268    268   
    "group",
  269    269   
    5,
  270    270   
);
  271    271   
static RUNTASKINPUT_MEMBER_LAUNCH_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  272    272   
    ::aws_smithy_schema::ShapeId::from_static(
  273    273   
        "com.amazonaws.ecs.synthetic#RunTaskInput$launchType",
  274    274   
        "com.amazonaws.ecs.synthetic",
  275    275   
        "RunTaskInput",
  276    276   
    ),
  277    277   
    ::aws_smithy_schema::ShapeType::String,
  278         -
    "launch_type",
         278  +
    "launchType",
  279    279   
    6,
  280    280   
);
  281    281   
static RUNTASKINPUT_MEMBER_NETWORK_CONFIGURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  282    282   
    ::aws_smithy_schema::ShapeId::from_static(
  283    283   
        "com.amazonaws.ecs.synthetic#RunTaskInput$networkConfiguration",
  284    284   
        "com.amazonaws.ecs.synthetic",
  285    285   
        "RunTaskInput",
  286    286   
    ),
  287    287   
    ::aws_smithy_schema::ShapeType::Structure,
  288         -
    "network_configuration",
         288  +
    "networkConfiguration",
  289    289   
    7,
  290    290   
);
  291    291   
static RUNTASKINPUT_MEMBER_OVERRIDES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  292    292   
    ::aws_smithy_schema::ShapeId::from_static(
  293    293   
        "com.amazonaws.ecs.synthetic#RunTaskInput$overrides",
  294    294   
        "com.amazonaws.ecs.synthetic",
  295    295   
        "RunTaskInput",
  296    296   
    ),
  297    297   
    ::aws_smithy_schema::ShapeType::Structure,
  298    298   
    "overrides",
  299    299   
    8,
  300    300   
);
  301    301   
static RUNTASKINPUT_MEMBER_PLACEMENT_CONSTRAINTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  302    302   
    ::aws_smithy_schema::ShapeId::from_static(
  303    303   
        "com.amazonaws.ecs.synthetic#RunTaskInput$placementConstraints",
  304    304   
        "com.amazonaws.ecs.synthetic",
  305    305   
        "RunTaskInput",
  306    306   
    ),
  307    307   
    ::aws_smithy_schema::ShapeType::List,
  308         -
    "placement_constraints",
         308  +
    "placementConstraints",
  309    309   
    9,
  310    310   
);
  311    311   
static RUNTASKINPUT_MEMBER_PLACEMENT_STRATEGY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  312    312   
    ::aws_smithy_schema::ShapeId::from_static(
  313    313   
        "com.amazonaws.ecs.synthetic#RunTaskInput$placementStrategy",
  314    314   
        "com.amazonaws.ecs.synthetic",
  315    315   
        "RunTaskInput",
  316    316   
    ),
  317    317   
    ::aws_smithy_schema::ShapeType::List,
  318         -
    "placement_strategy",
         318  +
    "placementStrategy",
  319    319   
    10,
  320    320   
);
  321    321   
static RUNTASKINPUT_MEMBER_PLATFORM_VERSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  322    322   
    ::aws_smithy_schema::ShapeId::from_static(
  323    323   
        "com.amazonaws.ecs.synthetic#RunTaskInput$platformVersion",
  324    324   
        "com.amazonaws.ecs.synthetic",
  325    325   
        "RunTaskInput",
  326    326   
    ),
  327    327   
    ::aws_smithy_schema::ShapeType::String,
  328         -
    "platform_version",
         328  +
    "platformVersion",
  329    329   
    11,
  330    330   
);
  331    331   
static RUNTASKINPUT_MEMBER_PROPAGATE_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  332    332   
    ::aws_smithy_schema::ShapeId::from_static(
  333    333   
        "com.amazonaws.ecs.synthetic#RunTaskInput$propagateTags",
  334    334   
        "com.amazonaws.ecs.synthetic",
  335    335   
        "RunTaskInput",
  336    336   
    ),
  337    337   
    ::aws_smithy_schema::ShapeType::String,
  338         -
    "propagate_tags",
         338  +
    "propagateTags",
  339    339   
    12,
  340    340   
);
  341    341   
static RUNTASKINPUT_MEMBER_REFERENCE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  342    342   
    ::aws_smithy_schema::ShapeId::from_static(
  343    343   
        "com.amazonaws.ecs.synthetic#RunTaskInput$referenceId",
  344    344   
        "com.amazonaws.ecs.synthetic",
  345    345   
        "RunTaskInput",
  346    346   
    ),
  347    347   
    ::aws_smithy_schema::ShapeType::String,
  348         -
    "reference_id",
         348  +
    "referenceId",
  349    349   
    13,
  350    350   
);
  351    351   
static RUNTASKINPUT_MEMBER_STARTED_BY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  352    352   
    ::aws_smithy_schema::ShapeId::from_static(
  353    353   
        "com.amazonaws.ecs.synthetic#RunTaskInput$startedBy",
  354    354   
        "com.amazonaws.ecs.synthetic",
  355    355   
        "RunTaskInput",
  356    356   
    ),
  357    357   
    ::aws_smithy_schema::ShapeType::String,
  358         -
    "started_by",
         358  +
    "startedBy",
  359    359   
    14,
  360    360   
);
  361    361   
static RUNTASKINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  362    362   
    ::aws_smithy_schema::ShapeId::from_static(
  363    363   
        "com.amazonaws.ecs.synthetic#RunTaskInput$tags",
  364    364   
        "com.amazonaws.ecs.synthetic",
  365    365   
        "RunTaskInput",
  366    366   
    ),
  367    367   
    ::aws_smithy_schema::ShapeType::List,
  368    368   
    "tags",
  369    369   
    15,
  370    370   
);
  371    371   
static RUNTASKINPUT_MEMBER_TASK_DEFINITION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  372    372   
    ::aws_smithy_schema::ShapeId::from_static(
  373    373   
        "com.amazonaws.ecs.synthetic#RunTaskInput$taskDefinition",
  374    374   
        "com.amazonaws.ecs.synthetic",
  375    375   
        "RunTaskInput",
  376    376   
    ),
  377    377   
    ::aws_smithy_schema::ShapeType::String,
  378         -
    "task_definition",
         378  +
    "taskDefinition",
  379    379   
    16,
  380    380   
);
  381    381   
static RUNTASKINPUT_MEMBER_CLIENT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  382    382   
    ::aws_smithy_schema::ShapeId::from_static(
  383    383   
        "com.amazonaws.ecs.synthetic#RunTaskInput$clientToken",
  384    384   
        "com.amazonaws.ecs.synthetic",
  385    385   
        "RunTaskInput",
  386    386   
    ),
  387    387   
    ::aws_smithy_schema::ShapeType::String,
  388         -
    "client_token",
         388  +
    "clientToken",
  389    389   
    17,
  390    390   
);
  391    391   
static RUNTASKINPUT_MEMBER_VOLUME_CONFIGURATIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  392    392   
    ::aws_smithy_schema::ShapeId::from_static(
  393    393   
        "com.amazonaws.ecs.synthetic#RunTaskInput$volumeConfigurations",
  394    394   
        "com.amazonaws.ecs.synthetic",
  395    395   
        "RunTaskInput",
  396    396   
    ),
  397    397   
    ::aws_smithy_schema::ShapeType::List,
  398         -
    "volume_configurations",
         398  +
    "volumeConfigurations",
  399    399   
    18,
  400    400   
);
  401    401   
static RUNTASKINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  402    402   
    RUNTASKINPUT_SCHEMA_ID,
  403    403   
    ::aws_smithy_schema::ShapeType::Structure,
  404    404   
    &[
  405    405   
        &RUNTASKINPUT_MEMBER_CAPACITY_PROVIDER_STRATEGY,
  406    406   
        &RUNTASKINPUT_MEMBER_CLUSTER,
  407    407   
        &RUNTASKINPUT_MEMBER_COUNT,
  408    408   
        &RUNTASKINPUT_MEMBER_ENABLE_ECS_MANAGED_TAGS,
@@ -505,505 +694,691 @@
  525    525   
                    }
  526    526   
                    Ok(())
  527    527   
                },
  528    528   
            )?;
  529    529   
        }
  530    530   
        Ok(())
  531    531   
    }
  532    532   
}
  533    533   
impl RunTaskInput {
  534    534   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  535         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  536         -
        deserializer: &mut D,
         535  +
    pub fn deserialize(
         536  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  537    537   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  538    538   
        #[allow(unused_variables, unused_mut)]
  539    539   
        let mut builder = Self::builder();
  540    540   
        #[allow(
  541    541   
            unused_variables,
  542    542   
            unreachable_code,
  543    543   
            clippy::single_match,
  544    544   
            clippy::match_single_binding,
  545    545   
            clippy::diverging_sub_expression
  546    546   
        )]
  547         -
        deserializer.read_struct(&RUNTASKINPUT_SCHEMA, (), |_, member, deser| {
         547  +
        deserializer.read_struct(&RUNTASKINPUT_SCHEMA, &mut |member, deser| {
  548    548   
            match member.member_index() {
  549    549   
                Some(0) => {
  550    550   
                    builder.capacity_provider_strategy = Some({
  551         -
                        let container = if let Some(cap) = deser.container_size() {
  552         -
                            Vec::with_capacity(cap)
  553         -
                        } else {
  554         -
                            Vec::new()
  555         -
                        };
  556         -
                        deser.read_list(member, container, |mut list, deser| {
  557         -
                            list.push(crate::types::CapacityProviderStrategyItem::deserialize(deser)?);
  558         -
                            Ok(list)
  559         -
                        })?
         551  +
                        let mut container = Vec::new();
         552  +
                        deser.read_list(member, &mut |deser| {
         553  +
                            container.push(crate::types::CapacityProviderStrategyItem::deserialize(deser)?);
         554  +
                            Ok(())
         555  +
                        })?;
         556  +
                        container
  560    557   
                    });
  561    558   
                }
  562    559   
                Some(1) => {
  563    560   
                    builder.cluster = Some(deser.read_string(member)?);
  564    561   
                }
  565    562   
                Some(2) => {
  566    563   
                    builder.count = Some(deser.read_integer(member)?);
  567    564   
                }
  568    565   
                Some(3) => {
  569    566   
                    builder.enable_ecs_managed_tags = Some(deser.read_boolean(member)?);
  570    567   
                }
  571    568   
                Some(4) => {
  572    569   
                    builder.enable_execute_command = Some(deser.read_boolean(member)?);
  573    570   
                }
  574    571   
                Some(5) => {
  575    572   
                    builder.group = Some(deser.read_string(member)?);
  576    573   
                }
  577    574   
                Some(6) => {
  578    575   
                    builder.launch_type = Some(crate::types::LaunchType::from(deser.read_string(member)?.as_str()));
  579    576   
                }
  580    577   
                Some(7) => {
  581    578   
                    builder.network_configuration = Some(crate::types::NetworkConfiguration::deserialize(deser)?);
  582    579   
                }
  583    580   
                Some(8) => {
  584    581   
                    builder.overrides = Some(crate::types::TaskOverride::deserialize(deser)?);
  585    582   
                }
  586    583   
                Some(9) => {
  587    584   
                    builder.placement_constraints = Some({
  588         -
                        let container = if let Some(cap) = deser.container_size() {
  589         -
                            Vec::with_capacity(cap)
  590         -
                        } else {
  591         -
                            Vec::new()
  592         -
                        };
  593         -
                        deser.read_list(member, container, |mut list, deser| {
  594         -
                            list.push(crate::types::PlacementConstraint::deserialize(deser)?);
  595         -
                            Ok(list)
  596         -
                        })?
         585  +
                        let mut container = Vec::new();
         586  +
                        deser.read_list(member, &mut |deser| {
         587  +
                            container.push(crate::types::PlacementConstraint::deserialize(deser)?);
         588  +
                            Ok(())
         589  +
                        })?;
         590  +
                        container
  597    591   
                    });
  598    592   
                }
  599    593   
                Some(10) => {
  600    594   
                    builder.placement_strategy = Some({
  601         -
                        let container = if let Some(cap) = deser.container_size() {
  602         -
                            Vec::with_capacity(cap)
  603         -
                        } else {
  604         -
                            Vec::new()
  605         -
                        };
  606         -
                        deser.read_list(member, container, |mut list, deser| {
  607         -
                            list.push(crate::types::PlacementStrategy::deserialize(deser)?);
  608         -
                            Ok(list)
  609         -
                        })?
         595  +
                        let mut container = Vec::new();
         596  +
                        deser.read_list(member, &mut |deser| {
         597  +
                            container.push(crate::types::PlacementStrategy::deserialize(deser)?);
         598  +
                            Ok(())
         599  +
                        })?;
         600  +
                        container
  610    601   
                    });
  611    602   
                }
  612    603   
                Some(11) => {
  613    604   
                    builder.platform_version = Some(deser.read_string(member)?);
  614    605   
                }
  615    606   
                Some(12) => {
  616    607   
                    builder.propagate_tags = Some(crate::types::PropagateTags::from(deser.read_string(member)?.as_str()));
  617    608   
                }
  618    609   
                Some(13) => {
  619    610   
                    builder.reference_id = Some(deser.read_string(member)?);
  620    611   
                }
  621    612   
                Some(14) => {
  622    613   
                    builder.started_by = Some(deser.read_string(member)?);
  623    614   
                }
  624    615   
                Some(15) => {
  625    616   
                    builder.tags = Some({
  626         -
                        let container = if let Some(cap) = deser.container_size() {
  627         -
                            Vec::with_capacity(cap)
  628         -
                        } else {
  629         -
                            Vec::new()
  630         -
                        };
  631         -
                        deser.read_list(member, container, |mut list, deser| {
  632         -
                            list.push(crate::types::Tag::deserialize(deser)?);
  633         -
                            Ok(list)
  634         -
                        })?
         617  +
                        let mut container = Vec::new();
         618  +
                        deser.read_list(member, &mut |deser| {
         619  +
                            container.push(crate::types::Tag::deserialize(deser)?);
         620  +
                            Ok(())
         621  +
                        })?;
         622  +
                        container
  635    623   
                    });
  636    624   
                }
  637    625   
                Some(16) => {
  638    626   
                    builder.task_definition = Some(deser.read_string(member)?);
  639    627   
                }
  640    628   
                Some(17) => {
  641    629   
                    builder.client_token = Some(deser.read_string(member)?);
  642    630   
                }
  643    631   
                Some(18) => {
  644    632   
                    builder.volume_configurations = Some({
  645         -
                        let container = if let Some(cap) = deser.container_size() {
  646         -
                            Vec::with_capacity(cap)
  647         -
                        } else {
  648         -
                            Vec::new()
  649         -
                        };
  650         -
                        deser.read_list(member, container, |mut list, deser| {
  651         -
                            list.push(crate::types::TaskVolumeConfiguration::deserialize(deser)?);
  652         -
                            Ok(list)
  653         -
                        })?
         633  +
                        let mut container = Vec::new();
         634  +
                        deser.read_list(member, &mut |deser| {
         635  +
                            container.push(crate::types::TaskVolumeConfiguration::deserialize(deser)?);
         636  +
                            Ok(())
         637  +
                        })?;
         638  +
                        container
  654    639   
                    });
  655    640   
                }
  656    641   
                _ => {}
  657    642   
            }
  658    643   
            Ok(())
  659    644   
        })?;
         645  +
        builder.task_definition = builder.task_definition.or(Some(String::new()));
  660    646   
        builder
  661    647   
            .build()
  662    648   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  663    649   
    }
  664    650   
}
         651  +
impl RunTaskInput {
         652  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         653  +
    pub fn deserialize_with_response(
         654  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         655  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         656  +
        _status: u16,
         657  +
        _body: &[u8],
         658  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         659  +
        Self::deserialize(deserializer)
         660  +
    }
         661  +
}
  665    662   
impl RunTaskInput {
  666    663   
    /// Creates a new builder-style object to manufacture [`RunTaskInput`](crate::operation::run_task::RunTaskInput).
  667    664   
    pub fn builder() -> crate::operation::run_task::builders::RunTaskInputBuilder {
  668    665   
        crate::operation::run_task::builders::RunTaskInputBuilder::default()
  669    666   
    }
  670    667   
}
  671    668   
  672    669   
/// A builder for [`RunTaskInput`](crate::operation::run_task::RunTaskInput).
  673    670   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  674    671   
#[non_exhaustive]

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

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

tmp-codegen-diff/aws-sdk/sdk/ecs/src/operation/start_task.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 `StartTask`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct StartTask;
    6      6   
impl StartTask {
    7      7   
    /// Creates a new `StartTask`
    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::start_task::StartTaskInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::start_task::StartTaskOutput::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::start_task::StartTaskInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::start_task::StartTaskOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::start_task::StartTaskError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +240,373 @@
  135    139   
                crate::operation::start_task::StartTaskError,
  136    140   
            >::new());
  137    141   
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct StartTaskResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for StartTaskResponseDeserializer {
  145         -
    fn deserialize_nonstreaming(
         149  +
    fn deserialize_nonstreaming_with_config(
  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_start_task::de_start_task_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::start_task::StartTaskError::unhandled(generic)),
         172  +
                    ))
         173  +
                }
         174  +
            };
         175  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         176  +
            let protocol = _cfg
         177  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         178  +
                .expect("a SharedClientProtocol is required");
         179  +
            let err = match error_code {
         180  +
                "ClientException" => crate::operation::start_task::StartTaskError::ClientException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::ClientException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::ClientException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
         197  +
                    };
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "ClusterNotFoundException" => crate::operation::start_task::StartTaskError::ClusterNotFoundException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::ClusterNotFoundException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::ClusterNotFoundException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "InvalidParameterException" => crate::operation::start_task::StartTaskError::InvalidParameterException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "ServerException" => crate::operation::start_task::StartTaskError::ServerException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::ServerException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::ServerException::deserialize_with_response(
         257  +
                                &mut *deser,
         258  +
                                response.headers(),
         259  +
                                response.status().into(),
         260  +
                                body,
         261  +
                            )
         262  +
                        }) {
         263  +
                        ::std::result::Result::Ok(val) => val,
         264  +
                        ::std::result::Result::Err(e) => {
         265  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         266  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         267  +
                            ))
         268  +
                        }
         269  +
                    };
         270  +
                    tmp.meta = generic;
         271  +
                    if tmp.message.is_none() {
         272  +
                        tmp.message = _error_message;
         273  +
                    }
         274  +
                    tmp
         275  +
                }),
         276  +
                "UnsupportedFeatureException" => crate::operation::start_task::StartTaskError::UnsupportedFeatureException({
         277  +
                    let mut tmp = match protocol
         278  +
                        .deserialize_response(response, crate::types::error::UnsupportedFeatureException::SCHEMA, _cfg)
         279  +
                        .and_then(|mut deser| {
         280  +
                            crate::types::error::UnsupportedFeatureException::deserialize_with_response(
         281  +
                                &mut *deser,
         282  +
                                response.headers(),
         283  +
                                response.status().into(),
         284  +
                                body,
         285  +
                            )
         286  +
                        }) {
         287  +
                        ::std::result::Result::Ok(val) => val,
         288  +
                        ::std::result::Result::Err(e) => {
         289  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         290  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         291  +
                            ))
         292  +
                        }
         293  +
                    };
         294  +
                    tmp.meta = generic;
         295  +
                    if tmp.message.is_none() {
         296  +
                        tmp.message = _error_message;
         297  +
                    }
         298  +
                    tmp
         299  +
                }),
         300  +
                _ => crate::operation::start_task::StartTaskError::generic(generic),
         301  +
            };
         302  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         303  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         304  +
            ))
  157    305   
        } else {
  158         -
            crate::protocol_serde::shape_start_task::de_start_task_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         306  +
            let protocol = _cfg
         307  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         308  +
                .expect("a SharedClientProtocol is required");
         309  +
            let mut deser = protocol.deserialize_response(response, StartTask::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         310  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         311  +
            })?;
         312  +
            let body = response.body().bytes().expect("body loaded");
         313  +
            let output = crate::operation::start_task::StartTaskOutput::deserialize_with_response(
         314  +
                &mut *deser,
         315  +
                response.headers(),
         316  +
                response.status().into(),
         317  +
                body,
         318  +
            )
         319  +
            .map_err(|e| {
         320  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         321  +
            })?;
         322  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         323  +
        }
  161    324   
    }
  162    325   
}
  163    326   
#[derive(Debug)]
  164    327   
struct StartTaskRequestSerializer;
  165    328   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for StartTaskRequestSerializer {
  166    329   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    330   
    fn serialize_input(
  168    331   
        &self,
  169    332   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    333   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    334   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    335   
        let input = input.downcast::<crate::operation::start_task::StartTaskInput>().expect("correct type");
  173         -
        let _header_serialization_settings = _cfg
  174         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  175         -
            .cloned()
  176         -
            .unwrap_or_default();
  177         -
        let mut request_builder = {
  178         -
            #[allow(clippy::uninlined_format_args)]
  179         -
            fn uri_base(
  180         -
                _input: &crate::operation::start_task::StartTaskInput,
  181         -
                output: &mut ::std::string::String,
  182         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  183         -
                use ::std::fmt::Write as _;
  184         -
                ::std::write!(output, "/").expect("formatting should succeed");
  185         -
                ::std::result::Result::Ok(())
  186         -
            }
  187         -
            #[allow(clippy::unnecessary_wraps)]
  188         -
            fn update_http_builder(
  189         -
                input: &crate::operation::start_task::StartTaskInput,
  190         -
                builder: ::http_1x::request::Builder,
  191         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  192         -
                let mut uri = ::std::string::String::new();
  193         -
                uri_base(input, &mut uri)?;
  194         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  195         -
            }
  196         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  197         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  198         -
            builder = _header_serialization_settings.set_default_header(
  199         -
                builder,
  200         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  201         -
                "AmazonEC2ContainerServiceV20141113.StartTask",
  202         -
            );
  203         -
            builder
  204         -
        };
  205         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_start_task::ser_start_task_input(&input)?);
  206         -
        if let Some(content_length) = body.content_length() {
  207         -
            let content_length = content_length.to_string();
  208         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  209         -
        }
  210         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         336  +
        let protocol = _cfg
         337  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         338  +
            .expect("a SharedClientProtocol is required");
         339  +
        let mut request = protocol
         340  +
            .serialize_request(&input, StartTask::INPUT_SCHEMA, "", _cfg)
         341  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         342  +
         343  +
        return ::std::result::Result::Ok(request);
  211    344   
    }
  212    345   
}
  213    346   
#[derive(Debug)]
  214    347   
struct StartTaskEndpointParamsInterceptor;
  215    348   
  216    349   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StartTaskEndpointParamsInterceptor {
  217    350   
    fn name(&self) -> &'static str {
  218    351   
        "StartTaskEndpointParamsInterceptor"
  219    352   
    }
  220    353   

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

@@ -125,125 +295,295 @@
  145    145   
    "cluster",
  146    146   
    0,
  147    147   
);
  148    148   
static STARTTASKINPUT_MEMBER_CONTAINER_INSTANCES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  149    149   
    ::aws_smithy_schema::ShapeId::from_static(
  150    150   
        "com.amazonaws.ecs.synthetic#StartTaskInput$containerInstances",
  151    151   
        "com.amazonaws.ecs.synthetic",
  152    152   
        "StartTaskInput",
  153    153   
    ),
  154    154   
    ::aws_smithy_schema::ShapeType::List,
  155         -
    "container_instances",
         155  +
    "containerInstances",
  156    156   
    1,
  157    157   
);
  158    158   
static STARTTASKINPUT_MEMBER_ENABLE_ECS_MANAGED_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  159    159   
    ::aws_smithy_schema::ShapeId::from_static(
  160    160   
        "com.amazonaws.ecs.synthetic#StartTaskInput$enableECSManagedTags",
  161    161   
        "com.amazonaws.ecs.synthetic",
  162    162   
        "StartTaskInput",
  163    163   
    ),
  164    164   
    ::aws_smithy_schema::ShapeType::Boolean,
  165         -
    "enable_ecs_managed_tags",
         165  +
    "enableECSManagedTags",
  166    166   
    2,
  167    167   
);
  168    168   
static STARTTASKINPUT_MEMBER_ENABLE_EXECUTE_COMMAND: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  169    169   
    ::aws_smithy_schema::ShapeId::from_static(
  170    170   
        "com.amazonaws.ecs.synthetic#StartTaskInput$enableExecuteCommand",
  171    171   
        "com.amazonaws.ecs.synthetic",
  172    172   
        "StartTaskInput",
  173    173   
    ),
  174    174   
    ::aws_smithy_schema::ShapeType::Boolean,
  175         -
    "enable_execute_command",
         175  +
    "enableExecuteCommand",
  176    176   
    3,
  177    177   
);
  178    178   
static STARTTASKINPUT_MEMBER_GROUP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  179    179   
    ::aws_smithy_schema::ShapeId::from_static(
  180    180   
        "com.amazonaws.ecs.synthetic#StartTaskInput$group",
  181    181   
        "com.amazonaws.ecs.synthetic",
  182    182   
        "StartTaskInput",
  183    183   
    ),
  184    184   
    ::aws_smithy_schema::ShapeType::String,
  185    185   
    "group",
  186    186   
    4,
  187    187   
);
  188    188   
static STARTTASKINPUT_MEMBER_NETWORK_CONFIGURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  189    189   
    ::aws_smithy_schema::ShapeId::from_static(
  190    190   
        "com.amazonaws.ecs.synthetic#StartTaskInput$networkConfiguration",
  191    191   
        "com.amazonaws.ecs.synthetic",
  192    192   
        "StartTaskInput",
  193    193   
    ),
  194    194   
    ::aws_smithy_schema::ShapeType::Structure,
  195         -
    "network_configuration",
         195  +
    "networkConfiguration",
  196    196   
    5,
  197    197   
);
  198    198   
static STARTTASKINPUT_MEMBER_OVERRIDES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  199    199   
    ::aws_smithy_schema::ShapeId::from_static(
  200    200   
        "com.amazonaws.ecs.synthetic#StartTaskInput$overrides",
  201    201   
        "com.amazonaws.ecs.synthetic",
  202    202   
        "StartTaskInput",
  203    203   
    ),
  204    204   
    ::aws_smithy_schema::ShapeType::Structure,
  205    205   
    "overrides",
  206    206   
    6,
  207    207   
);
  208    208   
static STARTTASKINPUT_MEMBER_PROPAGATE_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  209    209   
    ::aws_smithy_schema::ShapeId::from_static(
  210    210   
        "com.amazonaws.ecs.synthetic#StartTaskInput$propagateTags",
  211    211   
        "com.amazonaws.ecs.synthetic",
  212    212   
        "StartTaskInput",
  213    213   
    ),
  214    214   
    ::aws_smithy_schema::ShapeType::String,
  215         -
    "propagate_tags",
         215  +
    "propagateTags",
  216    216   
    7,
  217    217   
);
  218    218   
static STARTTASKINPUT_MEMBER_REFERENCE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  219    219   
    ::aws_smithy_schema::ShapeId::from_static(
  220    220   
        "com.amazonaws.ecs.synthetic#StartTaskInput$referenceId",
  221    221   
        "com.amazonaws.ecs.synthetic",
  222    222   
        "StartTaskInput",
  223    223   
    ),
  224    224   
    ::aws_smithy_schema::ShapeType::String,
  225         -
    "reference_id",
         225  +
    "referenceId",
  226    226   
    8,
  227    227   
);
  228    228   
static STARTTASKINPUT_MEMBER_STARTED_BY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  229    229   
    ::aws_smithy_schema::ShapeId::from_static(
  230    230   
        "com.amazonaws.ecs.synthetic#StartTaskInput$startedBy",
  231    231   
        "com.amazonaws.ecs.synthetic",
  232    232   
        "StartTaskInput",
  233    233   
    ),
  234    234   
    ::aws_smithy_schema::ShapeType::String,
  235         -
    "started_by",
         235  +
    "startedBy",
  236    236   
    9,
  237    237   
);
  238    238   
static STARTTASKINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  239    239   
    ::aws_smithy_schema::ShapeId::from_static(
  240    240   
        "com.amazonaws.ecs.synthetic#StartTaskInput$tags",
  241    241   
        "com.amazonaws.ecs.synthetic",
  242    242   
        "StartTaskInput",
  243    243   
    ),
  244    244   
    ::aws_smithy_schema::ShapeType::List,
  245    245   
    "tags",
  246    246   
    10,
  247    247   
);
  248    248   
static STARTTASKINPUT_MEMBER_TASK_DEFINITION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  249    249   
    ::aws_smithy_schema::ShapeId::from_static(
  250    250   
        "com.amazonaws.ecs.synthetic#StartTaskInput$taskDefinition",
  251    251   
        "com.amazonaws.ecs.synthetic",
  252    252   
        "StartTaskInput",
  253    253   
    ),
  254    254   
    ::aws_smithy_schema::ShapeType::String,
  255         -
    "task_definition",
         255  +
    "taskDefinition",
  256    256   
    11,
  257    257   
);
  258    258   
static STARTTASKINPUT_MEMBER_VOLUME_CONFIGURATIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  259    259   
    ::aws_smithy_schema::ShapeId::from_static(
  260    260   
        "com.amazonaws.ecs.synthetic#StartTaskInput$volumeConfigurations",
  261    261   
        "com.amazonaws.ecs.synthetic",
  262    262   
        "StartTaskInput",
  263    263   
    ),
  264    264   
    ::aws_smithy_schema::ShapeType::List,
  265         -
    "volume_configurations",
         265  +
    "volumeConfigurations",
  266    266   
    12,
  267    267   
);
  268    268   
static STARTTASKINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  269    269   
    STARTTASKINPUT_SCHEMA_ID,
  270    270   
    ::aws_smithy_schema::ShapeType::Structure,
  271    271   
    &[
  272    272   
        &STARTTASKINPUT_MEMBER_CLUSTER,
  273    273   
        &STARTTASKINPUT_MEMBER_CONTAINER_INSTANCES,
  274    274   
        &STARTTASKINPUT_MEMBER_ENABLE_ECS_MANAGED_TAGS,
  275    275   
        &STARTTASKINPUT_MEMBER_ENABLE_EXECUTE_COMMAND,
@@ -335,335 +486,483 @@
  355    355   
                    }
  356    356   
                    Ok(())
  357    357   
                },
  358    358   
            )?;
  359    359   
        }
  360    360   
        Ok(())
  361    361   
    }
  362    362   
}
  363    363   
impl StartTaskInput {
  364    364   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  365         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  366         -
        deserializer: &mut D,
         365  +
    pub fn deserialize(
         366  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  367    367   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  368    368   
        #[allow(unused_variables, unused_mut)]
  369    369   
        let mut builder = Self::builder();
  370    370   
        #[allow(
  371    371   
            unused_variables,
  372    372   
            unreachable_code,
  373    373   
            clippy::single_match,
  374    374   
            clippy::match_single_binding,
  375    375   
            clippy::diverging_sub_expression
  376    376   
        )]
  377         -
        deserializer.read_struct(&STARTTASKINPUT_SCHEMA, (), |_, member, deser| {
         377  +
        deserializer.read_struct(&STARTTASKINPUT_SCHEMA, &mut |member, deser| {
  378    378   
            match member.member_index() {
  379    379   
                Some(0) => {
  380    380   
                    builder.cluster = Some(deser.read_string(member)?);
  381    381   
                }
  382    382   
                Some(1) => {
  383         -
                    builder.container_instances = Some({
  384         -
                        let container = if let Some(cap) = deser.container_size() {
  385         -
                            Vec::with_capacity(cap)
  386         -
                        } else {
  387         -
                            Vec::new()
  388         -
                        };
  389         -
                        deser.read_list(member, container, |mut list, deser| {
  390         -
                            list.push(deser.read_string(member)?);
  391         -
                            Ok(list)
  392         -
                        })?
  393         -
                    });
         383  +
                    builder.container_instances = Some(deser.read_string_list(member)?);
  394    384   
                }
  395    385   
                Some(2) => {
  396    386   
                    builder.enable_ecs_managed_tags = Some(deser.read_boolean(member)?);
  397    387   
                }
  398    388   
                Some(3) => {
  399    389   
                    builder.enable_execute_command = Some(deser.read_boolean(member)?);
  400    390   
                }
  401    391   
                Some(4) => {
  402    392   
                    builder.group = Some(deser.read_string(member)?);
  403    393   
                }
  404    394   
                Some(5) => {
  405    395   
                    builder.network_configuration = Some(crate::types::NetworkConfiguration::deserialize(deser)?);
  406    396   
                }
  407    397   
                Some(6) => {
  408    398   
                    builder.overrides = Some(crate::types::TaskOverride::deserialize(deser)?);
  409    399   
                }
  410    400   
                Some(7) => {
  411    401   
                    builder.propagate_tags = Some(crate::types::PropagateTags::from(deser.read_string(member)?.as_str()));
  412    402   
                }
  413    403   
                Some(8) => {
  414    404   
                    builder.reference_id = Some(deser.read_string(member)?);
  415    405   
                }
  416    406   
                Some(9) => {
  417    407   
                    builder.started_by = Some(deser.read_string(member)?);
  418    408   
                }
  419    409   
                Some(10) => {
  420    410   
                    builder.tags = Some({
  421         -
                        let container = if let Some(cap) = deser.container_size() {
  422         -
                            Vec::with_capacity(cap)
  423         -
                        } else {
  424         -
                            Vec::new()
  425         -
                        };
  426         -
                        deser.read_list(member, container, |mut list, deser| {
  427         -
                            list.push(crate::types::Tag::deserialize(deser)?);
  428         -
                            Ok(list)
  429         -
                        })?
         411  +
                        let mut container = Vec::new();
         412  +
                        deser.read_list(member, &mut |deser| {
         413  +
                            container.push(crate::types::Tag::deserialize(deser)?);
         414  +
                            Ok(())
         415  +
                        })?;
         416  +
                        container
  430    417   
                    });
  431    418   
                }
  432    419   
                Some(11) => {
  433    420   
                    builder.task_definition = Some(deser.read_string(member)?);
  434    421   
                }
  435    422   
                Some(12) => {
  436    423   
                    builder.volume_configurations = Some({
  437         -
                        let container = if let Some(cap) = deser.container_size() {
  438         -
                            Vec::with_capacity(cap)
  439         -
                        } else {
  440         -
                            Vec::new()
  441         -
                        };
  442         -
                        deser.read_list(member, container, |mut list, deser| {
  443         -
                            list.push(crate::types::TaskVolumeConfiguration::deserialize(deser)?);
  444         -
                            Ok(list)
  445         -
                        })?
         424  +
                        let mut container = Vec::new();
         425  +
                        deser.read_list(member, &mut |deser| {
         426  +
                            container.push(crate::types::TaskVolumeConfiguration::deserialize(deser)?);
         427  +
                            Ok(())
         428  +
                        })?;
         429  +
                        container
  446    430   
                    });
  447    431   
                }
  448    432   
                _ => {}
  449    433   
            }
  450    434   
            Ok(())
  451    435   
        })?;
         436  +
        builder.container_instances = builder.container_instances.or(Some(Vec::new()));
         437  +
        builder.task_definition = builder.task_definition.or(Some(String::new()));
  452    438   
        builder
  453    439   
            .build()
  454    440   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  455    441   
    }
  456    442   
}
         443  +
impl StartTaskInput {
         444  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         445  +
    pub fn deserialize_with_response(
         446  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         447  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         448  +
        _status: u16,
         449  +
        _body: &[u8],
         450  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         451  +
        Self::deserialize(deserializer)
         452  +
    }
         453  +
}
  457    454   
impl StartTaskInput {
  458    455   
    /// Creates a new builder-style object to manufacture [`StartTaskInput`](crate::operation::start_task::StartTaskInput).
  459    456   
    pub fn builder() -> crate::operation::start_task::builders::StartTaskInputBuilder {
  460    457   
        crate::operation::start_task::builders::StartTaskInputBuilder::default()
  461    458   
    }
  462    459   
}
  463    460   
  464    461   
/// A builder for [`StartTaskInput`](crate::operation::start_task::StartTaskInput).
  465    462   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  466    463   
#[non_exhaustive]

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

@@ -21,21 +160,219 @@
   41     41   
static STARTTASKOUTPUT_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#StartTaskOutput$failures",
   44     44   
        "com.amazonaws.ecs.synthetic",
   45     45   
        "StartTaskOutput",
   46     46   
    ),
   47     47   
    ::aws_smithy_schema::ShapeType::List,
   48     48   
    "failures",
   49     49   
    1,
   50     50   
);
          51  +
static STARTTASKOUTPUT_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 STARTTASKOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   52     59   
    STARTTASKOUTPUT_SCHEMA_ID,
   53     60   
    ::aws_smithy_schema::ShapeType::Structure,
   54         -
    &[&STARTTASKOUTPUT_MEMBER_TASKS, &STARTTASKOUTPUT_MEMBER_FAILURES],
          61  +
    &[
          62  +
        &STARTTASKOUTPUT_MEMBER_TASKS,
          63  +
        &STARTTASKOUTPUT_MEMBER_FAILURES,
          64  +
        &STARTTASKOUTPUT_MEMBER__REQUEST_ID,
          65  +
    ],
   55     66   
);
   56     67   
impl StartTaskOutput {
   57     68   
    /// The schema for this shape.
   58     69   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STARTTASKOUTPUT_SCHEMA;
   59     70   
}
   60     71   
impl ::aws_smithy_schema::serde::SerializableStruct for StartTaskOutput {
   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.tasks {
   67     78   
            ser.write_list(
   68     79   
                &STARTTASKOUTPUT_MEMBER_TASKS,
   69     80   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   70     81   
                    for item in val {
   71     82   
                        ser.write_struct(crate::types::Task::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   
                &STARTTASKOUTPUT_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 StartTaskOutput {
   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(&STARTTASKOUTPUT_SCHEMA, (), |_, member, deser| {
         116  +
        deserializer.read_struct(&STARTTASKOUTPUT_SCHEMA, &mut |member, deser| {
  106    117   
            match member.member_index() {
  107    118   
                Some(0) => {
  108    119   
                    builder.tasks = 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::Task::deserialize(deser)?);
  116         -
                            Ok(list)
  117         -
                        })?
         120  +
                        let mut container = Vec::new();
         121  +
                        deser.read_list(member, &mut |deser| {
         122  +
                            container.push(crate::types::Task::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 StartTaskOutput {
         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(&STARTTASKOUTPUT_SCHEMA, &mut |member, deser| {
         171  +
            match member.member_index() {
         172  +
                Some(0) => {
         173  +
                    builder.tasks = Some({
         174  +
                        let mut container = Vec::new();
         175  +
                        deser.read_list(member, &mut |deser| {
         176  +
                            container.push(crate::types::Task::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 StartTaskOutput {