AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/get_vault_notifications.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 `GetVaultNotifications`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct GetVaultNotifications;
    6      6   
impl GetVaultNotifications {
    7      7   
    /// Creates a new `GetVaultNotifications`
    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::get_vault_notifications::GetVaultNotificationsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::get_vault_notifications::GetVaultNotificationsOutput::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::get_vault_notifications::GetVaultNotificationsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::get_vault_notifications::GetVaultNotificationsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::get_vault_notifications::GetVaultNotificationsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +267,367 @@
  141    145   
                crate::operation::get_vault_notifications::GetVaultNotificationsError,
  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 GetVaultNotificationsResponseDeserializer;
  150    154   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetVaultNotificationsResponseDeserializer {
  151         -
    fn deserialize_nonstreaming(
         155  +
    fn deserialize_nonstreaming_with_config(
  152    156   
        &self,
  153    157   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         158  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  154    159   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  155    160   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  156         -
        let headers = response.headers();
  157         -
        let body = response.body().bytes().expect("body loaded");
  158    161   
        #[allow(unused_mut)]
  159    162   
        let mut force_error = false;
  160    163   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  161         -
        let parse_result = if !success && status != 200 || force_error {
  162         -
            crate::protocol_serde::shape_get_vault_notifications::de_get_vault_notifications_http_error(status, headers, body)
  163         -
        } else {
  164         -
            crate::protocol_serde::shape_get_vault_notifications::de_get_vault_notifications_http_response(status, headers, body)
         164  +
        if !success && status != 200 || force_error {
         165  +
            let headers = response.headers();
         166  +
            let body = response.body().bytes().expect("body loaded");
         167  +
            #[allow(unused_mut)]
         168  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         169  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         170  +
            })?;
         171  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         172  +
            let generic = generic_builder.build();
         173  +
            let error_code = match generic.code() {
         174  +
                ::std::option::Option::Some(code) => code,
         175  +
                ::std::option::Option::None => {
         176  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         177  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         178  +
                            crate::operation::get_vault_notifications::GetVaultNotificationsError::unhandled(generic),
         179  +
                        ),
         180  +
                    ))
         181  +
                }
         182  +
            };
         183  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         184  +
            let protocol = _cfg
         185  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         186  +
                .expect("a SharedClientProtocol is required");
         187  +
            let err = match error_code {
         188  +
                "InvalidParameterValueException" => {
         189  +
                    crate::operation::get_vault_notifications::GetVaultNotificationsError::InvalidParameterValueException({
         190  +
                        let mut tmp = match protocol
         191  +
                            .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         192  +
                            .and_then(|mut deser| {
         193  +
                                crate::types::error::InvalidParameterValueException::deserialize_with_response(
         194  +
                                    &mut *deser,
         195  +
                                    response.headers(),
         196  +
                                    response.status().into(),
         197  +
                                    body,
         198  +
                                )
         199  +
                            }) {
         200  +
                            ::std::result::Result::Ok(val) => val,
         201  +
                            ::std::result::Result::Err(e) => {
         202  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         203  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         204  +
                                ))
         205  +
                            }
         206  +
                        };
         207  +
                        tmp.meta = generic;
         208  +
                        if tmp.message.is_none() {
         209  +
                            tmp.message = _error_message;
         210  +
                        }
         211  +
                        tmp
         212  +
                    })
         213  +
                }
         214  +
                "MissingParameterValueException" => {
         215  +
                    crate::operation::get_vault_notifications::GetVaultNotificationsError::MissingParameterValueException({
         216  +
                        let mut tmp = match protocol
         217  +
                            .deserialize_response(response, crate::types::error::MissingParameterValueException::SCHEMA, _cfg)
         218  +
                            .and_then(|mut deser| {
         219  +
                                crate::types::error::MissingParameterValueException::deserialize_with_response(
         220  +
                                    &mut *deser,
         221  +
                                    response.headers(),
         222  +
                                    response.status().into(),
         223  +
                                    body,
         224  +
                                )
         225  +
                            }) {
         226  +
                            ::std::result::Result::Ok(val) => val,
         227  +
                            ::std::result::Result::Err(e) => {
         228  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         229  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         230  +
                                ))
         231  +
                            }
         232  +
                        };
         233  +
                        tmp.meta = generic;
         234  +
                        if tmp.message.is_none() {
         235  +
                            tmp.message = _error_message;
         236  +
                        }
         237  +
                        tmp
         238  +
                    })
         239  +
                }
         240  +
                "ResourceNotFoundException" => crate::operation::get_vault_notifications::GetVaultNotificationsError::ResourceNotFoundException({
         241  +
                    let mut tmp = match protocol
         242  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         243  +
                        .and_then(|mut deser| {
         244  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         245  +
                                &mut *deser,
         246  +
                                response.headers(),
         247  +
                                response.status().into(),
         248  +
                                body,
         249  +
                            )
         250  +
                        }) {
         251  +
                        ::std::result::Result::Ok(val) => val,
         252  +
                        ::std::result::Result::Err(e) => {
         253  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         254  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         255  +
                            ))
         256  +
                        }
  165    257   
                    };
  166         -
        crate::protocol_serde::type_erase_result(parse_result)
         258  +
                    tmp.meta = generic;
         259  +
                    if tmp.message.is_none() {
         260  +
                        tmp.message = _error_message;
         261  +
                    }
         262  +
                    tmp
         263  +
                }),
         264  +
                "ServiceUnavailableException" => {
         265  +
                    crate::operation::get_vault_notifications::GetVaultNotificationsError::ServiceUnavailableException({
         266  +
                        let mut tmp = match protocol
         267  +
                            .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         268  +
                            .and_then(|mut deser| {
         269  +
                                crate::types::error::ServiceUnavailableException::deserialize_with_response(
         270  +
                                    &mut *deser,
         271  +
                                    response.headers(),
         272  +
                                    response.status().into(),
         273  +
                                    body,
         274  +
                                )
         275  +
                            }) {
         276  +
                            ::std::result::Result::Ok(val) => val,
         277  +
                            ::std::result::Result::Err(e) => {
         278  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         279  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         280  +
                                ))
         281  +
                            }
         282  +
                        };
         283  +
                        tmp.meta = generic;
         284  +
                        if tmp.message.is_none() {
         285  +
                            tmp.message = _error_message;
         286  +
                        }
         287  +
                        tmp
         288  +
                    })
         289  +
                }
         290  +
                _ => crate::operation::get_vault_notifications::GetVaultNotificationsError::generic(generic),
         291  +
            };
         292  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         293  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         294  +
            ))
         295  +
        } else {
         296  +
            let protocol = _cfg
         297  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         298  +
                .expect("a SharedClientProtocol is required");
         299  +
            let mut deser = protocol
         300  +
                .deserialize_response(response, GetVaultNotifications::OUTPUT_SCHEMA, _cfg)
         301  +
                .map_err(|e| {
         302  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         303  +
                })?;
         304  +
            let body = response.body().bytes().expect("body loaded");
         305  +
            let output = crate::operation::get_vault_notifications::GetVaultNotificationsOutput::deserialize_with_response(
         306  +
                &mut *deser,
         307  +
                response.headers(),
         308  +
                response.status().into(),
         309  +
                body,
         310  +
            )
         311  +
            .map_err(|e| {
         312  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         313  +
            })?;
         314  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         315  +
        }
  167    316   
    }
  168    317   
}
  169    318   
