AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ecs/Cargo.toml

@@ -15,15 +80,80 @@
   35     35   
path = "../aws-smithy-json"
   36     36   
version = "0.62.6"
   37     37   
   38     38   
[dependencies.aws-smithy-observability]
   39     39   
path = "../aws-smithy-observability"
   40     40   
version = "0.2.6"
   41     41   
   42     42   
[dependencies.aws-smithy-runtime]
   43     43   
path = "../aws-smithy-runtime"
   44     44   
features = ["client"]
   45         -
version = "1.10.3"
          45  +
version = "1.10.4"
   46     46   
   47     47   
[dependencies.aws-smithy-runtime-api]
   48     48   
path = "../aws-smithy-runtime-api"
   49     49   
features = ["client", "http-1x"]
   50         -
version = "1.11.6"
          50  +
version = "1.11.7"
   51     51   
   52     52   
[dependencies.aws-smithy-schema]
   53     53   
path = "../aws-smithy-schema"
   54     54   
version = "1.0.0"
   55     55   
   56     56   
[dependencies.aws-smithy-types]
   57     57   
path = "../aws-smithy-types"
   58     58   
features = ["http-body-1-x"]
   59     59   
version = "1.4.7"
   60     60   

tmp-codegen-diff/aws-sdk/sdk/ecs/src/config.rs

@@ -23,23 +82,86 @@
   43     43   
            config: self.cloneable.clone(),
   44     44   
            runtime_components: self.runtime_components.clone(),
   45     45   
            runtime_plugins: self.runtime_plugins.clone(),
   46     46   
            behavior_version: self.behavior_version,
   47     47   
        }
   48     48   
    }
   49     49   
    /// Return a reference to the stalled stream protection configuration contained in this config, if any.
   50     50   
    pub fn stalled_stream_protection(&self) -> ::std::option::Option<&crate::config::StalledStreamProtectionConfig> {
   51     51   
        self.config.load::<crate::config::StalledStreamProtectionConfig>()
   52     52   
    }
          53  +
    /// Returns the client protocol used for serialization and deserialization.
          54  +
    pub fn protocol(&self) -> ::std::option::Option<&::aws_smithy_schema::protocol::SharedClientProtocol> {
          55  +
        self.config.load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
          56  +
    }
   53     57   
    /// Return the [`SharedHttpClient`](crate::config::SharedHttpClient) to use when making requests, if any.
   54     58   
    pub fn http_client(&self) -> Option<crate::config::SharedHttpClient> {
   55     59   
        self.runtime_components.http_client()
   56     60   
    }
   57     61   
    /// Return the auth schemes configured on this service config
   58     62   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   59     63   
        self.runtime_components.auth_schemes()
   60     64   
    }
   61     65   
   62     66   
    /// Return the auth scheme resolver configured on this service config
@@ -153,157 +254,277 @@
  173    177   
    ///
  174    178   
    pub fn new() -> Self {
  175    179   
        Self::default()
  176    180   
    }
  177    181   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  178    182   
    /// but not those in runtime components.
  179    183   
    #[allow(unused)]
  180    184   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  181    185   
        let mut builder = Self::new();
  182    186   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         187  +
        if let ::std::option::Option::Some(protocol) = config_bag.load::<::aws_smithy_schema::protocol::SharedClientProtocol>().cloned() {
         188  +
            builder.set_protocol(::std::option::Option::Some(protocol));
         189  +
        }
  183    190   
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  184    191   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  185    192   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  186    193   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  187    194   
        builder.set_app_name(config_bag.load::<::aws_types::app_name::AppName>().cloned());
  188    195   
        builder.set_endpoint_url(config_bag.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()));
  189    196   
        builder.set_use_dual_stack(config_bag.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0));
  190    197   
        builder.set_use_fips(config_bag.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0));
  191    198   
        builder.set_region(config_bag.load::<crate::config::Region>().cloned());
  192    199   
        builder
  193    200   
    }
  194    201   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  195    202   
    /// to configure protection for stalled streams.
  196    203   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  197    204   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  198    205   
        self
  199    206   
    }
  200    207   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  201    208   
    /// to configure protection for stalled streams.
  202    209   
    pub fn set_stalled_stream_protection(
  203    210   
        &mut self,
  204    211   
        stalled_stream_protection_config: ::std::option::Option<crate::config::StalledStreamProtectionConfig>,
  205    212   
    ) -> &mut Self {
  206    213   
        self.config.store_or_unset(stalled_stream_protection_config);
  207    214   
        self
  208    215   
    }
  209    216   
    /// Sets the idempotency token provider to use for service calls that require tokens.
  210    217   
    pub fn idempotency_token_provider(
  211    218   
        mut self,
  212    219   
        idempotency_token_provider: impl ::std::convert::Into<crate::idempotency_token::IdempotencyTokenProvider>,
  213    220   
    ) -> Self {
  214    221   
        self.set_idempotency_token_provider(::std::option::Option::Some(idempotency_token_provider.into()));
  215    222   
        self
  216    223   
    }
  217    224   
    /// Sets the idempotency token provider to use for service calls that require tokens.
  218    225   
    pub fn set_idempotency_token_provider(
  219    226   
        &mut self,
  220    227   
        idempotency_token_provider: ::std::option::Option<crate::idempotency_token::IdempotencyTokenProvider>,
  221    228   
    ) -> &mut Self {
  222    229   
        self.config.store_or_unset(idempotency_token_provider);
  223    230   
        self
  224    231   
    }
         232  +
    /// Sets the client protocol to use for serialization and deserialization.
         233  +
    ///
         234  +
    /// This overrides the default protocol determined by the service model,
         235  +
    /// enabling runtime protocol selection.
         236  +
    pub fn protocol(mut self, protocol: impl ::aws_smithy_schema::protocol::ClientProtocol + 'static) -> Self {
         237  +
        self.set_protocol(::std::option::Option::Some(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         238  +
            protocol,
         239  +
        )));
         240  +
        self
         241  +
    }
         242  +
         243  +
    /// Sets the client protocol to use for serialization and deserialization.
         244  +
    pub fn set_protocol(&mut self, protocol: ::std::option::Option<::aws_smithy_schema::protocol::SharedClientProtocol>) -> &mut Self {
         245  +
        self.config.store_or_unset(protocol);
         246  +
        self
         247  +
    }
  225    248   
    /// Sets the HTTP client to use when making requests.
  226    249   
    ///
  227    250   
    /// # Examples
  228    251   
    /// ```no_run
  229    252   
    /// # #[cfg(test)]
  230    253   
    /// # mod tests {
  231    254   
    /// # #[test]
  232    255   
    /// # fn example() {
  233    256   
    /// use std::time::Duration;
  234    257   
    /// use aws_sdk_ecs::config::Config;
