AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36 (ignoring whitespace)

Files changed:

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

@@ -39,39 +99,99 @@
   59     59   
    "service",
   60     60   
    1,
   61     61   
);
   62     62   
static DESCRIBETASKSETSINPUT_MEMBER_TASK_SETS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   63     63   
    ::aws_smithy_schema::ShapeId::from_static(
   64     64   
        "com.amazonaws.ecs.synthetic#DescribeTaskSetsInput$taskSets",
   65     65   
        "com.amazonaws.ecs.synthetic",
   66     66   
        "DescribeTaskSetsInput",
   67     67   
    ),
   68     68   
    ::aws_smithy_schema::ShapeType::List,
   69         -
    "task_sets",
          69  +
    "taskSets",
   70     70   
    2,
   71     71   
);
   72     72   
static DESCRIBETASKSETSINPUT_MEMBER_INCLUDE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.ecs.synthetic#DescribeTaskSetsInput$include",
   75     75   
        "com.amazonaws.ecs.synthetic",
   76     76   
        "DescribeTaskSetsInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::List,
   79     79   
    "include",
@@ -105,105 +219,219 @@
  125    125   
                    }
  126    126   
                    Ok(())
  127    127   
                },
  128    128   
            )?;
  129    129   
        }
  130    130   
        Ok(())
  131    131   
    }
  132    132   
}
  133    133   
impl DescribeTaskSetsInput {
  134    134   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  135         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  136         -
        deserializer: &mut D,
         135  +
    pub fn deserialize(
         136  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  137    137   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  138    138   
        #[allow(unused_variables, unused_mut)]
  139    139   
        let mut builder = Self::builder();
  140    140   
        #[allow(
  141    141   
            unused_variables,
  142    142   
            unreachable_code,
  143    143   
            clippy::single_match,
  144    144   
            clippy::match_single_binding,
  145    145   
            clippy::diverging_sub_expression
  146    146   
        )]
  147         -
        deserializer.read_struct(&DESCRIBETASKSETSINPUT_SCHEMA, (), |_, member, deser| {
         147  +
        deserializer.read_struct(&DESCRIBETASKSETSINPUT_SCHEMA, &mut |member, deser| {
  148    148   
            match member.member_index() {
  149    149   
                Some(0) => {
  150    150   
                    builder.cluster = Some(deser.read_string(member)?);
  151    151   
                }
  152    152   
                Some(1) => {
  153    153   
                    builder.service = Some(deser.read_string(member)?);
  154    154   
                }
  155    155   
                Some(2) => {
  156         -
                    builder.task_sets = Some({
  157         -
                        let container = if let Some(cap) = deser.container_size() {
  158         -
                            Vec::with_capacity(cap)
  159         -
                        } else {
  160         -
                            Vec::new()
  161         -
                        };
  162         -
                        deser.read_list(member, container, |mut list, deser| {
  163         -
                            list.push(deser.read_string(member)?);
  164         -
                            Ok(list)
  165         -
                        })?
  166         -
                    });
         156  +
                    builder.task_sets = Some(deser.read_string_list(member)?);
  167    157   
                }
  168    158   
                Some(3) => {
  169    159   
                    builder.include = Some({
  170         -
                        let container = if let Some(cap) = deser.container_size() {
  171         -
                            Vec::with_capacity(cap)
  172         -
                        } else {
  173         -
                            Vec::new()
  174         -
                        };
  175         -
                        deser.read_list(member, container, |mut list, deser| {
  176         -
                            list.push(crate::types::TaskSetField::from(deser.read_string(member)?.as_str()));
  177         -
                            Ok(list)
  178         -
                        })?
         160  +
                        let mut container = Vec::new();
         161  +
                        deser.read_list(member, &mut |deser| {
         162  +
                            container.push(crate::types::TaskSetField::from(deser.read_string(member)?.as_str()));
         163  +
                            Ok(())
         164  +
                        })?;
         165  +
                        container
  179    166   
                    });
  180    167   
                }
  181    168   
                _ => {}
  182    169   
            }
  183    170   
            Ok(())
  184    171   
        })?;
         172  +
        builder.cluster = builder.cluster.or(Some(String::new()));
         173  +
        builder.service = builder.service.or(Some(String::new()));
  185    174   
        builder
  186    175   
            .build()
  187    176   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  188    177   
    }
  189    178   
}
         179  +
