AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12

Files changed:

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_jobs/_list_jobs_input.rs

@@ -28,28 +232,250 @@
   48     48   
    "com.amazonaws.glacier.synthetic",
   49     49   
    "ListJobsInput",
   50     50   
);
   51     51   
static LISTJOBSINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   52     52   
    ::aws_smithy_schema::ShapeId::from_static(
   53     53   
        "com.amazonaws.glacier.synthetic#ListJobsInput$accountId",
   54     54   
        "com.amazonaws.glacier.synthetic",
   55     55   
        "ListJobsInput",
   56     56   
    ),
   57     57   
    ::aws_smithy_schema::ShapeType::String,
   58         -
    "account_id",
          58  +
    "accountId",
   59     59   
    0,
   60     60   
)
   61     61   
.with_http_label();
   62     62   
static LISTJOBSINPUT_MEMBER_VAULT_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   63     63   
    ::aws_smithy_schema::ShapeId::from_static(
   64     64   
        "com.amazonaws.glacier.synthetic#ListJobsInput$vaultName",
   65     65   
        "com.amazonaws.glacier.synthetic",
   66     66   
        "ListJobsInput",
   67     67   
    ),
   68     68   
    ::aws_smithy_schema::ShapeType::String,
   69         -
    "vault_name",
          69  +
    "vaultName",
   70     70   
    1,
   71     71   
)
   72     72   
.with_http_label();
   73     73   
static LISTJOBSINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   74     74   
    ::aws_smithy_schema::ShapeId::from_static(
   75     75   
        "com.amazonaws.glacier.synthetic#ListJobsInput$limit",
   76     76   
        "com.amazonaws.glacier.synthetic",
   77     77   
        "ListJobsInput",
   78     78   
    ),
   79     79   
    ::aws_smithy_schema::ShapeType::Integer,
   80     80   
    "limit",
   81     81   
    2,
   82     82   
)
   83     83   
.with_http_query("limit");
   84     84   
static LISTJOBSINPUT_MEMBER_MARKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   85     85   
    ::aws_smithy_schema::ShapeId::from_static(
   86     86   
        "com.amazonaws.glacier.synthetic#ListJobsInput$marker",
   87     87   
        "com.amazonaws.glacier.synthetic",
   88     88   
        "ListJobsInput",
   89     89   
    ),
   90     90   
    ::aws_smithy_schema::ShapeType::String,
   91     91   
    "marker",
   92     92   
    3,
   93     93   
)
   94     94   
.with_http_query("marker");
   95     95   
static LISTJOBSINPUT_MEMBER_STATUSCODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   96     96   
    ::aws_smithy_schema::ShapeId::from_static(
   97     97   
        "com.amazonaws.glacier.synthetic#ListJobsInput$statuscode",
   98     98   
        "com.amazonaws.glacier.synthetic",
   99     99   
        "ListJobsInput",
  100    100   
    ),
  101    101   
    ::aws_smithy_schema::ShapeType::String,
  102    102   
    "statuscode",
  103    103   
    4,
  104    104   
)
  105    105   
.with_http_query("statuscode");
  106    106   
static LISTJOBSINPUT_MEMBER_COMPLETED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  107    107   
    ::aws_smithy_schema::ShapeId::from_static(
  108    108   
        "com.amazonaws.glacier.synthetic#ListJobsInput$completed",
  109    109   
        "com.amazonaws.glacier.synthetic",
  110    110   
        "ListJobsInput",
  111    111   
    ),
  112    112   
    ::aws_smithy_schema::ShapeType::String,
  113    113   
    "completed",
  114    114   
    5,
  115    115   
)
  116    116   
.with_http_query("completed");
  117    117   
static LISTJOBSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  118    118   
    LISTJOBSINPUT_SCHEMA_ID,
  119    119   
    ::aws_smithy_schema::ShapeType::Structure,
  120    120   
    &[
  121    121   
        &LISTJOBSINPUT_MEMBER_ACCOUNT_ID,
  122    122   
        &LISTJOBSINPUT_MEMBER_VAULT_NAME,
  123    123   
        &LISTJOBSINPUT_MEMBER_LIMIT,
  124    124   
        &LISTJOBSINPUT_MEMBER_MARKER,
  125    125   
        &LISTJOBSINPUT_MEMBER_STATUSCODE,
  126    126   
        &LISTJOBSINPUT_MEMBER_COMPLETED,
  127    127   
    ],
  128         -
);
         128  +
)
         129  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
         130  +
    "GET",
         131  +
    "/{accountId}/vaults/{vaultName}/jobs",
         132  +
    None,
         133  +
));
  129    134   
impl ListJobsInput {
  130    135   
    /// The schema for this shape.
  131    136   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTJOBSINPUT_SCHEMA;
  132    137   
}
  133    138   
impl ::aws_smithy_schema::serde::SerializableStruct for ListJobsInput {
  134    139   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  135    140   
    fn serialize_members(
  136    141   
        &self,
  137    142   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  138    143   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  139    144   
        if let Some(ref val) = self.account_id {
  140    145   
            ser.write_string(&LISTJOBSINPUT_MEMBER_ACCOUNT_ID, val)?;
  141    146   
        }
  142    147   
        if let Some(ref val) = self.vault_name {
  143    148   
            ser.write_string(&LISTJOBSINPUT_MEMBER_VAULT_NAME, val)?;
  144    149   
        }
  145    150   
        if let Some(ref val) = self.limit {
  146    151   
            ser.write_integer(&LISTJOBSINPUT_MEMBER_LIMIT, *val)?;
  147    152   
        }
  148    153   
        if let Some(ref val) = self.marker {
  149    154   
            ser.write_string(&LISTJOBSINPUT_MEMBER_MARKER, val)?;
  150    155   
        }
  151    156   
        if let Some(ref val) = self.statuscode {
  152    157   
            ser.write_string(&LISTJOBSINPUT_MEMBER_STATUSCODE, val)?;
  153    158   
        }
  154    159   
        if let Some(ref val) = self.completed {
  155    160   
            ser.write_string(&LISTJOBSINPUT_MEMBER_COMPLETED, val)?;
  156    161   
        }
  157    162   
        Ok(())
  158    163   
    }
  159    164   
}
  160    165   
impl ListJobsInput {
  161    166   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  162         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  163         -
        deserializer: &mut D,
         167  +
    pub fn deserialize(
         168  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  164    169   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  165    170   
        #[allow(unused_variables, unused_mut)]
  166    171   
        let mut builder = Self::builder();
  167    172   
        #[allow(
  168    173   
            unused_variables,
  169    174   
            unreachable_code,
  170    175   
            clippy::single_match,
  171    176   
            clippy::match_single_binding,
  172    177   
            clippy::diverging_sub_expression
  173    178   
        )]
  174         -
        deserializer.read_struct(&LISTJOBSINPUT_SCHEMA, (), |_, member, deser| {
         179  +
        deserializer.read_struct(&LISTJOBSINPUT_SCHEMA, &mut |member, deser| {
  175    180   
            match member.member_index() {
  176    181   
                Some(0) => {
  177    182   
                    builder.account_id = Some(deser.read_string(member)?);
  178    183   
                }
  179    184   
                Some(1) => {
  180    185   
                    builder.vault_name = Some(deser.read_string(member)?);
  181    186   
                }
  182    187   
                Some(2) => {
  183    188   
                    builder.limit = Some(deser.read_integer(member)?);
  184    189   
                }
  185    190   
                Some(3) => {
  186    191   
                    builder.marker = Some(deser.read_string(member)?);
  187    192   
                }
  188    193   
                Some(4) => {
  189    194   
                    builder.statuscode = Some(deser.read_string(member)?);
  190    195   
                }
  191    196   
                Some(5) => {
  192    197   
                    builder.completed = Some(deser.read_string(member)?);
  193    198   
                }
  194    199   
                _ => {}
  195    200   
            }
  196    201   
            Ok(())
  197    202   
        })?;
         203  +
        builder.account_id = builder.account_id.or(Some(String::new()));
         204  +
        builder.vault_name = builder.vault_name.or(Some(String::new()));
  198    205   
        builder
  199    206   
            .build()
  200    207   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  201    208   
    }
  202    209   
}
         210  +