#[derive(Debug)]
  170    319   
struct GetVaultNotificationsRequestSerializer;
  171    320   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetVaultNotificationsRequestSerializer {
  172    321   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  173    322   
    fn serialize_input(
  174    323   
        &self,
  175    324   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  176    325   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  177    326   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  178    327   
        let input = input
  179    328   
            .downcast::<crate::operation::get_vault_notifications::GetVaultNotificationsInput>()
  180    329   
            .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::get_vault_notifications::GetVaultNotificationsInput,
  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}/notification-configuration",
  217         -
                    accountId = account_id,
  218         -
                    vaultName = vault_name
  219         -
                )
  220         -
                .expect("formatting should succeed");
  221         -
                ::std::result::Result::Ok(())
  222         -
            }
  223         -
            #[allow(clippy::unnecessary_wraps)]
  224         -
            fn update_http_builder(
  225         -
                input: &crate::operation::get_vault_notifications::GetVaultNotificationsInput,
  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("GET").uri(uri))
  231         -
            }
  232         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  233         -
            builder
  234         -
        };
  235         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
         330  +
        let protocol = _cfg
         331  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         332  +
            .expect("a SharedClientProtocol is required");
         333  +
        let mut request = protocol
         334  +
            .serialize_request(&input, GetVaultNotifications::INPUT_SCHEMA, "", _cfg)
         335  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
  236    336   
  237         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         337  +
        return ::std::result::Result::Ok(request);
  238    338   
    }
  239    339   
}
  240    340   
