AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12

Files changed:

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

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

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

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

@@ -1,1 +96,143 @@
   18     18   
    "com.amazonaws.ecs.synthetic",
   19     19   
    "UpdateCapacityProviderOutput",
   20     20   
);
   21     21   
static UPDATECAPACITYPROVIDEROUTPUT_MEMBER_CAPACITY_PROVIDER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   22     22   
    ::aws_smithy_schema::ShapeId::from_static(
   23     23   
        "com.amazonaws.ecs.synthetic#UpdateCapacityProviderOutput$capacityProvider",
   24     24   
        "com.amazonaws.ecs.synthetic",
   25     25   
        "UpdateCapacityProviderOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28         -
    "capacity_provider",
          28  +
    "capacityProvider",
   29     29   
    0,
   30     30   
);
          31  +
static UPDATECAPACITYPROVIDEROUTPUT_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 UPDATECAPACITYPROVIDEROUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    UPDATECAPACITYPROVIDEROUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&UPDATECAPACITYPROVIDEROUTPUT_MEMBER_CAPACITY_PROVIDER],
          41  +
    &[
          42  +
        &UPDATECAPACITYPROVIDEROUTPUT_MEMBER_CAPACITY_PROVIDER,
          43  +
        &UPDATECAPACITYPROVIDEROUTPUT_MEMBER__REQUEST_ID,
          44  +
    ],
   35     45   
);
   36     46   
impl UpdateCapacityProviderOutput {
   37     47   
    /// The schema for this shape.
   38     48   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATECAPACITYPROVIDEROUTPUT_SCHEMA;
   39     49   
}
   40     50   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateCapacityProviderOutput {
   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.capacity_provider {
   47     57   
            ser.write_struct(&UPDATECAPACITYPROVIDEROUTPUT_MEMBER_CAPACITY_PROVIDER, val)?;
   48     58   
        }
   49     59   
        Ok(())
   50     60   
    }
   51     61   
}
   52     62   
impl UpdateCapacityProviderOutput {
   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(&UPDATECAPACITYPROVIDEROUTPUT_SCHEMA, (), |_, member, deser| {
          76  +
        deserializer.read_struct(&UPDATECAPACITYPROVIDEROUTPUT_SCHEMA, &mut |member, deser| {
          77  +
            match member.member_index() {
          78  +
                Some(0) => {
          79  +
                    builder.capacity_provider = Some(crate::types::CapacityProvider::deserialize(deser)?);
          80  +
                }
          81  +
                Some(1) => {
          82  +
                    builder._request_id = Some(deser.read_string(member)?);
          83  +
                }
          84  +
                _ => {}
          85  +
            }
          86  +
            Ok(())
          87  +
        })?;
          88  +
        Ok(builder.build())
          89  +
    }
          90  +
}
          91  +
impl UpdateCapacityProviderOutput {
          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(&UPDATECAPACITYPROVIDEROUTPUT_SCHEMA, &mut |member, deser| {
   67    114   
            match member.member_index() {
   68    115   
                Some(0) => {
   69    116   
                    builder.capacity_provider = Some(crate::types::CapacityProvider::deserialize(deser)?);
   70    117   
                }
   71    118   
                _ => {}
   72    119   
            }
   73    120   
            Ok(())
   74    121   
        })?;
   75    122   
        Ok(builder.build())
   76    123   
    }

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

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

@@ -49,49 +201,210 @@
   69     69   
    "configuration",
   70     70   
    2,
   71     71   
);
   72     72   
static UPDATECLUSTERINPUT_MEMBER_SERVICE_CONNECT_DEFAULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.ecs.synthetic#UpdateClusterInput$serviceConnectDefaults",
   75     75   
        "com.amazonaws.ecs.synthetic",
   76     76   
        "UpdateClusterInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::Structure,
   79         -
    "service_connect_defaults",
          79  +
    "serviceConnectDefaults",
   80     80   
    3,
   81     81   
);
   82     82   
static UPDATECLUSTERINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   83     83   
    UPDATECLUSTERINPUT_SCHEMA_ID,
   84     84   
    ::aws_smithy_schema::ShapeType::Structure,
   85     85   
    &[
   86     86   
        &UPDATECLUSTERINPUT_MEMBER_CLUSTER,
   87     87   
        &UPDATECLUSTERINPUT_MEMBER_SETTINGS,
   88     88   
        &UPDATECLUSTERINPUT_MEMBER_CONFIGURATION,
   89     89   
        &UPDATECLUSTERINPUT_MEMBER_SERVICE_CONNECT_DEFAULTS,
   90     90   
    ],
   91     91   
);
   92     92   
impl UpdateClusterInput {
   93     93   
    /// The schema for this shape.
   94     94   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATECLUSTERINPUT_SCHEMA;
   95     95   
}
   96     96   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateClusterInput {
   97     97   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   98     98   
    fn serialize_members(
   99     99   
        &self,
  100    100   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  101    101   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  102    102   
        if let Some(ref val) = self.cluster {
  103    103   
            ser.write_string(&UPDATECLUSTERINPUT_MEMBER_CLUSTER, val)?;
  104    104   
        }
  105    105   
        if let Some(ref val) = self.settings {
  106    106   
            ser.write_list(
  107    107   
                &UPDATECLUSTERINPUT_MEMBER_SETTINGS,
  108    108   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  109    109   
                    for item in val {
  110    110   
                        ser.write_struct(crate::types::ClusterSetting::SCHEMA, item)?;
  111    111   
                    }
  112    112   
                    Ok(())
  113    113   
                },
  114    114   
            )?;
  115    115   
        }
  116    116   
        if let Some(ref val) = self.configuration {
  117    117   
            ser.write_struct(&UPDATECLUSTERINPUT_MEMBER_CONFIGURATION, val)?;
  118    118   
        }
  119    119   
        if let Some(ref val) = self.service_connect_defaults {
  120    120   
            ser.write_struct(&UPDATECLUSTERINPUT_MEMBER_SERVICE_CONNECT_DEFAULTS, val)?;
  121    121   
        }
  122    122   
        Ok(())
  123    123   
    }
  124    124   
}
  125    125   
impl UpdateClusterInput {
  126    126   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  127         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  128         -
        deserializer: &mut D,
         127  +
    pub fn deserialize(
         128  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  129    129   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  130    130   
        #[allow(unused_variables, unused_mut)]
  131    131   
        let mut builder = Self::builder();
  132    132   
        #[allow(
  133    133   
            unused_variables,
  134    134   
            unreachable_code,
  135    135   
            clippy::single_match,
  136    136   
            clippy::match_single_binding,
  137    137   
            clippy::diverging_sub_expression
  138    138   
        )]
  139         -
        deserializer.read_struct(&UPDATECLUSTERINPUT_SCHEMA, (), |_, member, deser| {
         139  +
        deserializer.read_struct(&UPDATECLUSTERINPUT_SCHEMA, &mut |member, deser| {
  140    140   
            match member.member_index() {
  141    141   
                Some(0) => {
  142    142   
                    builder.cluster = Some(deser.read_string(member)?);
  143    143   
                }
  144    144   
                Some(1) => {
  145    145   
                    builder.settings = Some({
  146         -
                        let container = if let Some(cap) = deser.container_size() {
  147         -
                            Vec::with_capacity(cap)
  148         -
                        } else {
  149         -
                            Vec::new()
  150         -
                        };
  151         -
                        deser.read_list(member, container, |mut list, deser| {
  152         -
                            list.push(crate::types::ClusterSetting::deserialize(deser)?);
  153         -
                            Ok(list)
  154         -
                        })?
         146  +
                        let mut container = Vec::new();
         147  +
                        deser.read_list(member, &mut |deser| {
         148  +
                            container.push(crate::types::ClusterSetting::deserialize(deser)?);
         149  +
                            Ok(())
         150  +
                        })?;
         151  +
                        container
  155    152   
                    });
  156    153   
                }
  157    154   
                Some(2) => {
  158    155   
                    builder.configuration = Some(crate::types::ClusterConfiguration::deserialize(deser)?);
  159    156   
                }
  160    157   
                Some(3) => {
  161    158   
                    builder.service_connect_defaults = Some(crate::types::ClusterServiceConnectDefaultsRequest::deserialize(deser)?);
  162    159   
                }
  163    160   
                _ => {}
  164    161   
            }
  165    162   
            Ok(())
  166    163   
        })?;
         164  +
        builder.cluster = builder.cluster.or(Some(String::new()));
  167    165   
        builder
  168    166   
            .build()
  169    167   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  170    168   
    }
  171    169   
}
         170  +
