AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12 (ignoring whitespace)

Files changed:

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

@@ -10,10 +155,182 @@
   30     30   
    "com.amazonaws.glacier.synthetic",
   31     31   
    "InitiateJobInput",
   32     32   
);
   33     33   
static INITIATEJOBINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   34     34   
    ::aws_smithy_schema::ShapeId::from_static(
   35     35   
        "com.amazonaws.glacier.synthetic#InitiateJobInput$accountId",
   36     36   
        "com.amazonaws.glacier.synthetic",
   37     37   
        "InitiateJobInput",
   38     38   
    ),
   39     39   
    ::aws_smithy_schema::ShapeType::String,
   40         -
    "account_id",
          40  +
    "accountId",
   41     41   
    0,
   42     42   
)
   43     43   
.with_http_label();
   44     44   
static INITIATEJOBINPUT_MEMBER_VAULT_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   45     45   
    ::aws_smithy_schema::ShapeId::from_static(
   46     46   
        "com.amazonaws.glacier.synthetic#InitiateJobInput$vaultName",
   47     47   
        "com.amazonaws.glacier.synthetic",
   48     48   
        "InitiateJobInput",
   49     49   
    ),
   50     50   
    ::aws_smithy_schema::ShapeType::String,
   51         -
    "vault_name",
          51  +
    "vaultName",
   52     52   
    1,
   53     53   
)
   54     54   
.with_http_label();
   55     55   
static INITIATEJOBINPUT_MEMBER_JOB_PARAMETERS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   56     56   
    ::aws_smithy_schema::ShapeId::from_static(
   57     57   
        "com.amazonaws.glacier.synthetic#InitiateJobInput$jobParameters",
   58     58   
        "com.amazonaws.glacier.synthetic",
   59     59   
        "InitiateJobInput",
   60     60   
    ),
   61     61   
    ::aws_smithy_schema::ShapeType::Structure,
   62         -
    "job_parameters",
          62  +
    "jobParameters",
   63     63   
    2,
   64     64   
)
   65     65   
.with_http_payload();
   66     66   
static INITIATEJOBINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   67     67   
    INITIATEJOBINPUT_SCHEMA_ID,
   68     68   
    ::aws_smithy_schema::ShapeType::Structure,
   69     69   
    &[
   70     70   
        &INITIATEJOBINPUT_MEMBER_ACCOUNT_ID,
   71     71   
        &INITIATEJOBINPUT_MEMBER_VAULT_NAME,
   72     72   
        &INITIATEJOBINPUT_MEMBER_JOB_PARAMETERS,
   73     73   
    ],
   74         -
);
          74  +
)
          75  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          76  +
    "POST",
          77  +
    "/{accountId}/vaults/{vaultName}/jobs",
          78  +
    Some(202),
          79  +
));
   75     80   
impl InitiateJobInput {
   76     81   
    /// The schema for this shape.
   77     82   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INITIATEJOBINPUT_SCHEMA;
   78     83   
}
   79     84   
impl ::aws_smithy_schema::serde::SerializableStruct for InitiateJobInput {
   80     85   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   81     86   
    fn serialize_members(
   82     87   
        &self,
   83     88   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   84     89   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   85     90   
        if let Some(ref val) = self.account_id {
   86     91   
            ser.write_string(&INITIATEJOBINPUT_MEMBER_ACCOUNT_ID, val)?;
   87     92   
        }
   88     93   
        if let Some(ref val) = self.vault_name {
   89     94   
            ser.write_string(&INITIATEJOBINPUT_MEMBER_VAULT_NAME, val)?;
   90     95   
        }
   91     96   
        if let Some(ref val) = self.job_parameters {
   92     97   
            ser.write_struct(&INITIATEJOBINPUT_MEMBER_JOB_PARAMETERS, val)?;
   93     98   
        }
   94     99   
        Ok(())
   95    100   
    }
   96    101   
}
   97    102   
impl InitiateJobInput {
   98    103   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   99         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  100         -
        deserializer: &mut D,
         104  +
    pub fn deserialize(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  101    106   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  102    107   
        #[allow(unused_variables, unused_mut)]
  103    108   
        let mut builder = Self::builder();
  104    109   
        #[allow(
  105    110   
            unused_variables,
  106    111   
            unreachable_code,
  107    112   
            clippy::single_match,
  108    113   
            clippy::match_single_binding,
  109    114   
            clippy::diverging_sub_expression
  110    115   
        )]
  111         -
        deserializer.read_struct(&INITIATEJOBINPUT_SCHEMA, (), |_, member, deser| {
         116  +
        deserializer.read_struct(&INITIATEJOBINPUT_SCHEMA, &mut |member, deser| {
  112    117   
            match member.member_index() {
  113    118   
                Some(0) => {
  114    119   
                    builder.account_id = Some(deser.read_string(member)?);
  115    120   
                }
  116    121   
                Some(1) => {
  117    122   
                    builder.vault_name = Some(deser.read_string(member)?);
  118    123   
                }
  119    124   
                Some(2) => {
  120    125   
                    builder.job_parameters = Some(crate::types::JobParameters::deserialize(deser)?);
  121    126   
                }
  122    127   
                _ => {}
  123    128   
            }
  124    129   
            Ok(())
  125    130   
        })?;
         131  +
        builder.account_id = builder.account_id.or(Some(String::new()));
         132  +
        builder.vault_name = builder.vault_name.or(Some(String::new()));
         133  +
        builder
         134  +
            .build()
         135  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         136  +
    }
         137  +
}
         138  +
impl InitiateJobInput {
         139  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         140  +
    /// Header-bound members are read directly from headers, avoiding runtime
         141  +
    /// member iteration overhead. Body members are read via the deserializer.
         142  +
    pub fn deserialize_with_response(
         143  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         144  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         145  +
        _status: u16,
         146  +
        body: &[u8],
         147  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         148  +
        #[allow(unused_variables, unused_mut)]
         149  +
        let mut builder = Self::builder();
         150  +
        if !body.is_empty() {
         151  +
            builder.job_parameters = Some(crate::types::JobParameters::deserialize(deserializer)?);
         152  +
        }
  126    153   
        builder
  127    154   
            .build()
  128    155   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  129    156   
    }
  130    157   
}
  131    158   
impl crate::glacier_interceptors::GlacierAccountId for InitiateJobInput {
  132    159   
    fn account_id_mut(&mut self) -> &mut Option<String> {
  133    160   
        &mut self.account_id
  134    161   
    }
  135    162   
}

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

@@ -22,22 +159,197 @@
   42     42   
    0,
   43     43   
)
   44     44   
.with_http_header("Location");
   45     45   
static INITIATEJOBOUTPUT_MEMBER_JOB_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#InitiateJobOutput$jobId",
   48     48   
        "com.amazonaws.glacier.synthetic",
   49     49   
        "InitiateJobOutput",
   50     50   
    ),
   51     51   
    ::aws_smithy_schema::ShapeType::String,
   52         -
    "job_id",
          52  +
    "jobId",
   53     53   
    1,
   54     54   
)
   55     55   
.with_http_header("x-amz-job-id");
   56     56   
