AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

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

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

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

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

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

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

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

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

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

@@ -1,1 +109,126 @@
   17     17   
    "com.amazonaws.glacier.synthetic",
   18     18   
    "ListProvisionedCapacityInput",
   19     19   
);
   20     20   
static LISTPROVISIONEDCAPACITYINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "com.amazonaws.glacier.synthetic#ListProvisionedCapacityInput$accountId",
   23     23   
        "com.amazonaws.glacier.synthetic",
   24     24   
        "ListProvisionedCapacityInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "account_id",
          27  +
    "accountId",
   28     28   
    0,
   29     29   
)
   30     30   
.with_http_label();
   31     31   
static LISTPROVISIONEDCAPACITYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     32   
    LISTPROVISIONEDCAPACITYINPUT_SCHEMA_ID,
   33     33   
    ::aws_smithy_schema::ShapeType::Structure,
   34     34   
    &[&LISTPROVISIONEDCAPACITYINPUT_MEMBER_ACCOUNT_ID],
   35         -
);
          35  +
)
          36  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          37  +
    "GET",
          38  +
    "/{accountId}/provisioned-capacity",
          39  +
    None,
          40  +
));
   36     41   
impl ListProvisionedCapacityInput {
   37     42   
    /// The schema for this shape.
   38     43   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTPROVISIONEDCAPACITYINPUT_SCHEMA;
   39     44   
}
   40     45   
impl ::aws_smithy_schema::serde::SerializableStruct for ListProvisionedCapacityInput {
   41     46   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   42     47   
    fn serialize_members(
   43     48   
        &self,
   44     49   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   45     50   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   46     51   
        if let Some(ref val) = self.account_id {
   47     52   
            ser.write_string(&LISTPROVISIONEDCAPACITYINPUT_MEMBER_ACCOUNT_ID, val)?;
   48     53   
        }
   49     54   
        Ok(())
   50     55   
    }
   51     56   
}
   52     57   
impl ListProvisionedCapacityInput {
   53     58   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          59  +
    pub fn deserialize(
          60  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     61   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     62   
        #[allow(unused_variables, unused_mut)]
   58     63   
        let mut builder = Self::builder();
   59     64   
        #[allow(
   60     65   
            unused_variables,
   61     66   
            unreachable_code,
   62     67   
            clippy::single_match,
   63     68   
            clippy::match_single_binding,
   64     69   
            clippy::diverging_sub_expression
   65     70   
        )]
   66         -
        deserializer.read_struct(&LISTPROVISIONEDCAPACITYINPUT_SCHEMA, (), |_, member, deser| {
          71  +
        deserializer.read_struct(&LISTPROVISIONEDCAPACITYINPUT_SCHEMA, &mut |member, deser| {
   67     72   
            match member.member_index() {
   68     73   
                Some(0) => {
   69     74   
                    builder.account_id = Some(deser.read_string(member)?);
   70     75   
                }
   71     76   
                _ => {}
   72     77   
            }
   73     78   
            Ok(())
   74     79   
        })?;
          80  +
        builder.account_id = builder.account_id.or(Some(String::new()));
   75     81   
        builder
   76     82   
            .build()
   77     83   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   78     84   
    }
   79     85   
}
          86  +
impl ListProvisionedCapacityInput {
          87  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          88  +
    pub fn deserialize_with_response(
          89  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          90  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          91  +
        _status: u16,
          92  +
        _body: &[u8],
          93  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          94  +
        Self::deserialize(deserializer)
          95  +
    }
          96  +
}
   80     97   
impl crate::glacier_interceptors::GlacierAccountId for ListProvisionedCapacityInput {
   81     98   
    fn account_id_mut(&mut self) -> &mut Option<String> {
   82     99   
        &mut self.account_id
   83    100   
    }
   84    101   
}
   85    102   
impl ListProvisionedCapacityInput {
   86    103   
    /// Creates a new builder-style object to manufacture [`ListProvisionedCapacityInput`](crate::operation::list_provisioned_capacity::ListProvisionedCapacityInput).
   87    104   
    pub fn builder() -> crate::operation::list_provisioned_capacity::builders::ListProvisionedCapacityInputBuilder {
   88    105   
        crate::operation::list_provisioned_capacity::builders::ListProvisionedCapacityInputBuilder::default()
   89    106   
    }

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

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

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

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

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

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

@@ -1,1 +119,153 @@
   19     19   
    "com.amazonaws.glacier.synthetic",
   20     20   
    "ListTagsForVaultOutput",
   21     21   
);
   22     22   
static LISTTAGSFORVAULTOUTPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   23     23   
    ::aws_smithy_schema::ShapeId::from_static(
   24     24   
        "com.amazonaws.glacier.synthetic#ListTagsForVaultOutput$Tags",
   25     25   
        "com.amazonaws.glacier.synthetic",
   26     26   
        "ListTagsForVaultOutput",
   27     27   
    ),
   28     28   
    ::aws_smithy_schema::ShapeType::Map,
   29         -
    "tags",
          29  +
    "Tags",
   30     30   
    0,
   31     31   
);
          32  +
static LISTTAGSFORVAULTOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          33  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          34  +
    ::aws_smithy_schema::ShapeType::String,
          35  +
    "request_id",
          36  +
    1,
          37  +
)
          38  +
.with_http_header("x-amzn-requestid");
   32     39   
static LISTTAGSFORVAULTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   33     40   
    LISTTAGSFORVAULTOUTPUT_SCHEMA_ID,
   34     41   
    ::aws_smithy_schema::ShapeType::Structure,
   35         -
    &[&LISTTAGSFORVAULTOUTPUT_MEMBER_TAGS],
          42  +
    &[&LISTTAGSFORVAULTOUTPUT_MEMBER_TAGS, &LISTTAGSFORVAULTOUTPUT_MEMBER__REQUEST_ID],
   36     43   
);
   37     44   
impl ListTagsForVaultOutput {
   38     45   
    /// The schema for this shape.
   39     46   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTTAGSFORVAULTOUTPUT_SCHEMA;
   40     47   
}
   41     48   
impl ::aws_smithy_schema::serde::SerializableStruct for ListTagsForVaultOutput {
   42     49   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   43     50   
    fn serialize_members(
   44     51   
        &self,
   45     52   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   46     53   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   47     54   
        if let Some(ref val) = self.tags {
   48     55   
            ser.write_map(
   49     56   
                &LISTTAGSFORVAULTOUTPUT_MEMBER_TAGS,
   50     57   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   51     58   
                    for (key, value) in val {
   52     59   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
   53     60   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
   54     61   
                    }
   55     62   
                    Ok(())
   56     63   
                },
   57     64   
            )?;
   58     65   
        }
   59     66   
        Ok(())
   60     67   
    }
   61     68   
}
   62     69   
impl ListTagsForVaultOutput {
   63     70   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   64         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   65         -
        deserializer: &mut D,
          71  +
    pub fn deserialize(
          72  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   66     73   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   67     74   
        #[allow(unused_variables, unused_mut)]
   68     75   
        let mut builder = Self::builder();
   69     76   
        #[allow(
   70     77   
            unused_variables,
   71     78   
            unreachable_code,
   72     79   
            clippy::single_match,
   73     80   
            clippy::match_single_binding,
   74     81   
            clippy::diverging_sub_expression
   75     82   
        )]
   76         -
        deserializer.read_struct(&LISTTAGSFORVAULTOUTPUT_SCHEMA, (), |_, member, deser| {
          83  +
        deserializer.read_struct(&LISTTAGSFORVAULTOUTPUT_SCHEMA, &mut |member, deser| {
   77     84   
            match member.member_index() {
   78     85   
                Some(0) => {
   79         -
                    builder.tags = Some({
   80         -
                        let container = if let Some(cap) = deser.container_size() {
   81         -
                            std::collections::HashMap::with_capacity(cap)
   82         -
                        } else {
   83         -
                            std::collections::HashMap::new()
   84         -
                        };
   85         -
                        deser.read_map(member, container, |mut map, key, deser| {
   86         -
                            map.insert(key, deser.read_string(member)?);
   87         -
                            Ok(map)
   88         -
                        })?
   89         -
                    });
          86  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
          87  +
                }
          88  +
                Some(1) => {
          89  +
                    builder._request_id = Some(deser.read_string(member)?);
          90  +
                }
          91  +
                _ => {}
          92  +
            }
          93  +
            Ok(())
          94  +
        })?;
          95  +
        Ok(builder.build())
          96  +
    }
          97  +
}
          98  +
impl ListTagsForVaultOutput {
          99  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         100  +
    /// Header-bound members are read directly from headers, avoiding runtime
         101  +
    /// member iteration overhead. Body members are read via the deserializer.
         102  +
    pub fn deserialize_with_response(
         103  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         104  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         105  +
        _status: u16,
         106  +
        _body: &[u8],
         107  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         108  +
        #[allow(unused_variables, unused_mut)]
         109  +
        let mut builder = Self::builder();
         110  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         111  +
            builder._request_id = Some(val.to_string());
         112  +
        }
         113  +
        #[allow(
         114  +
            unused_variables,
         115  +
            unreachable_code,
         116  +
            clippy::single_match,
         117  +
            clippy::match_single_binding,
         118  +
            clippy::diverging_sub_expression
         119  +
        )]
         120  +
        deserializer.read_struct(&LISTTAGSFORVAULTOUTPUT_SCHEMA, &mut |member, deser| {
         121  +
            match member.member_index() {
         122  +
                Some(0) => {
         123  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
   90    124   
                }
   91    125   
                _ => {}
   92    126   
            }
   93    127   
            Ok(())
   94    128   
        })?;
   95    129   
        Ok(builder.build())
   96    130   
    }
   97    131   
}
   98    132   