impl UpdateClusterInput {
         171  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         172  +
    pub fn deserialize_with_response(
         173  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         174  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         175  +
        _status: u16,
         176  +
        _body: &[u8],
         177  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         178  +
        Self::deserialize(deserializer)
         179  +
    }
         180  +
}
  172    181   
impl UpdateClusterInput {
  173    182   
    /// Creates a new builder-style object to manufacture [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
  174    183   
    pub fn builder() -> crate::operation::update_cluster::builders::UpdateClusterInputBuilder {
  175    184   
        crate::operation::update_cluster::builders::UpdateClusterInputBuilder::default()
  176    185   
    }
  177    186   
}
  178    187   
  179    188   
/// A builder for [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
  180    189   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  181    190   
#[non_exhaustive]

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

@@ -1,1 +96,140 @@
   21     21   
static UPDATECLUSTEROUTPUT_MEMBER_CLUSTER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   22     22   
    ::aws_smithy_schema::ShapeId::from_static(
   23     23   
        "com.amazonaws.ecs.synthetic#UpdateClusterOutput$cluster",
   24     24   
        "com.amazonaws.ecs.synthetic",
   25     25   
        "UpdateClusterOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28     28   
    "cluster",
   29     29   
    0,
   30     30   
);
          31  +
static UPDATECLUSTEROUTPUT_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 UPDATECLUSTEROUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    UPDATECLUSTEROUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&UPDATECLUSTEROUTPUT_MEMBER_CLUSTER],
          41  +
    &[&UPDATECLUSTEROUTPUT_MEMBER_CLUSTER, &UPDATECLUSTEROUTPUT_MEMBER__REQUEST_ID],
   35     42   
);
   36     43   
impl UpdateClusterOutput {
   37     44   
    /// The schema for this shape.
   38     45   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATECLUSTEROUTPUT_SCHEMA;
   39     46   
}
   40     47   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateClusterOutput {
   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.cluster {
   47     54   
            ser.write_struct(&UPDATECLUSTEROUTPUT_MEMBER_CLUSTER, val)?;
   48     55   
        }
   49     56   
        Ok(())
   50     57   
    }
   51     58   
}
   52     59   