impl DescribeTaskSetsInput {
         180  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         181  +
    pub fn deserialize_with_response(
         182  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         183  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         184  +
        _status: u16,
         185  +
        _body: &[u8],
         186  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         187  +
        Self::deserialize(deserializer)
         188  +
    }
         189  +
}
  190    190   
impl DescribeTaskSetsInput {
  191    191   
    /// Creates a new builder-style object to manufacture [`DescribeTaskSetsInput`](crate::operation::describe_task_sets::DescribeTaskSetsInput).
  192    192   
    pub fn builder() -> crate::operation::describe_task_sets::builders::DescribeTaskSetsInputBuilder {
  193    193   
        crate::operation::describe_task_sets::builders::DescribeTaskSetsInputBuilder::default()
  194    194   
    }
  195    195   
}
  196    196   
  197    197   
/// A builder for [`DescribeTaskSetsInput`](crate::operation::describe_task_sets::DescribeTaskSetsInput).
  198    198   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  199    199   
#[non_exhaustive]

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

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

tmp-codegen-diff/aws-sdk/sdk/ecs/src/operation/describe_tasks.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 `DescribeTasks`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeTasks;
    6      6   
impl DescribeTasks {
    7      7   
    /// Creates a new `DescribeTasks`
    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::describe_tasks::DescribeTasksInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_tasks::DescribeTasksOutput::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::describe_tasks::DescribeTasksInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::describe_tasks::DescribeTasksOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::describe_tasks::DescribeTasksError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +242,351 @@
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct DescribeTasksResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeTasksResponseDeserializer {
  145    149   
    fn deserialize_nonstreaming(
  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_describe_tasks::de_describe_tasks_http_error(status, headers, body)
  157         -
        } else {
  158         -
            crate::protocol_serde::shape_describe_tasks::de_describe_tasks_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::describe_tasks::DescribeTasksError::unhandled(generic)),
         172  +
                    ))
         173  +
                }
         174  +
            };
         175  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         176  +
            let protocol = _cfg
         177  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         178  +
                .expect("a SharedClientProtocol is required");
         179  +
            let err = match error_code {
         180  +
                "ClientException" => crate::operation::describe_tasks::DescribeTasksError::ClientException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::ClientException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::ClientException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
         197  +
                    };
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "ClusterNotFoundException" => crate::operation::describe_tasks::DescribeTasksError::ClusterNotFoundException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::ClusterNotFoundException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::ClusterNotFoundException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
  159    221   
                    };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "InvalidParameterException" => crate::operation::describe_tasks::DescribeTasksError::InvalidParameterException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "ServerException" => crate::operation::describe_tasks::DescribeTasksError::ServerException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::ServerException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::ServerException::deserialize_with_response(
         257  +
                                &mut *deser,
         258  +
                                response.headers(),
         259  +
                                response.status().into(),
         260  +
                                body,
         261  +
                            )
         262  +
                        }) {
         263  +
                        ::std::result::Result::Ok(val) => val,
         264  +
                        ::std::result::Result::Err(e) => {
         265  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         266  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         267  +
                            ))
         268  +
                        }
         269  +
                    };
         270  +
                    tmp.meta = generic;
         271  +
                    if tmp.message.is_none() {
         272  +
                        tmp.message = _error_message;
         273  +
                    }
         274  +
                    tmp
         275  +
                }),
         276  +
                _ => crate::operation::describe_tasks::DescribeTasksError::generic(generic),
         277  +
            };
         278  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         279  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         280  +
            ))
         281  +
        } else {
         282  +
            let protocol = _cfg
         283  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         284  +
                .expect("a SharedClientProtocol is required");
         285  +
            let mut deser = protocol.deserialize_response(response, DescribeTasks::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         286  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         287  +
            })?;
         288  +
            let body = response.body().bytes().expect("body loaded");
         289  +
            let output = crate::operation::describe_tasks::DescribeTasksOutput::deserialize_with_response(
         290  +
                &mut *deser,
         291  +
                response.headers(),
         292  +
                response.status().into(),
         293  +
                body,
         294  +
            )
         295  +
            .map_err(|e| {
         296  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         297  +
            })?;
         298  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         299  +
        }
  161    300   
    }
  162    301   
}
  163    302   
