AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ecs/src/operation/stop_service_deployment.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 `StopServiceDeployment`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct StopServiceDeployment;
    6      6   
impl StopServiceDeployment {
    7      7   
    /// Creates a new `StopServiceDeployment`
    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::stop_service_deployment::StopServiceDeploymentInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::stop_service_deployment::StopServiceDeploymentOutput::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::stop_service_deployment::StopServiceDeploymentInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::stop_service_deployment::StopServiceDeploymentOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::stop_service_deployment::StopServiceDeploymentError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +247,434 @@
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct StopServiceDeploymentResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for StopServiceDeploymentResponseDeserializer {
  148    152   
    fn deserialize_nonstreaming(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_stop_service_deployment::de_stop_service_deployment_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::stop_service_deployment::StopServiceDeploymentError::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::stop_service_deployment::StopServiceDeploymentError::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::stop_service_deployment::StopServiceDeploymentError::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  +
                "ConflictException" => crate::operation::stop_service_deployment::StopServiceDeploymentError::ConflictException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::ConflictException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::ConflictException::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  +
                "InvalidParameterException" => crate::operation::stop_service_deployment::StopServiceDeploymentError::InvalidParameterException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::InvalidParameterException::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  +
                "ServerException" => crate::operation::stop_service_deployment::StopServiceDeploymentError::ServerException({
         282  +
                    let mut tmp = match protocol
         283  +
                        .deserialize_response(response, crate::types::error::ServerException::SCHEMA, _cfg)
         284  +
                        .and_then(|mut deser| {
         285  +
                            crate::types::error::ServerException::deserialize_with_response(
         286  +
                                &mut *deser,
         287  +
                                response.headers(),
         288  +
                                response.status().into(),
         289  +
                                body,
         290  +
                            )
         291  +
                        }) {
         292  +
                        ::std::result::Result::Ok(val) => val,
         293  +
                        ::std::result::Result::Err(e) => {
         294  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         295  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         296  +
                            ))
         297  +
                        }
         298  +
                    };
         299  +
                    tmp.meta = generic;
         300  +
                    if tmp.message.is_none() {
         301  +
                        tmp.message = _error_message;
         302  +
                    }
         303  +
                    tmp
         304  +
                }),
         305  +
                "ServiceDeploymentNotFoundException" => {
         306  +
                    crate::operation::stop_service_deployment::StopServiceDeploymentError::ServiceDeploymentNotFoundException({
         307  +
                        let mut tmp = match protocol
         308  +
                            .deserialize_response(response, crate::types::error::ServiceDeploymentNotFoundException::SCHEMA, _cfg)
         309  +
                            .and_then(|mut deser| {
         310  +
                                crate::types::error::ServiceDeploymentNotFoundException::deserialize_with_response(
         311  +
                                    &mut *deser,
         312  +
                                    response.headers(),
         313  +
                                    response.status().into(),
         314  +
                                    body,
         315  +
                                )
         316  +
                            }) {
         317  +
                            ::std::result::Result::Ok(val) => val,
         318  +
                            ::std::result::Result::Err(e) => {
         319  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         320  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         321  +
                                ))
         322  +
                            }
         323  +
                        };
         324  +
                        tmp.meta = generic;
         325  +
                        if tmp.message.is_none() {
         326  +
                            tmp.message = _error_message;
         327  +
                        }
         328  +
                        tmp
         329  +
                    })
         330  +
                }
         331  +
                "UnsupportedFeatureException" => {
         332  +
                    crate::operation::stop_service_deployment::StopServiceDeploymentError::UnsupportedFeatureException({
         333  +
                        let mut tmp = match protocol
         334  +
                            .deserialize_response(response, crate::types::error::UnsupportedFeatureException::SCHEMA, _cfg)
         335  +
                            .and_then(|mut deser| {
         336  +
                                crate::types::error::UnsupportedFeatureException::deserialize_with_response(
         337  +
                                    &mut *deser,
         338  +
                                    response.headers(),
         339  +
                                    response.status().into(),
         340  +
                                    body,
         341  +
                                )
         342  +
                            }) {
         343  +
                            ::std::result::Result::Ok(val) => val,
         344  +
                            ::std::result::Result::Err(e) => {
         345  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         346  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         347  +
                                ))
         348  +
                            }
         349  +
                        };
         350  +
                        tmp.meta = generic;
         351  +
                        if tmp.message.is_none() {
         352  +
                            tmp.message = _error_message;
         353  +
                        }
         354  +
                        tmp
         355  +
                    })
         356  +
                }
         357  +
                _ => crate::operation::stop_service_deployment::StopServiceDeploymentError::generic(generic),
         358  +
            };
         359  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         360  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         361  +
            ))
  160    362   
        } else {
  161         -
            crate::protocol_serde::shape_stop_service_deployment::de_stop_service_deployment_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         363  +
            let protocol = _cfg
         364  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         365  +
                .expect("a SharedClientProtocol is required");
         366  +
            let mut deser = protocol
         367  +
                .deserialize_response(response, StopServiceDeployment::OUTPUT_SCHEMA, _cfg)
         368  +
                .map_err(|e| {
         369  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         370  +
                })?;
         371  +
            let body = response.body().bytes().expect("body loaded");
         372  +
            let output = crate::operation::stop_service_deployment::StopServiceDeploymentOutput::deserialize_with_response(
         373  +
                &mut *deser,
         374  +
                response.headers(),
         375  +
                response.status().into(),
         376  +
                body,
         377  +
            )
         378  +
            .map_err(|e| {
         379  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         380  +
            })?;
         381  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         382  +
        }
  164    383   
    }
  165    384   
}
  166    385   