@@ -1290,1313 +1349,1377 @@
 1310   1333   
pub(crate) struct ServiceRuntimePlugin {
 1311   1334   
    config: ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer>,
 1312   1335   
    runtime_components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1313   1336   
}
 1314   1337   
 1315   1338   
impl ServiceRuntimePlugin {
 1316   1339   
    pub fn new(_service_config: crate::config::Config) -> Self {
 1317   1340   
        let config = {
 1318   1341   
            let mut cfg = ::aws_smithy_types::config_bag::Layer::new("AmazonEC2ContainerServiceV20141113");
 1319   1342   
            cfg.store_put(crate::idempotency_token::default_provider());
        1343  +
            if _service_config.protocol().is_none() {
        1344  +
                cfg.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
        1345  +
                    ::aws_smithy_json::protocol::aws_json_rpc::AwsJsonRpcProtocol::aws_json_1_1("AmazonEC2ContainerServiceV20141113"),
        1346  +
                ));
        1347  +
            }
 1320   1348   
            cfg.store_put(::aws_smithy_runtime::client::orchestrator::AuthSchemeAndEndpointOrchestrationV2);
 1321   1349   
            ::std::option::Option::Some(cfg.freeze())
 1322   1350   
        };
 1323   1351   
        let mut runtime_components = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ServiceRuntimePlugin");
 1324   1352   
        runtime_components.set_auth_scheme_option_resolver(::std::option::Option::Some({
 1325   1353   
            use crate::config::auth::ResolveAuthScheme;
 1326   1354   
            crate::config::auth::DefaultAuthSchemeResolver::default().into_shared_resolver()
 1327   1355   
        }));
 1328   1356   
        runtime_components.set_endpoint_resolver(::std::option::Option::Some({
 1329   1357   
            use crate::config::endpoint::ResolveEndpoint;
@@ -1425,1453 +1484,1515 @@
 1445   1473   
        }
 1446   1474   
        // resiliency
 1447   1475   
        builder.set_retry_config(input.retry_config().cloned());
 1448   1476   
        builder.set_timeout_config(input.timeout_config().cloned());
 1449   1477   
        builder.set_sleep_impl(input.sleep_impl());
 1450   1478   
 1451   1479   
        builder.set_http_client(input.http_client());
 1452   1480   
        builder.set_time_source(input.time_source());
 1453   1481   
        builder.set_behavior_version(input.behavior_version());
 1454   1482   
        builder.set_auth_scheme_preference(input.auth_scheme_preference().cloned());
        1483  +
        if let Some(protocol) = input.protocol() {
        1484  +
            builder.set_protocol(Some(protocol.clone()));
        1485  +
        }
 1455   1486   
        // setting `None` here removes the default
 1456   1487   
        if let Some(config) = input.stalled_stream_protection() {
 1457   1488   
            builder.set_stalled_stream_protection(Some(config));
 1458   1489   
        }
 1459   1490   
 1460   1491   
        if let Some(cache) = input.identity_cache() {
 1461   1492   
            builder.set_identity_cache(cache);
 1462   1493   
        }
 1463   1494   
        builder.set_app_name(input.app_name().cloned());
 1464   1495   

tmp-codegen-diff/aws-sdk/sdk/ecs/src/lib.rs

@@ -190,190 +236,232 @@
  210    210   
pub(crate) mod client_idempotency_token;
  211    211   
  212    212   
mod idempotency_token;
  213    213   
  214    214   
mod observability_feature;
  215    215   
  216    216   
pub(crate) mod protocol_serde;
  217    217   
  218    218   
mod sdk_feature_tracker;
  219    219   
  220         -
mod serialization_settings;
  221         -
  222    220   
mod endpoint_lib;
  223    221   
         222  +
mod json_errors;
         223  +
  224    224   
mod lens;
  225    225   
  226    226   
/// Supporting types for waiters.
  227    227   
///
  228    228   
/// Note: to use waiters, import the [`Waiters`](crate::client::Waiters) trait, which adds methods prefixed with `wait_until` to the client.
  229    229   
pub mod waiters;
  230    230   
  231         -
mod json_errors;
  232         -
  233         -
mod serde_util;
  234         -
  235    231   
#[doc(inline)]
  236    232   
pub use client::Client;

tmp-codegen-diff/aws-sdk/sdk/ecs/src/operation/create_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 `CreateCapacityProvider`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateCapacityProvider;
    6      6   
impl CreateCapacityProvider {
    7      7   
    /// Creates a new `CreateCapacityProvider`
    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::create_capacity_provider::CreateCapacityProviderInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_capacity_provider::CreateCapacityProviderOutput::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::create_capacity_provider::CreateCapacityProviderInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_capacity_provider::CreateCapacityProviderOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_capacity_provider::CreateCapacityProviderError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +247,432 @@
  138    142   
                crate::operation::create_capacity_provider::CreateCapacityProviderError,
  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 CreateCapacityProviderResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateCapacityProviderResponseDeserializer {
  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_create_capacity_provider::de_create_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::create_capacity_provider::CreateCapacityProviderError::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::create_capacity_provider::CreateCapacityProviderError::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::create_capacity_provider::CreateCapacityProviderError::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::create_capacity_provider::CreateCapacityProviderError::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  +
                "LimitExceededException" => crate::operation::create_capacity_provider::CreateCapacityProviderError::LimitExceededException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::LimitExceededException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    if tmp.message.is_none() {
         277  +
                        tmp.message = _error_message;
         278  +
                    }
         279  +
                    tmp
         280  +
                }),
         281  +
                "ServerException" => crate::operation::create_capacity_provider::CreateCapacityProviderError::ServerException({
         282  +
                    let mut tmp = match protocol
         283  +
                        .deserialize_response(response, crate::types::error::ServerException::SCHEMA, _cfg)
         284  +
                        .and_then(|mut deser| {
         285  +
                            crate::types::error::ServerException::deserialize_with_response(
         286  +
                                &mut *deser,
         287  +
                                response.headers(),
         288  +
                                response.status().into(),
         289  +
                                body,
         290  +
                            )
         291  +
                        }) {
         292  +
                        ::std::result::Result::Ok(val) => val,
         293  +
                        ::std::result::Result::Err(e) => {
         294  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         295  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         296  +
                            ))
         297  +
                        }
         298  +
                    };
         299  +
                    tmp.meta = generic;
         300  +
                    if tmp.message.is_none() {
         301  +
                        tmp.message = _error_message;
         302  +
                    }
         303  +
                    tmp
         304  +
                }),
         305  +
                "UnsupportedFeatureException" => {
         306  +
                    crate::operation::create_capacity_provider::CreateCapacityProviderError::UnsupportedFeatureException({
         307  +
                        let mut tmp = match protocol
         308  +
                            .deserialize_response(response, crate::types::error::UnsupportedFeatureException::SCHEMA, _cfg)
         309  +
                            .and_then(|mut deser| {
         310  +
                                crate::types::error::UnsupportedFeatureException::deserialize_with_response(
         311  +
                                    &mut *deser,
         312  +
                                    response.headers(),
         313  +
                                    response.status().into(),
         314  +
                                    body,
         315  +
                                )
         316  +
                            }) {
         317  +
                            ::std::result::Result::Ok(val) => val,
         318  +
                            ::std::result::Result::Err(e) => {
         319  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         320  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         321  +
                                ))
         322  +
                            }
         323  +
                        };
         324  +
                        tmp.meta = generic;
         325  +
                        if tmp.message.is_none() {
         326  +
                            tmp.message = _error_message;
         327  +
                        }
         328  +
                        tmp
         329  +
                    })
         330  +
                }
         331  +
                "UpdateInProgressException" => crate::operation::create_capacity_provider::CreateCapacityProviderError::UpdateInProgressException({
         332  +
                    let mut tmp = match protocol
         333  +
                        .deserialize_response(response, crate::types::error::UpdateInProgressException::SCHEMA, _cfg)
         334  +
                        .and_then(|mut deser| {
         335  +
                            crate::types::error::UpdateInProgressException::deserialize_with_response(
         336  +
                                &mut *deser,
         337  +
                                response.headers(),
         338  +
                                response.status().into(),
         339  +
                                body,
         340  +
                            )
         341  +
                        }) {
         342  +
                        ::std::result::Result::Ok(val) => val,
         343  +
                        ::std::result::Result::Err(e) => {
         344  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         345  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         346  +
                            ))
         347  +
                        }
         348  +
                    };
         349  +
                    tmp.meta = generic;
         350  +
                    if tmp.message.is_none() {
         351  +
                        tmp.message = _error_message;
         352  +
                    }
         353  +
                    tmp
         354  +
                }),
         355  +
                _ => crate::operation::create_capacity_provider::CreateCapacityProviderError::generic(generic),
         356  +
            };
         357  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         358  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         359  +
            ))
  160    360   
        } else {
  161         -
            crate::protocol_serde::shape_create_capacity_provider::de_create_capacity_provider_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         361  +
            let protocol = _cfg
         362  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         363  +
                .expect("a SharedClientProtocol is required");
         364  +
            let mut deser = protocol
         365  +
                .deserialize_response(response, CreateCapacityProvider::OUTPUT_SCHEMA, _cfg)
         366  +
                .map_err(|e| {
         367  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         368  +
                })?;
         369  +
            let body = response.body().bytes().expect("body loaded");
         370  +
            let output = crate::operation::create_capacity_provider::CreateCapacityProviderOutput::deserialize_with_response(
         371  +
                &mut *deser,
         372  +
                response.headers(),
         373  +
                response.status().into(),
         374  +
                body,
         375  +
            )
         376  +
            .map_err(|e| {
         377  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         378  +
            })?;
         379  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         380  +
        }
  164    381   
    }
  165    382   
}
  166    383   