#[derive(Debug)]
  164    303   
struct DescribeTasksRequestSerializer;
  165    304   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeTasksRequestSerializer {
  166    305   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    306   
    fn serialize_input(
  168    307   
        &self,
  169    308   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    309   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    310   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    311   
        let input = input
  173    312   
            .downcast::<crate::operation::describe_tasks::DescribeTasksInput>()
  174    313   
            .expect("correct type");
  175         -
        let _header_serialization_settings = _cfg
  176         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  177         -
            .cloned()
  178         -
            .unwrap_or_default();
  179         -
        let mut request_builder = {
  180         -
            #[allow(clippy::uninlined_format_args)]
  181         -
            fn uri_base(
  182         -
                _input: &crate::operation::describe_tasks::DescribeTasksInput,
  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::describe_tasks::DescribeTasksInput,
  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.DescribeTasks",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_describe_tasks::ser_describe_tasks_input(&input)?);
  208         -
        if let Some(content_length) = body.content_length() {
  209         -
            let content_length = content_length.to_string();
  210         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  211         -
        }
  212         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         314  +
        let protocol = _cfg
         315  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         316  +
            .expect("a SharedClientProtocol is required");
         317  +
        let mut request = protocol
         318  +
            .serialize_request(&input, DescribeTasks::INPUT_SCHEMA, "", _cfg)
         319  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         320  +
         321  +
        return ::std::result::Result::Ok(request);
  213    322   
    }
  214    323   
}
  215    324   
#[derive(Debug)]
  216    325   
struct DescribeTasksEndpointParamsInterceptor;
  217    326   
  218    327   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeTasksEndpointParamsInterceptor {
  219    328   
    fn name(&self) -> &'static str {
  220    329   
        "DescribeTasksEndpointParamsInterceptor"
  221    330   
    }
  222    331   

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

@@ -85,85 +196,195 @@
  105    105   
                    }
  106    106   
                    Ok(())
  107    107   
                },
  108    108   
            )?;
  109    109   
        }
  110    110   
        Ok(())
  111    111   
    }
  112    112   
}
  113    113   
impl DescribeTasksInput {
  114    114   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  115         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  116         -
        deserializer: &mut D,
         115  +
    pub fn deserialize(
         116  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  117    117   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  118    118   
        #[allow(unused_variables, unused_mut)]
  119    119   
        let mut builder = Self::builder();
  120    120   
        #[allow(
  121    121   
            unused_variables,
  122    122   
            unreachable_code,
  123    123   
            clippy::single_match,
  124    124   
            clippy::match_single_binding,
  125    125   
            clippy::diverging_sub_expression
  126    126   
        )]
  127         -
        deserializer.read_struct(&DESCRIBETASKSINPUT_SCHEMA, (), |_, member, deser| {
         127  +
        deserializer.read_struct(&DESCRIBETASKSINPUT_SCHEMA, &mut |member, deser| {
  128    128   
            match member.member_index() {
  129    129   
                Some(0) => {
  130    130   
                    builder.cluster = Some(deser.read_string(member)?);
  131    131   
                }
  132    132   
                Some(1) => {
  133         -
                    builder.tasks = Some({
  134         -
                        let container = if let Some(cap) = deser.container_size() {
  135         -
                            Vec::with_capacity(cap)
  136         -
                        } else {
  137         -
                            Vec::new()
  138         -
                        };
  139         -
                        deser.read_list(member, container, |mut list, deser| {
  140         -
                            list.push(deser.read_string(member)?);
  141         -
                            Ok(list)
  142         -
                        })?
  143         -
                    });
         133  +
                    builder.tasks = Some(deser.read_string_list(member)?);
  144    134   
                }
  145    135   
                Some(2) => {
  146    136   
                    builder.include = Some({
  147         -
                        let container = if let Some(cap) = deser.container_size() {
  148         -
                            Vec::with_capacity(cap)
  149         -
                        } else {
  150         -
                            Vec::new()
  151         -
                        };
  152         -
                        deser.read_list(member, container, |mut list, deser| {
  153         -
                            list.push(crate::types::TaskField::from(deser.read_string(member)?.as_str()));
  154         -
                            Ok(list)
  155         -
                        })?
         137  +
                        let mut container = Vec::new();
         138  +
                        deser.read_list(member, &mut |deser| {
         139  +
                            container.push(crate::types::TaskField::from(deser.read_string(member)?.as_str()));
         140  +
                            Ok(())
         141  +
                        })?;
         142  +
                        container
  156    143   
                    });
  157    144   
                }
  158    145   
                _ => {}
  159    146   
            }
  160    147   
            Ok(())
  161    148   
        })?;
         149  +
        builder.tasks = builder.tasks.or(Some(Vec::new()));
  162    150   
        builder
  163    151   
            .build()
  164    152   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  165    153   
    }
  166    154   
}
         155  +