#[derive(Debug)]
  241    341   
struct GetVaultNotificationsEndpointParamsInterceptor;
  242    342   
  243    343   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetVaultNotificationsEndpointParamsInterceptor {
  244    344   
    fn name(&self) -> &'static str {
  245    345   
        "GetVaultNotificationsEndpointParamsInterceptor"
  246    346   
    }
  247    347   

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

@@ -4,4 +136,154 @@
   24     24   
    "com.amazonaws.glacier.synthetic",
   25     25   
    "GetVaultNotificationsInput",
   26     26   
);
   27     27   
static GETVAULTNOTIFICATIONSINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   28     28   
    ::aws_smithy_schema::ShapeId::from_static(
   29     29   
        "com.amazonaws.glacier.synthetic#GetVaultNotificationsInput$accountId",
   30     30   
        "com.amazonaws.glacier.synthetic",
   31     31   
        "GetVaultNotificationsInput",
   32     32   
    ),
   33     33   
    ::aws_smithy_schema::ShapeType::String,
   34         -
    "account_id",
          34  +
    "accountId",
   35     35   
    0,
   36     36   
)
   37     37   
.with_http_label();
   38     38   
static GETVAULTNOTIFICATIONSINPUT_MEMBER_VAULT_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "com.amazonaws.glacier.synthetic#GetVaultNotificationsInput$vaultName",
   41     41   
        "com.amazonaws.glacier.synthetic",
   42     42   
        "GetVaultNotificationsInput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::String,
   45         -
    "vault_name",
          45  +
    "vaultName",
   46     46   
    1,
   47     47   
)
   48     48   
.with_http_label();
   49     49   
static GETVAULTNOTIFICATIONSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   50     50   
    GETVAULTNOTIFICATIONSINPUT_SCHEMA_ID,
   51     51   
    ::aws_smithy_schema::ShapeType::Structure,
   52     52   
    &[
   53     53   
        &GETVAULTNOTIFICATIONSINPUT_MEMBER_ACCOUNT_ID,
   54     54   
        &GETVAULTNOTIFICATIONSINPUT_MEMBER_VAULT_NAME,
   55     55   
    ],
   56         -
);
          56  +
)
          57  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          58  +
    "GET",
          59  +
    "/{accountId}/vaults/{vaultName}/notification-configuration",
          60  +
    None,
          61  +
));
   57     62   
impl GetVaultNotificationsInput {
   58     63   
    /// The schema for this shape.
   59     64   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETVAULTNOTIFICATIONSINPUT_SCHEMA;
   60     65   
}
   61     66   
impl ::aws_smithy_schema::serde::SerializableStruct for GetVaultNotificationsInput {
   62     67   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   63     68   
    fn serialize_members(
   64     69   
        &self,
   65     70   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   66     71   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   67     72   
        if let Some(ref val) = self.account_id {
   68     73   
            ser.write_string(&GETVAULTNOTIFICATIONSINPUT_MEMBER_ACCOUNT_ID, val)?;
   69     74   
        }
   70     75   
        if let Some(ref val) = self.vault_name {
   71     76   
            ser.write_string(&GETVAULTNOTIFICATIONSINPUT_MEMBER_VAULT_NAME, val)?;
   72     77   
        }
   73     78   
        Ok(())
   74     79   
    }
   75     80   
}
   76     81   