impl UpdateClusterOutput {
   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(&UPDATECLUSTEROUTPUT_SCHEMA, (), |_, member, deser| {
          73  +
        deserializer.read_struct(&UPDATECLUSTEROUTPUT_SCHEMA, &mut |member, deser| {
          74  +
            match member.member_index() {
          75  +
                Some(0) => {
          76  +
                    builder.cluster = Some(crate::types::Cluster::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 UpdateClusterOutput {
          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(&UPDATECLUSTEROUTPUT_SCHEMA, &mut |member, deser| {
   67    111   
            match member.member_index() {
   68    112   
                Some(0) => {
   69    113   
                    builder.cluster = Some(crate::types::Cluster::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/update_cluster_settings.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 `UpdateClusterSettings`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct UpdateClusterSettings;
    6      6   
impl UpdateClusterSettings {
    7      7   
    /// Creates a new `UpdateClusterSettings`
    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::update_cluster_settings::UpdateClusterSettingsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_cluster_settings::UpdateClusterSettingsOutput::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::update_cluster_settings::UpdateClusterSettingsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::update_cluster_settings::UpdateClusterSettingsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::update_cluster_settings::UpdateClusterSettingsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +247,358 @@
  138    142   
                crate::operation::update_cluster_settings::UpdateClusterSettingsError,
  139    143   
            >::new());
  140    144   
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct UpdateClusterSettingsResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateClusterSettingsResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_update_cluster_settings::de_update_cluster_settings_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::update_cluster_settings::UpdateClusterSettingsError::unhandled(generic),
         176  +
                        ),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "ClientException" => crate::operation::update_cluster_settings::UpdateClusterSettingsError::ClientException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::ClientException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::ClientException::deserialize_with_response(
         190  +
                                &mut *deser,
         191  +
                                response.headers(),
         192  +
                                response.status().into(),
         193  +
                                body,
         194  +
                            )
         195  +
                        }) {
         196  +
                        ::std::result::Result::Ok(val) => val,
         197  +
                        ::std::result::Result::Err(e) => {
         198  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         199  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         200  +
                            ))
         201  +
                        }
         202  +
                    };
         203  +
                    tmp.meta = generic;
         204  +
                    if tmp.message.is_none() {
         205  +
                        tmp.message = _error_message;
         206  +
                    }
         207  +
                    tmp
         208  +
                }),
         209  +
                "ClusterNotFoundException" => crate::operation::update_cluster_settings::UpdateClusterSettingsError::ClusterNotFoundException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::ClusterNotFoundException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::ClusterNotFoundException::deserialize_with_response(
         214  +
                                &mut *deser,
         215  +
                                response.headers(),
         216  +
                                response.status().into(),
         217  +
                                body,
         218  +
                            )
         219  +
                        }) {
         220  +
                        ::std::result::Result::Ok(val) => val,
         221  +
                        ::std::result::Result::Err(e) => {
         222  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         223  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         224  +
                            ))
         225  +
                        }
         226  +
                    };
         227  +
                    tmp.meta = generic;
         228  +
                    if tmp.message.is_none() {
         229  +
                        tmp.message = _error_message;
         230  +
                    }
         231  +
                    tmp
         232  +
                }),
         233  +
                "InvalidParameterException" => crate::operation::update_cluster_settings::UpdateClusterSettingsError::InvalidParameterException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         238  +
                                &mut *deser,
         239  +
                                response.headers(),
         240  +
                                response.status().into(),
         241  +
                                body,
         242  +
                            )
         243  +
                        }) {
         244  +
                        ::std::result::Result::Ok(val) => val,
         245  +
                        ::std::result::Result::Err(e) => {
         246  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         247  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         248  +
                            ))
         249  +
                        }
         250  +
                    };
         251  +
                    tmp.meta = generic;
         252  +
                    if tmp.message.is_none() {
         253  +
                        tmp.message = _error_message;
         254  +
                    }
         255  +
                    tmp
         256  +
                }),
         257  +
                "ServerException" => crate::operation::update_cluster_settings::UpdateClusterSettingsError::ServerException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::ServerException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::ServerException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    if tmp.message.is_none() {
         277  +
                        tmp.message = _error_message;
         278  +
                    }
         279  +
                    tmp
         280  +
                }),
         281  +
                _ => crate::operation::update_cluster_settings::UpdateClusterSettingsError::generic(generic),
         282  +
            };
         283  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         284  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         285  +
            ))
  160    286   
        } else {
  161         -
            crate::protocol_serde::shape_update_cluster_settings::de_update_cluster_settings_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         287  +
            let protocol = _cfg
         288  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         289  +
                .expect("a SharedClientProtocol is required");
         290  +
            let mut deser = protocol
         291  +
                .deserialize_response(response, UpdateClusterSettings::OUTPUT_SCHEMA, _cfg)
         292  +
                .map_err(|e| {
         293  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         294  +
                })?;
         295  +
            let body = response.body().bytes().expect("body loaded");
         296  +
            let output = crate::operation::update_cluster_settings::UpdateClusterSettingsOutput::deserialize_with_response(
         297  +
                &mut *deser,
         298  +
                response.headers(),
         299  +
                response.status().into(),
         300  +
                body,
         301  +
            )
         302  +
            .map_err(|e| {
         303  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         304  +
            })?;
         305  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         306  +
        }
  164    307   
    }
  165    308   
}
  166    309   
#[derive(Debug)]
  167    310   