static INITIATEJOBOUTPUT_MEMBER_JOB_OUTPUT_PATH: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   57     57   
    ::aws_smithy_schema::ShapeId::from_static(
   58     58   
        "com.amazonaws.glacier.synthetic#InitiateJobOutput$jobOutputPath",
   59     59   
        "com.amazonaws.glacier.synthetic",
   60     60   
        "InitiateJobOutput",
   61     61   
    ),
   62     62   
    ::aws_smithy_schema::ShapeType::String,
   63         -
    "job_output_path",
          63  +
    "jobOutputPath",
   64     64   
    2,
   65     65   
)
   66     66   
.with_http_header("x-amz-job-output-path");
          67  +
static INITIATEJOBOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          68  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          69  +
    ::aws_smithy_schema::ShapeType::String,
          70  +
    "request_id",
          71  +
    3,
          72  +
)
          73  +
.with_http_header("x-amzn-requestid");
   67     74   
static INITIATEJOBOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   68     75   
    INITIATEJOBOUTPUT_SCHEMA_ID,
   69     76   
    ::aws_smithy_schema::ShapeType::Structure,
   70     77   
    &[
   71     78   
        &INITIATEJOBOUTPUT_MEMBER_LOCATION,
   72     79   
        &INITIATEJOBOUTPUT_MEMBER_JOB_ID,
   73     80   
        &INITIATEJOBOUTPUT_MEMBER_JOB_OUTPUT_PATH,
          81  +
        &INITIATEJOBOUTPUT_MEMBER__REQUEST_ID,
   74     82   
    ],
   75     83   
);
   76     84   
impl InitiateJobOutput {
   77     85   
    /// The schema for this shape.
   78     86   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INITIATEJOBOUTPUT_SCHEMA;
   79     87   
}
   80     88   
impl ::aws_smithy_schema::serde::SerializableStruct for InitiateJobOutput {
   81     89   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   82     90   
    fn serialize_members(
   83     91   
        &self,
   84     92   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   85     93   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   86     94   
        if let Some(ref val) = self.location {
   87     95   
            ser.write_string(&INITIATEJOBOUTPUT_MEMBER_LOCATION, val)?;
   88     96   
        }
   89     97   
        if let Some(ref val) = self.job_id {
   90     98   
            ser.write_string(&INITIATEJOBOUTPUT_MEMBER_JOB_ID, val)?;
   91     99   
        }
   92    100   
        if let Some(ref val) = self.job_output_path {
   93    101   
            ser.write_string(&INITIATEJOBOUTPUT_MEMBER_JOB_OUTPUT_PATH, val)?;
   94    102   
        }
   95    103   
        Ok(())
   96    104   
    }
   97    105   
}
   98    106   
impl InitiateJobOutput {
   99    107   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  100         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  101         -
        deserializer: &mut D,
         108  +
    pub fn deserialize(
         109  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  102    110   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  103    111   
        #[allow(unused_variables, unused_mut)]
  104    112   
        let mut builder = Self::builder();
  105    113   
        #[allow(
  106    114   
            unused_variables,
  107    115   
            unreachable_code,
  108    116   
            clippy::single_match,
  109    117   
            clippy::match_single_binding,
  110    118   
            clippy::diverging_sub_expression
  111    119   
        )]
  112         -
        deserializer.read_struct(&INITIATEJOBOUTPUT_SCHEMA, (), |_, member, deser| {
         120  +
        deserializer.read_struct(&INITIATEJOBOUTPUT_SCHEMA, &mut |member, deser| {
  113    121   
            match member.member_index() {
  114    122   
                Some(0) => {
  115    123   
                    builder.location = Some(deser.read_string(member)?);
  116    124   
                }
  117    125   
                Some(1) => {
  118    126   
                    builder.job_id = Some(deser.read_string(member)?);
  119    127   
                }
  120    128   
                Some(2) => {
  121    129   
                    builder.job_output_path = Some(deser.read_string(member)?);
  122    130   
                }
         131  +
                Some(3) => {
         132  +
                    builder._request_id = Some(deser.read_string(member)?);
         133  +
                }
  123    134   
                _ => {}
  124    135   
            }
  125    136   
            Ok(())
  126    137   
        })?;
  127    138   
        Ok(builder.build())
  128    139   
    }
  129    140   
}
         141  +
impl InitiateJobOutput {
         142  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         143  +
    /// Header-bound members are read directly from headers, avoiding runtime
         144  +
    /// member iteration overhead. Body members are read via the deserializer.
         145  +
    pub fn deserialize_with_response(
         146  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         147  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         148  +
        _status: u16,
         149  +
        _body: &[u8],
         150  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         151  +
        #[allow(unused_variables, unused_mut)]
         152  +
        let mut builder = Self::builder();
         153  +
        if let Some(val) = headers.get("Location") {
         154  +
            builder.location = Some(val.to_string());
         155  +
        }
         156  +
        if let Some(val) = headers.get("x-amz-job-id") {
         157  +
            builder.job_id = Some(val.to_string());
         158  +
        }
         159  +
        if let Some(val) = headers.get("x-amz-job-output-path") {
         160  +
            builder.job_output_path = Some(val.to_string());
         161  +
        }
         162  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         163  +
            builder._request_id = Some(val.to_string());
         164  +
        }
         165  +
        Ok(builder.build())
         166  +
    }
         167  +
}
  130    168   
impl ::aws_types::request_id::RequestId for InitiateJobOutput {
  131    169   
    fn request_id(&self) -> Option<&str> {
  132    170   
        self._request_id.as_deref()
  133    171   
    }
  134    172   
}
  135    173   
