AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/lambda/src/operation/tag_resource/_tag_resource_input.rs

@@ -3,3 +150,158 @@
   23     23   
    "com.amazonaws.lambda.synthetic",
   24     24   
    "TagResourceInput",
   25     25   
);
   26     26   
static TAGRESOURCEINPUT_MEMBER_RESOURCE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   27     27   
    ::aws_smithy_schema::ShapeId::from_static(
   28     28   
        "com.amazonaws.lambda.synthetic#TagResourceInput$Resource",
   29     29   
        "com.amazonaws.lambda.synthetic",
   30     30   
        "TagResourceInput",
   31     31   
    ),
   32     32   
    ::aws_smithy_schema::ShapeType::String,
   33         -
    "resource",
          33  +
    "Resource",
   34     34   
    0,
   35     35   
)
   36     36   
.with_http_label();
   37     37   
static TAGRESOURCEINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   38     38   
    ::aws_smithy_schema::ShapeId::from_static(
   39     39   
        "com.amazonaws.lambda.synthetic#TagResourceInput$Tags",
   40     40   
        "com.amazonaws.lambda.synthetic",
   41     41   
        "TagResourceInput",
   42     42   
    ),
   43     43   
    ::aws_smithy_schema::ShapeType::Map,
   44         -
    "tags",
          44  +
    "Tags",
   45     45   
    1,
   46     46   
);
   47     47   
static TAGRESOURCEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   48     48   
    TAGRESOURCEINPUT_SCHEMA_ID,
   49     49   
    ::aws_smithy_schema::ShapeType::Structure,
   50     50   
    &[&TAGRESOURCEINPUT_MEMBER_RESOURCE, &TAGRESOURCEINPUT_MEMBER_TAGS],
   51         -
);
          51  +
)
          52  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          53  +
    "POST",
          54  +
    "/2017-03-31/tags/{Resource}",
          55  +
    Some(204),
          56  +
));
   52     57   
impl TagResourceInput {
   53     58   
    /// The schema for this shape.
   54     59   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TAGRESOURCEINPUT_SCHEMA;
   55     60   
}
   56     61   
impl ::aws_smithy_schema::serde::SerializableStruct for TagResourceInput {
   57     62   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   58     63   
    fn serialize_members(
   59     64   
        &self,
   60     65   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   61     66   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   62     67   
        if let Some(ref val) = self.resource {
   63     68   
            ser.write_string(&TAGRESOURCEINPUT_MEMBER_RESOURCE, val)?;
   64     69   
        }
   65     70   
        if let Some(ref val) = self.tags {
   66     71   
            ser.write_map(
   67     72   
                &TAGRESOURCEINPUT_MEMBER_TAGS,
   68     73   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   69     74   
                    for (key, value) in val {
   70     75   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
   71     76   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
   72     77   
                    }
   73     78   
                    Ok(())
   74     79   
                },
   75     80   
            )?;
   76     81   
        }
   77     82   
        Ok(())
   78     83   
    }
   79     84   
}
   80     85   
impl TagResourceInput {
   81     86   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   82         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   83         -
        deserializer: &mut D,
          87  +
    pub fn deserialize(
          88  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   84     89   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   85     90   
        #[allow(unused_variables, unused_mut)]
   86     91   
        let mut builder = Self::builder();
   87     92   
        #[allow(
   88     93   
            unused_variables,
   89     94   
            unreachable_code,
   90     95   
            clippy::single_match,
   91     96   
            clippy::match_single_binding,
   92     97   
            clippy::diverging_sub_expression
   93     98   
        )]
   94         -
        deserializer.read_struct(&TAGRESOURCEINPUT_SCHEMA, (), |_, member, deser| {
          99  +
        deserializer.read_struct(&TAGRESOURCEINPUT_SCHEMA, &mut |member, deser| {
   95    100   
            match member.member_index() {
   96    101   
                Some(0) => {
   97    102   
                    builder.resource = Some(deser.read_string(member)?);
   98    103   
                }
   99    104   
                Some(1) => {
  100         -
                    builder.tags = Some({
  101         -
                        let container = if let Some(cap) = deser.container_size() {
  102         -
                            std::collections::HashMap::with_capacity(cap)
  103         -
                        } else {
  104         -
                            std::collections::HashMap::new()
  105         -
                        };
  106         -
                        deser.read_map(member, container, |mut map, key, deser| {
  107         -
                            map.insert(key, deser.read_string(member)?);
  108         -
                            Ok(map)
  109         -
                        })?
  110         -
                    });
         105  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
  111    106   
                }
  112    107   
                _ => {}
  113    108   
            }
  114    109   
            Ok(())
  115    110   
        })?;
         111  +
        builder.resource = builder.resource.or(Some(String::new()));
         112  +
        builder.tags = builder.tags.or(Some(::std::collections::HashMap::new()));
  116    113   
        builder
  117    114   
            .build()
  118    115   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  119    116   
    }
  120    117   
}
         118  +