impl ListJobsInput {
         211  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         212  +
    pub fn deserialize_with_response(
         213  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         214  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         215  +
        _status: u16,
         216  +
        _body: &[u8],
         217  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         218  +
        Self::deserialize(deserializer)
         219  +
    }
         220  +
}
  203    221   
impl crate::glacier_interceptors::GlacierAccountId for ListJobsInput {
  204    222   
    fn account_id_mut(&mut self) -> &mut Option<String> {
  205    223   
        &mut self.account_id
  206    224   
    }
  207    225   
}
  208    226   
impl ListJobsInput {
  209    227   
    /// Creates a new builder-style object to manufacture [`ListJobsInput`](crate::operation::list_jobs::ListJobsInput).
  210    228   
    pub fn builder() -> crate::operation::list_jobs::builders::ListJobsInputBuilder {
  211    229   
        crate::operation::list_jobs::builders::ListJobsInputBuilder::default()
  212    230   
    }

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_jobs/_list_jobs_output.rs

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

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

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_multipart_uploads/_list_multipart_uploads_input.rs

@@ -16,16 +184,202 @@
   36     36   
    "com.amazonaws.glacier.synthetic",
   37     37   
    "ListMultipartUploadsInput",
   38     38   
);
   39     39   
static LISTMULTIPARTUPLOADSINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   40     40   
    ::aws_smithy_schema::ShapeId::from_static(
   41     41   
        "com.amazonaws.glacier.synthetic#ListMultipartUploadsInput$accountId",
   42     42   
        "com.amazonaws.glacier.synthetic",
   43     43   
        "ListMultipartUploadsInput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::String,
   46         -
    "account_id",
          46  +
    "accountId",
   47     47   
    0,
   48     48   
)
   49     49   
.with_http_label();
   50     50   
static LISTMULTIPARTUPLOADSINPUT_MEMBER_VAULT_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   51     51   
    ::aws_smithy_schema::ShapeId::from_static(
   52     52   
        "com.amazonaws.glacier.synthetic#ListMultipartUploadsInput$vaultName",
   53     53   
        "com.amazonaws.glacier.synthetic",
   54     54   
        "ListMultipartUploadsInput",
   55     55   
    ),
   56     56   
    ::aws_smithy_schema::ShapeType::String,
   57         -
    "vault_name",
          57  +
    "vaultName",
   58     58   
    1,
   59     59   
)
   60     60   
.with_http_label();
   61     61   
static LISTMULTIPARTUPLOADSINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   62     62   
    ::aws_smithy_schema::ShapeId::from_static(
   63     63   
        "com.amazonaws.glacier.synthetic#ListMultipartUploadsInput$limit",
   64     64   
        "com.amazonaws.glacier.synthetic",
   65     65   
        "ListMultipartUploadsInput",
   66     66   
    ),
   67     67   
    ::aws_smithy_schema::ShapeType::Integer,
   68     68   
    "limit",
   69     69   
    2,
   70     70   
)
   71     71   
.with_http_query("limit");
   72     72   
static LISTMULTIPARTUPLOADSINPUT_MEMBER_MARKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.glacier.synthetic#ListMultipartUploadsInput$marker",
   75     75   
        "com.amazonaws.glacier.synthetic",
   76     76   
        "ListMultipartUploadsInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::String,
   79     79   
    "marker",
   80     80   
    3,
   81     81   
)
   82     82   
.with_http_query("marker");
   83     83   
static LISTMULTIPARTUPLOADSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   84     84   
    LISTMULTIPARTUPLOADSINPUT_SCHEMA_ID,
   85     85   
    ::aws_smithy_schema::ShapeType::Structure,
   86     86   
    &[
   87     87   
        &LISTMULTIPARTUPLOADSINPUT_MEMBER_ACCOUNT_ID,
   88     88   
        &LISTMULTIPARTUPLOADSINPUT_MEMBER_VAULT_NAME,
   89     89   
        &LISTMULTIPARTUPLOADSINPUT_MEMBER_LIMIT,
   90     90   
        &LISTMULTIPARTUPLOADSINPUT_MEMBER_MARKER,
   91     91   
    ],
   92         -
);
          92  +
)
          93  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          94  +
    "GET",
          95  +
    "/{accountId}/vaults/{vaultName}/multipart-uploads",
          96  +
    None,
          97  +
));
   93     98   
impl ListMultipartUploadsInput {
   94     99   
    /// The schema for this shape.
   95    100   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTMULTIPARTUPLOADSINPUT_SCHEMA;
   96    101   
}
   97    102   
impl ::aws_smithy_schema::serde::SerializableStruct for ListMultipartUploadsInput {
   98    103   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   99    104   
    fn serialize_members(
  100    105   
        &self,
  101    106   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  102    107   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  103    108   
        if let Some(ref val) = self.account_id {
  104    109   
            ser.write_string(&LISTMULTIPARTUPLOADSINPUT_MEMBER_ACCOUNT_ID, val)?;
  105    110   
        }
  106    111   
        if let Some(ref val) = self.vault_name {
  107    112   
            ser.write_string(&LISTMULTIPARTUPLOADSINPUT_MEMBER_VAULT_NAME, val)?;
  108    113   
        }
  109    114   
        if let Some(ref val) = self.limit {
  110    115   
            ser.write_integer(&LISTMULTIPARTUPLOADSINPUT_MEMBER_LIMIT, *val)?;
  111    116   
        }
  112    117   
        if let Some(ref val) = self.marker {
  113    118   
            ser.write_string(&LISTMULTIPARTUPLOADSINPUT_MEMBER_MARKER, val)?;
  114    119   
        }
  115    120   
        Ok(())
  116    121   
    }
  117    122   
}
  118    123   