impl InitiateJobOutput {
  136    174   
    /// Creates a new builder-style object to manufacture [`InitiateJobOutput`](crate::operation::initiate_job::InitiateJobOutput).
  137    175   
    pub fn builder() -> crate::operation::initiate_job::builders::InitiateJobOutputBuilder {
  138    176   
        crate::operation::initiate_job::builders::InitiateJobOutputBuilder::default()
  139    177   
    }

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/initiate_multipart_upload.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 `InitiateMultipartUpload`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct InitiateMultipartUpload;
    6      6   
impl InitiateMultipartUpload {
    7      7   
    /// Creates a new `InitiateMultipartUpload`
    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::initiate_multipart_upload::InitiateMultipartUploadInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          15  +
        crate::operation::initiate_multipart_upload::InitiateMultipartUploadOutput::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::initiate_multipart_upload::InitiateMultipartUploadInput,
   14     19   
    ) -> ::std::result::Result<
   15     20   
        crate::operation::initiate_multipart_upload::InitiateMultipartUploadOutput,
   16     21   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     22   
            crate::operation::initiate_multipart_upload::InitiateMultipartUploadError,
   18     23   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     24   
        >,
   20     25   
    > {
@@ -121,126 +268,409 @@
  141    146   
                crate::operation::initiate_multipart_upload::InitiateMultipartUploadError,
  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 InitiateMultipartUploadResponseDeserializer;
  150    155   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for InitiateMultipartUploadResponseDeserializer {
  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 != 201 || force_error {
  162         -
            crate::protocol_serde::shape_initiate_multipart_upload::de_initiate_multipart_upload_http_error(status, headers, body)
  163         -
        } else {
  164         -
            crate::protocol_serde::shape_initiate_multipart_upload::de_initiate_multipart_upload_http_response(status, headers, body)
         165  +
        if !success && status != 201 || 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::initiate_multipart_upload::InitiateMultipartUploadError::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::initiate_multipart_upload::InitiateMultipartUploadError::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::initiate_multipart_upload::InitiateMultipartUploadError::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  +
                "ResourceNotFoundException" => {
         242  +
                    crate::operation::initiate_multipart_upload::InitiateMultipartUploadError::ResourceNotFoundException({
         243  +
                        let mut tmp = match protocol
         244  +
                            .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         245  +
                            .and_then(|mut deser| {
         246  +
                                crate::types::error::ResourceNotFoundException::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  +
                "ServiceUnavailableException" => {
         268  +
                    crate::operation::initiate_multipart_upload::InitiateMultipartUploadError::ServiceUnavailableException({
         269  +
                        let mut tmp = match protocol
         270  +
                            .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         271  +
                            .and_then(|mut deser| {
         272  +
                                crate::types::error::ServiceUnavailableException::deserialize_with_response(
         273  +
                                    &mut *deser,
         274  +
                                    response.headers(),
         275  +
                                    response.status().into(),
         276  +
                                    body,
         277  +
                                )
         278  +
                            }) {
         279  +
                            ::std::result::Result::Ok(val) => val,
         280  +
                            ::std::result::Result::Err(e) => {
         281  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         282  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         283  +
                                ))
         284  +
                            }
         285  +
                        };
         286  +
                        tmp.meta = generic;
         287  +
                        if tmp.message.is_none() {
         288  +
                            tmp.message = _error_message;
         289  +
                        }
         290  +
                        tmp
         291  +
                    })
         292  +
                }
         293  +
                _ => crate::operation::initiate_multipart_upload::InitiateMultipartUploadError::generic(generic),
  165    294   
            };
  166         -
        crate::protocol_serde::type_erase_result(parse_result)
         295  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         296  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         297  +
            ))
         298  +
        } else {
         299  +
            let protocol = _cfg
         300  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         301  +
                .expect("a SharedClientProtocol is required");
         302  +
            let mut deser = protocol
         303  +
                .deserialize_response(response, InitiateMultipartUpload::OUTPUT_SCHEMA, _cfg)
         304  +
                .map_err(|e| {
         305  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         306  +
                })?;
         307  +
            let body = response.body().bytes().expect("body loaded");
         308  +
            let output = crate::operation::initiate_multipart_upload::InitiateMultipartUploadOutput::deserialize_with_response(
         309  +
                &mut *deser,
         310  +
                response.headers(),
         311  +
                response.status().into(),
         312  +
                body,
         313  +
            )
         314  +
            .map_err(|e| {
         315  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         316  +
            })?;
         317  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         318  +
        }
  167    319   
    }
  168    320   
}
  169    321   
#[derive(Debug)]
  170    322   
struct InitiateMultipartUploadRequestSerializer;
  171    323   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for InitiateMultipartUploadRequestSerializer {
  172    324   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  173    325   
    fn serialize_input(
  174    326   
        &self,
  175    327   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  176    328   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  177    329   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  178    330   
        let input = input
  179    331   
            .downcast::<crate::operation::initiate_multipart_upload::InitiateMultipartUploadInput>()
  180    332   
            .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::initiate_multipart_upload::InitiateMultipartUploadInput,
  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         -
                    ));
  202         -
                }
  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         -
                    ));
  213         -
                }
  214         -
                ::std::write!(
  215         -
                    output,
  216         -
                    "/{accountId}/vaults/{vaultName}/multipart-uploads",
  217         -
                    accountId = account_id,
  218         -
                    vaultName = vault_name
         333  +
        let protocol = _cfg
         334  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         335  +
            .expect("a SharedClientProtocol is required");
         336  +
        if protocol.supports_http_bindings() {
         337  +
            let mut request = protocol
         338  +
                .serialize_body(&input, InitiateMultipartUpload::INPUT_SCHEMA, "", _cfg)
         339  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         340  +
            {
         341  +
                let mut uri = "/{accountId}/vaults/{vaultName}/multipart-uploads".to_string();
         342  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         343  +
                if let Some(ref val) = input.account_id {
         344  +
                    uri = uri.replace("{accountId}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
         345  +
                }
         346  +
                if let Some(ref val) = input.vault_name {
         347  +
                    uri = uri.replace("{vaultName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
         348  +
                }
         349  +
                if let Some(ref val) = input.archive_description {
         350  +
                    request.headers_mut().insert("x-amz-archive-description", val.to_string());
         351  +
                }
         352  +
                if let Some(ref val) = input.part_size {
         353  +
                    request.headers_mut().insert("x-amz-part-size", val.to_string());
         354  +
                }
         355  +
                if !query_params.is_empty() {
         356  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         357  +
                    let pairs: Vec<String> = query_params
         358  +
                        .iter()
         359  +
                        .map(|(k, v)| {
         360  +
                            format!(
         361  +
                                "{}={}",
         362  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         363  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
  219    364   
                            )
  220         -
                .expect("formatting should succeed");
  221         -
                ::std::result::Result::Ok(())
         365  +
                        })
         366  +
                        .collect();
         367  +
                    uri.push_str(&pairs.join("&"));
         368  +
                }
         369  +
                request.set_uri(uri.as_str()).expect("valid URI");
  222    370   
            }
  223         -
            #[allow(clippy::unnecessary_wraps)]
  224         -
            fn update_http_builder(
  225         -
                input: &crate::operation::initiate_multipart_upload::InitiateMultipartUploadInput,
  226         -
                builder: ::http_1x::request::Builder,
  227         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  228         -
                let mut uri = ::std::string::String::new();
  229         -
                uri_base(input, &mut uri)?;
  230         -
                let builder = crate::protocol_serde::shape_initiate_multipart_upload::ser_initiate_multipart_upload_headers(input, builder)?;
  231         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  232         -
            }
  233         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  234         -
            builder
  235         -
        };
  236         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  237    371   
  238         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         372  +
            return ::std::result::Result::Ok(request);
         373  +
        } else {
         374  +
            let mut request = protocol
         375  +
                .serialize_request(&input, InitiateMultipartUpload::INPUT_SCHEMA, "", _cfg)
         376  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         377  +
         378  +
            return ::std::result::Result::Ok(request);
         379  +
        }
  239    380   
    }
  240    381   
}
  241    382   
#[derive(Debug)]
  242    383   
struct InitiateMultipartUploadEndpointParamsInterceptor;
  243    384   
  244    385   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InitiateMultipartUploadEndpointParamsInterceptor {
  245    386   
    fn name(&self) -> &'static str {
  246    387   
        "InitiateMultipartUploadEndpointParamsInterceptor"
  247    388   
    }
  248    389   

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