impl TagResourceInput {
         119  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         120  +
    pub fn deserialize_with_response(
         121  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         122  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         123  +
        _status: u16,
         124  +
        _body: &[u8],
         125  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         126  +
        Self::deserialize(deserializer)
         127  +
    }
         128  +
}
  121    129   
impl TagResourceInput {
  122    130   
    /// Creates a new builder-style object to manufacture [`TagResourceInput`](crate::operation::tag_resource::TagResourceInput).
  123    131   
    pub fn builder() -> crate::operation::tag_resource::builders::TagResourceInputBuilder {
  124    132   
        crate::operation::tag_resource::builders::TagResourceInputBuilder::default()
  125    133   
    }
  126    134   
}
  127    135   
  128    136   
/// A builder for [`TagResourceInput`](crate::operation::tag_resource::TagResourceInput).
  129    137   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  130    138   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/lambda/src/operation/tag_resource/_tag_resource_output.rs

@@ -1,1 +80,111 @@
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct TagResourceOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static TAGRESOURCEOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.lambda.synthetic#TagResourceOutput",
   10     10   
    "com.amazonaws.lambda.synthetic",
   11     11   
    "TagResourceOutput",
   12     12   
);
   13         -
static TAGRESOURCEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(TAGRESOURCEOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static TAGRESOURCEOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          14  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          15  +
    ::aws_smithy_schema::ShapeType::String,
          16  +
    "request_id",
          17  +
    0,
          18  +
)
          19  +
.with_http_header("x-amzn-requestid");
          20  +
static TAGRESOURCEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    TAGRESOURCEOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&TAGRESOURCEOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl TagResourceOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TAGRESOURCEOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for TagResourceOutput {
   20     30   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   21     31   
    fn serialize_members(
   22     32   
        &self,
   23     33   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   24     34   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   25     35   
        Ok(())
   26     36   
    }
   27     37   
}
   28     38   
impl TagResourceOutput {
   29     39   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   30         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   31         -
        deserializer: &mut D,
          40  +
    pub fn deserialize(
          41  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   32     42   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   33     43   
        #[allow(unused_variables, unused_mut)]
   34     44   
        let mut builder = Self::builder();
   35     45   
        #[allow(
   36     46   
            unused_variables,
   37     47   
            unreachable_code,
   38     48   
            clippy::single_match,
   39     49   
            clippy::match_single_binding,
   40     50   
            clippy::diverging_sub_expression
   41     51   
        )]
   42         -
        deserializer.read_struct(&TAGRESOURCEOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&TAGRESOURCEOUTPUT_SCHEMA, &mut |member, deser| {
   43     53   
            match member.member_index() {
          54  +
                Some(0) => {
          55  +
                    builder._request_id = Some(deser.read_string(member)?);
          56  +
                }
   44     57   
                _ => {}
   45     58   
            }
   46     59   
            Ok(())
   47     60   
        })?;
   48     61   
        Ok(builder.build())
   49     62   
    }
   50     63   
}
          64  +
impl TagResourceOutput {
          65  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          66  +
    /// Header-bound members are read directly from headers, avoiding runtime
          67  +
    /// member iteration overhead. Body members are read via the deserializer.
          68  +
    pub fn deserialize_with_response(
          69  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        if let Some(val) = headers.get("x-amzn-requestid") {
          77  +
            builder._request_id = Some(val.to_string());
          78  +
        }
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
   51     82   
impl ::aws_types::request_id::RequestId for TagResourceOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl TagResourceOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`TagResourceOutput`](crate::operation::tag_resource::TagResourceOutput).
   58     89   
    pub fn builder() -> crate::operation::tag_resource::builders::TagResourceOutputBuilder {
   59     90   
        crate::operation::tag_resource::builders::TagResourceOutputBuilder::default()
   60     91   
    }

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

tmp-codegen-diff/aws-sdk/sdk/lambda/src/operation/untag_resource/_untag_resource_input.rs

@@ -5,5 +152,160 @@
   25     25   
    "com.amazonaws.lambda.synthetic",
   26     26   
    "UntagResourceInput",
   27     27   
);
   28     28   