#[derive(Debug)]
  167    384   
struct CreateCapacityProviderRequestSerializer;
  168    385   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateCapacityProviderRequestSerializer {
  169    386   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    387   
    fn serialize_input(
  171    388   
        &self,
  172    389   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    390   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    391   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    392   
        let input = input
  176    393   
            .downcast::<crate::operation::create_capacity_provider::CreateCapacityProviderInput>()
  177    394   
            .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::create_capacity_provider::CreateCapacityProviderInput,
  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::create_capacity_provider::CreateCapacityProviderInput,
  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.CreateCapacityProvider",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  211         -
            crate::protocol_serde::shape_create_capacity_provider::ser_create_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())
         395  +
        let protocol = _cfg
         396  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         397  +
            .expect("a SharedClientProtocol is required");
         398  +
        let mut request = protocol
         399  +
            .serialize_request(&input, CreateCapacityProvider::INPUT_SCHEMA, "", _cfg)
         400  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         401  +
         402  +
        return ::std::result::Result::Ok(request);
  218    403   
    }
  219    404   
}
  220    405   
#[derive(Debug)]
  221    406   
struct CreateCapacityProviderEndpointParamsInterceptor;
  222    407   
  223    408   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateCapacityProviderEndpointParamsInterceptor {
  224    409   
    fn name(&self) -> &'static str {
  225    410   
        "CreateCapacityProviderEndpointParamsInterceptor"
  226    411   
    }
  227    412   

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

@@ -77,77 +147,147 @@
   97     97   
    "cluster",
   98     98   
    1,
   99     99   
);
  100    100   
static CREATECAPACITYPROVIDERINPUT_MEMBER_AUTO_SCALING_GROUP_PROVIDER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  101    101   
    ::aws_smithy_schema::ShapeId::from_static(
  102    102   
        "com.amazonaws.ecs.synthetic#CreateCapacityProviderInput$autoScalingGroupProvider",
  103    103   
        "com.amazonaws.ecs.synthetic",
  104    104   
        "CreateCapacityProviderInput",
  105    105   
    ),
  106    106   
    ::aws_smithy_schema::ShapeType::Structure,
  107         -
    "auto_scaling_group_provider",
         107  +
    "autoScalingGroupProvider",
  108    108   
    2,
  109    109   
);
  110    110   