@@ -18,18 +181,232 @@
   38     38   
    "com.amazonaws.glacier.synthetic",
   39     39   
    "InitiateMultipartUploadInput",
   40     40   
);
   41     41   
static INITIATEMULTIPARTUPLOADINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   42     42   
    ::aws_smithy_schema::ShapeId::from_static(
   43     43   
        "com.amazonaws.glacier.synthetic#InitiateMultipartUploadInput$accountId",
   44     44   
        "com.amazonaws.glacier.synthetic",
   45     45   
        "InitiateMultipartUploadInput",
   46     46   
    ),
   47     47   
    ::aws_smithy_schema::ShapeType::String,
   48         -
    "account_id",
          48  +
    "accountId",
   49     49   
    0,
   50     50   
)
   51     51   
.with_http_label();
   52     52   
static INITIATEMULTIPARTUPLOADINPUT_MEMBER_VAULT_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.glacier.synthetic#InitiateMultipartUploadInput$vaultName",
   55     55   
        "com.amazonaws.glacier.synthetic",
   56     56   
        "InitiateMultipartUploadInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::String,
   59         -
    "vault_name",
          59  +
    "vaultName",
   60     60   
    1,
   61     61   
)
   62     62   
.with_http_label();
   63     63   
static INITIATEMULTIPARTUPLOADINPUT_MEMBER_ARCHIVE_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   64     64   
    ::aws_smithy_schema::ShapeId::from_static(
   65     65   
        "com.amazonaws.glacier.synthetic#InitiateMultipartUploadInput$archiveDescription",
   66     66   
        "com.amazonaws.glacier.synthetic",
   67     67   
        "InitiateMultipartUploadInput",
   68     68   
    ),
   69     69   
    ::aws_smithy_schema::ShapeType::String,
   70         -
    "archive_description",
          70  +
    "archiveDescription",
   71     71   
    2,
   72     72   
)
   73     73   
.with_http_header("x-amz-archive-description");
   74     74   
static INITIATEMULTIPARTUPLOADINPUT_MEMBER_PART_SIZE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   75     75   
    ::aws_smithy_schema::ShapeId::from_static(
   76     76   
        "com.amazonaws.glacier.synthetic#InitiateMultipartUploadInput$partSize",
   77     77   
        "com.amazonaws.glacier.synthetic",
   78     78   
        "InitiateMultipartUploadInput",
   79     79   
    ),
   80     80   
    ::aws_smithy_schema::ShapeType::String,
   81         -
    "part_size",
          81  +
    "partSize",
   82     82   
    3,
   83     83   
)
   84     84   
.with_http_header("x-amz-part-size");
   85     85   
static INITIATEMULTIPARTUPLOADINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   86     86   
    INITIATEMULTIPARTUPLOADINPUT_SCHEMA_ID,
   87     87   
    ::aws_smithy_schema::ShapeType::Structure,
   88     88   
    &[
   89     89   
        &INITIATEMULTIPARTUPLOADINPUT_MEMBER_ACCOUNT_ID,
   90     90   
        &INITIATEMULTIPARTUPLOADINPUT_MEMBER_VAULT_NAME,
   91     91   
        &INITIATEMULTIPARTUPLOADINPUT_MEMBER_ARCHIVE_DESCRIPTION,
   92     92   
        &INITIATEMULTIPARTUPLOADINPUT_MEMBER_PART_SIZE,
   93     93   
    ],
   94         -
);
          94  +
)
          95  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          96  +
    "POST",
          97  +
    "/{accountId}/vaults/{vaultName}/multipart-uploads",
          98  +
    Some(201),
          99  +
));
   95    100   
impl InitiateMultipartUploadInput {
   96    101   
    /// The schema for this shape.
   97    102   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INITIATEMULTIPARTUPLOADINPUT_SCHEMA;
   98    103   
}
   99    104   
impl ::aws_smithy_schema::serde::SerializableStruct for InitiateMultipartUploadInput {
  100    105   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  101    106   
    fn serialize_members(
  102    107   
        &self,
  103    108   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  104    109   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  105    110   
        if let Some(ref val) = self.account_id {
  106    111   
            ser.write_string(&INITIATEMULTIPARTUPLOADINPUT_MEMBER_ACCOUNT_ID, val)?;
  107    112   
        }
  108    113   
        if let Some(ref val) = self.vault_name {
  109    114   
            ser.write_string(&INITIATEMULTIPARTUPLOADINPUT_MEMBER_VAULT_NAME, val)?;
  110    115   
        }
  111    116   
        if let Some(ref val) = self.archive_description {
  112    117   
            ser.write_string(&INITIATEMULTIPARTUPLOADINPUT_MEMBER_ARCHIVE_DESCRIPTION, val)?;
  113    118   
        }
  114    119   
        if let Some(ref val) = self.part_size {
  115    120   
            ser.write_string(&INITIATEMULTIPARTUPLOADINPUT_MEMBER_PART_SIZE, val)?;
  116    121   
        }
  117    122   
        Ok(())
  118    123   
    }
  119    124   
}
  120    125   
impl InitiateMultipartUploadInput {
  121    126   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  122         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  123         -
        deserializer: &mut D,
         127  +
    pub fn deserialize(
         128  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  124    129   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  125    130   
        #[allow(unused_variables, unused_mut)]
  126    131   
        let mut builder = Self::builder();
  127    132   
        #[allow(
  128    133   
            unused_variables,
  129    134   
            unreachable_code,
  130    135   
            clippy::single_match,
  131    136   
            clippy::match_single_binding,
  132    137   
            clippy::diverging_sub_expression
  133    138   
        )]
  134         -
        deserializer.read_struct(&INITIATEMULTIPARTUPLOADINPUT_SCHEMA, (), |_, member, deser| {
         139  +
        deserializer.read_struct(&INITIATEMULTIPARTUPLOADINPUT_SCHEMA, &mut |member, deser| {
  135    140   
            match member.member_index() {
  136    141   
                Some(0) => {
  137    142   
                    builder.account_id = Some(deser.read_string(member)?);
  138    143   
                }
  139    144   
                Some(1) => {
  140    145   
                    builder.vault_name = Some(deser.read_string(member)?);
  141    146   
                }
  142    147   
                Some(2) => {
  143    148   
                    builder.archive_description = Some(deser.read_string(member)?);
  144    149   
                }
  145    150   
                Some(3) => {
  146    151   
                    builder.part_size = Some(deser.read_string(member)?);
  147    152   
                }
  148    153   
                _ => {}
  149    154   
            }
  150    155   
            Ok(())
  151    156   
        })?;
         157  +
        builder.account_id = builder.account_id.or(Some(String::new()));
         158  +
        builder.vault_name = builder.vault_name.or(Some(String::new()));
         159  +
        builder
         160  +
            .build()
         161  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         162  +
    }
         163  +
}
         164  +