struct UpdateClusterSettingsRequestSerializer;
  168    311   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateClusterSettingsRequestSerializer {
  169    312   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    313   
    fn serialize_input(
  171    314   
        &self,
  172    315   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    316   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    317   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    318   
        let input = input
  176    319   
            .downcast::<crate::operation::update_cluster_settings::UpdateClusterSettingsInput>()
  177    320   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::update_cluster_settings::UpdateClusterSettingsInput,
  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::update_cluster_settings::UpdateClusterSettingsInput,
  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.UpdateClusterSettings",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_cluster_settings::ser_update_cluster_settings_input(
  211         -
            &input,
  212         -
        )?);
  213         -
        if let Some(content_length) = body.content_length() {
  214         -
            let content_length = content_length.to_string();
  215         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  216         -
        }
  217         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         321  +
        let protocol = _cfg
         322  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         323  +
            .expect("a SharedClientProtocol is required");
         324  +
        let mut request = protocol
         325  +
            .serialize_request(&input, UpdateClusterSettings::INPUT_SCHEMA, "", _cfg)
         326  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         327  +
         328  +
        return ::std::result::Result::Ok(request);
  218    329   
    }
  219    330   
}
  220    331   
#[derive(Debug)]
  221    332   
struct UpdateClusterSettingsEndpointParamsInterceptor;
  222    333   
  223    334   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateClusterSettingsEndpointParamsInterceptor {
  224    335   
    fn name(&self) -> &'static str {
  225    336   
        "UpdateClusterSettingsEndpointParamsInterceptor"
  226    337   
    }
  227    338   

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

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

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

@@ -1,1 +96,143 @@
   21     21   
static UPDATECLUSTERSETTINGSOUTPUT_MEMBER_CLUSTER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   22     22   
    ::aws_smithy_schema::ShapeId::from_static(
   23     23   
        "com.amazonaws.ecs.synthetic#UpdateClusterSettingsOutput$cluster",
   24     24   
        "com.amazonaws.ecs.synthetic",
   25     25   
        "UpdateClusterSettingsOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28     28   
    "cluster",
   29     29   
    0,
   30     30   
);
          31  +
static UPDATECLUSTERSETTINGSOUTPUT_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 UPDATECLUSTERSETTINGSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    UPDATECLUSTERSETTINGSOUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&UPDATECLUSTERSETTINGSOUTPUT_MEMBER_CLUSTER],
          41  +
    &[
          42  +
        &UPDATECLUSTERSETTINGSOUTPUT_MEMBER_CLUSTER,
          43  +
        &UPDATECLUSTERSETTINGSOUTPUT_MEMBER__REQUEST_ID,
          44  +
    ],
   35     45   
);
   36     46   
impl UpdateClusterSettingsOutput {
   37     47   
    /// The schema for this shape.
   38     48   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATECLUSTERSETTINGSOUTPUT_SCHEMA;
   39     49   
}
   40     50   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateClusterSettingsOutput {
   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.cluster {
   47     57   
            ser.write_struct(&UPDATECLUSTERSETTINGSOUTPUT_MEMBER_CLUSTER, val)?;
   48     58   
        }
   49     59   
        Ok(())
   50     60   
    }
   51     61   
}
   52     62   