#[derive(Debug)]
  167    386   
struct StopServiceDeploymentRequestSerializer;
  168    387   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for StopServiceDeploymentRequestSerializer {
  169    388   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    389   
    fn serialize_input(
  171    390   
        &self,
  172    391   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    392   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    393   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    394   
        let input = input
  176    395   
            .downcast::<crate::operation::stop_service_deployment::StopServiceDeploymentInput>()
  177    396   
            .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::stop_service_deployment::StopServiceDeploymentInput,
  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::stop_service_deployment::StopServiceDeploymentInput,
  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.StopServiceDeployment",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_stop_service_deployment::ser_stop_service_deployment_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())
         397  +
        let protocol = _cfg
         398  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         399  +
            .expect("a SharedClientProtocol is required");
         400  +
        let mut request = protocol
         401  +
            .serialize_request(&input, StopServiceDeployment::INPUT_SCHEMA, "", _cfg)
         402  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         403  +
         404  +
        return ::std::result::Result::Ok(request);
  218    405   
    }
  219    406   
}
  220    407   
#[derive(Debug)]
  221    408   
struct StopServiceDeploymentEndpointParamsInterceptor;
  222    409   
  223    410   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StopServiceDeploymentEndpointParamsInterceptor {
  224    411   
    fn name(&self) -> &'static str {
  225    412   
        "StopServiceDeploymentEndpointParamsInterceptor"
  226    413   
    }
  227    414   

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

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

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

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

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

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

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

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

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

@@ -1,1 +96,140 @@
   21     21   
static STOPTASKOUTPUT_MEMBER_TASK: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   22     22   
    ::aws_smithy_schema::ShapeId::from_static(
   23     23   
        "com.amazonaws.ecs.synthetic#StopTaskOutput$task",
   24     24   
        "com.amazonaws.ecs.synthetic",
   25     25   
        "StopTaskOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28     28   
    "task",
   29     29   
    0,
   30     30   
);
          31  +
static STOPTASKOUTPUT_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 STOPTASKOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    STOPTASKOUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&STOPTASKOUTPUT_MEMBER_TASK],
          41  +
    &[&STOPTASKOUTPUT_MEMBER_TASK, &STOPTASKOUTPUT_MEMBER__REQUEST_ID],
   35     42   
);
   36     43   
impl StopTaskOutput {
   37     44   
    /// The schema for this shape.
   38     45   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STOPTASKOUTPUT_SCHEMA;
   39     46   
}
   40     47   
impl ::aws_smithy_schema::serde::SerializableStruct for StopTaskOutput {
   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 {
   47     54   
            ser.write_struct(&STOPTASKOUTPUT_MEMBER_TASK, val)?;
   48     55   
        }
   49     56   
        Ok(())
   50     57   
    }
   51     58   
}
   52     59   