impl InitiateMultipartUploadInput {
         165  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         166  +
    /// Header-bound members are read directly from headers, avoiding runtime
         167  +
    /// member iteration overhead. Body members are read via the deserializer.
         168  +
    pub fn deserialize_with_response(
         169  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         170  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         171  +
        _status: u16,
         172  +
        _body: &[u8],
         173  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         174  +
        #[allow(unused_variables, unused_mut)]
         175  +
        let mut builder = Self::builder();
         176  +
        if let Some(val) = headers.get("x-amz-archive-description") {
         177  +
            builder.archive_description = Some(val.to_string());
         178  +
        }
         179  +
        if let Some(val) = headers.get("x-amz-part-size") {
         180  +
            builder.part_size = Some(val.to_string());
         181  +
        }
         182  +
        #[allow(
         183  +
            unused_variables,
         184  +
            unreachable_code,
         185  +
            clippy::single_match,
         186  +
            clippy::match_single_binding,
         187  +
            clippy::diverging_sub_expression
         188  +
        )]
         189  +
        deserializer.read_struct(&INITIATEMULTIPARTUPLOADINPUT_SCHEMA, &mut |member, deser| {
         190  +
            match member.member_index() {
         191  +
                Some(0) => {
         192  +
                    builder.account_id = Some(deser.read_string(member)?);
         193  +
                }
         194  +
                Some(1) => {
         195  +
                    builder.vault_name = Some(deser.read_string(member)?);
         196  +
                }
         197  +
                Some(2) => { /* read from headers above */ }
         198  +
                Some(3) => { /* read from headers above */ }
         199  +
                _ => {}
         200  +
            }
         201  +
            Ok(())
         202  +
        })?;
  152    203   
        builder
  153    204   
            .build()
  154    205   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  155    206   
    }
  156    207   
}
  157    208   
impl crate::glacier_interceptors::GlacierAccountId for InitiateMultipartUploadInput {
  158    209   
    fn account_id_mut(&mut self) -> &mut Option<String> {
  159    210   
        &mut self.account_id
  160    211   
    }
  161    212   
}

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

@@ -16,16 +135,170 @@
   36     36   
    0,
   37     37   
)
   38     38   
.with_http_header("Location");
   39     39   
static INITIATEMULTIPARTUPLOADOUTPUT_MEMBER_UPLOAD_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#InitiateMultipartUploadOutput$uploadId",
   42     42   
        "com.amazonaws.glacier.synthetic",
   43     43   
        "InitiateMultipartUploadOutput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::String,
   46         -
    "upload_id",
          46  +
    "uploadId",
   47     47   
    1,
   48     48   
)
   49     49   
.with_http_header("x-amz-multipart-upload-id");
          50  +
static INITIATEMULTIPARTUPLOADOUTPUT_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 INITIATEMULTIPARTUPLOADOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   51     58   
    INITIATEMULTIPARTUPLOADOUTPUT_SCHEMA_ID,
   52     59   
    ::aws_smithy_schema::ShapeType::Structure,
   53     60   
    &[
   54     61   
        &INITIATEMULTIPARTUPLOADOUTPUT_MEMBER_LOCATION,
   55     62   
        &INITIATEMULTIPARTUPLOADOUTPUT_MEMBER_UPLOAD_ID,
          63  +
        &INITIATEMULTIPARTUPLOADOUTPUT_MEMBER__REQUEST_ID,
   56     64   
    ],
   57     65   
);
   58     66   
impl InitiateMultipartUploadOutput {
   59     67   
    /// The schema for this shape.
   60     68   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INITIATEMULTIPARTUPLOADOUTPUT_SCHEMA;
   61     69   
}
   62     70   
impl ::aws_smithy_schema::serde::SerializableStruct for InitiateMultipartUploadOutput {
   63     71   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   64     72   
    fn serialize_members(
   65     73   
        &self,
   66     74   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   67     75   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   68     76   
        if let Some(ref val) = self.location {
   69     77   
            ser.write_string(&INITIATEMULTIPARTUPLOADOUTPUT_MEMBER_LOCATION, val)?;
   70     78   
        }
   71     79   
        if let Some(ref val) = self.upload_id {
   72     80   
            ser.write_string(&INITIATEMULTIPARTUPLOADOUTPUT_MEMBER_UPLOAD_ID, val)?;
   73     81   
        }
   74     82   
        Ok(())
   75     83   
    }
   76     84   
}
   77     85   
impl InitiateMultipartUploadOutput {
   78     86   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   79         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   80         -
        deserializer: &mut D,
          87  +
    pub fn deserialize(
          88  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   81     89   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   82     90   
        #[allow(unused_variables, unused_mut)]
   83     91   
        let mut builder = Self::builder();
   84     92   
        #[allow(
   85     93   
            unused_variables,
   86     94   
            unreachable_code,
   87     95   
            clippy::single_match,
   88     96   
            clippy::match_single_binding,
   89     97   
            clippy::diverging_sub_expression
   90     98   
        )]
   91         -
        deserializer.read_struct(&INITIATEMULTIPARTUPLOADOUTPUT_SCHEMA, (), |_, member, deser| {
          99  +
        deserializer.read_struct(&INITIATEMULTIPARTUPLOADOUTPUT_SCHEMA, &mut |member, deser| {
   92    100   
            match member.member_index() {
   93    101   
                Some(0) => {
   94    102   
                    builder.location = Some(deser.read_string(member)?);
   95    103   
                }
   96    104   
                Some(1) => {
   97    105   
                    builder.upload_id = Some(deser.read_string(member)?);
   98    106   
                }
         107  +
                Some(2) => {
         108  +
                    builder._request_id = Some(deser.read_string(member)?);
         109  +
                }
   99    110   
                _ => {}
  100    111   
            }
  101    112   
            Ok(())
  102    113   
        })?;
  103    114   
        Ok(builder.build())
  104    115   
    }
  105    116   
}
         117  +
impl InitiateMultipartUploadOutput {
         118  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         119  +
    /// Header-bound members are read directly from headers, avoiding runtime
         120  +
    /// member iteration overhead. Body members are read via the deserializer.
         121  +
    pub fn deserialize_with_response(
         122  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         123  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         124  +
        _status: u16,
         125  +
        _body: &[u8],
         126  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         127  +
        #[allow(unused_variables, unused_mut)]
         128  +
        let mut builder = Self::builder();
         129  +
        if let Some(val) = headers.get("Location") {
         130  +
            builder.location = Some(val.to_string());
         131  +
        }
         132  +
        if let Some(val) = headers.get("x-amz-multipart-upload-id") {
         133  +
            builder.upload_id = Some(val.to_string());
         134  +
        }
         135  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         136  +
            builder._request_id = Some(val.to_string());
         137  +
        }
         138  +
        Ok(builder.build())
         139  +
    }
         140  +
}
  106    141   
impl ::aws_types::request_id::RequestId for InitiateMultipartUploadOutput {
  107    142   
    fn request_id(&self) -> Option<&str> {
  108    143   
        self._request_id.as_deref()
  109    144   
    }
  110    145   
}
  111    146   
