AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

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

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

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/ecs/src/operation/update_task_protection.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 `UpdateTaskProtection`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct UpdateTaskProtection;
    6      6   
impl UpdateTaskProtection {
    7      7   
    /// Creates a new `UpdateTaskProtection`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_task_protection::UpdateTaskProtectionInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_task_protection::UpdateTaskProtectionOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::update_task_protection::UpdateTaskProtectionInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::update_task_protection::UpdateTaskProtectionOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::update_task_protection::UpdateTaskProtectionError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +247,430 @@
  138    142   
                crate::operation::update_task_protection::UpdateTaskProtectionError,
  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 UpdateTaskProtectionResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateTaskProtectionResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_update_task_protection::de_update_task_protection_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_update_task_protection::de_update_task_protection_http_response(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         175  +
                            crate::operation::update_task_protection::UpdateTaskProtectionError::unhandled(generic),
         176  +
                        ),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "AccessDeniedException" => crate::operation::update_task_protection::UpdateTaskProtectionError::AccessDeniedException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         190  +
                                &mut *deser,
         191  +
                                response.headers(),
         192  +
                                response.status().into(),
         193  +
                                body,
         194  +
                            )
         195  +
                        }) {
         196  +
                        ::std::result::Result::Ok(val) => val,
         197  +
                        ::std::result::Result::Err(e) => {
         198  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         199  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         200  +
                            ))
         201  +
                        }
         202  +
                    };
         203  +
                    tmp.meta = generic;
         204  +
                    if tmp.message.is_none() {
         205  +
                        tmp.message = _error_message;
         206  +
                    }
         207  +
                    tmp
         208  +
                }),
         209  +
                "ClientException" => crate::operation::update_task_protection::UpdateTaskProtectionError::ClientException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::ClientException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::ClientException::deserialize_with_response(
         214  +
                                &mut *deser,
         215  +
                                response.headers(),
         216  +
                                response.status().into(),
         217  +
                                body,
         218  +
                            )
         219  +
                        }) {
         220  +
                        ::std::result::Result::Ok(val) => val,
         221  +
                        ::std::result::Result::Err(e) => {
         222  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         223  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         224  +
                            ))
         225  +
                        }
         226  +
                    };
         227  +
                    tmp.meta = generic;
         228  +
                    if tmp.message.is_none() {
         229  +
                        tmp.message = _error_message;
         230  +
                    }
         231  +
                    tmp
         232  +
                }),
         233  +
                "ClusterNotFoundException" => crate::operation::update_task_protection::UpdateTaskProtectionError::ClusterNotFoundException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::ClusterNotFoundException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::ClusterNotFoundException::deserialize_with_response(
         238  +
                                &mut *deser,
         239  +
                                response.headers(),
         240  +
                                response.status().into(),
         241  +
                                body,
         242  +
                            )
         243  +
                        }) {
         244  +
                        ::std::result::Result::Ok(val) => val,
         245  +
                        ::std::result::Result::Err(e) => {
         246  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         247  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         248  +
                            ))
         249  +
                        }
         250  +
                    };
         251  +
                    tmp.meta = generic;
         252  +
                    if tmp.message.is_none() {
         253  +
                        tmp.message = _error_message;
         254  +
                    }
         255  +
                    tmp
         256  +
                }),
         257  +
                "InvalidParameterException" => crate::operation::update_task_protection::UpdateTaskProtectionError::InvalidParameterException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
  162    274   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         275  +
                    tmp.meta = generic;
         276  +
                    if tmp.message.is_none() {
         277  +
                        tmp.message = _error_message;
         278  +
                    }
         279  +
                    tmp
         280  +
                }),
         281  +
                "ResourceNotFoundException" => crate::operation::update_task_protection::UpdateTaskProtectionError::ResourceNotFoundException({
         282  +
                    let mut tmp = match protocol
         283  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         284  +
                        .and_then(|mut deser| {
         285  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         286  +
                                &mut *deser,
         287  +
                                response.headers(),
         288  +
                                response.status().into(),
         289  +
                                body,
         290  +
                            )
         291  +
                        }) {
         292  +
                        ::std::result::Result::Ok(val) => val,
         293  +
                        ::std::result::Result::Err(e) => {
         294  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         295  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         296  +
                            ))
         297  +
                        }
         298  +
                    };
         299  +
                    tmp.meta = generic;
         300  +
                    if tmp.message.is_none() {
         301  +
                        tmp.message = _error_message;
         302  +
                    }
         303  +
                    tmp
         304  +
                }),
         305  +
                "ServerException" => crate::operation::update_task_protection::UpdateTaskProtectionError::ServerException({
         306  +
                    let mut tmp = match protocol
         307  +
                        .deserialize_response(response, crate::types::error::ServerException::SCHEMA, _cfg)
         308  +
                        .and_then(|mut deser| {
         309  +
                            crate::types::error::ServerException::deserialize_with_response(
         310  +
                                &mut *deser,
         311  +
                                response.headers(),
         312  +
                                response.status().into(),
         313  +
                                body,
         314  +
                            )
         315  +
                        }) {
         316  +
                        ::std::result::Result::Ok(val) => val,
         317  +
                        ::std::result::Result::Err(e) => {
         318  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         319  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         320  +
                            ))
         321  +
                        }
         322  +
                    };
         323  +
                    tmp.meta = generic;
         324  +
                    if tmp.message.is_none() {
         325  +
                        tmp.message = _error_message;
         326  +
                    }
         327  +
                    tmp
         328  +
                }),
         329  +
                "UnsupportedFeatureException" => crate::operation::update_task_protection::UpdateTaskProtectionError::UnsupportedFeatureException({
         330  +
                    let mut tmp = match protocol
         331  +
                        .deserialize_response(response, crate::types::error::UnsupportedFeatureException::SCHEMA, _cfg)
         332  +
                        .and_then(|mut deser| {
         333  +
                            crate::types::error::UnsupportedFeatureException::deserialize_with_response(
         334  +
                                &mut *deser,
         335  +
                                response.headers(),
         336  +
                                response.status().into(),
         337  +
                                body,
         338  +
                            )
         339  +
                        }) {
         340  +
                        ::std::result::Result::Ok(val) => val,
         341  +
                        ::std::result::Result::Err(e) => {
         342  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         343  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         344  +
                            ))
         345  +
                        }
         346  +
                    };
         347  +
                    tmp.meta = generic;
         348  +
                    if tmp.message.is_none() {
         349  +
                        tmp.message = _error_message;
         350  +
                    }
         351  +
                    tmp
         352  +
                }),
         353  +
                _ => crate::operation::update_task_protection::UpdateTaskProtectionError::generic(generic),
         354  +
            };
         355  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         356  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         357  +
            ))
         358  +
        } else {
         359  +
            let protocol = _cfg
         360  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         361  +
                .expect("a SharedClientProtocol is required");
         362  +
            let mut deser = protocol
         363  +
                .deserialize_response(response, UpdateTaskProtection::OUTPUT_SCHEMA, _cfg)
         364  +
                .map_err(|e| {
         365  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         366  +
                })?;
         367  +
            let body = response.body().bytes().expect("body loaded");
         368  +
            let output = crate::operation::update_task_protection::UpdateTaskProtectionOutput::deserialize_with_response(
         369  +
                &mut *deser,
         370  +
                response.headers(),
         371  +
                response.status().into(),
         372  +
                body,
         373  +
            )
         374  +
            .map_err(|e| {
         375  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         376  +
            })?;
         377  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         378  +
        }
  164    379   
    }
  165    380   
}
  166    381   