static CREATECAPACITYPROVIDERINPUT_MEMBER_MANAGED_INSTANCES_PROVIDER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  111    111   
    ::aws_smithy_schema::ShapeId::from_static(
  112    112   
        "com.amazonaws.ecs.synthetic#CreateCapacityProviderInput$managedInstancesProvider",
  113    113   
        "com.amazonaws.ecs.synthetic",
  114    114   
        "CreateCapacityProviderInput",
  115    115   
    ),
  116    116   
    ::aws_smithy_schema::ShapeType::Structure,
  117         -
    "managed_instances_provider",
         117  +
    "managedInstancesProvider",
  118    118   
    3,
  119    119   
);
  120    120   
static CREATECAPACITYPROVIDERINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  121    121   
    ::aws_smithy_schema::ShapeId::from_static(
  122    122   
        "com.amazonaws.ecs.synthetic#CreateCapacityProviderInput$tags",
  123    123   
        "com.amazonaws.ecs.synthetic",
  124    124   
        "CreateCapacityProviderInput",
  125    125   
    ),
  126    126   
    ::aws_smithy_schema::ShapeType::List,
  127    127   
    "tags",
@@ -149,149 +256,265 @@
  169    169   
                    }
  170    170   
                    Ok(())
  171    171   
                },
  172    172   
            )?;
  173    173   
        }
  174    174   
        Ok(())
  175    175   
    }
  176    176   
}
  177    177   
impl CreateCapacityProviderInput {
  178    178   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  179         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  180         -
        deserializer: &mut D,
         179  +
    pub fn deserialize(
         180  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  181    181   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  182    182   
        #[allow(unused_variables, unused_mut)]
  183    183   
        let mut builder = Self::builder();
  184    184   
        #[allow(
  185    185   
            unused_variables,
  186    186   
            unreachable_code,
  187    187   
            clippy::single_match,
  188    188   
            clippy::match_single_binding,
  189    189   
            clippy::diverging_sub_expression
  190    190   
        )]
  191         -
        deserializer.read_struct(&CREATECAPACITYPROVIDERINPUT_SCHEMA, (), |_, member, deser| {
         191  +
        deserializer.read_struct(&CREATECAPACITYPROVIDERINPUT_SCHEMA, &mut |member, deser| {
  192    192   
            match member.member_index() {
  193    193   
                Some(0) => {
  194    194   
                    builder.name = Some(deser.read_string(member)?);
  195    195   
                }
  196    196   
                Some(1) => {
  197    197   
                    builder.cluster = Some(deser.read_string(member)?);
  198    198   
                }
  199    199   
                Some(2) => {
  200    200   
                    builder.auto_scaling_group_provider = Some(crate::types::AutoScalingGroupProvider::deserialize(deser)?);
  201    201   
                }
  202    202   
                Some(3) => {
  203    203   
                    builder.managed_instances_provider = Some(crate::types::CreateManagedInstancesProviderConfiguration::deserialize(deser)?);
  204    204   
                }
  205    205   
                Some(4) => {
  206    206   
                    builder.tags = Some({
  207         -
                        let container = if let Some(cap) = deser.container_size() {
  208         -
                            Vec::with_capacity(cap)
  209         -
                        } else {
  210         -
                            Vec::new()
  211         -
                        };
  212         -
                        deser.read_list(member, container, |mut list, deser| {
  213         -
                            list.push(crate::types::Tag::deserialize(deser)?);
  214         -
                            Ok(list)
  215         -
                        })?
         207  +
                        let mut container = Vec::new();
         208  +
                        deser.read_list(member, &mut |deser| {
         209  +
                            container.push(crate::types::Tag::deserialize(deser)?);
         210  +
                            Ok(())
         211  +
                        })?;
         212  +
                        container
  216    213   
                    });
  217    214   
                }
  218    215   
                _ => {}
  219    216   
            }
  220    217   
            Ok(())
  221    218   
        })?;
         219  +
        builder.name = builder.name.or(Some(String::new()));
  222    220   
        builder
  223    221   
            .build()
  224    222   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  225    223   
    }
  226    224   
}
         225  +
impl CreateCapacityProviderInput {
         226  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         227  +
    pub fn deserialize_with_response(
         228  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         229  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         230  +
        _status: u16,
         231  +
        _body: &[u8],
         232  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         233  +
        Self::deserialize(deserializer)
         234  +
    }
         235  +
}
  227    236   
impl CreateCapacityProviderInput {
  228    237   
    /// Creates a new builder-style object to manufacture [`CreateCapacityProviderInput`](crate::operation::create_capacity_provider::CreateCapacityProviderInput).
  229    238   
    pub fn builder() -> crate::operation::create_capacity_provider::builders::CreateCapacityProviderInputBuilder {
  230    239   
        crate::operation::create_capacity_provider::builders::CreateCapacityProviderInputBuilder::default()
  231    240   
    }
  232    241   
}
  233    242   
  234    243   
/// A builder for [`CreateCapacityProviderInput`](crate::operation::create_capacity_provider::CreateCapacityProviderInput).
  235    244   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  236    245   
#[non_exhaustive]

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

@@ -1,1 +96,143 @@
   18     18   
    "com.amazonaws.ecs.synthetic",
   19     19   
    "CreateCapacityProviderOutput",
   20     20   
);
   21     21   
static CREATECAPACITYPROVIDEROUTPUT_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#CreateCapacityProviderOutput$capacityProvider",
   24     24   
        "com.amazonaws.ecs.synthetic",
   25     25   
        "CreateCapacityProviderOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28         -
    "capacity_provider",
          28  +
    "capacityProvider",
   29     29   
    0,
   30     30   
);
          31  +
