AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12

Files changed:

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

@@ -65,65 +156,168 @@
   85     85   
            ser.write_string(&DELETESERVICEINPUT_MEMBER_SERVICE, val)?;
   86     86   
        }
   87     87   
        if let Some(ref val) = self.force {
   88     88   
            ser.write_boolean(&DELETESERVICEINPUT_MEMBER_FORCE, *val)?;
   89     89   
        }
   90     90   
        Ok(())
   91     91   
    }
   92     92   
}
   93     93   
impl DeleteServiceInput {
   94     94   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   95         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   96         -
        deserializer: &mut D,
          95  +
    pub fn deserialize(
          96  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   97     97   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   98     98   
        #[allow(unused_variables, unused_mut)]
   99     99   
        let mut builder = Self::builder();
  100    100   
        #[allow(
  101    101   
            unused_variables,
  102    102   
            unreachable_code,
  103    103   
            clippy::single_match,
  104    104   
            clippy::match_single_binding,
  105    105   
            clippy::diverging_sub_expression
  106    106   
        )]
  107         -
        deserializer.read_struct(&DELETESERVICEINPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&DELETESERVICEINPUT_SCHEMA, &mut |member, deser| {
  108    108   
            match member.member_index() {
  109    109   
                Some(0) => {
  110    110   
                    builder.cluster = Some(deser.read_string(member)?);
  111    111   
                }
  112    112   
                Some(1) => {
  113    113   
                    builder.service = Some(deser.read_string(member)?);
  114    114   
                }
  115    115   
                Some(2) => {
  116    116   
                    builder.force = Some(deser.read_boolean(member)?);
  117    117   
                }
  118    118   
                _ => {}
  119    119   
            }
  120    120   
            Ok(())
  121    121   
        })?;
         122  +
        builder.service = builder.service.or(Some(String::new()));
  122    123   
        builder
  123    124   
            .build()
  124    125   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  125    126   
    }
  126    127   
}
         128  +
impl DeleteServiceInput {
         129  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         130  +
    pub fn deserialize_with_response(
         131  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         132  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         133  +
        _status: u16,
         134  +
        _body: &[u8],
         135  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         136  +
        Self::deserialize(deserializer)
         137  +
    }
         138  +
}
  127    139   
impl DeleteServiceInput {
  128    140   
    /// Creates a new builder-style object to manufacture [`DeleteServiceInput`](crate::operation::delete_service::DeleteServiceInput).
  129    141   
    pub fn builder() -> crate::operation::delete_service::builders::DeleteServiceInputBuilder {
  130    142   
        crate::operation::delete_service::builders::DeleteServiceInputBuilder::default()
  131    143   
    }
  132    144   
}
  133    145   
  134    146   
/// A builder for [`DeleteServiceInput`](crate::operation::delete_service::DeleteServiceInput).
  135    147   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  136    148   
#[non_exhaustive]

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

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

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

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

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

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

@@ -8,8 +163,219 @@
   28     28   
    "com.amazonaws.ecs.synthetic",
   29     29   
    "DeleteTaskDefinitionsOutput",
   30     30   
);
   31     31   
static DELETETASKDEFINITIONSOUTPUT_MEMBER_TASK_DEFINITIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   32     32   
    ::aws_smithy_schema::ShapeId::from_static(
   33     33   
        "com.amazonaws.ecs.synthetic#DeleteTaskDefinitionsOutput$taskDefinitions",
   34     34   
        "com.amazonaws.ecs.synthetic",
   35     35   
        "DeleteTaskDefinitionsOutput",
   36     36   
    ),
   37     37   
    ::aws_smithy_schema::ShapeType::List,
   38         -
    "task_definitions",
          38  +
    "taskDefinitions",
   39     39   
    0,
   40     40   
);
   41     41   
static DELETETASKDEFINITIONSOUTPUT_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#DeleteTaskDefinitionsOutput$failures",
   44     44   
        "com.amazonaws.ecs.synthetic",
   45     45   
        "DeleteTaskDefinitionsOutput",
   46     46   
    ),
   47     47   
    ::aws_smithy_schema::ShapeType::List,
   48     48   
    "failures",
   49     49   
    1,
   50     50   
);
          51  +