impl ListMultipartUploadsInput {
  119    124   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  120         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  121         -
        deserializer: &mut D,
         125  +
    pub fn deserialize(
         126  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  122    127   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  123    128   
        #[allow(unused_variables, unused_mut)]
  124    129   
        let mut builder = Self::builder();
  125    130   
        #[allow(
  126    131   
            unused_variables,
  127    132   
            unreachable_code,
  128    133   
            clippy::single_match,
  129    134   
            clippy::match_single_binding,
  130    135   
            clippy::diverging_sub_expression
  131    136   
        )]
  132         -
        deserializer.read_struct(&LISTMULTIPARTUPLOADSINPUT_SCHEMA, (), |_, member, deser| {
         137  +
        deserializer.read_struct(&LISTMULTIPARTUPLOADSINPUT_SCHEMA, &mut |member, deser| {
  133    138   
            match member.member_index() {
  134    139   
                Some(0) => {
  135    140   
                    builder.account_id = Some(deser.read_string(member)?);
  136    141   
                }
  137    142   
                Some(1) => {
  138    143   
                    builder.vault_name = Some(deser.read_string(member)?);
  139    144   
                }
  140    145   
                Some(2) => {
  141    146   
                    builder.limit = Some(deser.read_integer(member)?);
  142    147   
                }
  143    148   
                Some(3) => {
  144    149   
                    builder.marker = Some(deser.read_string(member)?);
  145    150   
                }
  146    151   
                _ => {}
  147    152   
            }
  148    153   
            Ok(())
  149    154   
        })?;
         155  +
        builder.account_id = builder.account_id.or(Some(String::new()));
         156  +
        builder.vault_name = builder.vault_name.or(Some(String::new()));
  150    157   
        builder
  151    158   
            .build()
  152    159   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  153    160   
    }
  154    161   
}
         162  +
impl ListMultipartUploadsInput {
         163  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         164  +
    pub fn deserialize_with_response(
         165  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         166  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         167  +
        _status: u16,
         168  +
        _body: &[u8],
         169  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         170  +
        Self::deserialize(deserializer)
         171  +
    }
         172  +
}
  155    173   
impl crate::glacier_interceptors::GlacierAccountId for ListMultipartUploadsInput {
  156    174   
    fn account_id_mut(&mut self) -> &mut Option<String> {
  157    175   
        &mut self.account_id
  158    176   
    }
  159    177   
}
  160    178   