impl GetVaultNotificationsInput {
   77     82   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   78         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   79         -
        deserializer: &mut D,
          83  +
    pub fn deserialize(
          84  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   80     85   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   81     86   
        #[allow(unused_variables, unused_mut)]
   82     87   
        let mut builder = Self::builder();
   83     88   
        #[allow(
   84     89   
            unused_variables,
   85     90   
            unreachable_code,
   86     91   
            clippy::single_match,
   87     92   
            clippy::match_single_binding,
   88     93   
            clippy::diverging_sub_expression
   89     94   
        )]
   90         -
        deserializer.read_struct(&GETVAULTNOTIFICATIONSINPUT_SCHEMA, (), |_, member, deser| {
          95  +
        deserializer.read_struct(&GETVAULTNOTIFICATIONSINPUT_SCHEMA, &mut |member, deser| {
   91     96   
            match member.member_index() {
   92     97   
                Some(0) => {
   93     98   
                    builder.account_id = Some(deser.read_string(member)?);
   94     99   
                }
   95    100   
                Some(1) => {
   96    101   
                    builder.vault_name = Some(deser.read_string(member)?);
   97    102   
                }
   98    103   
                _ => {}
   99    104   
            }
  100    105   
            Ok(())
  101    106   
        })?;
         107  +
        builder.account_id = builder.account_id.or(Some(String::new()));
         108  +
        builder.vault_name = builder.vault_name.or(Some(String::new()));
  102    109   
        builder
  103    110   
            .build()
  104    111   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  105    112   
    }
  106    113   
}
         114  +
impl GetVaultNotificationsInput {
         115  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         116  +
    pub fn deserialize_with_response(
         117  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         118  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         119  +
        _status: u16,
         120  +
        _body: &[u8],
         121  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         122  +
        Self::deserialize(deserializer)
         123  +
    }
         124  +
}
  107    125   
impl crate::glacier_interceptors::GlacierAccountId for GetVaultNotificationsInput {
  108    126   
    fn account_id_mut(&mut self) -> &mut Option<String> {
  109    127   
        &mut self.account_id
  110    128   
    }
  111    129   
}
  112    130   
impl GetVaultNotificationsInput {
  113    131   
    /// Creates a new builder-style object to manufacture [`GetVaultNotificationsInput`](crate::operation::get_vault_notifications::GetVaultNotificationsInput).
  114    132   
    pub fn builder() -> crate::operation::get_vault_notifications::builders::GetVaultNotificationsInputBuilder {
  115    133   
        crate::operation::get_vault_notifications::builders::GetVaultNotificationsInputBuilder::default()
  116    134   
    }

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

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

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

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,370 @@
  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  +
                            }
  165    259   
                        };
  166         -
        crate::protocol_serde::type_erase_result(parse_result)
         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),
         294  +
            };
         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
  219         -
                )
  220         -
                .expect("formatting should succeed");
  221         -
                ::std::result::Result::Ok(())
  222         -
            }
  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("");
         333  +
        let protocol = _cfg
         334  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         335  +
            .expect("a SharedClientProtocol is required");
         336  +
        let mut request = protocol
         337  +
            .serialize_request(&input, InitiateMultipartUpload::INPUT_SCHEMA, "", _cfg)
         338  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
  237    339   
  238         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         340  +
        return ::std::result::Result::Ok(request);
  239    341   
    }
  240    342   
}
  241    343   
#[derive(Debug)]
  242    344   
struct InitiateMultipartUploadEndpointParamsInterceptor;
  243    345   
  244    346   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InitiateMultipartUploadEndpointParamsInterceptor {
  245    347   
    fn name(&self) -> &'static str {
  246    348   
        "InitiateMultipartUploadEndpointParamsInterceptor"
  247    349   
    }
  248    350   

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   
    }