impl UpdateClusterSettingsOutput {
   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(&UPDATECLUSTERSETTINGSOUTPUT_SCHEMA, (), |_, member, deser| {
          76  +
        deserializer.read_struct(&UPDATECLUSTERSETTINGSOUTPUT_SCHEMA, &mut |member, deser| {
          77  +
            match member.member_index() {
          78  +
                Some(0) => {
          79  +
                    builder.cluster = Some(crate::types::Cluster::deserialize(deser)?);
          80  +
                }
          81  +
                Some(1) => {
          82  +
                    builder._request_id = Some(deser.read_string(member)?);
          83  +
                }
          84  +
                _ => {}
          85  +
            }
          86  +
            Ok(())
          87  +
        })?;
          88  +
        Ok(builder.build())
          89  +
    }
          90  +
}
          91  +
impl UpdateClusterSettingsOutput {
          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(&UPDATECLUSTERSETTINGSOUTPUT_SCHEMA, &mut |member, deser| {
   67    114   
            match member.member_index() {
   68    115   
                Some(0) => {
   69    116   
                    builder.cluster = Some(crate::types::Cluster::deserialize(deser)?);
   70    117   
                }
   71    118   
                _ => {}
   72    119   
            }
   73    120   
            Ok(())
   74    121   
        })?;
   75    122   
        Ok(builder.build())
   76    123   
    }

tmp-codegen-diff/aws-sdk/sdk/ecs/src/operation/update_container_agent.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 `UpdateContainerAgent`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct UpdateContainerAgent;
    6      6   
impl UpdateContainerAgent {
    7      7   
    /// Creates a new `UpdateContainerAgent`
    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::update_container_agent::UpdateContainerAgentInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_container_agent::UpdateContainerAgentOutput::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::update_container_agent::UpdateContainerAgentInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::update_container_agent::UpdateContainerAgentOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::update_container_agent::UpdateContainerAgentError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +247,430 @@
  138    142   
                crate::operation::update_container_agent::UpdateContainerAgentError,
  139    143   
            >::new());
  140    144   
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct UpdateContainerAgentResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateContainerAgentResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_update_container_agent::de_update_container_agent_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::update_container_agent::UpdateContainerAgentError::unhandled(generic),
         176  +
                        ),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "ClientException" => crate::operation::update_container_agent::UpdateContainerAgentError::ClientException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::ClientException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::ClientException::deserialize_with_response(
         190  +
                                &mut *deser,
         191  +
                                response.headers(),
         192  +
                                response.status().into(),
         193  +
                                body,
         194  +
                            )
         195  +
                        }) {
         196  +
                        ::std::result::Result::Ok(val) => val,
         197  +
                        ::std::result::Result::Err(e) => {
         198  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         199  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         200  +
                            ))
         201  +
                        }
         202  +
                    };
         203  +
                    tmp.meta = generic;
         204  +
                    if tmp.message.is_none() {
         205  +
                        tmp.message = _error_message;
         206  +
                    }
         207  +
                    tmp
         208  +
                }),
         209  +
                "ClusterNotFoundException" => crate::operation::update_container_agent::UpdateContainerAgentError::ClusterNotFoundException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::ClusterNotFoundException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::ClusterNotFoundException::deserialize_with_response(
         214  +
                                &mut *deser,
         215  +
                                response.headers(),
         216  +
                                response.status().into(),
         217  +
                                body,
         218  +
                            )
         219  +
                        }) {
         220  +
                        ::std::result::Result::Ok(val) => val,
         221  +
                        ::std::result::Result::Err(e) => {
         222  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         223  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         224  +
                            ))
         225  +
                        }
         226  +
                    };
         227  +
                    tmp.meta = generic;
         228  +
                    if tmp.message.is_none() {
         229  +
                        tmp.message = _error_message;
         230  +
                    }
         231  +
                    tmp
         232  +
                }),
         233  +
                "InvalidParameterException" => crate::operation::update_container_agent::UpdateContainerAgentError::InvalidParameterException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         238  +
                                &mut *deser,
         239  +
                                response.headers(),
         240  +
                                response.status().into(),
         241  +
                                body,
         242  +
                            )
         243  +
                        }) {
         244  +
                        ::std::result::Result::Ok(val) => val,
         245  +
                        ::std::result::Result::Err(e) => {
         246  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         247  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         248  +
                            ))
         249  +
                        }
         250  +
                    };
         251  +
                    tmp.meta = generic;
         252  +
                    if tmp.message.is_none() {
         253  +
                        tmp.message = _error_message;
         254  +
                    }
         255  +
                    tmp
         256  +
                }),
         257  +
                "MissingVersionException" => crate::operation::update_container_agent::UpdateContainerAgentError::MissingVersionException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::MissingVersionException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::MissingVersionException::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  +
                "NoUpdateAvailableException" => crate::operation::update_container_agent::UpdateContainerAgentError::NoUpdateAvailableException({
         282  +
                    let mut tmp = match protocol
         283  +
                        .deserialize_response(response, crate::types::error::NoUpdateAvailableException::SCHEMA, _cfg)
         284  +
                        .and_then(|mut deser| {
         285  +
                            crate::types::error::NoUpdateAvailableException::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  +
                "ServerException" => crate::operation::update_container_agent::UpdateContainerAgentError::ServerException({
         306  +
                    let mut tmp = match protocol
         307  +
                        .deserialize_response(response, crate::types::error::ServerException::SCHEMA, _cfg)
         308  +
                        .and_then(|mut deser| {
         309  +
                            crate::types::error::ServerException::deserialize_with_response(
         310  +
                                &mut *deser,
         311  +
                                response.headers(),
         312  +
                                response.status().into(),
         313  +
                                body,
         314  +
                            )
         315  +
                        }) {
         316  +
                        ::std::result::Result::Ok(val) => val,
         317  +
                        ::std::result::Result::Err(e) => {
         318  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         319  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         320  +
                            ))
         321  +
                        }
         322  +
                    };
         323  +
                    tmp.meta = generic;
         324  +
                    if tmp.message.is_none() {
         325  +
                        tmp.message = _error_message;
         326  +
                    }
         327  +
                    tmp
         328  +
                }),
         329  +
                "UpdateInProgressException" => crate::operation::update_container_agent::UpdateContainerAgentError::UpdateInProgressException({
         330  +
                    let mut tmp = match protocol
         331  +
                        .deserialize_response(response, crate::types::error::UpdateInProgressException::SCHEMA, _cfg)
         332  +
                        .and_then(|mut deser| {
         333  +
                            crate::types::error::UpdateInProgressException::deserialize_with_response(
         334  +
                                &mut *deser,
         335  +
                                response.headers(),
         336  +
                                response.status().into(),
         337  +
                                body,
         338  +
                            )
         339  +
                        }) {
         340  +
                        ::std::result::Result::Ok(val) => val,
         341  +
                        ::std::result::Result::Err(e) => {
         342  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         343  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         344  +
                            ))
         345  +
                        }
         346  +
                    };
         347  +
                    tmp.meta = generic;
         348  +
                    if tmp.message.is_none() {
         349  +
                        tmp.message = _error_message;
         350  +
                    }
         351  +
                    tmp
         352  +
                }),
         353  +
                _ => crate::operation::update_container_agent::UpdateContainerAgentError::generic(generic),
         354  +
            };
         355  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         356  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         357  +
            ))
  160    358   
        } else {
  161         -
            crate::protocol_serde::shape_update_container_agent::de_update_container_agent_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         359  +
            let protocol = _cfg
         360  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         361  +
                .expect("a SharedClientProtocol is required");
         362  +
            let mut deser = protocol
         363  +
                .deserialize_response(response, UpdateContainerAgent::OUTPUT_SCHEMA, _cfg)
         364  +
                .map_err(|e| {
         365  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         366  +
                })?;
         367  +
            let body = response.body().bytes().expect("body loaded");
         368  +
            let output = crate::operation::update_container_agent::UpdateContainerAgentOutput::deserialize_with_response(
         369  +
                &mut *deser,
         370  +
                response.headers(),
         371  +
                response.status().into(),
         372  +
                body,
         373  +
            )
         374  +
            .map_err(|e| {
         375  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         376  +
            })?;
         377  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         378  +
        }
  164    379   
    }
  165    380   
}
  166    381   