impl ListMultipartUploadsInput {
  161    179   
    /// Creates a new builder-style object to manufacture [`ListMultipartUploadsInput`](crate::operation::list_multipart_uploads::ListMultipartUploadsInput).
  162    180   
    pub fn builder() -> crate::operation::list_multipart_uploads::builders::ListMultipartUploadsInputBuilder {
  163    181   
        crate::operation::list_multipart_uploads::builders::ListMultipartUploadsInputBuilder::default()
  164    182   
    }

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_multipart_uploads/_list_multipart_uploads_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_parts.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 `ListParts`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListParts;
    6      6   
impl ListParts {
    7      7   
    /// Creates a new `ListParts`
    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::list_parts::ListPartsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_parts::ListPartsOutput::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::list_parts::ListPartsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_parts::ListPartsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_parts::ListPartsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +292,394 @@
  138    142   
                crate::operation::list_parts::ListPartsError,
  139    143   
            >::new());
  140    144   
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct ListPartsResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListPartsResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_list_parts::de_list_parts_http_error(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::list_parts::ListPartsError::unhandled(generic)),
         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  +
                "InvalidParameterValueException" => crate::operation::list_parts::ListPartsError::InvalidParameterValueException({
         184  +
                    let mut tmp = match protocol
         185  +
                        .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         186  +
                        .and_then(|mut deser| {
         187  +
                            crate::types::error::InvalidParameterValueException::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  +
                "MissingParameterValueException" => crate::operation::list_parts::ListPartsError::MissingParameterValueException({
         208  +
                    let mut tmp = match protocol
         209  +
                        .deserialize_response(response, crate::types::error::MissingParameterValueException::SCHEMA, _cfg)
         210  +
                        .and_then(|mut deser| {
         211  +
                            crate::types::error::MissingParameterValueException::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  +
                "ResourceNotFoundException" => crate::operation::list_parts::ListPartsError::ResourceNotFoundException({
         232  +
                    let mut tmp = match protocol
         233  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         234  +
                        .and_then(|mut deser| {
         235  +
                            crate::types::error::ResourceNotFoundException::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  +
                        }
         248  +
                    };
         249  +
                    tmp.meta = generic;
         250  +
                    if tmp.message.is_none() {
         251  +
                        tmp.message = _error_message;
         252  +
                    }
         253  +
                    tmp
         254  +
                }),
         255  +
                "ServiceUnavailableException" => crate::operation::list_parts::ListPartsError::ServiceUnavailableException({
         256  +
                    let mut tmp = match protocol
         257  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         258  +
                        .and_then(|mut deser| {
         259  +
                            crate::types::error::ServiceUnavailableException::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  +
                _ => crate::operation::list_parts::ListPartsError::generic(generic),
         280  +
            };
         281  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         282  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         283  +
            ))
  160    284   
        } else {
  161         -
            crate::protocol_serde::shape_list_parts::de_list_parts_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         285  +
            let protocol = _cfg
         286  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         287  +
                .expect("a SharedClientProtocol is required");
         288  +
            let mut deser = protocol.deserialize_response(response, ListParts::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         289  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         290  +
            })?;
         291  +
            let body = response.body().bytes().expect("body loaded");
         292  +
            let output = crate::operation::list_parts::ListPartsOutput::deserialize_with_response(
         293  +
                &mut *deser,
         294  +
                response.headers(),
         295  +
                response.status().into(),
         296  +
                body,
         297  +
            )
         298  +
            .map_err(|e| {
         299  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         300  +
            })?;
         301  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         302  +
        }
  164    303   
    }
  165    304   
}
  166    305   
#[derive(Debug)]
  167    306   
struct ListPartsRequestSerializer;
  168    307   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListPartsRequestSerializer {
  169    308   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    309   
    fn serialize_input(
  171    310   
        &self,
  172    311   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    312   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    313   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    314   
        let input = input.downcast::<crate::operation::list_parts::ListPartsInput>().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::list_parts::ListPartsInput,
  184         -
                output: &mut ::std::string::String,
  185         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  186         -
                use ::std::fmt::Write as _;
  187         -
                let input_1 = &_input.account_id;
  188         -
                let input_1 = input_1
  189         -
                    .as_ref()
  190         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("account_id", "cannot be empty or unset"))?;
  191         -
                let account_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  192         -
                if account_id.is_empty() {
  193         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  194         -
                        "account_id",
  195         -
                        "cannot be empty or unset",
  196         -
                    ));
         315  +
        let protocol = _cfg
         316  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         317  +
            .expect("a SharedClientProtocol is required");
         318  +
        if protocol.supports_http_bindings() {
         319  +
            let mut request = protocol
         320  +
                .serialize_body(&input, ListParts::INPUT_SCHEMA, "", _cfg)
         321  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         322  +
            {
         323  +
                let mut uri = "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}".to_string();
         324  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         325  +
                if let Some(ref val) = input.account_id {
         326  +
                    uri = uri.replace("{accountId}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  197    327   
                }
  198         -
                let input_2 = &_input.vault_name;
  199         -
                let input_2 = input_2
  200         -
                    .as_ref()
  201         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("vault_name", "cannot be empty or unset"))?;
  202         -
                let vault_name = ::aws_smithy_http::label::fmt_string(input_2, ::aws_smithy_http::label::EncodingStrategy::Default);
  203         -
                if vault_name.is_empty() {
  204         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  205         -
                        "vault_name",
  206         -
                        "cannot be empty or unset",
  207         -
                    ));
         328  +
                if let Some(ref val) = input.vault_name {
         329  +
                    uri = uri.replace("{vaultName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  208    330   
                }
  209         -
                let input_3 = &_input.upload_id;
  210         -
                let input_3 = input_3
  211         -
                    .as_ref()
  212         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("upload_id", "cannot be empty or unset"))?;
  213         -
                let upload_id = ::aws_smithy_http::label::fmt_string(input_3, ::aws_smithy_http::label::EncodingStrategy::Default);
  214         -
                if upload_id.is_empty() {
  215         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  216         -
                        "upload_id",
  217         -
                        "cannot be empty or unset",
  218         -
                    ));
         331  +
                if let Some(ref val) = input.upload_id {
         332  +
                    uri = uri.replace("{uploadId}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  219    333   
                }
  220         -
                ::std::write!(
  221         -
                    output,
  222         -
                    "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}",
  223         -
                    accountId = account_id,
  224         -
                    vaultName = vault_name,
  225         -
                    uploadId = upload_id
  226         -
                )
  227         -
                .expect("formatting should succeed");
  228         -
                ::std::result::Result::Ok(())
  229         -
            }
  230         -
            fn uri_query(
  231         -
                _input: &crate::operation::list_parts::ListPartsInput,
  232         -
                mut output: &mut ::std::string::String,
  233         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  234         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  235         -
                if let ::std::option::Option::Some(inner_4) = &_input.marker {
  236         -
                    {
  237         -
                        query.push_kv("marker", &::aws_smithy_http::query::fmt_string(inner_4));
  238         -
                    }
         334  +
                if let Some(ref val) = input.marker {
         335  +
                    query_params.push(("marker".to_string(), val.to_string()));
  239    336   
                }
  240         -
                if let ::std::option::Option::Some(inner_5) = &_input.limit {
  241         -
                    {
  242         -
                        query.push_kv("limit", ::aws_smithy_types::primitive::Encoder::from(*inner_5).encode());
  243         -
                    }
         337  +
                if let Some(ref val) = input.limit {
         338  +
                    query_params.push(("limit".to_string(), val.to_string()));
  244    339   
                }
  245         -
                ::std::result::Result::Ok(())
  246         -
            }
  247         -
            #[allow(clippy::unnecessary_wraps)]
  248         -
            fn update_http_builder(
  249         -
                input: &crate::operation::list_parts::ListPartsInput,
  250         -
                builder: ::http_1x::request::Builder,
  251         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  252         -
                let mut uri = ::std::string::String::new();
  253         -
                uri_base(input, &mut uri)?;
  254         -
                uri_query(input, &mut uri)?;
  255         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
         340  +
                if !query_params.is_empty() {
         341  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         342  +
                    let pairs: Vec<String> = query_params
         343  +
                        .iter()
         344  +
                        .map(|(k, v)| {
         345  +
                            format!(
         346  +
                                "{}={}",
         347  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         348  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         349  +
                            )
         350  +
                        })
         351  +
                        .collect();
         352  +
                    uri.push_str(&pairs.join("&"));
         353  +
                }
         354  +
                request.set_uri(uri.as_str()).expect("valid URI");
  256    355   
            }
  257         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  258         -
            builder
  259         -
        };
  260         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  261    356   
  262         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         357  +
            return ::std::result::Result::Ok(request);
         358  +
        } else {
         359  +
            let mut request = protocol
         360  +
                .serialize_request(&input, ListParts::INPUT_SCHEMA, "", _cfg)
         361  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         362  +
         363  +
            return ::std::result::Result::Ok(request);
         364  +
        }
  263    365   
    }
  264    366   
}
  265    367   
#[derive(Debug)]
  266    368   
struct ListPartsEndpointParamsInterceptor;
  267    369   
  268    370   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListPartsEndpointParamsInterceptor {
  269    371   
    fn name(&self) -> &'static str {
  270    372   
        "ListPartsEndpointParamsInterceptor"
  271    373   
    }
  272    374   

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_parts/_list_parts_input.rs

@@ -22,22 +208,227 @@
   42     42   
    "com.amazonaws.glacier.synthetic",
   43     43   
    "ListPartsInput",
   44     44   
);
   45     45   
static LISTPARTSINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   46     46   
    ::aws_smithy_schema::ShapeId::from_static(
   47     47   
        "com.amazonaws.glacier.synthetic#ListPartsInput$accountId",
   48     48   
        "com.amazonaws.glacier.synthetic",
   49     49   
        "ListPartsInput",
   50     50   
    ),
   51     51   
    ::aws_smithy_schema::ShapeType::String,
   52         -
    "account_id",
          52  +
    "accountId",
   53     53   
    0,
   54     54   
)
   55     55   
.with_http_label();
   56     56   
static LISTPARTSINPUT_MEMBER_VAULT_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   57     57   
    ::aws_smithy_schema::ShapeId::from_static(
   58     58   
        "com.amazonaws.glacier.synthetic#ListPartsInput$vaultName",
   59     59   
        "com.amazonaws.glacier.synthetic",
   60     60   
        "ListPartsInput",
   61     61   
    ),
   62     62   
    ::aws_smithy_schema::ShapeType::String,
   63         -
    "vault_name",
          63  +
    "vaultName",
   64     64   
    1,
   65     65   
)
   66     66   
.with_http_label();
   67     67   
static LISTPARTSINPUT_MEMBER_UPLOAD_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   68     68   
    ::aws_smithy_schema::ShapeId::from_static(
   69     69   
        "com.amazonaws.glacier.synthetic#ListPartsInput$uploadId",
   70     70   
        "com.amazonaws.glacier.synthetic",
   71     71   
        "ListPartsInput",
   72     72   
    ),
   73     73   
    ::aws_smithy_schema::ShapeType::String,
   74         -
    "upload_id",
          74  +
    "uploadId",
   75     75   
    2,
   76     76   
)
   77     77   
.with_http_label();
   78     78   
static LISTPARTSINPUT_MEMBER_MARKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   79     79   
    ::aws_smithy_schema::ShapeId::from_static(
   80     80   
        "com.amazonaws.glacier.synthetic#ListPartsInput$marker",
   81     81   
        "com.amazonaws.glacier.synthetic",
   82     82   
        "ListPartsInput",
   83     83   
    ),
   84     84   
    ::aws_smithy_schema::ShapeType::String,
   85     85   
    "marker",
   86     86   
    3,
   87     87   
)
   88     88   
.with_http_query("marker");
   89     89   
static LISTPARTSINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   90     90   
    ::aws_smithy_schema::ShapeId::from_static(
   91     91   
        "com.amazonaws.glacier.synthetic#ListPartsInput$limit",
   92     92   
        "com.amazonaws.glacier.synthetic",
   93     93   
        "ListPartsInput",
   94     94   
    ),
   95     95   
    ::aws_smithy_schema::ShapeType::Integer,
   96     96   
    "limit",
   97     97   
    4,
   98     98   
)
   99     99   
.with_http_query("limit");
  100    100   
static LISTPARTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  101    101   
    LISTPARTSINPUT_SCHEMA_ID,
  102    102   
    ::aws_smithy_schema::ShapeType::Structure,
  103    103   
    &[
  104    104   
        &LISTPARTSINPUT_MEMBER_ACCOUNT_ID,
  105    105   
        &LISTPARTSINPUT_MEMBER_VAULT_NAME,
  106    106   
        &LISTPARTSINPUT_MEMBER_UPLOAD_ID,
  107    107   
        &LISTPARTSINPUT_MEMBER_MARKER,
  108    108   
        &LISTPARTSINPUT_MEMBER_LIMIT,
  109    109   
    ],
  110         -
);
         110  +
)
         111  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
         112  +
    "GET",
         113  +
    "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}",
         114  +
    None,
         115  +
));
  111    116   
impl ListPartsInput {
  112    117   
    /// The schema for this shape.
  113    118   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTPARTSINPUT_SCHEMA;
  114    119   
}
  115    120   
impl ::aws_smithy_schema::serde::SerializableStruct for ListPartsInput {
  116    121   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  117    122   
    fn serialize_members(
  118    123   
        &self,
  119    124   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  120    125   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  121    126   
        if let Some(ref val) = self.account_id {
  122    127   
            ser.write_string(&LISTPARTSINPUT_MEMBER_ACCOUNT_ID, val)?;
  123    128   
        }
  124    129   
        if let Some(ref val) = self.vault_name {
  125    130   
            ser.write_string(&LISTPARTSINPUT_MEMBER_VAULT_NAME, val)?;
  126    131   
        }
  127    132   
        if let Some(ref val) = self.upload_id {
  128    133   
            ser.write_string(&LISTPARTSINPUT_MEMBER_UPLOAD_ID, val)?;
  129    134   
        }
  130    135   
        if let Some(ref val) = self.marker {
  131    136   
            ser.write_string(&LISTPARTSINPUT_MEMBER_MARKER, val)?;
  132    137   
        }
  133    138   
        if let Some(ref val) = self.limit {
  134    139   
            ser.write_integer(&LISTPARTSINPUT_MEMBER_LIMIT, *val)?;
  135    140   
        }
  136    141   
        Ok(())
  137    142   
    }
  138    143   
}
  139    144   
impl ListPartsInput {
  140    145   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  141         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  142         -
        deserializer: &mut D,
         146  +
    pub fn deserialize(
         147  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  143    148   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  144    149   
        #[allow(unused_variables, unused_mut)]
  145    150   
        let mut builder = Self::builder();
  146    151   
        #[allow(
  147    152   
            unused_variables,
  148    153   
            unreachable_code,
  149    154   
            clippy::single_match,
  150    155   
            clippy::match_single_binding,
  151    156   
            clippy::diverging_sub_expression
  152    157   
        )]
  153         -
        deserializer.read_struct(&LISTPARTSINPUT_SCHEMA, (), |_, member, deser| {
         158  +
        deserializer.read_struct(&LISTPARTSINPUT_SCHEMA, &mut |member, deser| {
  154    159   
            match member.member_index() {
  155    160   
                Some(0) => {
  156    161   
                    builder.account_id = Some(deser.read_string(member)?);
  157    162   
                }
  158    163   
                Some(1) => {
  159    164   
                    builder.vault_name = Some(deser.read_string(member)?);
  160    165   
                }
  161    166   
                Some(2) => {
  162    167   
                    builder.upload_id = Some(deser.read_string(member)?);
  163    168   
                }
  164    169   
                Some(3) => {
  165    170   
                    builder.marker = Some(deser.read_string(member)?);
  166    171   
                }
  167    172   
                Some(4) => {
  168    173   
                    builder.limit = Some(deser.read_integer(member)?);
  169    174   
                }
  170    175   
                _ => {}
  171    176   
            }
  172    177   
            Ok(())
  173    178   
        })?;
         179  +
        builder.account_id = builder.account_id.or(Some(String::new()));
         180  +
        builder.vault_name = builder.vault_name.or(Some(String::new()));
         181  +
        builder.upload_id = builder.upload_id.or(Some(String::new()));
  174    182   
        builder
  175    183   
            .build()
  176    184   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  177    185   
    }
  178    186   
}
         187  +
impl ListPartsInput {
         188  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         189  +
    pub fn deserialize_with_response(
         190  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         191  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         192  +
        _status: u16,
         193  +
        _body: &[u8],
         194  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         195  +
        Self::deserialize(deserializer)
         196  +
    }
         197  +
}
  179    198   
impl crate::glacier_interceptors::GlacierAccountId for ListPartsInput {
  180    199   
    fn account_id_mut(&mut self) -> &mut Option<String> {
  181    200   
        &mut self.account_id
  182    201   
    }
  183    202   
}
  184    203   
impl ListPartsInput {
  185    204   
    /// Creates a new builder-style object to manufacture [`ListPartsInput`](crate::operation::list_parts::ListPartsInput).
  186    205   
    pub fn builder() -> crate::operation::list_parts::builders::ListPartsInputBuilder {
  187    206   
        crate::operation::list_parts::builders::ListPartsInputBuilder::default()
  188    207   
    }

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_parts/_list_parts_output.rs

@@ -37,37 +257,324 @@
   57     57   
    "com.amazonaws.glacier.synthetic",
   58     58   
    "ListPartsOutput",
   59     59   
);
   60     60   
static LISTPARTSOUTPUT_MEMBER_MULTIPART_UPLOAD_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   61     61   
    ::aws_smithy_schema::ShapeId::from_static(
   62     62   
        "com.amazonaws.glacier.synthetic#ListPartsOutput$MultipartUploadId",
   63     63   
        "com.amazonaws.glacier.synthetic",
   64     64   
        "ListPartsOutput",
   65     65   
    ),
   66     66   
    ::aws_smithy_schema::ShapeType::String,
   67         -
    "multipart_upload_id",
          67  +
    "MultipartUploadId",
   68     68   
    0,
   69     69   
);
   70     70   
static LISTPARTSOUTPUT_MEMBER_VAULT_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "com.amazonaws.glacier.synthetic#ListPartsOutput$VaultARN",
   73     73   
        "com.amazonaws.glacier.synthetic",
   74     74   
        "ListPartsOutput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::String,
   77         -
    "vault_arn",
          77  +
    "VaultARN",
   78     78   
    1,
   79     79   
);
   80     80   
static LISTPARTSOUTPUT_MEMBER_ARCHIVE_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   81     81   
    ::aws_smithy_schema::ShapeId::from_static(
   82     82   
        "com.amazonaws.glacier.synthetic#ListPartsOutput$ArchiveDescription",
   83     83   
        "com.amazonaws.glacier.synthetic",
   84     84   
        "ListPartsOutput",
   85     85   
    ),
   86     86   
    ::aws_smithy_schema::ShapeType::String,
   87         -
    "archive_description",
          87  +
    "ArchiveDescription",
   88     88   
    2,
   89     89   
);
   90     90   
static LISTPARTSOUTPUT_MEMBER_PART_SIZE_IN_BYTES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   91     91   
    ::aws_smithy_schema::ShapeId::from_static(
   92     92   
        "com.amazonaws.glacier.synthetic#ListPartsOutput$PartSizeInBytes",
   93     93   
        "com.amazonaws.glacier.synthetic",
   94     94   
        "ListPartsOutput",
   95     95   
    ),
   96     96   
    ::aws_smithy_schema::ShapeType::Long,
   97         -
    "part_size_in_bytes",
          97  +
    "PartSizeInBytes",
   98     98   
    3,
   99     99   
);
  100    100   