#[derive(Debug)]
  167    382   
struct UpdateTaskProtectionRequestSerializer;
  168    383   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateTaskProtectionRequestSerializer {
  169    384   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    385   
    fn serialize_input(
  171    386   
        &self,
  172    387   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    388   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    389   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    390   
        let input = input
  176    391   
            .downcast::<crate::operation::update_task_protection::UpdateTaskProtectionInput>()
  177    392   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::update_task_protection::UpdateTaskProtectionInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                ::std::write!(output, "/").expect("formatting should succeed");
  190         -
                ::std::result::Result::Ok(())
  191         -
            }
  192         -
            #[allow(clippy::unnecessary_wraps)]
  193         -
            fn update_http_builder(
  194         -
                input: &crate::operation::update_task_protection::UpdateTaskProtectionInput,
  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.UpdateTaskProtection",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_task_protection::ser_update_task_protection_input(
  211         -
            &input,
  212         -
        )?);
  213         -
        if let Some(content_length) = body.content_length() {
  214         -
            let content_length = content_length.to_string();
  215         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  216         -
        }
  217         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         393  +
        let protocol = _cfg
         394  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         395  +
            .expect("a SharedClientProtocol is required");
         396  +
        let mut request = protocol
         397  +
            .serialize_request(&input, UpdateTaskProtection::INPUT_SCHEMA, "", _cfg)
         398  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         399  +
         400  +
        return ::std::result::Result::Ok(request);
  218    401   
    }
  219    402   
}
  220    403   
#[derive(Debug)]
  221    404   
struct UpdateTaskProtectionEndpointParamsInterceptor;
  222    405   
  223    406   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateTaskProtectionEndpointParamsInterceptor {
  224    407   
    fn name(&self) -> &'static str {
  225    408   
        "UpdateTaskProtectionEndpointParamsInterceptor"
  226    409   
    }
  227    410   

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

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

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

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

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

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