impl ::aws_types::request_id::RequestId for ListTagsForVaultOutput {
   99    133   
    fn request_id(&self) -> Option<&str> {

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_vaults.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 `ListVaults`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListVaults;
    6      6   
impl ListVaults {
    7      7   
    /// Creates a new `ListVaults`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_vaults::ListVaultsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_vaults::ListVaultsOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::list_vaults::ListVaultsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_vaults::ListVaultsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_vaults::ListVaultsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +263,352 @@
  138    142   
                crate::operation::list_vaults::ListVaultsError,
  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 ListVaultsResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListVaultsResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_list_vaults::de_list_vaults_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_list_vaults::de_list_vaults_http_response(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::list_vaults::ListVaultsError::unhandled(generic)),
         175  +
                    ))
         176  +
                }
  162    177   
            };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         178  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         179  +
            let protocol = _cfg
         180  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         181  +
                .expect("a SharedClientProtocol is required");
         182  +
            let err = match error_code {
         183  +
                "InvalidParameterValueException" => crate::operation::list_vaults::ListVaultsError::InvalidParameterValueException({
         184  +
                    let mut tmp = match protocol
         185  +
                        .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         186  +
                        .and_then(|mut deser| {
         187  +
                            crate::types::error::InvalidParameterValueException::deserialize_with_response(
         188  +
                                &mut *deser,
         189  +
                                response.headers(),
         190  +
                                response.status().into(),
         191  +
                                body,
         192  +
                            )
         193  +
                        }) {
         194  +
                        ::std::result::Result::Ok(val) => val,
         195  +
                        ::std::result::Result::Err(e) => {
         196  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         197  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         198  +
                            ))
         199  +
                        }
         200  +
                    };
         201  +
                    tmp.meta = generic;
         202  +
                    if tmp.message.is_none() {
         203  +
                        tmp.message = _error_message;
         204  +
                    }
         205  +
                    tmp
         206  +
                }),
         207  +
                "MissingParameterValueException" => crate::operation::list_vaults::ListVaultsError::MissingParameterValueException({
         208  +
                    let mut tmp = match protocol
         209  +
                        .deserialize_response(response, crate::types::error::MissingParameterValueException::SCHEMA, _cfg)
         210  +
                        .and_then(|mut deser| {
         211  +
                            crate::types::error::MissingParameterValueException::deserialize_with_response(
         212  +
                                &mut *deser,
         213  +
                                response.headers(),
         214  +
                                response.status().into(),
         215  +
                                body,
         216  +
                            )
         217  +
                        }) {
         218  +
                        ::std::result::Result::Ok(val) => val,
         219  +
                        ::std::result::Result::Err(e) => {
         220  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         221  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         222  +
                            ))
         223  +
                        }
         224  +
                    };
         225  +
                    tmp.meta = generic;
         226  +
                    if tmp.message.is_none() {
         227  +
                        tmp.message = _error_message;
         228  +
                    }
         229  +
                    tmp
         230  +
                }),
         231  +
                "ResourceNotFoundException" => crate::operation::list_vaults::ListVaultsError::ResourceNotFoundException({
         232  +
                    let mut tmp = match protocol
         233  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         234  +
                        .and_then(|mut deser| {
         235  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         236  +
                                &mut *deser,
         237  +
                                response.headers(),
         238  +
                                response.status().into(),
         239  +
                                body,
         240  +
                            )
         241  +
                        }) {
         242  +
                        ::std::result::Result::Ok(val) => val,
         243  +
                        ::std::result::Result::Err(e) => {
         244  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         245  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         246  +
                            ))
         247  +
                        }
         248  +
                    };
         249  +
                    tmp.meta = generic;
         250  +
                    if tmp.message.is_none() {
         251  +
                        tmp.message = _error_message;
         252  +
                    }
         253  +
                    tmp
         254  +
                }),
         255  +
                "ServiceUnavailableException" => crate::operation::list_vaults::ListVaultsError::ServiceUnavailableException({
         256  +
                    let mut tmp = match protocol
         257  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         258  +
                        .and_then(|mut deser| {
         259  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         260  +
                                &mut *deser,
         261  +
                                response.headers(),
         262  +
                                response.status().into(),
         263  +
                                body,
         264  +
                            )
         265  +
                        }) {
         266  +
                        ::std::result::Result::Ok(val) => val,
         267  +
                        ::std::result::Result::Err(e) => {
         268  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         269  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         270  +
                            ))
         271  +
                        }
         272  +
                    };
         273  +
                    tmp.meta = generic;
         274  +
                    if tmp.message.is_none() {
         275  +
                        tmp.message = _error_message;
         276  +
                    }
         277  +
                    tmp
         278  +
                }),
         279  +
                _ => crate::operation::list_vaults::ListVaultsError::generic(generic),
         280  +
            };
         281  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         282  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         283  +
            ))
         284  +
        } else {
         285  +
            let protocol = _cfg
         286  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         287  +
                .expect("a SharedClientProtocol is required");
         288  +
            let mut deser = protocol.deserialize_response(response, ListVaults::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         289  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         290  +
            })?;
         291  +
            let body = response.body().bytes().expect("body loaded");
         292  +
            let output = crate::operation::list_vaults::ListVaultsOutput::deserialize_with_response(
         293  +
                &mut *deser,
         294  +
                response.headers(),
         295  +
                response.status().into(),
         296  +
                body,
         297  +
            )
         298  +
            .map_err(|e| {
         299  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         300  +
            })?;
         301  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         302  +
        }
  164    303   
    }
  165    304   
}
  166    305   