impl StopTaskOutput {
   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(&STOPTASKOUTPUT_SCHEMA, (), |_, member, deser| {
          73  +
        deserializer.read_struct(&STOPTASKOUTPUT_SCHEMA, &mut |member, deser| {
          74  +
            match member.member_index() {
          75  +
                Some(0) => {
          76  +
                    builder.task = Some(crate::types::Task::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 StopTaskOutput {
          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(&STOPTASKOUTPUT_SCHEMA, &mut |member, deser| {
   67    111   
            match member.member_index() {
   68    112   
                Some(0) => {
   69    113   
                    builder.task = Some(crate::types::Task::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/submit_attachment_state_changes.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 `SubmitAttachmentStateChanges`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct SubmitAttachmentStateChanges;
    6      6   
impl SubmitAttachmentStateChanges {
    7      7   
    /// Creates a new `SubmitAttachmentStateChanges`
    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::submit_attachment_state_changes::SubmitAttachmentStateChangesInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesOutput::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::submit_attachment_state_changes::SubmitAttachmentStateChangesInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -121,127 +247,364 @@
  141    147   
        ::std::borrow::Cow::Owned(rcb)
  142    148   
    }
  143    149   
}
  144    150   
  145    151   
#[derive(Debug)]
  146    152   
struct SubmitAttachmentStateChangesResponseDeserializer;
  147    153   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for SubmitAttachmentStateChangesResponseDeserializer {
  148    154   
    fn deserialize_nonstreaming(
  149    155   
        &self,
  150    156   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         157  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    158   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    159   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    160   
        #[allow(unused_mut)]
  156    161   
        let mut force_error = false;
  157    162   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_submit_attachment_state_changes::de_submit_attachment_state_changes_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::submit_attachment_state_changes::SubmitAttachmentStateChangesError::unhandled(generic),
         178  +
                        ),
         179  +
                    ))
         180  +
                }
         181  +
            };
         182  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         183  +
            let protocol = _cfg
         184  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         185  +
                .expect("a SharedClientProtocol is required");
         186  +
            let err = match error_code {
         187  +
                "AccessDeniedException" => {
         188  +
                    crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesError::AccessDeniedException({
         189  +
                        let mut tmp = match protocol
         190  +
                            .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         191  +
                            .and_then(|mut deser| {
         192  +
                                crate::types::error::AccessDeniedException::deserialize_with_response(
         193  +
                                    &mut *deser,
         194  +
                                    response.headers(),
         195  +
                                    response.status().into(),
         196  +
                                    body,
         197  +
                                )
         198  +
                            }) {
         199  +
                            ::std::result::Result::Ok(val) => val,
         200  +
                            ::std::result::Result::Err(e) => {
         201  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         202  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         203  +
                                ))
         204  +
                            }
         205  +
                        };
         206  +
                        tmp.meta = generic;
         207  +
                        if tmp.message.is_none() {
         208  +
                            tmp.message = _error_message;
         209  +
                        }
         210  +
                        tmp
         211  +
                    })
         212  +
                }
         213  +
                "ClientException" => crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesError::ClientException({
         214  +
                    let mut tmp = match protocol
         215  +
                        .deserialize_response(response, crate::types::error::ClientException::SCHEMA, _cfg)
         216  +
                        .and_then(|mut deser| {
         217  +
                            crate::types::error::ClientException::deserialize_with_response(
         218  +
                                &mut *deser,
         219  +
                                response.headers(),
         220  +
                                response.status().into(),
         221  +
                                body,
         222  +
                            )
         223  +
                        }) {
         224  +
                        ::std::result::Result::Ok(val) => val,
         225  +
                        ::std::result::Result::Err(e) => {
         226  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         227  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         228  +
                            ))
         229  +
                        }
         230  +
                    };
         231  +
                    tmp.meta = generic;
         232  +
                    if tmp.message.is_none() {
         233  +
                        tmp.message = _error_message;
         234  +
                    }
         235  +
                    tmp
         236  +
                }),
         237  +
                "InvalidParameterException" => {
         238  +
                    crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesError::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::submit_attachment_state_changes::SubmitAttachmentStateChangesError::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::submit_attachment_state_changes::SubmitAttachmentStateChangesError::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_submit_attachment_state_changes::de_submit_attachment_state_changes_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, SubmitAttachmentStateChanges::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::submit_attachment_state_changes::SubmitAttachmentStateChangesOutput::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 SubmitAttachmentStateChangesRequestSerializer;
  168    317   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for SubmitAttachmentStateChangesRequestSerializer {
  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::submit_attachment_state_changes::SubmitAttachmentStateChangesInput>()
  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::submit_attachment_state_changes::SubmitAttachmentStateChangesInput,
  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::submit_attachment_state_changes::SubmitAttachmentStateChangesInput,
  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.SubmitAttachmentStateChanges",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  211         -
            crate::protocol_serde::shape_submit_attachment_state_changes::ser_submit_attachment_state_changes_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, SubmitAttachmentStateChanges::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 SubmitAttachmentStateChangesEndpointParamsInterceptor;
  222    339   
  223    340   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SubmitAttachmentStateChangesEndpointParamsInterceptor {
  224    341   
    fn name(&self) -> &'static str {
  225    342   
        "SubmitAttachmentStateChangesEndpointParamsInterceptor"
  226    343   
    }
  227    344   

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

@@ -55,55 +153,162 @@
   75     75   
                    }
   76     76   
                    Ok(())
   77     77   
                },
   78     78   
            )?;
   79     79   
        }
   80     80   
        Ok(())
   81     81   
    }
   82     82   
}
   83     83   
impl SubmitAttachmentStateChangesInput {
   84     84   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   85         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   86         -
        deserializer: &mut D,
          85  +
    pub fn deserialize(
          86  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   87     87   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   88     88   
        #[allow(unused_variables, unused_mut)]
   89     89   
        let mut builder = Self::builder();
   90     90   
        #[allow(
   91     91   
            unused_variables,
   92     92   
            unreachable_code,
   93     93   
            clippy::single_match,
   94     94   
            clippy::match_single_binding,
   95     95   
            clippy::diverging_sub_expression
   96     96   
        )]
   97         -
        deserializer.read_struct(&SUBMITATTACHMENTSTATECHANGESINPUT_SCHEMA, (), |_, member, deser| {
          97  +
        deserializer.read_struct(&SUBMITATTACHMENTSTATECHANGESINPUT_SCHEMA, &mut |member, deser| {
   98     98   
            match member.member_index() {
   99     99   
                Some(0) => {
  100    100   
                    builder.cluster = Some(deser.read_string(member)?);
  101    101   
                }
  102    102   
                Some(1) => {
  103    103   
                    builder.attachments = Some({
  104         -
                        let container = if let Some(cap) = deser.container_size() {
  105         -
                            Vec::with_capacity(cap)
  106         -
                        } else {
  107         -
                            Vec::new()
  108         -
                        };
  109         -
                        deser.read_list(member, container, |mut list, deser| {
  110         -
                            list.push(crate::types::AttachmentStateChange::deserialize(deser)?);
  111         -
                            Ok(list)
  112         -
                        })?
         104  +
                        let mut container = Vec::new();
         105  +
                        deser.read_list(member, &mut |deser| {
         106  +
                            container.push(crate::types::AttachmentStateChange::deserialize(deser)?);
         107  +
                            Ok(())
         108  +
                        })?;
         109  +
                        container
  113    110   
                    });
  114    111   
                }
  115    112   
                _ => {}
  116    113   
            }
  117    114   
            Ok(())
  118    115   
        })?;
         116  +
        builder.attachments = builder.attachments.or(Some(Vec::new()));
  119    117   
        builder
  120    118   
            .build()
  121    119   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  122    120   
    }
  123    121   
}
         122  +
impl SubmitAttachmentStateChangesInput {
         123  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         124  +
    pub fn deserialize_with_response(
         125  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         126  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         127  +
        _status: u16,
         128  +
        _body: &[u8],
         129  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         130  +
        Self::deserialize(deserializer)
         131  +
    }
         132  +
}
  124    133   
impl SubmitAttachmentStateChangesInput {
  125    134   
    /// Creates a new builder-style object to manufacture [`SubmitAttachmentStateChangesInput`](crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesInput).
  126    135   
    pub fn builder() -> crate::operation::submit_attachment_state_changes::builders::SubmitAttachmentStateChangesInputBuilder {
  127    136   
        crate::operation::submit_attachment_state_changes::builders::SubmitAttachmentStateChangesInputBuilder::default()
  128    137   
    }
  129    138   
}
  130    139   
  131    140   
/// A builder for [`SubmitAttachmentStateChangesInput`](crate::operation::submit_attachment_state_changes::SubmitAttachmentStateChangesInput).
  132    141   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  133    142   
#[non_exhaustive]

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

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

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