static DELETETASKDEFINITIONSOUTPUT_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 DELETETASKDEFINITIONSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   52     59   
    DELETETASKDEFINITIONSOUTPUT_SCHEMA_ID,
   53     60   
    ::aws_smithy_schema::ShapeType::Structure,
   54     61   
    &[
   55     62   
        &DELETETASKDEFINITIONSOUTPUT_MEMBER_TASK_DEFINITIONS,
   56     63   
        &DELETETASKDEFINITIONSOUTPUT_MEMBER_FAILURES,
          64  +
        &DELETETASKDEFINITIONSOUTPUT_MEMBER__REQUEST_ID,
   57     65   
    ],
   58     66   
);
   59     67   
impl DeleteTaskDefinitionsOutput {
   60     68   
    /// The schema for this shape.
   61     69   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETETASKDEFINITIONSOUTPUT_SCHEMA;
   62     70   
}
   63     71   
impl ::aws_smithy_schema::serde::SerializableStruct for DeleteTaskDefinitionsOutput {
   64     72   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   65     73   
    fn serialize_members(
   66     74   
        &self,
   67     75   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   68     76   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   69     77   
        if let Some(ref val) = self.task_definitions {
   70     78   
            ser.write_list(
   71     79   
                &DELETETASKDEFINITIONSOUTPUT_MEMBER_TASK_DEFINITIONS,
   72     80   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   73     81   
                    for item in val {
   74     82   
                        ser.write_struct(crate::types::TaskDefinition::SCHEMA, item)?;
   75     83   
                    }
   76     84   
                    Ok(())
   77     85   
                },
   78     86   
            )?;
   79     87   
        }
   80     88   
        if let Some(ref val) = self.failures {
   81     89   
            ser.write_list(
   82     90   
                &DELETETASKDEFINITIONSOUTPUT_MEMBER_FAILURES,
   83     91   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   84     92   
                    for item in val {
   85     93   
                        ser.write_struct(crate::types::Failure::SCHEMA, item)?;
   86     94   
                    }
   87     95   
                    Ok(())
   88     96   
                },
   89     97   
            )?;
   90     98   
        }
   91     99   
        Ok(())
   92    100   
    }
   93    101   
}
   94    102   
impl DeleteTaskDefinitionsOutput {
   95    103   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   96         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   97         -
        deserializer: &mut D,
         104  +
    pub fn deserialize(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   98    106   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   99    107   
        #[allow(unused_variables, unused_mut)]
  100    108   
        let mut builder = Self::builder();
  101    109   
        #[allow(
  102    110   
            unused_variables,
  103    111   
            unreachable_code,
  104    112   
            clippy::single_match,
  105    113   
            clippy::match_single_binding,
  106    114   
            clippy::diverging_sub_expression
  107    115   
        )]
  108         -
        deserializer.read_struct(&DELETETASKDEFINITIONSOUTPUT_SCHEMA, (), |_, member, deser| {
         116  +
        deserializer.read_struct(&DELETETASKDEFINITIONSOUTPUT_SCHEMA, &mut |member, deser| {
  109    117   
            match member.member_index() {
  110    118   
                Some(0) => {
  111    119   
                    builder.task_definitions = Some({
  112         -
                        let container = if let Some(cap) = deser.container_size() {
  113         -
                            Vec::with_capacity(cap)
  114         -
                        } else {
  115         -
                            Vec::new()
  116         -
                        };
  117         -
                        deser.read_list(member, container, |mut list, deser| {
  118         -
                            list.push(crate::types::TaskDefinition::deserialize(deser)?);
  119         -
                            Ok(list)
  120         -
                        })?
         120  +
                        let mut container = Vec::new();
         121  +
                        deser.read_list(member, &mut |deser| {
         122  +
                            container.push(crate::types::TaskDefinition::deserialize(deser)?);
         123  +
                            Ok(())
         124  +
                        })?;
         125  +
                        container
  121    126   
                    });
  122    127   
                }
  123    128   
                Some(1) => {
  124    129   
                    builder.failures = Some({
  125         -
                        let container = if let Some(cap) = deser.container_size() {
  126         -
                            Vec::with_capacity(cap)
  127         -
                        } else {
  128         -
                            Vec::new()
  129         -
                        };
  130         -
                        deser.read_list(member, container, |mut list, deser| {
  131         -
                            list.push(crate::types::Failure::deserialize(deser)?);
  132         -
                            Ok(list)
  133         -
                        })?
         130  +
                        let mut container = Vec::new();
         131  +
                        deser.read_list(member, &mut |deser| {
         132  +
                            container.push(crate::types::Failure::deserialize(deser)?);
         133  +
                            Ok(())
         134  +
                        })?;
         135  +
                        container
         136  +
                    });
         137  +
                }
         138  +
                Some(2) => {
         139  +
                    builder._request_id = Some(deser.read_string(member)?);
         140  +
                }
         141  +
                _ => {}
         142  +
            }
         143  +
            Ok(())
         144  +
        })?;
         145  +
        Ok(builder.build())
         146  +
    }
         147  +
}
         148  +