static UNTAGRESOURCEINPUT_MEMBER_RESOURCE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   29     29   
    ::aws_smithy_schema::ShapeId::from_static(
   30     30   
        "com.amazonaws.lambda.synthetic#UntagResourceInput$Resource",
   31     31   
        "com.amazonaws.lambda.synthetic",
   32     32   
        "UntagResourceInput",
   33     33   
    ),
   34     34   
    ::aws_smithy_schema::ShapeType::String,
   35         -
    "resource",
          35  +
    "Resource",
   36     36   
    0,
   37     37   
)
   38     38   
.with_http_label();
   39     39   
static UNTAGRESOURCEINPUT_MEMBER_TAG_KEYS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   40     40   
    ::aws_smithy_schema::ShapeId::from_static(
   41     41   
        "com.amazonaws.lambda.synthetic#UntagResourceInput$TagKeys",
   42     42   
        "com.amazonaws.lambda.synthetic",
   43     43   
        "UntagResourceInput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::List,
   46         -
    "tag_keys",
          46  +
    "TagKeys",
   47     47   
    1,
   48     48   
)
   49     49   
.with_http_query("tagKeys");
   50     50   
static UNTAGRESOURCEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   51     51   
    UNTAGRESOURCEINPUT_SCHEMA_ID,
   52     52   
    ::aws_smithy_schema::ShapeType::Structure,
   53     53   
    &[&UNTAGRESOURCEINPUT_MEMBER_RESOURCE, &UNTAGRESOURCEINPUT_MEMBER_TAG_KEYS],
   54         -
);
          54  +
)
          55  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          56  +
    "DELETE",
          57  +
    "/2017-03-31/tags/{Resource}",
          58  +
    Some(204),
          59  +
));
   55     60   
impl UntagResourceInput {
   56     61   
    /// The schema for this shape.
   57     62   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UNTAGRESOURCEINPUT_SCHEMA;
   58     63   
}
   59     64   
impl ::aws_smithy_schema::serde::SerializableStruct for UntagResourceInput {
   60     65   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   61     66   
    fn serialize_members(
   62     67   
        &self,
   63     68   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   64     69   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   65     70   
        if let Some(ref val) = self.resource {
   66     71   
            ser.write_string(&UNTAGRESOURCEINPUT_MEMBER_RESOURCE, val)?;
   67     72   
        }
   68     73   
        if let Some(ref val) = self.tag_keys {
   69     74   
            ser.write_list(
   70     75   
                &UNTAGRESOURCEINPUT_MEMBER_TAG_KEYS,
   71     76   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   72     77   
                    for item in val {
   73     78   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
   74     79   
                    }
   75     80   
                    Ok(())
   76     81   
                },
   77     82   
            )?;
   78     83   
        }
   79     84   
        Ok(())
   80     85   
    }
   81     86   
}
   82     87   
impl UntagResourceInput {
   83     88   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   84         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   85         -
        deserializer: &mut D,
          89  +
    pub fn deserialize(
          90  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   86     91   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   87     92   
        #[allow(unused_variables, unused_mut)]
   88     93   
        let mut builder = Self::builder();
   89     94   
        #[allow(
   90     95   
            unused_variables,
   91     96   
            unreachable_code,
   92     97   
            clippy::single_match,
   93     98   
            clippy::match_single_binding,
   94     99   
            clippy::diverging_sub_expression
   95    100   
        )]
   96         -
        deserializer.read_struct(&UNTAGRESOURCEINPUT_SCHEMA, (), |_, member, deser| {
         101  +
        deserializer.read_struct(&UNTAGRESOURCEINPUT_SCHEMA, &mut |member, deser| {
   97    102   
            match member.member_index() {
   98    103   
                Some(0) => {
   99    104   
                    builder.resource = Some(deser.read_string(member)?);
  100    105   
                }
  101    106   
                Some(1) => {
  102         -
                    builder.tag_keys = Some({
  103         -
                        let container = if let Some(cap) = deser.container_size() {
  104         -
                            Vec::with_capacity(cap)
  105         -
                        } else {
  106         -
                            Vec::new()
  107         -
                        };
  108         -
                        deser.read_list(member, container, |mut list, deser| {
  109         -
                            list.push(deser.read_string(member)?);
  110         -
                            Ok(list)
  111         -
                        })?
  112         -
                    });
         107  +
                    builder.tag_keys = Some(deser.read_string_list(member)?);
  113    108   
                }
  114    109   
                _ => {}
  115    110   
            }
  116    111   
            Ok(())
  117    112   
        })?;
         113  +
        builder.resource = builder.resource.or(Some(String::new()));
         114  +
        builder.tag_keys = builder.tag_keys.or(Some(Vec::new()));
  118    115   
        builder
  119    116   
            .build()
  120    117   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  121    118   
    }
  122    119   
}
         120  +