static CREATECAPACITYPROVIDEROUTPUT_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 CREATECAPACITYPROVIDEROUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    CREATECAPACITYPROVIDEROUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&CREATECAPACITYPROVIDEROUTPUT_MEMBER_CAPACITY_PROVIDER],
          41  +
    &[
          42  +
        &CREATECAPACITYPROVIDEROUTPUT_MEMBER_CAPACITY_PROVIDER,
          43  +
        &CREATECAPACITYPROVIDEROUTPUT_MEMBER__REQUEST_ID,
          44  +
    ],
   35     45   
);
   36     46   
impl CreateCapacityProviderOutput {
   37     47   
    /// The schema for this shape.
   38     48   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATECAPACITYPROVIDEROUTPUT_SCHEMA;
   39     49   
}
   40     50   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateCapacityProviderOutput {
   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(&CREATECAPACITYPROVIDEROUTPUT_MEMBER_CAPACITY_PROVIDER, val)?;
   48     58   
        }
   49     59   
        Ok(())
   50     60   
    }
   51     61   
}
   52     62   
impl CreateCapacityProviderOutput {
   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(&CREATECAPACITYPROVIDEROUTPUT_SCHEMA, (), |_, member, deser| {
          76  +
        deserializer.read_struct(&CREATECAPACITYPROVIDEROUTPUT_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 CreateCapacityProviderOutput {
          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(&CREATECAPACITYPROVIDEROUTPUT_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/create_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 `CreateCluster`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateCluster;
    6      6   
impl CreateCluster {
    7      7   
    /// Creates a new `CreateCluster`
    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::create_cluster::CreateClusterInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_cluster::CreateClusterOutput::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::create_cluster::CreateClusterInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_cluster::CreateClusterOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_cluster::CreateClusterError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +242,351 @@
  135    139   
                crate::operation::create_cluster::CreateClusterError,
  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 CreateClusterResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateClusterResponseDeserializer {
  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_create_cluster::de_create_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::create_cluster::CreateClusterError::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::create_cluster::CreateClusterError::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  +
                "InvalidParameterException" => crate::operation::create_cluster::CreateClusterError::InvalidParameterException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::InvalidParameterException::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  +
                "NamespaceNotFoundException" => crate::operation::create_cluster::CreateClusterError::NamespaceNotFoundException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::NamespaceNotFoundException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::NamespaceNotFoundException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "ServerException" => crate::operation::create_cluster::CreateClusterError::ServerException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::ServerException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::ServerException::deserialize_with_response(
         257  +
                                &mut *deser,
         258  +
                                response.headers(),
         259  +
                                response.status().into(),
         260  +
                                body,
         261  +
                            )
         262  +
                        }) {
         263  +
                        ::std::result::Result::Ok(val) => val,
         264  +
                        ::std::result::Result::Err(e) => {
         265  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         266  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         267  +
                            ))
         268  +
                        }
         269  +
                    };
         270  +
                    tmp.meta = generic;
         271  +
                    if tmp.message.is_none() {
         272  +
                        tmp.message = _error_message;
         273  +
                    }
         274  +
                    tmp
         275  +
                }),
         276  +
                _ => crate::operation::create_cluster::CreateClusterError::generic(generic),
         277  +
            };
         278  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         279  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         280  +
            ))
  157    281   
        } else {
  158         -
            crate::protocol_serde::shape_create_cluster::de_create_cluster_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         282  +
            let protocol = _cfg
         283  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         284  +
                .expect("a SharedClientProtocol is required");
         285  +
            let mut deser = protocol.deserialize_response(response, CreateCluster::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         286  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         287  +
            })?;
         288  +
            let body = response.body().bytes().expect("body loaded");
         289  +
            let output = crate::operation::create_cluster::CreateClusterOutput::deserialize_with_response(
         290  +
                &mut *deser,
         291  +
                response.headers(),
         292  +
                response.status().into(),
         293  +
                body,
         294  +
            )
         295  +
            .map_err(|e| {
         296  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         297  +
            })?;
         298  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         299  +
        }
  161    300   
    }
  162    301   
}
  163    302   
#[derive(Debug)]
  164    303   
struct CreateClusterRequestSerializer;
  165    304   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateClusterRequestSerializer {
  166    305   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    306   
    fn serialize_input(
  168    307   
        &self,
  169    308   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    309   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    310   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    311   
        let input = input
  173    312   
            .downcast::<crate::operation::create_cluster::CreateClusterInput>()
  174    313   
            .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::create_cluster::CreateClusterInput,
  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::create_cluster::CreateClusterInput,
  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.CreateCluster",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_cluster::ser_create_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())
         314  +
        let protocol = _cfg
         315  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         316  +
            .expect("a SharedClientProtocol is required");
         317  +
        let mut request = protocol
         318  +
            .serialize_request(&input, CreateCluster::INPUT_SCHEMA, "", _cfg)
         319  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         320  +
         321  +
        return ::std::result::Result::Ok(request);
  213    322   
    }
  214    323   
}
  215    324   
#[derive(Debug)]
  216    325   
struct CreateClusterEndpointParamsInterceptor;
  217    326   
  218    327   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateClusterEndpointParamsInterceptor {
  219    328   
    fn name(&self) -> &'static str {
  220    329   
        "CreateClusterEndpointParamsInterceptor"
  221    330   
    }
  222    331   

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

@@ -85,85 +205,205 @@
  105    105   
    "com.amazonaws.ecs.synthetic",
  106    106   
    "CreateClusterInput",
  107    107   
);
  108    108   
static CREATECLUSTERINPUT_MEMBER_CLUSTER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  109    109   
    ::aws_smithy_schema::ShapeId::from_static(
  110    110   
        "com.amazonaws.ecs.synthetic#CreateClusterInput$clusterName",
  111    111   
        "com.amazonaws.ecs.synthetic",
  112    112   
        "CreateClusterInput",
  113    113   
    ),
  114    114   
    ::aws_smithy_schema::ShapeType::String,
  115         -
    "cluster_name",
         115  +
    "clusterName",
  116    116   
    0,
  117    117   
);
  118    118   
static CREATECLUSTERINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  119    119   
    ::aws_smithy_schema::ShapeId::from_static(
  120    120   
        "com.amazonaws.ecs.synthetic#CreateClusterInput$tags",
  121    121   
        "com.amazonaws.ecs.synthetic",
  122    122   
        "CreateClusterInput",
  123    123   
    ),
  124    124   
    ::aws_smithy_schema::ShapeType::List,
  125    125   
    "tags",
  126    126   
    1,
  127    127   
);
  128    128   