impl DescribeTasksInput {
         156  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         157  +
    pub fn deserialize_with_response(
         158  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         159  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         160  +
        _status: u16,
         161  +
        _body: &[u8],
         162  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         163  +
        Self::deserialize(deserializer)
         164  +
    }
         165  +
}
  167    166   
impl DescribeTasksInput {
  168    167   
    /// Creates a new builder-style object to manufacture [`DescribeTasksInput`](crate::operation::describe_tasks::DescribeTasksInput).
  169    168   
    pub fn builder() -> crate::operation::describe_tasks::builders::DescribeTasksInputBuilder {
  170    169   
        crate::operation::describe_tasks::builders::DescribeTasksInputBuilder::default()
  171    170   
    }
  172    171   
}
  173    172   
  174    173   
/// A builder for [`DescribeTasksInput`](crate::operation::describe_tasks::DescribeTasksInput).
  175    174   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  176    175   
#[non_exhaustive]

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

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

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

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

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

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

@@ -20,20 +138,189 @@
   40     40   
    "endpoint",
   41     41   
    0,
   42     42   
);
   43     43   
static DISCOVERPOLLENDPOINTOUTPUT_MEMBER_TELEMETRY_ENDPOINT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   44     44   
    ::aws_smithy_schema::ShapeId::from_static(
   45     45   
        "com.amazonaws.ecs.synthetic#DiscoverPollEndpointOutput$telemetryEndpoint",
   46     46   
        "com.amazonaws.ecs.synthetic",
   47     47   
        "DiscoverPollEndpointOutput",
   48     48   
    ),
   49     49   
    ::aws_smithy_schema::ShapeType::String,
   50         -
    "telemetry_endpoint",
          50  +
    "telemetryEndpoint",
   51     51   
    1,
   52     52   
);
   53     53   
static DISCOVERPOLLENDPOINTOUTPUT_MEMBER_SERVICE_CONNECT_ENDPOINT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   54     54   
    ::aws_smithy_schema::ShapeId::from_static(
   55     55   
        "com.amazonaws.ecs.synthetic#DiscoverPollEndpointOutput$serviceConnectEndpoint",
   56     56   
        "com.amazonaws.ecs.synthetic",
   57     57   
        "DiscoverPollEndpointOutput",
   58     58   
    ),
   59     59   
    ::aws_smithy_schema::ShapeType::String,
   60         -
    "service_connect_endpoint",
          60  +
    "serviceConnectEndpoint",
   61     61   
    2,
   62     62   
);
          63  +
static DISCOVERPOLLENDPOINTOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          64  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          65  +
    ::aws_smithy_schema::ShapeType::String,
          66  +
    "request_id",
          67  +
    3,
          68  +
)
          69  +
.with_http_header("x-amzn-requestid");
   63     70   
static DISCOVERPOLLENDPOINTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   64     71   
    DISCOVERPOLLENDPOINTOUTPUT_SCHEMA_ID,
   65     72   
    ::aws_smithy_schema::ShapeType::Structure,
   66     73   
    &[
   67     74   
        &DISCOVERPOLLENDPOINTOUTPUT_MEMBER_ENDPOINT,
   68     75   
        &DISCOVERPOLLENDPOINTOUTPUT_MEMBER_TELEMETRY_ENDPOINT,
   69     76   
        &DISCOVERPOLLENDPOINTOUTPUT_MEMBER_SERVICE_CONNECT_ENDPOINT,
          77  +
        &DISCOVERPOLLENDPOINTOUTPUT_MEMBER__REQUEST_ID,
   70     78   
    ],
   71     79   
);
   72     80   
impl DiscoverPollEndpointOutput {
   73     81   
    /// The schema for this shape.
   74     82   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DISCOVERPOLLENDPOINTOUTPUT_SCHEMA;
   75     83   
}
   76     84   
impl ::aws_smithy_schema::serde::SerializableStruct for DiscoverPollEndpointOutput {
   77     85   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   78     86   
    fn serialize_members(
   79     87   
        &self,
   80     88   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   81     89   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   82     90   
        if let Some(ref val) = self.endpoint {
   83     91   
            ser.write_string(&DISCOVERPOLLENDPOINTOUTPUT_MEMBER_ENDPOINT, val)?;
   84     92   
        }
   85     93   
        if let Some(ref val) = self.telemetry_endpoint {
   86     94   
            ser.write_string(&DISCOVERPOLLENDPOINTOUTPUT_MEMBER_TELEMETRY_ENDPOINT, val)?;
   87     95   
        }
   88     96   
        if let Some(ref val) = self.service_connect_endpoint {
   89     97   
            ser.write_string(&DISCOVERPOLLENDPOINTOUTPUT_MEMBER_SERVICE_CONNECT_ENDPOINT, val)?;
   90     98   
        }
   91     99   
        Ok(())
   92    100   
    }
   93    101   
}
   94    102   
impl DiscoverPollEndpointOutput {
   95    103   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   96         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   97         -
        deserializer: &mut D,
         104  +
    pub fn deserialize(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   98    106   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   99    107   
        #[allow(unused_variables, unused_mut)]
  100    108   
        let mut builder = Self::builder();
  101    109   
        #[allow(
  102    110   
            unused_variables,
  103    111   
            unreachable_code,
  104    112   
            clippy::single_match,
  105    113   
            clippy::match_single_binding,
  106    114   
            clippy::diverging_sub_expression
  107    115   
        )]
  108         -
        deserializer.read_struct(&DISCOVERPOLLENDPOINTOUTPUT_SCHEMA, (), |_, member, deser| {
         116  +
        deserializer.read_struct(&DISCOVERPOLLENDPOINTOUTPUT_SCHEMA, &mut |member, deser| {
         117  +
            match member.member_index() {
         118  +
                Some(0) => {
         119  +
                    builder.endpoint = Some(deser.read_string(member)?);
         120  +
                }
         121  +
                Some(1) => {
         122  +
                    builder.telemetry_endpoint = Some(deser.read_string(member)?);
         123  +
                }
         124  +
                Some(2) => {
         125  +
                    builder.service_connect_endpoint = Some(deser.read_string(member)?);
         126  +
                }
         127  +
                Some(3) => {
         128  +
                    builder._request_id = Some(deser.read_string(member)?);
         129  +
                }
         130  +
                _ => {}
         131  +
            }
         132  +
            Ok(())
         133  +
        })?;
         134  +
        Ok(builder.build())
         135  +
    }
         136  +
}
         137  +