impl InitiateMultipartUploadOutput {
  112    147   
    /// Creates a new builder-style object to manufacture [`InitiateMultipartUploadOutput`](crate::operation::initiate_multipart_upload::InitiateMultipartUploadOutput).
  113    148   
    pub fn builder() -> crate::operation::initiate_multipart_upload::builders::InitiateMultipartUploadOutputBuilder {
  114    149   
        crate::operation::initiate_multipart_upload::builders::InitiateMultipartUploadOutputBuilder::default()
  115    150   
    }

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/initiate_vault_lock.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 `InitiateVaultLock`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct InitiateVaultLock;
    6      6   
impl InitiateVaultLock {
    7      7   
    /// Creates a new `InitiateVaultLock`
    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::initiate_vault_lock::InitiateVaultLockInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::initiate_vault_lock::InitiateVaultLockOutput::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::initiate_vault_lock::InitiateVaultLockInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::initiate_vault_lock::InitiateVaultLockOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::initiate_vault_lock::InitiateVaultLockError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +273,394 @@
  141    145   
                crate::operation::initiate_vault_lock::InitiateVaultLockError,
  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 InitiateVaultLockResponseDeserializer;
  150    154   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for InitiateVaultLockResponseDeserializer {
  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 != 201 || force_error {
  162         -
            crate::protocol_serde::shape_initiate_vault_lock::de_initiate_vault_lock_http_error(status, headers, body)
  163         -
        } else {
  164         -
            crate::protocol_serde::shape_initiate_vault_lock::de_initiate_vault_lock_http_response(status, headers, body)
         164  +
        if !success && status != 201 || 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::initiate_vault_lock::InitiateVaultLockError::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" => crate::operation::initiate_vault_lock::InitiateVaultLockError::InvalidParameterValueException({
         189  +
                    let mut tmp = match protocol
         190  +
                        .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         191  +
                        .and_then(|mut deser| {
         192  +
                            crate::types::error::InvalidParameterValueException::deserialize_with_response(
         193  +
                                &mut *deser,
         194  +
                                response.headers(),
         195  +
                                response.status().into(),
         196  +
                                body,
         197  +
                            )
         198  +
                        }) {
         199  +
                        ::std::result::Result::Ok(val) => val,
         200  +
                        ::std::result::Result::Err(e) => {
         201  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         202  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         203  +
                            ))
         204  +
                        }
         205  +
                    };
         206  +
                    tmp.meta = generic;
         207  +
                    if tmp.message.is_none() {
         208  +
                        tmp.message = _error_message;
         209  +
                    }
         210  +
                    tmp
         211  +
                }),
         212  +
                "MissingParameterValueException" => crate::operation::initiate_vault_lock::InitiateVaultLockError::MissingParameterValueException({
         213  +
                    let mut tmp = match protocol
         214  +
                        .deserialize_response(response, crate::types::error::MissingParameterValueException::SCHEMA, _cfg)
         215  +
                        .and_then(|mut deser| {
         216  +
                            crate::types::error::MissingParameterValueException::deserialize_with_response(
         217  +
                                &mut *deser,
         218  +
                                response.headers(),
         219  +
                                response.status().into(),
         220  +
                                body,
         221  +
                            )
         222  +
                        }) {
         223  +
                        ::std::result::Result::Ok(val) => val,
         224  +
                        ::std::result::Result::Err(e) => {
         225  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         226  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         227  +
                            ))
         228  +
                        }
         229  +
                    };
         230  +
                    tmp.meta = generic;
         231  +
                    if tmp.message.is_none() {
         232  +
                        tmp.message = _error_message;
         233  +
                    }
         234  +
                    tmp
         235  +
                }),
         236  +
                "ResourceNotFoundException" => crate::operation::initiate_vault_lock::InitiateVaultLockError::ResourceNotFoundException({
         237  +
                    let mut tmp = match protocol
         238  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         239  +
                        .and_then(|mut deser| {
         240  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         241  +
                                &mut *deser,
         242  +
                                response.headers(),
         243  +
                                response.status().into(),
         244  +
                                body,
         245  +
                            )
         246  +
                        }) {
         247  +
                        ::std::result::Result::Ok(val) => val,
         248  +
                        ::std::result::Result::Err(e) => {
         249  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         250  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         251  +
                            ))
         252  +
                        }
         253  +
                    };
         254  +
                    tmp.meta = generic;
         255  +
                    if tmp.message.is_none() {
         256  +
                        tmp.message = _error_message;
         257  +
                    }
         258  +
                    tmp
         259  +
                }),
         260  +
                "ServiceUnavailableException" => crate::operation::initiate_vault_lock::InitiateVaultLockError::ServiceUnavailableException({
         261  +
                    let mut tmp = match protocol
         262  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         263  +
                        .and_then(|mut deser| {
         264  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         265  +
                                &mut *deser,
         266  +
                                response.headers(),
         267  +
                                response.status().into(),
         268  +
                                body,
         269  +
                            )
         270  +
                        }) {
         271  +
                        ::std::result::Result::Ok(val) => val,
         272  +
                        ::std::result::Result::Err(e) => {
         273  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         274  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         275  +
                            ))
         276  +
                        }
  165    277   
                    };
  166         -
        crate::protocol_serde::type_erase_result(parse_result)
         278  +
                    tmp.meta = generic;
         279  +
                    if tmp.message.is_none() {
         280  +
                        tmp.message = _error_message;
         281  +
                    }
         282  +
                    tmp
         283  +
                }),
         284  +
                _ => crate::operation::initiate_vault_lock::InitiateVaultLockError::generic(generic),
         285  +
            };
         286  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         287  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         288  +
            ))
         289  +
        } else {
         290  +
            let protocol = _cfg
         291  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         292  +
                .expect("a SharedClientProtocol is required");
         293  +
            let mut deser = protocol
         294  +
                .deserialize_response(response, InitiateVaultLock::OUTPUT_SCHEMA, _cfg)
         295  +
                .map_err(|e| {
         296  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         297  +
                })?;
         298  +
            let body = response.body().bytes().expect("body loaded");
         299  +
            let output = crate::operation::initiate_vault_lock::InitiateVaultLockOutput::deserialize_with_response(
         300  +
                &mut *deser,
         301  +
                response.headers(),
         302  +
                response.status().into(),
         303  +
                body,
         304  +
            )
         305  +
            .map_err(|e| {
         306  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         307  +
            })?;
         308  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         309  +
        }
  167    310   
    }
  168    311   
}
  169    312   
#[derive(Debug)]
  170    313   