static CREATECLUSTERINPUT_MEMBER_SETTINGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  129    129   
    ::aws_smithy_schema::ShapeId::from_static(
  130    130   
        "com.amazonaws.ecs.synthetic#CreateClusterInput$settings",
  131    131   
        "com.amazonaws.ecs.synthetic",
  132    132   
        "CreateClusterInput",
  133    133   
    ),
  134    134   
    ::aws_smithy_schema::ShapeType::List,
  135    135   
    "settings",
  136    136   
    2,
  137    137   
);
  138    138   
static CREATECLUSTERINPUT_MEMBER_CONFIGURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  139    139   
    ::aws_smithy_schema::ShapeId::from_static(
  140    140   
        "com.amazonaws.ecs.synthetic#CreateClusterInput$configuration",
  141    141   
        "com.amazonaws.ecs.synthetic",
  142    142   
        "CreateClusterInput",
  143    143   
    ),
  144    144   
    ::aws_smithy_schema::ShapeType::Structure,
  145    145   
    "configuration",
  146    146   
    3,
  147    147   
);
  148    148   
static CREATECLUSTERINPUT_MEMBER_CAPACITY_PROVIDERS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  149    149   
    ::aws_smithy_schema::ShapeId::from_static(
  150    150   
        "com.amazonaws.ecs.synthetic#CreateClusterInput$capacityProviders",
  151    151   
        "com.amazonaws.ecs.synthetic",
  152    152   
        "CreateClusterInput",
  153    153   
    ),
  154    154   
    ::aws_smithy_schema::ShapeType::List,
  155         -
    "capacity_providers",
         155  +
    "capacityProviders",
  156    156   
    4,
  157    157   
);
  158    158   
static CREATECLUSTERINPUT_MEMBER_DEFAULT_CAPACITY_PROVIDER_STRATEGY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  159    159   
    ::aws_smithy_schema::ShapeId::from_static(
  160    160   
        "com.amazonaws.ecs.synthetic#CreateClusterInput$defaultCapacityProviderStrategy",
  161    161   
        "com.amazonaws.ecs.synthetic",
  162    162   
        "CreateClusterInput",
  163    163   
    ),
  164    164   
    ::aws_smithy_schema::ShapeType::List,
  165         -
    "default_capacity_provider_strategy",
         165  +
    "defaultCapacityProviderStrategy",
  166    166   
    5,
  167    167   
);
  168    168   
static CREATECLUSTERINPUT_MEMBER_SERVICE_CONNECT_DEFAULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  169    169   
    ::aws_smithy_schema::ShapeId::from_static(
  170    170   
        "com.amazonaws.ecs.synthetic#CreateClusterInput$serviceConnectDefaults",
  171    171   
        "com.amazonaws.ecs.synthetic",
  172    172   
        "CreateClusterInput",
  173    173   
    ),
  174    174   
    ::aws_smithy_schema::ShapeType::Structure,
  175         -
    "service_connect_defaults",
         175  +
    "serviceConnectDefaults",
  176    176   
    6,
  177    177   
);
  178    178   
static CREATECLUSTERINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  179    179   
    CREATECLUSTERINPUT_SCHEMA_ID,
  180    180   
    ::aws_smithy_schema::ShapeType::Structure,
  181    181   
    &[
  182    182   
        &CREATECLUSTERINPUT_MEMBER_CLUSTER_NAME,
  183    183   
        &CREATECLUSTERINPUT_MEMBER_TAGS,
  184    184   
        &CREATECLUSTERINPUT_MEMBER_SETTINGS,
  185    185   
        &CREATECLUSTERINPUT_MEMBER_CONFIGURATION,
@@ -229,229 +372,364 @@
  249    249   
            )?;
  250    250   
        }
  251    251   
        if let Some(ref val) = self.service_connect_defaults {
  252    252   
            ser.write_struct(&CREATECLUSTERINPUT_MEMBER_SERVICE_CONNECT_DEFAULTS, val)?;
  253    253   
        }
  254    254   
        Ok(())
  255    255   
    }
  256    256   
}
  257    257   