impl UntagResourceInput {
         121  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         122  +
    pub fn deserialize_with_response(
         123  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         124  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         125  +
        _status: u16,
         126  +
        _body: &[u8],
         127  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         128  +
        Self::deserialize(deserializer)
         129  +
    }
         130  +
}
  123    131   
impl UntagResourceInput {
  124    132   
    /// Creates a new builder-style object to manufacture [`UntagResourceInput`](crate::operation::untag_resource::UntagResourceInput).
  125    133   
    pub fn builder() -> crate::operation::untag_resource::builders::UntagResourceInputBuilder {
  126    134   
        crate::operation::untag_resource::builders::UntagResourceInputBuilder::default()
  127    135   
    }
  128    136   
}
  129    137   
  130    138   
/// A builder for [`UntagResourceInput`](crate::operation::untag_resource::UntagResourceInput).
  131    139   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  132    140   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/lambda/src/operation/untag_resource/_untag_resource_output.rs

@@ -1,1 +80,111 @@
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct UntagResourceOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static UNTAGRESOURCEOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.lambda.synthetic#UntagResourceOutput",
   10     10   
    "com.amazonaws.lambda.synthetic",
   11     11   
    "UntagResourceOutput",
   12     12   
);
   13         -
static UNTAGRESOURCEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(UNTAGRESOURCEOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static UNTAGRESOURCEOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          14  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          15  +
    ::aws_smithy_schema::ShapeType::String,
          16  +
    "request_id",
          17  +
    0,
          18  +
)
          19  +
.with_http_header("x-amzn-requestid");
          20  +
static UNTAGRESOURCEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    UNTAGRESOURCEOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&UNTAGRESOURCEOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl UntagResourceOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UNTAGRESOURCEOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for UntagResourceOutput {
   20     30   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   21     31   
    fn serialize_members(
   22     32   
        &self,
   23     33   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   24     34   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   25     35   
        Ok(())
   26     36   
    }
   27     37   
}
   28     38   
impl UntagResourceOutput {
   29     39   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   30         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   31         -
        deserializer: &mut D,
          40  +
    pub fn deserialize(
          41  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   32     42   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   33     43   
        #[allow(unused_variables, unused_mut)]
   34     44   
        let mut builder = Self::builder();
   35     45   
        #[allow(
   36     46   
            unused_variables,
   37     47   
            unreachable_code,
   38     48   
            clippy::single_match,
   39     49   
            clippy::match_single_binding,
   40     50   
            clippy::diverging_sub_expression
   41     51   
        )]
   42         -
        deserializer.read_struct(&UNTAGRESOURCEOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&UNTAGRESOURCEOUTPUT_SCHEMA, &mut |member, deser| {
   43     53   
            match member.member_index() {
          54  +
                Some(0) => {
          55  +
                    builder._request_id = Some(deser.read_string(member)?);
          56  +
                }
   44     57   
                _ => {}
   45     58   
            }
   46     59   
            Ok(())
   47     60   
        })?;
   48     61   
        Ok(builder.build())
   49     62   
    }
   50     63   
}
          64  +
impl UntagResourceOutput {
          65  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          66  +
    /// Header-bound members are read directly from headers, avoiding runtime
          67  +
    /// member iteration overhead. Body members are read via the deserializer.
          68  +
    pub fn deserialize_with_response(
          69  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        if let Some(val) = headers.get("x-amzn-requestid") {
          77  +
            builder._request_id = Some(val.to_string());
          78  +
        }
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
   51     82   
impl ::aws_types::request_id::RequestId for UntagResourceOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl UntagResourceOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`UntagResourceOutput`](crate::operation::untag_resource::UntagResourceOutput).
   58     89   
    pub fn builder() -> crate::operation::untag_resource::builders::UntagResourceOutputBuilder {
   59     90   
        crate::operation::untag_resource::builders::UntagResourceOutputBuilder::default()
   60     91   
    }

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

tmp-codegen-diff/aws-sdk/sdk/lambda/src/operation/update_alias/_update_alias_input.rs

@@ -47,47 +247,265 @@
   67     67   
    "com.amazonaws.lambda.synthetic",
   68     68   
    "UpdateAliasInput",
   69     69   
);
   70     70   
static UPDATEALIASINPUT_MEMBER_FUNCTION_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "com.amazonaws.lambda.synthetic#UpdateAliasInput$FunctionName",
   73     73   
        "com.amazonaws.lambda.synthetic",
   74     74   
        "UpdateAliasInput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::String,
   77         -
    "function_name",
          77  +
    "FunctionName",
   78     78   
    0,
   79     79   
)
   80     80   