static LISTPARTSOUTPUT_MEMBER_CREATION_DATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  101    101   
    ::aws_smithy_schema::ShapeId::from_static(
  102    102   
        "com.amazonaws.glacier.synthetic#ListPartsOutput$CreationDate",
  103    103   
        "com.amazonaws.glacier.synthetic",
  104    104   
        "ListPartsOutput",
  105    105   
    ),
  106    106   
    ::aws_smithy_schema::ShapeType::String,
  107         -
    "creation_date",
         107  +
    "CreationDate",
  108    108   
    4,
  109    109   
);
  110    110   
static LISTPARTSOUTPUT_MEMBER_PARTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  111    111   
    ::aws_smithy_schema::ShapeId::from_static(
  112    112   
        "com.amazonaws.glacier.synthetic#ListPartsOutput$Parts",
  113    113   
        "com.amazonaws.glacier.synthetic",
  114    114   
        "ListPartsOutput",
  115    115   
    ),
  116    116   
    ::aws_smithy_schema::ShapeType::List,
  117         -
    "parts",
         117  +
    "Parts",
  118    118   
    5,
  119    119   
);
  120    120   
static LISTPARTSOUTPUT_MEMBER_MARKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  121    121   
    ::aws_smithy_schema::ShapeId::from_static(
  122    122   
        "com.amazonaws.glacier.synthetic#ListPartsOutput$Marker",
  123    123   
        "com.amazonaws.glacier.synthetic",
  124    124   
        "ListPartsOutput",
  125    125   
    ),
  126    126   
    ::aws_smithy_schema::ShapeType::String,
  127         -
    "marker",
         127  +
    "Marker",
  128    128   
    6,
  129    129   
);
         130  +
static LISTPARTSOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         131  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         132  +
    ::aws_smithy_schema::ShapeType::String,
         133  +
    "request_id",
         134  +
    7,
         135  +
)
         136  +
.with_http_header("x-amzn-requestid");
  130    137   
static LISTPARTSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  131    138   
    LISTPARTSOUTPUT_SCHEMA_ID,
  132    139   
    ::aws_smithy_schema::ShapeType::Structure,
  133    140   
    &[
  134    141   
        &LISTPARTSOUTPUT_MEMBER_MULTIPART_UPLOAD_ID,
  135    142   
        &LISTPARTSOUTPUT_MEMBER_VAULT_ARN,
  136    143   
        &LISTPARTSOUTPUT_MEMBER_ARCHIVE_DESCRIPTION,
  137    144   
        &LISTPARTSOUTPUT_MEMBER_PART_SIZE_IN_BYTES,
  138    145   
        &LISTPARTSOUTPUT_MEMBER_CREATION_DATE,
  139    146   
        &LISTPARTSOUTPUT_MEMBER_PARTS,
  140    147   
        &LISTPARTSOUTPUT_MEMBER_MARKER,
         148  +
        &LISTPARTSOUTPUT_MEMBER__REQUEST_ID,
  141    149   
    ],
  142    150   
);
  143    151   
impl ListPartsOutput {
  144    152   
    /// The schema for this shape.
  145    153   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTPARTSOUTPUT_SCHEMA;
  146    154   
}
  147    155   
impl ::aws_smithy_schema::serde::SerializableStruct for ListPartsOutput {
  148    156   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  149    157   
    fn serialize_members(
  150    158   
        &self,
  151    159   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  152    160   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  153    161   
        if let Some(ref val) = self.multipart_upload_id {
  154    162   
            ser.write_string(&LISTPARTSOUTPUT_MEMBER_MULTIPART_UPLOAD_ID, val)?;
  155    163   
        }
  156    164   
        if let Some(ref val) = self.vault_arn {
  157    165   
            ser.write_string(&LISTPARTSOUTPUT_MEMBER_VAULT_ARN, val)?;
  158    166   
        }
  159    167   
        if let Some(ref val) = self.archive_description {
  160    168   
            ser.write_string(&LISTPARTSOUTPUT_MEMBER_ARCHIVE_DESCRIPTION, val)?;
  161    169   
        }
  162    170   
        {
  163    171   
            let val = &self.part_size_in_bytes;
  164    172   
            ser.write_long(&LISTPARTSOUTPUT_MEMBER_PART_SIZE_IN_BYTES, *val)?;
  165    173   
        }
  166    174   
        if let Some(ref val) = self.creation_date {
  167    175   
            ser.write_string(&LISTPARTSOUTPUT_MEMBER_CREATION_DATE, val)?;
  168    176   
        }
  169    177   
        if let Some(ref val) = self.parts {
  170    178   
            ser.write_list(
  171    179   
                &LISTPARTSOUTPUT_MEMBER_PARTS,
  172    180   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  173    181   
                    for item in val {
  174    182   
                        ser.write_struct(crate::types::PartListElement::SCHEMA, item)?;
  175    183   
                    }
  176    184   
                    Ok(())
  177    185   
                },
  178    186   
            )?;
  179    187   
        }
  180    188   
        if let Some(ref val) = self.marker {
  181    189   
            ser.write_string(&LISTPARTSOUTPUT_MEMBER_MARKER, val)?;
  182    190   
        }
  183    191   
        Ok(())
  184    192   
    }
  185    193   
}
  186    194   
impl ListPartsOutput {
  187    195   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  188         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  189         -
        deserializer: &mut D,
         196  +
    pub fn deserialize(
         197  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         198  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         199  +
        #[allow(unused_variables, unused_mut)]
         200  +
        let mut builder = Self::builder();
         201  +
        #[allow(
         202  +
            unused_variables,
         203  +
            unreachable_code,
         204  +
            clippy::single_match,
         205  +
            clippy::match_single_binding,
         206  +
            clippy::diverging_sub_expression
         207  +
        )]
         208  +
        deserializer.read_struct(&LISTPARTSOUTPUT_SCHEMA, &mut |member, deser| {
         209  +
            match member.member_index() {
         210  +
                Some(0) => {
         211  +
                    builder.multipart_upload_id = Some(deser.read_string(member)?);
         212  +
                }
         213  +
                Some(1) => {
         214  +
                    builder.vault_arn = Some(deser.read_string(member)?);
         215  +
                }
         216  +
                Some(2) => {
         217  +
                    builder.archive_description = Some(deser.read_string(member)?);
         218  +
                }
         219  +
                Some(3) => {
         220  +
                    builder.part_size_in_bytes = Some(deser.read_long(member)?);
         221  +
                }
         222  +
                Some(4) => {
         223  +
                    builder.creation_date = Some(deser.read_string(member)?);
         224  +
                }
         225  +
                Some(5) => {
         226  +
                    builder.parts = Some({
         227  +
                        let mut container = Vec::new();
         228  +
                        deser.read_list(member, &mut |deser| {
         229  +
                            container.push(crate::types::PartListElement::deserialize(deser)?);
         230  +
                            Ok(())
         231  +
                        })?;
         232  +
                        container
         233  +
                    });
         234  +
                }
         235  +
                Some(6) => {
         236  +
                    builder.marker = Some(deser.read_string(member)?);
         237  +
                }
         238  +
                Some(7) => {
         239  +
                    builder._request_id = Some(deser.read_string(member)?);
         240  +
                }
         241  +
                _ => {}
         242  +
            }
         243  +
            Ok(())
         244  +
        })?;
         245  +
        Ok(builder.build())
         246  +
    }
         247  +
}
         248  +