impl CreateClusterInput {
  258    258   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  259         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  260         -
        deserializer: &mut D,
         259  +
    pub fn deserialize(
         260  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  261    261   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  262    262   
        #[allow(unused_variables, unused_mut)]
  263    263   
        let mut builder = Self::builder();
  264    264   
        #[allow(
  265    265   
            unused_variables,
  266    266   
            unreachable_code,
  267    267   
            clippy::single_match,
  268    268   
            clippy::match_single_binding,
  269    269   
            clippy::diverging_sub_expression
  270    270   
        )]
  271         -
        deserializer.read_struct(&CREATECLUSTERINPUT_SCHEMA, (), |_, member, deser| {
         271  +
        deserializer.read_struct(&CREATECLUSTERINPUT_SCHEMA, &mut |member, deser| {
  272    272   
            match member.member_index() {
  273    273   
                Some(0) => {
  274    274   
                    builder.cluster_name = Some(deser.read_string(member)?);
  275    275   
                }
  276    276   
                Some(1) => {
  277    277   
                    builder.tags = Some({
  278         -
                        let container = if let Some(cap) = deser.container_size() {
  279         -
                            Vec::with_capacity(cap)
  280         -
                        } else {
  281         -
                            Vec::new()
  282         -
                        };
  283         -
                        deser.read_list(member, container, |mut list, deser| {
  284         -
                            list.push(crate::types::Tag::deserialize(deser)?);
  285         -
                            Ok(list)
  286         -
                        })?
         278  +
                        let mut container = Vec::new();
         279  +
                        deser.read_list(member, &mut |deser| {
         280  +
                            container.push(crate::types::Tag::deserialize(deser)?);
         281  +
                            Ok(())
         282  +
                        })?;
         283  +
                        container
  287    284   
                    });
  288    285   
                }
  289    286   
                Some(2) => {
  290    287   
                    builder.settings = Some({
  291         -
                        let container = if let Some(cap) = deser.container_size() {
  292         -
                            Vec::with_capacity(cap)
  293         -
                        } else {
  294         -
                            Vec::new()
  295         -
                        };
  296         -
                        deser.read_list(member, container, |mut list, deser| {
  297         -
                            list.push(crate::types::ClusterSetting::deserialize(deser)?);
  298         -
                            Ok(list)
  299         -
                        })?
         288  +
                        let mut container = Vec::new();
         289  +
                        deser.read_list(member, &mut |deser| {
         290  +
                            container.push(crate::types::ClusterSetting::deserialize(deser)?);
         291  +
                            Ok(())
         292  +
                        })?;
         293  +
                        container
  300    294   
                    });
  301    295   
                }
  302    296   
                Some(3) => {
  303    297   
                    builder.configuration = Some(crate::types::ClusterConfiguration::deserialize(deser)?);
  304    298   
                }
  305    299   
                Some(4) => {
  306         -
                    builder.capacity_providers = Some({
  307         -
                        let container = if let Some(cap) = deser.container_size() {
  308         -
                            Vec::with_capacity(cap)
  309         -
                        } else {
  310         -
                            Vec::new()
  311         -
                        };
  312         -
                        deser.read_list(member, container, |mut list, deser| {
  313         -
                            list.push(deser.read_string(member)?);
  314         -
                            Ok(list)
  315         -
                        })?
  316         -
                    });
         300  +
                    builder.capacity_providers = Some(deser.read_string_list(member)?);
  317    301   
                }
  318    302   
                Some(5) => {
  319    303   
                    builder.default_capacity_provider_strategy = Some({
  320         -
                        let container = if let Some(cap) = deser.container_size() {
  321         -
                            Vec::with_capacity(cap)
  322         -
                        } else {
  323         -
                            Vec::new()
  324         -
                        };
  325         -
                        deser.read_list(member, container, |mut list, deser| {
  326         -
                            list.push(crate::types::CapacityProviderStrategyItem::deserialize(deser)?);
  327         -
                            Ok(list)
  328         -
                        })?
         304  +
                        let mut container = Vec::new();
         305  +
                        deser.read_list(member, &mut |deser| {
         306  +
                            container.push(crate::types::CapacityProviderStrategyItem::deserialize(deser)?);
         307  +
                            Ok(())
         308  +
                        })?;
         309  +
                        container
  329    310   
                    });
  330    311   
                }
  331    312   
                Some(6) => {
  332    313   
                    builder.service_connect_defaults = Some(crate::types::ClusterServiceConnectDefaultsRequest::deserialize(deser)?);
  333    314   
                }
  334    315   
                _ => {}
  335    316   
            }
  336    317   
            Ok(())
  337    318   
        })?;
  338    319   
        builder
  339    320   
            .build()
  340    321   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  341    322   
    }
  342    323   
}
         324  +
impl CreateClusterInput {
         325  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         326  +
    pub fn deserialize_with_response(
         327  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         328  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         329  +
        _status: u16,
         330  +
        _body: &[u8],
         331  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         332  +
        Self::deserialize(deserializer)
         333  +
    }
         334  +
}
  343    335   
impl CreateClusterInput {
  344    336   
    /// Creates a new builder-style object to manufacture [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
  345    337   
    pub fn builder() -> crate::operation::create_cluster::builders::CreateClusterInputBuilder {
  346    338   
        crate::operation::create_cluster::builders::CreateClusterInputBuilder::default()
  347    339   
    }
  348    340   
}
  349    341   
  350    342   
/// A builder for [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
  351    343   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  352    344   
#[non_exhaustive]

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

@@ -1,1 +96,140 @@
   21     21   
static CREATECLUSTEROUTPUT_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#CreateClusterOutput$cluster",
   24     24   
        "com.amazonaws.ecs.synthetic",
   25     25   
        "CreateClusterOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28     28   
    "cluster",
   29     29   
    0,
   30     30   
);
          31  +
static CREATECLUSTEROUTPUT_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 CREATECLUSTEROUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    CREATECLUSTEROUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&CREATECLUSTEROUTPUT_MEMBER_CLUSTER],
          41  +
    &[&CREATECLUSTEROUTPUT_MEMBER_CLUSTER, &CREATECLUSTEROUTPUT_MEMBER__REQUEST_ID],
   35     42   
);
   36     43   
impl CreateClusterOutput {
   37     44   
    /// The schema for this shape.
   38     45   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATECLUSTEROUTPUT_SCHEMA;
   39     46   
}
   40     47   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateClusterOutput {
   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(&CREATECLUSTEROUTPUT_MEMBER_CLUSTER, val)?;
   48     55   
        }
   49     56   
        Ok(())
   50     57   
    }
   51     58   
}
   52     59   