.with_http_label();
   81     81   
static UPDATEALIASINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   82     82   
    ::aws_smithy_schema::ShapeId::from_static(
   83     83   
        "com.amazonaws.lambda.synthetic#UpdateAliasInput$Name",
   84     84   
        "com.amazonaws.lambda.synthetic",
   85     85   
        "UpdateAliasInput",
   86     86   
    ),
   87     87   
    ::aws_smithy_schema::ShapeType::String,
   88         -
    "name",
          88  +
    "Name",
   89     89   
    1,
   90     90   
)
   91     91   
.with_http_label();
   92     92   
static UPDATEALIASINPUT_MEMBER_FUNCTION_VERSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   93     93   
    ::aws_smithy_schema::ShapeId::from_static(
   94     94   
        "com.amazonaws.lambda.synthetic#UpdateAliasInput$FunctionVersion",
   95     95   
        "com.amazonaws.lambda.synthetic",
   96     96   
        "UpdateAliasInput",
   97     97   
    ),
   98     98   
    ::aws_smithy_schema::ShapeType::String,
   99         -
    "function_version",
          99  +
    "FunctionVersion",
  100    100   
    2,
  101    101   
);
  102    102   
static UPDATEALIASINPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  103    103   
    ::aws_smithy_schema::ShapeId::from_static(
  104    104   
        "com.amazonaws.lambda.synthetic#UpdateAliasInput$Description",
  105    105   
        "com.amazonaws.lambda.synthetic",
  106    106   
        "UpdateAliasInput",
  107    107   
    ),
  108    108   
    ::aws_smithy_schema::ShapeType::String,
  109         -
    "description",
         109  +
    "Description",
  110    110   
    3,
  111    111   
);
  112    112   
static UPDATEALIASINPUT_MEMBER_ROUTING_CONFIG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  113    113   
    ::aws_smithy_schema::ShapeId::from_static(
  114    114   
        "com.amazonaws.lambda.synthetic#UpdateAliasInput$RoutingConfig",
  115    115   
        "com.amazonaws.lambda.synthetic",
  116    116   
        "UpdateAliasInput",
  117    117   
    ),
  118    118   
    ::aws_smithy_schema::ShapeType::Structure,
  119         -
    "routing_config",
         119  +
    "RoutingConfig",
  120    120   
    4,
  121    121   
);
  122    122   
static UPDATEALIASINPUT_MEMBER_REVISION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  123    123   
    ::aws_smithy_schema::ShapeId::from_static(
  124    124   
        "com.amazonaws.lambda.synthetic#UpdateAliasInput$RevisionId",
  125    125   
        "com.amazonaws.lambda.synthetic",
  126    126   
        "UpdateAliasInput",
  127    127   
    ),
  128    128   
    ::aws_smithy_schema::ShapeType::String,
  129         -
    "revision_id",
         129  +
    "RevisionId",
  130    130   
    5,
  131    131   
);
  132    132   
static UPDATEALIASINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  133    133   
    UPDATEALIASINPUT_SCHEMA_ID,
  134    134   
    ::aws_smithy_schema::ShapeType::Structure,
  135    135   
    &[
  136    136   
        &UPDATEALIASINPUT_MEMBER_FUNCTION_NAME,
  137    137   
        &UPDATEALIASINPUT_MEMBER_NAME,
  138    138   
        &UPDATEALIASINPUT_MEMBER_FUNCTION_VERSION,
  139    139   
        &UPDATEALIASINPUT_MEMBER_DESCRIPTION,
  140    140   
        &UPDATEALIASINPUT_MEMBER_ROUTING_CONFIG,
  141    141   
        &UPDATEALIASINPUT_MEMBER_REVISION_ID,
  142    142   
    ],
  143         -
);
         143  +
)
         144  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
         145  +
    "PUT",
         146  +
    "/2015-03-31/functions/{FunctionName}/aliases/{Name}",
         147  +
    None,
         148  +
));
  144    149   