#[derive(Debug)]
  167    306   
struct ListVaultsRequestSerializer;
  168    307   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListVaultsRequestSerializer {
  169    308   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    309   
    fn serialize_input(
  171    310   
        &self,
  172    311   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    312   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    313   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    314   
        let input = input.downcast::<crate::operation::list_vaults::ListVaultsInput>().expect("correct type");
  176         -
        let _header_serialization_settings = _cfg
  177         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  178         -
            .cloned()
  179         -
            .unwrap_or_default();
  180         -
        let mut request_builder = {
  181         -
            #[allow(clippy::uninlined_format_args)]
  182         -
            fn uri_base(
  183         -
                _input: &crate::operation::list_vaults::ListVaultsInput,
  184         -
                output: &mut ::std::string::String,
  185         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  186         -
                use ::std::fmt::Write as _;
  187         -
                let input_1 = &_input.account_id;
  188         -
                let input_1 = input_1
  189         -
                    .as_ref()
  190         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("account_id", "cannot be empty or unset"))?;
  191         -
                let account_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  192         -
                if account_id.is_empty() {
  193         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  194         -
                        "account_id",
  195         -
                        "cannot be empty or unset",
  196         -
                    ));
  197         -
                }
  198         -
                ::std::write!(output, "/{accountId}/vaults", accountId = account_id).expect("formatting should succeed");
  199         -
                ::std::result::Result::Ok(())
  200         -
            }
  201         -
            fn uri_query(
  202         -
                _input: &crate::operation::list_vaults::ListVaultsInput,
  203         -
                mut output: &mut ::std::string::String,
  204         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  205         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  206         -
                if let ::std::option::Option::Some(inner_2) = &_input.marker {
  207         -
                    {
  208         -
                        query.push_kv("marker", &::aws_smithy_http::query::fmt_string(inner_2));
  209         -
                    }
  210         -
                }
  211         -
                if let ::std::option::Option::Some(inner_3) = &_input.limit {
  212         -
                    {
  213         -
                        query.push_kv("limit", ::aws_smithy_types::primitive::Encoder::from(*inner_3).encode());
  214         -
                    }
  215         -
                }
  216         -
                ::std::result::Result::Ok(())
  217         -
            }
  218         -
            #[allow(clippy::unnecessary_wraps)]
  219         -
            fn update_http_builder(
  220         -
                input: &crate::operation::list_vaults::ListVaultsInput,
  221         -
                builder: ::http_1x::request::Builder,
  222         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  223         -
                let mut uri = ::std::string::String::new();
  224         -
                uri_base(input, &mut uri)?;
  225         -
                uri_query(input, &mut uri)?;
  226         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  227         -
            }
  228         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  229         -
            builder
  230         -
        };
  231         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
         315  +
        let protocol = _cfg
         316  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         317  +
            .expect("a SharedClientProtocol is required");
         318  +
        let mut request = protocol
         319  +
            .serialize_request(&input, ListVaults::INPUT_SCHEMA, "", _cfg)
         320  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
  232    321   
  233         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         322  +
        return ::std::result::Result::Ok(request);
  234    323   
    }
  235    324   
}
  236    325   
#[derive(Debug)]
  237    326   
struct ListVaultsEndpointParamsInterceptor;
  238    327   
  239    328   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListVaultsEndpointParamsInterceptor {
  240    329   
    fn name(&self) -> &'static str {
  241    330   
        "ListVaultsEndpointParamsInterceptor"
  242    331   
    }
  243    332