impl CreateClusterOutput {
   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(&CREATECLUSTEROUTPUT_SCHEMA, (), |_, member, deser| {
          73  +
        deserializer.read_struct(&CREATECLUSTEROUTPUT_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 CreateClusterOutput {
          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(&CREATECLUSTEROUTPUT_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/create_service.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 `CreateService`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateService;
    6      6   
impl CreateService {
    7      7   
    /// Creates a new `CreateService`
    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::create_service::CreateServiceInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_service::CreateServiceOutput::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::create_service::CreateServiceInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_service::CreateServiceOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_service::CreateServiceError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +242,477 @@
  135    139   
                crate::operation::create_service::CreateServiceError,
  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 CreateServiceResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateServiceResponseDeserializer {
  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_create_service::de_create_service_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::create_service::CreateServiceError::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  +
                "AccessDeniedException" => crate::operation::create_service::CreateServiceError::AccessDeniedException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::AccessDeniedException::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  +
                "ClientException" => crate::operation::create_service::CreateServiceError::ClientException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::ClientException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::ClientException::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  +
                "ClusterNotFoundException" => crate::operation::create_service::CreateServiceError::ClusterNotFoundException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::ClusterNotFoundException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::ClusterNotFoundException::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  +
                "InvalidParameterException" => crate::operation::create_service::CreateServiceError::InvalidParameterException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::InvalidParameterException::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  +
                "NamespaceNotFoundException" => crate::operation::create_service::CreateServiceError::NamespaceNotFoundException({
         277  +
                    let mut tmp = match protocol
         278  +
                        .deserialize_response(response, crate::types::error::NamespaceNotFoundException::SCHEMA, _cfg)
         279  +
                        .and_then(|mut deser| {
         280  +
                            crate::types::error::NamespaceNotFoundException::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  +
                "PlatformTaskDefinitionIncompatibilityException" => {
         301  +
                    crate::operation::create_service::CreateServiceError::PlatformTaskDefinitionIncompatibilityException({
         302  +
                        let mut tmp = match protocol
         303  +
                            .deserialize_response(
         304  +
                                response,
         305  +
                                crate::types::error::PlatformTaskDefinitionIncompatibilityException::SCHEMA,
         306  +
                                _cfg,
         307  +
                            )
         308  +
                            .and_then(|mut deser| {
         309  +
                                crate::types::error::PlatformTaskDefinitionIncompatibilityException::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  +
                }
         330  +
                "PlatformUnknownException" => crate::operation::create_service::CreateServiceError::PlatformUnknownException({
         331  +
                    let mut tmp = match protocol
         332  +
                        .deserialize_response(response, crate::types::error::PlatformUnknownException::SCHEMA, _cfg)
         333  +
                        .and_then(|mut deser| {
         334  +
                            crate::types::error::PlatformUnknownException::deserialize_with_response(
         335  +
                                &mut *deser,
         336  +
                                response.headers(),
         337  +
                                response.status().into(),
         338  +
                                body,
         339  +
                            )
         340  +
                        }) {
         341  +
                        ::std::result::Result::Ok(val) => val,
         342  +
                        ::std::result::Result::Err(e) => {
         343  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         344  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         345  +
                            ))
         346  +
                        }
         347  +
                    };
         348  +
                    tmp.meta = generic;
         349  +
                    if tmp.message.is_none() {
         350  +
                        tmp.message = _error_message;
         351  +
                    }
         352  +
                    tmp
         353  +
                }),
         354  +
                "ServerException" => crate::operation::create_service::CreateServiceError::ServerException({
         355  +
                    let mut tmp = match protocol
         356  +
                        .deserialize_response(response, crate::types::error::ServerException::SCHEMA, _cfg)
         357  +
                        .and_then(|mut deser| {
         358  +
                            crate::types::error::ServerException::deserialize_with_response(
         359  +
                                &mut *deser,
         360  +
                                response.headers(),
         361  +
                                response.status().into(),
         362  +
                                body,
         363  +
                            )
         364  +
                        }) {
         365  +
                        ::std::result::Result::Ok(val) => val,
         366  +
                        ::std::result::Result::Err(e) => {
         367  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         368  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         369  +
                            ))
         370  +
                        }
         371  +
                    };
         372  +
                    tmp.meta = generic;
         373  +
                    if tmp.message.is_none() {
         374  +
                        tmp.message = _error_message;
         375  +
                    }
         376  +
                    tmp
         377  +
                }),
         378  +
                "UnsupportedFeatureException" => crate::operation::create_service::CreateServiceError::UnsupportedFeatureException({
         379  +
                    let mut tmp = match protocol
         380  +
                        .deserialize_response(response, crate::types::error::UnsupportedFeatureException::SCHEMA, _cfg)
         381  +
                        .and_then(|mut deser| {
         382  +
                            crate::types::error::UnsupportedFeatureException::deserialize_with_response(
         383  +
                                &mut *deser,
         384  +
                                response.headers(),
         385  +
                                response.status().into(),
         386  +
                                body,
         387  +
                            )
         388  +
                        }) {
         389  +
                        ::std::result::Result::Ok(val) => val,
         390  +
                        ::std::result::Result::Err(e) => {
         391  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         392  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         393  +
                            ))
         394  +
                        }
         395  +
                    };
         396  +
                    tmp.meta = generic;
         397  +
                    if tmp.message.is_none() {
         398  +
                        tmp.message = _error_message;
         399  +
                    }
         400  +
                    tmp
         401  +
                }),
         402  +
                _ => crate::operation::create_service::CreateServiceError::generic(generic),
         403  +
            };
         404  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         405  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         406  +
            ))
  157    407   
        } else {
  158         -
            crate::protocol_serde::shape_create_service::de_create_service_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         408  +
            let protocol = _cfg
         409  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         410  +
                .expect("a SharedClientProtocol is required");
         411  +
            let mut deser = protocol.deserialize_response(response, CreateService::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         412  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         413  +
            })?;
         414  +
            let body = response.body().bytes().expect("body loaded");
         415  +
            let output = crate::operation::create_service::CreateServiceOutput::deserialize_with_response(
         416  +
                &mut *deser,
         417  +
                response.headers(),
         418  +
                response.status().into(),
         419  +
                body,
         420  +
            )
         421  +
            .map_err(|e| {
         422  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         423  +
            })?;
         424  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         425  +
        }
  161    426   
    }
  162    427   
}
  163    428   
#[derive(Debug)]
  164    429   
struct CreateServiceRequestSerializer;
  165    430   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateServiceRequestSerializer {
  166    431   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    432   
    fn serialize_input(
  168    433   
        &self,
  169    434   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    435   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    436   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    437   
        let input = input
  173    438   
            .downcast::<crate::operation::create_service::CreateServiceInput>()
  174    439   
            .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::create_service::CreateServiceInput,
  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::create_service::CreateServiceInput,
  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.CreateService",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_service::ser_create_service_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())
         440  +
        let protocol = _cfg
         441  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         442  +
            .expect("a SharedClientProtocol is required");
         443  +
        let mut request = protocol
         444  +
            .serialize_request(&input, CreateService::INPUT_SCHEMA, "", _cfg)
         445  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         446  +
         447  +
        return ::std::result::Result::Ok(request);
  213    448   
    }
  214    449   
}
  215    450   
#[derive(Debug)]
  216    451   
struct CreateServiceEndpointParamsInterceptor;
  217    452   
  218    453   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateServiceEndpointParamsInterceptor {
  219    454   
    fn name(&self) -> &'static str {
  220    455   
        "CreateServiceEndpointParamsInterceptor"
  221    456   
    }
  222    457