#[derive(Debug)]
  167    382   
struct UpdateContainerAgentRequestSerializer;
  168    383   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateContainerAgentRequestSerializer {
  169    384   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    385   
    fn serialize_input(
  171    386   
        &self,
  172    387   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    388   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    389   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    390   
        let input = input
  176    391   
            .downcast::<crate::operation::update_container_agent::UpdateContainerAgentInput>()
  177    392   
            .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::update_container_agent::UpdateContainerAgentInput,
  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::update_container_agent::UpdateContainerAgentInput,
  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.UpdateContainerAgent",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_container_agent::ser_update_container_agent_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())
         393  +
        let protocol = _cfg
         394  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         395  +
            .expect("a SharedClientProtocol is required");
         396  +
        let mut request = protocol
         397  +
            .serialize_request(&input, UpdateContainerAgent::INPUT_SCHEMA, "", _cfg)
         398  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         399  +
         400  +
        return ::std::result::Result::Ok(request);
  218    401   
    }
  219    402   
}
  220    403   
#[derive(Debug)]
  221    404   
struct UpdateContainerAgentEndpointParamsInterceptor;
  222    405   
  223    406   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateContainerAgentEndpointParamsInterceptor {
  224    407   
    fn name(&self) -> &'static str {
  225    408   
        "UpdateContainerAgentEndpointParamsInterceptor"
  226    409   
    }
  227    410