impl DiscoverPollEndpointOutput {
         138  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         139  +
    /// Header-bound members are read directly from headers, avoiding runtime
         140  +
    /// member iteration overhead. Body members are read via the deserializer.
         141  +
    pub fn deserialize_with_response(
         142  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         143  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         144  +
        _status: u16,
         145  +
        _body: &[u8],
         146  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         147  +
        #[allow(unused_variables, unused_mut)]
         148  +
        let mut builder = Self::builder();
         149  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         150  +
            builder._request_id = Some(val.to_string());
         151  +
        }
         152  +
        #[allow(
         153  +
            unused_variables,
         154  +
            unreachable_code,
         155  +
            clippy::single_match,
         156  +
            clippy::match_single_binding,
         157  +
            clippy::diverging_sub_expression
         158  +
        )]
         159  +
        deserializer.read_struct(&DISCOVERPOLLENDPOINTOUTPUT_SCHEMA, &mut |member, deser| {
  109    160   
            match member.member_index() {
  110    161   
                Some(0) => {
  111    162   
                    builder.endpoint = Some(deser.read_string(member)?);
  112    163   
                }
  113    164   
                Some(1) => {
  114    165   
                    builder.telemetry_endpoint = Some(deser.read_string(member)?);
  115    166   
                }
  116    167   
                Some(2) => {
  117    168   
                    builder.service_connect_endpoint = Some(deser.read_string(member)?);
  118    169   
                }

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

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

@@ -105,105 +202,216 @@
  125    125   
            ser.write_boolean(&EXECUTECOMMANDINPUT_MEMBER_INTERACTIVE, *val)?;
  126    126   
        }
  127    127   
        if let Some(ref val) = self.task {
  128    128   
            ser.write_string(&EXECUTECOMMANDINPUT_MEMBER_TASK, val)?;
  129    129   
        }
  130    130   
        Ok(())
  131    131   
    }
  132    132   
}
  133    133   
impl ExecuteCommandInput {
  134    134   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  135         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  136         -
        deserializer: &mut D,
         135  +
    pub fn deserialize(
         136  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  137    137   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  138    138   
        #[allow(unused_variables, unused_mut)]
  139    139   
        let mut builder = Self::builder();
  140    140   
        #[allow(
  141    141   
            unused_variables,
  142    142   
            unreachable_code,
  143    143   
            clippy::single_match,
  144    144   
            clippy::match_single_binding,
  145    145   
            clippy::diverging_sub_expression
  146    146   
        )]
  147         -
        deserializer.read_struct(&EXECUTECOMMANDINPUT_SCHEMA, (), |_, member, deser| {
         147  +
        deserializer.read_struct(&EXECUTECOMMANDINPUT_SCHEMA, &mut |member, deser| {
  148    148   
            match member.member_index() {
  149    149   
                Some(0) => {
  150    150   
                    builder.cluster = Some(deser.read_string(member)?);
  151    151   
                }
  152    152   
                Some(1) => {
  153    153   
                    builder.container = Some(deser.read_string(member)?);
  154    154   
                }
  155    155   
                Some(2) => {
  156    156   
                    builder.command = Some(deser.read_string(member)?);
  157    157   
                }
  158    158   
                Some(3) => {
  159    159   
                    builder.interactive = Some(deser.read_boolean(member)?);
  160    160   
                }
  161    161   
                Some(4) => {
  162    162   
                    builder.task = Some(deser.read_string(member)?);
  163    163   
                }
  164    164   
                _ => {}
  165    165   
            }
  166    166   
            Ok(())
  167    167   
        })?;
         168  +
        builder.command = builder.command.or(Some(String::new()));
         169  +
        builder.interactive = builder.interactive.or(Some(false));
         170  +
        builder.task = builder.task.or(Some(String::new()));
  168    171   
        builder
  169    172   
            .build()
  170    173   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  171    174   
    }
  172    175   
}
         176  +
impl ExecuteCommandInput {
         177  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         178  +
    pub fn deserialize_with_response(
         179  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         180  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         181  +
        _status: u16,
         182  +
        _body: &[u8],
         183  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         184  +
        Self::deserialize(deserializer)
         185  +
    }
         186  +
}
  173    187   
impl ExecuteCommandInput {
  174    188   
    /// Creates a new builder-style object to manufacture [`ExecuteCommandInput`](crate::operation::execute_command::ExecuteCommandInput).
  175    189   
    pub fn builder() -> crate::operation::execute_command::builders::ExecuteCommandInputBuilder {
  176    190   
        crate::operation::execute_command::builders::ExecuteCommandInputBuilder::default()
  177    191   
    }
  178    192   
}
  179    193   
  180    194   
/// A builder for [`ExecuteCommandInput`](crate::operation::execute_command::ExecuteCommandInput).
  181    195   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  182    196   
#[non_exhaustive]