impl ListPartsOutput {
         249  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         250  +
    /// Header-bound members are read directly from headers, avoiding runtime
         251  +
    /// member iteration overhead. Body members are read via the deserializer.
         252  +
    pub fn deserialize_with_response(
         253  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         254  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         255  +
        _status: u16,
         256  +
        _body: &[u8],
  190    257   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  191    258   
        #[allow(unused_variables, unused_mut)]
  192    259   
        let mut builder = Self::builder();
         260  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         261  +
            builder._request_id = Some(val.to_string());
         262  +
        }
  193    263   
        #[allow(
  194    264   
            unused_variables,
  195    265   
            unreachable_code,
  196    266   
            clippy::single_match,
  197    267   
            clippy::match_single_binding,
  198    268   
            clippy::diverging_sub_expression
  199    269   
        )]
  200         -
        deserializer.read_struct(&LISTPARTSOUTPUT_SCHEMA, (), |_, member, deser| {
         270  +
        deserializer.read_struct(&LISTPARTSOUTPUT_SCHEMA, &mut |member, deser| {
  201    271   
            match member.member_index() {
  202    272   
                Some(0) => {
  203    273   
                    builder.multipart_upload_id = Some(deser.read_string(member)?);
  204    274   
                }
  205    275   
                Some(1) => {
  206    276   
                    builder.vault_arn = Some(deser.read_string(member)?);
  207    277   
                }
  208    278   
                Some(2) => {
  209    279   
                    builder.archive_description = Some(deser.read_string(member)?);
  210    280   
                }
  211    281   
                Some(3) => {
  212    282   
                    builder.part_size_in_bytes = Some(deser.read_long(member)?);
  213    283   
                }
  214    284   
                Some(4) => {
  215    285   
                    builder.creation_date = Some(deser.read_string(member)?);
  216    286   
                }
  217    287   
                Some(5) => {
  218    288   
                    builder.parts = Some({
  219         -
                        let container = if let Some(cap) = deser.container_size() {
  220         -
                            Vec::with_capacity(cap)
  221         -
                        } else {
  222         -
                            Vec::new()
  223         -
                        };
  224         -
                        deser.read_list(member, container, |mut list, deser| {
  225         -
                            list.push(crate::types::PartListElement::deserialize(deser)?);
  226         -
                            Ok(list)
  227         -
                        })?
         289  +
                        let mut container = Vec::new();
         290  +
                        deser.read_list(member, &mut |deser| {
         291  +
                            container.push(crate::types::PartListElement::deserialize(deser)?);
         292  +
                            Ok(())
         293  +
                        })?;
         294  +
                        container
  228    295   
                    });
  229    296   
                }
  230    297   
                Some(6) => {
  231    298   
                    builder.marker = Some(deser.read_string(member)?);
  232    299   
                }
  233    300   
                _ => {}
  234    301   
            }
  235    302   
            Ok(())
  236    303   
        })?;
  237    304   
        Ok(builder.build())

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_provisioned_capacity.rs

@@ -1,1 +40,45 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `ListProvisionedCapacity`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListProvisionedCapacity;
    6      6   
impl ListProvisionedCapacity {
    7      7   
    /// Creates a new `ListProvisionedCapacity`
    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::list_provisioned_capacity::ListProvisionedCapacityInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          15  +
        crate::operation::list_provisioned_capacity::ListProvisionedCapacityOutput::SCHEMA;
   11     16   
    pub(crate) async fn orchestrate(
   12     17   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     18   
        input: crate::operation::list_provisioned_capacity::ListProvisionedCapacityInput,
   14     19   
    ) -> ::std::result::Result<
   15     20   
        crate::operation::list_provisioned_capacity::ListProvisionedCapacityOutput,
   16     21   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     22   
            crate::operation::list_provisioned_capacity::ListProvisionedCapacityError,
   18     23   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     24   
        >,
   20     25   
    > {
@@ -121,126 +250,374 @@
  141    146   
                crate::operation::list_provisioned_capacity::ListProvisionedCapacityError,
  142    147   
            >::new());
  143    148   
  144    149   
        ::std::borrow::Cow::Owned(rcb)
  145    150   
    }
  146    151   
}
  147    152   
  148    153   
#[derive(Debug)]
  149    154   
struct ListProvisionedCapacityResponseDeserializer;
  150    155   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListProvisionedCapacityResponseDeserializer {
  151         -
    fn deserialize_nonstreaming(
         156  +
    fn deserialize_nonstreaming_with_config(
  152    157   
        &self,
  153    158   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         159  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  154    160   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  155    161   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  156         -
        let headers = response.headers();
  157         -
        let body = response.body().bytes().expect("body loaded");
  158    162   
        #[allow(unused_mut)]
  159    163   
        let mut force_error = false;
  160    164   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  161         -
        let parse_result = if !success && status != 200 || force_error {
  162         -
            crate::protocol_serde::shape_list_provisioned_capacity::de_list_provisioned_capacity_http_error(status, headers, body)
         165  +
        if !success && status != 200 || force_error {
         166  +
            let headers = response.headers();
         167  +
            let body = response.body().bytes().expect("body loaded");
         168  +
            #[allow(unused_mut)]
         169  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         170  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         171  +
            })?;
         172  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         173  +
            let generic = generic_builder.build();
         174  +
            let error_code = match generic.code() {
         175  +
                ::std::option::Option::Some(code) => code,
         176  +
                ::std::option::Option::None => {
         177  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         178  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         179  +
                            crate::operation::list_provisioned_capacity::ListProvisionedCapacityError::unhandled(generic),
         180  +
                        ),
         181  +
                    ))
         182  +
                }
         183  +
            };
         184  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         185  +
            let protocol = _cfg
         186  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         187  +
                .expect("a SharedClientProtocol is required");
         188  +
            let err = match error_code {
         189  +
                "InvalidParameterValueException" => {
         190  +
                    crate::operation::list_provisioned_capacity::ListProvisionedCapacityError::InvalidParameterValueException({
         191  +
                        let mut tmp = match protocol
         192  +
                            .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         193  +
                            .and_then(|mut deser| {
         194  +
                                crate::types::error::InvalidParameterValueException::deserialize_with_response(
         195  +
                                    &mut *deser,
         196  +
                                    response.headers(),
         197  +
                                    response.status().into(),
         198  +
                                    body,
         199  +
                                )
         200  +
                            }) {
         201  +
                            ::std::result::Result::Ok(val) => val,
         202  +
                            ::std::result::Result::Err(e) => {
         203  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         204  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         205  +
                                ))
         206  +
                            }
         207  +
                        };
         208  +
                        tmp.meta = generic;
         209  +
                        if tmp.message.is_none() {
         210  +
                            tmp.message = _error_message;
         211  +
                        }
         212  +
                        tmp
         213  +
                    })
         214  +
                }
         215  +
                "MissingParameterValueException" => {
         216  +
                    crate::operation::list_provisioned_capacity::ListProvisionedCapacityError::MissingParameterValueException({
         217  +
                        let mut tmp = match protocol
         218  +
                            .deserialize_response(response, crate::types::error::MissingParameterValueException::SCHEMA, _cfg)
         219  +
                            .and_then(|mut deser| {
         220  +
                                crate::types::error::MissingParameterValueException::deserialize_with_response(
         221  +
                                    &mut *deser,
         222  +
                                    response.headers(),
         223  +
                                    response.status().into(),
         224  +
                                    body,
         225  +
                                )
         226  +
                            }) {
         227  +
                            ::std::result::Result::Ok(val) => val,
         228  +
                            ::std::result::Result::Err(e) => {
         229  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         230  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         231  +
                                ))
         232  +
                            }
         233  +
                        };
         234  +
                        tmp.meta = generic;
         235  +
                        if tmp.message.is_none() {
         236  +
                            tmp.message = _error_message;
         237  +
                        }
         238  +
                        tmp
         239  +
                    })
         240  +
                }
         241  +
                "ServiceUnavailableException" => {
         242  +
                    crate::operation::list_provisioned_capacity::ListProvisionedCapacityError::ServiceUnavailableException({
         243  +
                        let mut tmp = match protocol
         244  +
                            .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         245  +
                            .and_then(|mut deser| {
         246  +
                                crate::types::error::ServiceUnavailableException::deserialize_with_response(
         247  +
                                    &mut *deser,
         248  +
                                    response.headers(),
         249  +
                                    response.status().into(),
         250  +
                                    body,
         251  +
                                )
         252  +
                            }) {
         253  +
                            ::std::result::Result::Ok(val) => val,
         254  +
                            ::std::result::Result::Err(e) => {
         255  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         256  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         257  +
                                ))
         258  +
                            }
         259  +
                        };
         260  +
                        tmp.meta = generic;
         261  +
                        if tmp.message.is_none() {
         262  +
                            tmp.message = _error_message;
         263  +
                        }
         264  +
                        tmp
         265  +
                    })
         266  +
                }
         267  +
                _ => crate::operation::list_provisioned_capacity::ListProvisionedCapacityError::generic(generic),
         268  +
            };
         269  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         270  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         271  +
            ))
  163    272   
        } else {
  164         -
            crate::protocol_serde::shape_list_provisioned_capacity::de_list_provisioned_capacity_http_response(status, headers, body)
  165         -
        };
  166         -
        crate::protocol_serde::type_erase_result(parse_result)
         273  +
            let protocol = _cfg
         274  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         275  +
                .expect("a SharedClientProtocol is required");
         276  +
            let mut deser = protocol
         277  +
                .deserialize_response(response, ListProvisionedCapacity::OUTPUT_SCHEMA, _cfg)
         278  +
                .map_err(|e| {
         279  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         280  +
                })?;
         281  +
            let body = response.body().bytes().expect("body loaded");
         282  +
            let output = crate::operation::list_provisioned_capacity::ListProvisionedCapacityOutput::deserialize_with_response(
         283  +
                &mut *deser,
         284  +
                response.headers(),
         285  +
                response.status().into(),
         286  +
                body,
         287  +
            )
         288  +
            .map_err(|e| {
         289  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         290  +
            })?;
         291  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         292  +
        }
  167    293   
    }
  168    294   
}
  169    295   