impl DeleteTaskDefinitionsOutput {
         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(&DELETETASKDEFINITIONSOUTPUT_SCHEMA, &mut |member, deser| {
         171  +
            match member.member_index() {
         172  +
                Some(0) => {
         173  +
                    builder.task_definitions = Some({
         174  +
                        let mut container = Vec::new();
         175  +
                        deser.read_list(member, &mut |deser| {
         176  +
                            container.push(crate::types::TaskDefinition::deserialize(deser)?);
         177  +
                            Ok(())
         178  +
                        })?;
         179  +
                        container
         180  +
                    });
         181  +
                }
         182  +
                Some(1) => {
         183  +
                    builder.failures = Some({
         184  +
                        let mut container = Vec::new();
         185  +
                        deser.read_list(member, &mut |deser| {
         186  +
                            container.push(crate::types::Failure::deserialize(deser)?);
         187  +
                            Ok(())
         188  +
                        })?;
         189  +
                        container
  134    190   
                    });
  135    191   
                }
  136    192   
                _ => {}
  137    193   
            }
  138    194   
            Ok(())
  139    195   
        })?;
  140    196   
        Ok(builder.build())
  141    197   
    }
  142    198   
}
  143    199   
impl ::aws_types::request_id::RequestId for DeleteTaskDefinitionsOutput {

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

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

@@ -35,35 +179,193 @@
   55     55   
    "service",
   56     56   
    1,
   57     57   
);
   58     58   
static DELETETASKSETINPUT_MEMBER_TASK_SET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   59     59   
    ::aws_smithy_schema::ShapeId::from_static(
   60     60   
        "com.amazonaws.ecs.synthetic#DeleteTaskSetInput$taskSet",
   61     61   
        "com.amazonaws.ecs.synthetic",
   62     62   
        "DeleteTaskSetInput",
   63     63   
    ),
   64     64   
    ::aws_smithy_schema::ShapeType::String,
   65         -
    "task_set",
          65  +
    "taskSet",
   66     66   
    2,
   67     67   
);
   68     68   
static DELETETASKSETINPUT_MEMBER_FORCE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   69     69   
    ::aws_smithy_schema::ShapeId::from_static(
   70     70   
        "com.amazonaws.ecs.synthetic#DeleteTaskSetInput$force",
   71     71   
        "com.amazonaws.ecs.synthetic",
   72     72   
        "DeleteTaskSetInput",
   73     73   
    ),
   74     74   
    ::aws_smithy_schema::ShapeType::Boolean,
   75     75   
    "force",
   76     76   
    3,
   77     77   
);
   78     78   
static DELETETASKSETINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   79     79   
    DELETETASKSETINPUT_SCHEMA_ID,
   80     80   
    ::aws_smithy_schema::ShapeType::Structure,
   81     81   
    &[
   82     82   
        &DELETETASKSETINPUT_MEMBER_CLUSTER,
   83     83   
        &DELETETASKSETINPUT_MEMBER_SERVICE,
   84     84   
        &DELETETASKSETINPUT_MEMBER_TASK_SET,
   85     85   
        &DELETETASKSETINPUT_MEMBER_FORCE,
   86     86   
    ],
   87     87   
);
   88     88   