impl UpdateAliasInput {
  145    150   
    /// The schema for this shape.
  146    151   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATEALIASINPUT_SCHEMA;
  147    152   
}
  148    153   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateAliasInput {
  149    154   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  150    155   
    fn serialize_members(
  151    156   
        &self,
  152    157   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  153    158   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  154    159   
        if let Some(ref val) = self.function_name {
  155    160   
            ser.write_string(&UPDATEALIASINPUT_MEMBER_FUNCTION_NAME, val)?;
  156    161   
        }
  157    162   
        if let Some(ref val) = self.name {
  158    163   
            ser.write_string(&UPDATEALIASINPUT_MEMBER_NAME, val)?;
  159    164   
        }
  160    165   
        if let Some(ref val) = self.function_version {
  161    166   
            ser.write_string(&UPDATEALIASINPUT_MEMBER_FUNCTION_VERSION, val)?;
  162    167   
        }
  163    168   
        if let Some(ref val) = self.description {
  164    169   
            ser.write_string(&UPDATEALIASINPUT_MEMBER_DESCRIPTION, val)?;
  165    170   
        }
  166    171   
        if let Some(ref val) = self.routing_config {
  167    172   
            ser.write_struct(&UPDATEALIASINPUT_MEMBER_ROUTING_CONFIG, val)?;
  168    173   
        }
  169    174   
        if let Some(ref val) = self.revision_id {
  170    175   
            ser.write_string(&UPDATEALIASINPUT_MEMBER_REVISION_ID, val)?;
  171    176   
        }
  172    177   
        Ok(())
  173    178   
    }
  174    179   
}
  175    180   
impl UpdateAliasInput {
  176    181   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  177         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  178         -
        deserializer: &mut D,
         182  +
    pub fn deserialize(
         183  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  179    184   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  180    185   
        #[allow(unused_variables, unused_mut)]
  181    186   
        let mut builder = Self::builder();
  182    187   
        #[allow(
  183    188   
            unused_variables,
  184    189   
            unreachable_code,
  185    190   
            clippy::single_match,
  186    191   
            clippy::match_single_binding,
  187    192   
            clippy::diverging_sub_expression
  188    193   
        )]
  189         -
        deserializer.read_struct(&UPDATEALIASINPUT_SCHEMA, (), |_, member, deser| {
         194  +
        deserializer.read_struct(&UPDATEALIASINPUT_SCHEMA, &mut |member, deser| {
  190    195   
            match member.member_index() {
  191    196   
                Some(0) => {
  192    197   
                    builder.function_name = Some(deser.read_string(member)?);
  193    198   
                }
  194    199   
                Some(1) => {
  195    200   
                    builder.name = Some(deser.read_string(member)?);
  196    201   
                }
  197    202   
                Some(2) => {
  198    203   
                    builder.function_version = Some(deser.read_string(member)?);
  199    204   
                }
  200    205   
                Some(3) => {
  201    206   
                    builder.description = Some(deser.read_string(member)?);
  202    207   
                }
  203    208   
                Some(4) => {
  204    209   
                    builder.routing_config = Some(crate::types::AliasRoutingConfiguration::deserialize(deser)?);
  205    210   
                }
  206    211   
                Some(5) => {
  207    212   
                    builder.revision_id = Some(deser.read_string(member)?);
  208    213   
                }
  209    214   
                _ => {}
  210    215   
            }
  211    216   
            Ok(())
  212    217   
        })?;
         218  +
        builder.function_name = builder.function_name.or(Some(String::new()));
         219  +
        builder.name = builder.name.or(Some(String::new()));
  213    220   
        builder
  214    221   
            .build()
  215    222   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  216    223   
    }
  217    224   
}
         225  +
impl UpdateAliasInput {
         226  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         227  +
    pub fn deserialize_with_response(
         228  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         229  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         230  +
        _status: u16,
         231  +
        _body: &[u8],
         232  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         233  +
        Self::deserialize(deserializer)
         234  +
    }
         235  +
}
  218    236   
impl UpdateAliasInput {
  219    237   
    /// Creates a new builder-style object to manufacture [`UpdateAliasInput`](crate::operation::update_alias::UpdateAliasInput).
  220    238   
    pub fn builder() -> crate::operation::update_alias::builders::UpdateAliasInputBuilder {
  221    239   
        crate::operation::update_alias::builders::UpdateAliasInputBuilder::default()
  222    240   
    }
  223    241   
}
  224    242   
  225    243   
/// A builder for [`UpdateAliasInput`](crate::operation::update_alias::UpdateAliasInput).
  226    244   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  227    245   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/lambda/src/operation/update_alias/_update_alias_output.rs

@@ -29,29 +199,259 @@
   49     49   
    "com.amazonaws.lambda.synthetic",
   50     50   
    "UpdateAliasOutput",
   51     51   
);
   52     52   