#[derive(Debug)]
  170    296   
struct ListProvisionedCapacityRequestSerializer;
  171    297   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListProvisionedCapacityRequestSerializer {
  172    298   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  173    299   
    fn serialize_input(
  174    300   
        &self,
  175    301   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  176    302   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  177    303   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  178    304   
        let input = input
  179    305   
            .downcast::<crate::operation::list_provisioned_capacity::ListProvisionedCapacityInput>()
  180    306   
            .expect("correct type");
  181         -
        let _header_serialization_settings = _cfg
  182         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  183         -
            .cloned()
  184         -
            .unwrap_or_default();
  185         -
        let mut request_builder = {
  186         -
            #[allow(clippy::uninlined_format_args)]
  187         -
            fn uri_base(
  188         -
                _input: &crate::operation::list_provisioned_capacity::ListProvisionedCapacityInput,
  189         -
                output: &mut ::std::string::String,
  190         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  191         -
                use ::std::fmt::Write as _;
  192         -
                let input_1 = &_input.account_id;
  193         -
                let input_1 = input_1
  194         -
                    .as_ref()
  195         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("account_id", "cannot be empty or unset"))?;
  196         -
                let account_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  197         -
                if account_id.is_empty() {
  198         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  199         -
                        "account_id",
  200         -
                        "cannot be empty or unset",
  201         -
                    ));
         307  +
        let protocol = _cfg
         308  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         309  +
            .expect("a SharedClientProtocol is required");
         310  +
        if protocol.supports_http_bindings() {
         311  +
            let mut request = protocol
         312  +
                .serialize_body(&input, ListProvisionedCapacity::INPUT_SCHEMA, "", _cfg)
         313  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         314  +
            {
         315  +
                let mut uri = "/{accountId}/provisioned-capacity".to_string();
         316  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         317  +
                if let Some(ref val) = input.account_id {
         318  +
                    uri = uri.replace("{accountId}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  202    319   
                }
  203         -
                ::std::write!(output, "/{accountId}/provisioned-capacity", accountId = account_id).expect("formatting should succeed");
  204         -
                ::std::result::Result::Ok(())
  205         -
            }
  206         -
            #[allow(clippy::unnecessary_wraps)]
  207         -
            fn update_http_builder(
  208         -
                input: &crate::operation::list_provisioned_capacity::ListProvisionedCapacityInput,
  209         -
                builder: ::http_1x::request::Builder,
  210         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  211         -
                let mut uri = ::std::string::String::new();
  212         -
                uri_base(input, &mut uri)?;
  213         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
         320  +
                if !query_params.is_empty() {
         321  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         322  +
                    let pairs: Vec<String> = query_params
         323  +
                        .iter()
         324  +
                        .map(|(k, v)| {
         325  +
                            format!(
         326  +
                                "{}={}",
         327  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         328  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         329  +
                            )
         330  +
                        })
         331  +
                        .collect();
         332  +
                    uri.push_str(&pairs.join("&"));
         333  +
                }
         334  +
                request.set_uri(uri.as_str()).expect("valid URI");
  214    335   
            }
  215         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  216         -
            builder
  217         -
        };
  218         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  219    336   
  220         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         337  +
            return ::std::result::Result::Ok(request);
         338  +
        } else {
         339  +
            let mut request = protocol
         340  +
                .serialize_request(&input, ListProvisionedCapacity::INPUT_SCHEMA, "", _cfg)
         341  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         342  +
         343  +
            return ::std::result::Result::Ok(request);
         344  +
        }
  221    345   
    }
  222    346   
}
  223    347   
#[derive(Debug)]
  224    348   
struct ListProvisionedCapacityEndpointParamsInterceptor;
  225    349   
  226    350   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListProvisionedCapacityEndpointParamsInterceptor {
  227    351   
    fn name(&self) -> &'static str {
  228    352   
        "ListProvisionedCapacityEndpointParamsInterceptor"
  229    353   
    }
  230    354