struct InitiateVaultLockRequestSerializer;
  171    314   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for InitiateVaultLockRequestSerializer {
  172    315   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  173    316   
    fn serialize_input(
  174    317   
        &self,
  175    318   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  176    319   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  177    320   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  178    321   
        let input = input
  179    322   
            .downcast::<crate::operation::initiate_vault_lock::InitiateVaultLockInput>()
  180    323   
            .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::initiate_vault_lock::InitiateVaultLockInput,
  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         -
                    ));
         324  +
        let protocol = _cfg
         325  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         326  +
            .expect("a SharedClientProtocol is required");
         327  +
        if protocol.supports_http_bindings() {
         328  +
            let mut request = protocol
         329  +
                .serialize_request(&input, InitiateVaultLock::INPUT_SCHEMA, "", _cfg)
         330  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         331  +
            {
         332  +
                let mut uri = "/{accountId}/vaults/{vaultName}/lock-policy".to_string();
         333  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         334  +
                if let Some(ref val) = input.account_id {
         335  +
                    uri = uri.replace("{accountId}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
         336  +
                }
         337  +
                if let Some(ref val) = input.vault_name {
         338  +
                    uri = uri.replace("{vaultName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
         339  +
                }
         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("&"));
  202    353   
                }
  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         -
                    ));
         354  +
                request.set_uri(uri.as_str()).expect("valid URI");
  213    355   
            }
  214         -
                ::std::write!(
  215         -
                    output,
  216         -
                    "/{accountId}/vaults/{vaultName}/lock-policy",
  217         -
                    accountId = account_id,
  218         -
                    vaultName = vault_name
  219         -
                )
  220         -
                .expect("formatting should succeed");
  221         -
                ::std::result::Result::Ok(())
         356  +
         357  +
            return ::std::result::Result::Ok(request);
         358  +
        } else {
         359  +
            let mut request = protocol
         360  +
                .serialize_request(&input, InitiateVaultLock::INPUT_SCHEMA, "", _cfg)
         361  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         362  +
         363  +
            return ::std::result::Result::Ok(request);
  222    364   
        }
  223         -
            #[allow(clippy::unnecessary_wraps)]
  224         -
            fn update_http_builder(
  225         -
                input: &crate::operation::initiate_vault_lock::InitiateVaultLockInput,
  226         -
                builder: ::http_1x::request::Builder,
  227         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  228         -
                let mut uri = ::std::string::String::new();
  229         -
                uri_base(input, &mut uri)?;
  230         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  231         -
            }
  232         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  233         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  234         -
            builder
  235         -
        };
  236         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_initiate_vault_lock_input::ser_policy_http_payload(
  237         -
            &input.policy,
  238         -
        )?);
  239         -
        if let Some(content_length) = body.content_length() {
  240         -
            let content_length = content_length.to_string();
  241         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  242         -
        }
  243         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  244    365   
    }
  245    366   
}
  246    367   
#[derive(Debug)]
  247    368   
struct InitiateVaultLockEndpointParamsInterceptor;
  248    369   
  249    370   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InitiateVaultLockEndpointParamsInterceptor {
  250    371   
    fn name(&self) -> &'static str {
  251    372   
        "InitiateVaultLockEndpointParamsInterceptor"
  252    373   
    }
  253    374   

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

@@ -10,10 +155,182 @@
   30     30   
    "com.amazonaws.glacier.synthetic",
   31     31   
    "InitiateVaultLockInput",
   32     32   
);
   33     33   
static INITIATEVAULTLOCKINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   34     34   
    ::aws_smithy_schema::ShapeId::from_static(
   35     35   
        "com.amazonaws.glacier.synthetic#InitiateVaultLockInput$accountId",
   36     36   
        "com.amazonaws.glacier.synthetic",
   37     37   
        "InitiateVaultLockInput",
   38     38   
    ),
   39     39   
    ::aws_smithy_schema::ShapeType::String,
   40         -
    "account_id",
          40  +
    "accountId",
   41     41   
    0,
   42     42   
)
   43     43   
.with_http_label();
   44     44   
static INITIATEVAULTLOCKINPUT_MEMBER_VAULT_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   45     45   
    ::aws_smithy_schema::ShapeId::from_static(
   46     46   
        "com.amazonaws.glacier.synthetic#InitiateVaultLockInput$vaultName",
   47     47   
        "com.amazonaws.glacier.synthetic",
   48     48   
        "InitiateVaultLockInput",
   49     49   
    ),
   50     50   
    ::aws_smithy_schema::ShapeType::String,
   51         -
    "vault_name",
          51  +
    "vaultName",
   52     52   
    1,
   53     53   
)
   54     54   
.with_http_label();
   55     55   
static INITIATEVAULTLOCKINPUT_MEMBER_POLICY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   56     56   
    ::aws_smithy_schema::ShapeId::from_static(
   57     57   
        "com.amazonaws.glacier.synthetic#InitiateVaultLockInput$policy",
   58     58   
        "com.amazonaws.glacier.synthetic",
   59     59   
        "InitiateVaultLockInput",
   60     60   
    ),
   61     61   
    ::aws_smithy_schema::ShapeType::Structure,
   62     62   
    "policy",
   63     63   
    2,
   64     64   
)
   65     65   
.with_http_payload();
   66     66   
static INITIATEVAULTLOCKINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   67     67   
    INITIATEVAULTLOCKINPUT_SCHEMA_ID,
   68     68   
    ::aws_smithy_schema::ShapeType::Structure,
   69     69   
    &[
   70     70   
        &INITIATEVAULTLOCKINPUT_MEMBER_ACCOUNT_ID,
   71     71   
        &INITIATEVAULTLOCKINPUT_MEMBER_VAULT_NAME,
   72     72   
        &INITIATEVAULTLOCKINPUT_MEMBER_POLICY,
   73     73   
    ],
   74         -
);
          74  +
)
          75  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          76  +
    "POST",
          77  +
    "/{accountId}/vaults/{vaultName}/lock-policy",
          78  +
    Some(201),
          79  +
));
   75     80   
impl InitiateVaultLockInput {
   76     81   
    /// The schema for this shape.
   77     82   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INITIATEVAULTLOCKINPUT_SCHEMA;
   78     83   
}
   79     84   
impl ::aws_smithy_schema::serde::SerializableStruct for InitiateVaultLockInput {
   80     85   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   81     86   
    fn serialize_members(
   82     87   
        &self,
   83     88   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   84     89   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   85     90   
        if let Some(ref val) = self.account_id {
   86     91   
            ser.write_string(&INITIATEVAULTLOCKINPUT_MEMBER_ACCOUNT_ID, val)?;
   87     92   
        }
   88     93   
        if let Some(ref val) = self.vault_name {
   89     94   
            ser.write_string(&INITIATEVAULTLOCKINPUT_MEMBER_VAULT_NAME, val)?;
   90     95   
        }
   91     96   
        if let Some(ref val) = self.policy {
   92     97   
            ser.write_struct(&INITIATEVAULTLOCKINPUT_MEMBER_POLICY, val)?;
   93     98   
        }
   94     99   
        Ok(())
   95    100   
    }
   96    101   
}
   97    102   
impl InitiateVaultLockInput {
   98    103   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   99         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  100         -
        deserializer: &mut D,
         104  +
    pub fn deserialize(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  101    106   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  102    107   
        #[allow(unused_variables, unused_mut)]
  103    108   
        let mut builder = Self::builder();
  104    109   
        #[allow(
  105    110   
            unused_variables,
  106    111   
            unreachable_code,
  107    112   
            clippy::single_match,
  108    113   
            clippy::match_single_binding,
  109    114   
            clippy::diverging_sub_expression
  110    115   
        )]
  111         -
        deserializer.read_struct(&INITIATEVAULTLOCKINPUT_SCHEMA, (), |_, member, deser| {
         116  +
        deserializer.read_struct(&INITIATEVAULTLOCKINPUT_SCHEMA, &mut |member, deser| {
  112    117   
            match member.member_index() {
  113    118   
                Some(0) => {
  114    119   
                    builder.account_id = Some(deser.read_string(member)?);
  115    120   
                }
  116    121   
                Some(1) => {
  117    122   
                    builder.vault_name = Some(deser.read_string(member)?);
  118    123   
                }
  119    124   
                Some(2) => {
  120    125   
                    builder.policy = Some(crate::types::VaultLockPolicy::deserialize(deser)?);
  121    126   
                }
  122    127   
                _ => {}
  123    128   
            }
  124    129   
            Ok(())
  125    130   
        })?;
         131  +
        builder.account_id = builder.account_id.or(Some(String::new()));
         132  +
        builder.vault_name = builder.vault_name.or(Some(String::new()));
         133  +
        builder
         134  +
            .build()
         135  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         136  +
    }
         137  +
}
         138  +