static UPDATEALIASOUTPUT_MEMBER_ALIAS_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.lambda.synthetic#UpdateAliasOutput$AliasArn",
   55     55   
        "com.amazonaws.lambda.synthetic",
   56     56   
        "UpdateAliasOutput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::String,
   59         -
    "alias_arn",
          59  +
    "AliasArn",
   60     60   
    0,
   61     61   
);
   62     62   
static UPDATEALIASOUTPUT_MEMBER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   63     63   
    ::aws_smithy_schema::ShapeId::from_static(
   64     64   
        "com.amazonaws.lambda.synthetic#UpdateAliasOutput$Name",
   65     65   
        "com.amazonaws.lambda.synthetic",
   66     66   
        "UpdateAliasOutput",
   67     67   
    ),
   68     68   
    ::aws_smithy_schema::ShapeType::String,
   69         -
    "name",
          69  +
    "Name",
   70     70   
    1,
   71     71   
);
   72     72   
static UPDATEALIASOUTPUT_MEMBER_FUNCTION_VERSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.lambda.synthetic#UpdateAliasOutput$FunctionVersion",
   75     75   
        "com.amazonaws.lambda.synthetic",
   76     76   
        "UpdateAliasOutput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::String,
   79         -
    "function_version",
          79  +
    "FunctionVersion",
   80     80   
    2,
   81     81   
);
   82     82   
static UPDATEALIASOUTPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   83     83   
    ::aws_smithy_schema::ShapeId::from_static(
   84     84   
        "com.amazonaws.lambda.synthetic#UpdateAliasOutput$Description",
   85     85   
        "com.amazonaws.lambda.synthetic",
   86     86   
        "UpdateAliasOutput",
   87     87   
    ),
   88     88   
    ::aws_smithy_schema::ShapeType::String,
   89         -
    "description",
          89  +
    "Description",
   90     90   
    3,
   91     91   
);
   92     92   
static UPDATEALIASOUTPUT_MEMBER_ROUTING_CONFIG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   93     93   
    ::aws_smithy_schema::ShapeId::from_static(
   94     94   
        "com.amazonaws.lambda.synthetic#UpdateAliasOutput$RoutingConfig",
   95     95   
        "com.amazonaws.lambda.synthetic",
   96     96   
        "UpdateAliasOutput",
   97     97   
    ),
   98     98   
    ::aws_smithy_schema::ShapeType::Structure,
   99         -
    "routing_config",
          99  +
    "RoutingConfig",
  100    100   
    4,
  101    101   
);
  102    102   
static UPDATEALIASOUTPUT_MEMBER_REVISION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  103    103   
    ::aws_smithy_schema::ShapeId::from_static(
  104    104   
        "com.amazonaws.lambda.synthetic#UpdateAliasOutput$RevisionId",
  105    105   
        "com.amazonaws.lambda.synthetic",
  106    106   
        "UpdateAliasOutput",
  107    107   
    ),
  108    108   
    ::aws_smithy_schema::ShapeType::String,
  109         -
    "revision_id",
         109  +
    "RevisionId",
  110    110   
    5,
  111    111   
);
         112  +
static UPDATEALIASOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         113  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         114  +
    ::aws_smithy_schema::ShapeType::String,
         115  +
    "request_id",
         116  +
    6,
         117  +
)
         118  +
.with_http_header("x-amzn-requestid");
  112    119   
static UPDATEALIASOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  113    120   
    UPDATEALIASOUTPUT_SCHEMA_ID,
  114    121   
    ::aws_smithy_schema::ShapeType::Structure,
  115    122   
    &[
  116    123   
        &UPDATEALIASOUTPUT_MEMBER_ALIAS_ARN,
  117    124   
        &UPDATEALIASOUTPUT_MEMBER_NAME,
  118    125   
        &UPDATEALIASOUTPUT_MEMBER_FUNCTION_VERSION,
  119    126   
        &UPDATEALIASOUTPUT_MEMBER_DESCRIPTION,
  120    127   
        &UPDATEALIASOUTPUT_MEMBER_ROUTING_CONFIG,
  121    128   
        &UPDATEALIASOUTPUT_MEMBER_REVISION_ID,
         129  +
        &UPDATEALIASOUTPUT_MEMBER__REQUEST_ID,
  122    130   
    ],
  123    131   
);
  124    132   