impl DeleteTaskSetInput {
   89     89   
    /// The schema for this shape.
   90     90   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETETASKSETINPUT_SCHEMA;
   91     91   
}
   92     92   
impl ::aws_smithy_schema::serde::SerializableStruct for DeleteTaskSetInput {
   93     93   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   94     94   
    fn serialize_members(
   95     95   
        &self,
   96     96   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   97     97   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   98     98   
        if let Some(ref val) = self.cluster {
   99     99   
            ser.write_string(&DELETETASKSETINPUT_MEMBER_CLUSTER, val)?;
  100    100   
        }
  101    101   
        if let Some(ref val) = self.service {
  102    102   
            ser.write_string(&DELETETASKSETINPUT_MEMBER_SERVICE, val)?;
  103    103   
        }
  104    104   
        if let Some(ref val) = self.task_set {
  105    105   
            ser.write_string(&DELETETASKSETINPUT_MEMBER_TASK_SET, val)?;
  106    106   
        }
  107    107   
        if let Some(ref val) = self.force {
  108    108   
            ser.write_boolean(&DELETETASKSETINPUT_MEMBER_FORCE, *val)?;
  109    109   
        }
  110    110   
        Ok(())
  111    111   
    }
  112    112   
}
  113    113   
impl DeleteTaskSetInput {
  114    114   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  115         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  116         -
        deserializer: &mut D,
         115  +
    pub fn deserialize(
         116  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  117    117   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  118    118   
        #[allow(unused_variables, unused_mut)]
  119    119   
        let mut builder = Self::builder();
  120    120   
        #[allow(
  121    121   
            unused_variables,
  122    122   
            unreachable_code,
  123    123   
            clippy::single_match,
  124    124   
            clippy::match_single_binding,
  125    125   
            clippy::diverging_sub_expression
  126    126   
        )]
  127         -
        deserializer.read_struct(&DELETETASKSETINPUT_SCHEMA, (), |_, member, deser| {
         127  +
        deserializer.read_struct(&DELETETASKSETINPUT_SCHEMA, &mut |member, deser| {
  128    128   
            match member.member_index() {
  129    129   
                Some(0) => {
  130    130   
                    builder.cluster = Some(deser.read_string(member)?);
  131    131   
                }
  132    132   
                Some(1) => {
  133    133   
                    builder.service = Some(deser.read_string(member)?);
  134    134   
                }
  135    135   
                Some(2) => {
  136    136   
                    builder.task_set = Some(deser.read_string(member)?);
  137    137   
                }
  138    138   
                Some(3) => {
  139    139   
                    builder.force = Some(deser.read_boolean(member)?);
  140    140   
                }
  141    141   
                _ => {}
  142    142   
            }
  143    143   
            Ok(())
  144    144   
        })?;
         145  +
        builder.cluster = builder.cluster.or(Some(String::new()));
         146  +
        builder.service = builder.service.or(Some(String::new()));
         147  +
        builder.task_set = builder.task_set.or(Some(String::new()));
  145    148   
        builder
  146    149   
            .build()
  147    150   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  148    151   
    }
  149    152   
}
         153  +
impl DeleteTaskSetInput {
         154  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         155  +
    pub fn deserialize_with_response(
         156  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         157  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         158  +
        _status: u16,
         159  +
        _body: &[u8],
         160  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         161  +
        Self::deserialize(deserializer)
         162  +
    }
         163  +
}
  150    164   
impl DeleteTaskSetInput {
  151    165   
    /// Creates a new builder-style object to manufacture [`DeleteTaskSetInput`](crate::operation::delete_task_set::DeleteTaskSetInput).
  152    166   
    pub fn builder() -> crate::operation::delete_task_set::builders::DeleteTaskSetInputBuilder {
  153    167   
        crate::operation::delete_task_set::builders::DeleteTaskSetInputBuilder::default()
  154    168   
    }
  155    169   
}
  156    170   
  157    171   
/// A builder for [`DeleteTaskSetInput`](crate::operation::delete_task_set::DeleteTaskSetInput).
  158    172   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  159    173   
#[non_exhaustive]

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

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

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

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