impl InitiateVaultLockInput {
         139  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         140  +
    /// Header-bound members are read directly from headers, avoiding runtime
         141  +
    /// member iteration overhead. Body members are read via the deserializer.
         142  +
    pub fn deserialize_with_response(
         143  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         144  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         145  +
        _status: u16,
         146  +
        body: &[u8],
         147  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         148  +
        #[allow(unused_variables, unused_mut)]
         149  +
        let mut builder = Self::builder();
         150  +
        if !body.is_empty() {
         151  +
            builder.policy = Some(crate::types::VaultLockPolicy::deserialize(deserializer)?);
         152  +
        }
  126    153   
        builder
  127    154   
            .build()
  128    155   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  129    156   
    }
  130    157   
}
  131    158   
impl crate::glacier_interceptors::GlacierAccountId for InitiateVaultLockInput {
  132    159   
    fn account_id_mut(&mut self) -> &mut Option<String> {
  133    160   
        &mut self.account_id
  134    161   
    }
  135    162   
}

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

@@ -1,1 +109,140 @@
   19     19   
    "com.amazonaws.glacier.synthetic",
   20     20   
    "InitiateVaultLockOutput",
   21     21   
);
   22     22   
static INITIATEVAULTLOCKOUTPUT_MEMBER_LOCK_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   23     23   
    ::aws_smithy_schema::ShapeId::from_static(
   24     24   
        "com.amazonaws.glacier.synthetic#InitiateVaultLockOutput$lockId",
   25     25   
        "com.amazonaws.glacier.synthetic",
   26     26   
        "InitiateVaultLockOutput",
   27     27   
    ),
   28     28   
    ::aws_smithy_schema::ShapeType::String,
   29         -
    "lock_id",
          29  +
    "lockId",
   30     30   
    0,
   31     31   
)
   32     32   
.with_http_header("x-amz-lock-id");
          33  +
static INITIATEVAULTLOCKOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          34  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          35  +
    ::aws_smithy_schema::ShapeType::String,
          36  +
    "request_id",
          37  +
    1,
          38  +
)
          39  +
.with_http_header("x-amzn-requestid");
   33     40   
static INITIATEVAULTLOCKOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   34     41   
    INITIATEVAULTLOCKOUTPUT_SCHEMA_ID,
   35     42   
    ::aws_smithy_schema::ShapeType::Structure,
   36         -
    &[&INITIATEVAULTLOCKOUTPUT_MEMBER_LOCK_ID],
          43  +
    &[&INITIATEVAULTLOCKOUTPUT_MEMBER_LOCK_ID, &INITIATEVAULTLOCKOUTPUT_MEMBER__REQUEST_ID],
   37     44   
);
   38     45   
impl InitiateVaultLockOutput {
   39     46   
    /// The schema for this shape.
   40     47   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INITIATEVAULTLOCKOUTPUT_SCHEMA;
   41     48   
}
   42     49   
impl ::aws_smithy_schema::serde::SerializableStruct for InitiateVaultLockOutput {
   43     50   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   44     51   
    fn serialize_members(
   45     52   
        &self,
   46     53   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   47     54   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   48     55   
        if let Some(ref val) = self.lock_id {
   49     56   
            ser.write_string(&INITIATEVAULTLOCKOUTPUT_MEMBER_LOCK_ID, val)?;
   50     57   
        }
   51     58   
        Ok(())
   52     59   
    }
   53     60   
}
   54     61   
impl InitiateVaultLockOutput {
   55     62   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   56         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   57         -
        deserializer: &mut D,
          63  +
    pub fn deserialize(
          64  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   58     65   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   59     66   
        #[allow(unused_variables, unused_mut)]
   60     67   
        let mut builder = Self::builder();
   61     68   
        #[allow(
   62     69   
            unused_variables,
   63     70   
            unreachable_code,
   64     71   
            clippy::single_match,
   65     72   
            clippy::match_single_binding,
   66     73   
            clippy::diverging_sub_expression
   67     74   
        )]
   68         -
        deserializer.read_struct(&INITIATEVAULTLOCKOUTPUT_SCHEMA, (), |_, member, deser| {
          75  +
        deserializer.read_struct(&INITIATEVAULTLOCKOUTPUT_SCHEMA, &mut |member, deser| {
   69     76   
            match member.member_index() {
   70     77   
                Some(0) => {
   71     78   
                    builder.lock_id = Some(deser.read_string(member)?);
   72     79   
                }
          80  +
                Some(1) => {
          81  +
                    builder._request_id = Some(deser.read_string(member)?);
          82  +
                }
   73     83   
                _ => {}
   74     84   
            }
   75     85   
            Ok(())
   76     86   
        })?;
   77     87   
        Ok(builder.build())
   78     88   
    }
   79     89   
}
          90  +
impl InitiateVaultLockOutput {
          91  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          92  +
    /// Header-bound members are read directly from headers, avoiding runtime
          93  +
    /// member iteration overhead. Body members are read via the deserializer.
          94  +
    pub fn deserialize_with_response(
          95  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          96  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          97  +
        _status: u16,
          98  +
        _body: &[u8],
          99  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         100  +
        #[allow(unused_variables, unused_mut)]
         101  +
        let mut builder = Self::builder();
         102  +
        if let Some(val) = headers.get("x-amz-lock-id") {
         103  +
            builder.lock_id = Some(val.to_string());
         104  +
        }
         105  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         106  +
            builder._request_id = Some(val.to_string());
         107  +
        }
         108  +
        Ok(builder.build())
         109  +
    }
         110  +
}
   80    111   
impl ::aws_types::request_id::RequestId for InitiateVaultLockOutput {
   81    112   
    fn request_id(&self) -> Option<&str> {
   82    113   
        self._request_id.as_deref()
   83    114   
    }
   84    115   
}
   85    116   
impl InitiateVaultLockOutput {
   86    117   
    /// Creates a new builder-style object to manufacture [`InitiateVaultLockOutput`](crate::operation::initiate_vault_lock::InitiateVaultLockOutput).
   87    118   
    pub fn builder() -> crate::operation::initiate_vault_lock::builders::InitiateVaultLockOutputBuilder {
   88    119   
        crate::operation::initiate_vault_lock::builders::InitiateVaultLockOutputBuilder::default()
   89    120   
    }

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