impl UpdateAliasOutput {
  125    133   
    /// The schema for this shape.
  126    134   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATEALIASOUTPUT_SCHEMA;
  127    135   
}
  128    136   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateAliasOutput {
  129    137   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  130    138   
    fn serialize_members(
  131    139   
        &self,
  132    140   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  133    141   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  134    142   
        if let Some(ref val) = self.alias_arn {
  135    143   
            ser.write_string(&UPDATEALIASOUTPUT_MEMBER_ALIAS_ARN, val)?;
  136    144   
        }
  137    145   
        if let Some(ref val) = self.name {
  138    146   
            ser.write_string(&UPDATEALIASOUTPUT_MEMBER_NAME, val)?;
  139    147   
        }
  140    148   
        if let Some(ref val) = self.function_version {
  141    149   
            ser.write_string(&UPDATEALIASOUTPUT_MEMBER_FUNCTION_VERSION, val)?;
  142    150   
        }
  143    151   
        if let Some(ref val) = self.description {
  144    152   
            ser.write_string(&UPDATEALIASOUTPUT_MEMBER_DESCRIPTION, val)?;
  145    153   
        }
  146    154   
        if let Some(ref val) = self.routing_config {
  147    155   
            ser.write_struct(&UPDATEALIASOUTPUT_MEMBER_ROUTING_CONFIG, val)?;
  148    156   
        }
  149    157   
        if let Some(ref val) = self.revision_id {
  150    158   
            ser.write_string(&UPDATEALIASOUTPUT_MEMBER_REVISION_ID, val)?;
  151    159   
        }
  152    160   
        Ok(())
  153    161   
    }
  154    162   
}
  155    163   
impl UpdateAliasOutput {
  156    164   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  157         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  158         -
        deserializer: &mut D,
         165  +
    pub fn deserialize(
         166  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         167  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         168  +
        #[allow(unused_variables, unused_mut)]
         169  +
        let mut builder = Self::builder();
         170  +
        #[allow(
         171  +
            unused_variables,
         172  +
            unreachable_code,
         173  +
            clippy::single_match,
         174  +
            clippy::match_single_binding,
         175  +
            clippy::diverging_sub_expression
         176  +
        )]
         177  +
        deserializer.read_struct(&UPDATEALIASOUTPUT_SCHEMA, &mut |member, deser| {
         178  +
            match member.member_index() {
         179  +
                Some(0) => {
         180  +
                    builder.alias_arn = Some(deser.read_string(member)?);
         181  +
                }
         182  +
                Some(1) => {
         183  +
                    builder.name = Some(deser.read_string(member)?);
         184  +
                }
         185  +
                Some(2) => {
         186  +
                    builder.function_version = Some(deser.read_string(member)?);
         187  +
                }
         188  +
                Some(3) => {
         189  +
                    builder.description = Some(deser.read_string(member)?);
         190  +
                }
         191  +
                Some(4) => {
         192  +
                    builder.routing_config = Some(crate::types::AliasRoutingConfiguration::deserialize(deser)?);
         193  +
                }
         194  +
                Some(5) => {
         195  +
                    builder.revision_id = Some(deser.read_string(member)?);
         196  +
                }
         197  +
                Some(6) => {
         198  +
                    builder._request_id = Some(deser.read_string(member)?);
         199  +
                }
         200  +
                _ => {}
         201  +
            }
         202  +
            Ok(())
         203  +
        })?;
         204  +
        Ok(builder.build())
         205  +
    }
         206  +
}
         207  +
impl UpdateAliasOutput {
         208  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         209  +
    /// Header-bound members are read directly from headers, avoiding runtime
         210  +
    /// member iteration overhead. Body members are read via the deserializer.
         211  +
    pub fn deserialize_with_response(
         212  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         213  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         214  +
        _status: u16,
         215  +
        _body: &[u8],
  159    216   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  160    217   
        #[allow(unused_variables, unused_mut)]
  161    218   
        let mut builder = Self::builder();
         219  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         220  +
            builder._request_id = Some(val.to_string());
         221  +
        }
  162    222   
        #[allow(
  163    223   
            unused_variables,
  164    224   
            unreachable_code,
  165    225   
            clippy::single_match,
  166    226   
            clippy::match_single_binding,
  167    227   
            clippy::diverging_sub_expression
  168    228   
        )]
  169         -
        deserializer.read_struct(&UPDATEALIASOUTPUT_SCHEMA, (), |_, member, deser| {
         229  +
        deserializer.read_struct(&UPDATEALIASOUTPUT_SCHEMA, &mut |member, deser| {
  170    230   
            match member.member_index() {
  171    231   
                Some(0) => {
  172    232   
                    builder.alias_arn = Some(deser.read_string(member)?);
  173    233   
                }
  174    234   
                Some(1) => {
  175    235   
                    builder.name = Some(deser.read_string(member)?);
  176    236   
                }
  177    237   
                Some(2) => {
  178    238   
                    builder.function_version = Some(deser.read_string(member)?);
  179    239   
                }

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