AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36 (ignoring whitespace)

Files changed:

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

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

tmp-codegen-diff/aws-sdk/sdk/lambda/src/operation/put_function_code_signing_config/_put_function_code_signing_config_input.rs

@@ -23,23 +154,172 @@
   43     43   
    "com.amazonaws.lambda.synthetic",
   44     44   
    "PutFunctionCodeSigningConfigInput",
   45     45   
);
   46     46   
static PUTFUNCTIONCODESIGNINGCONFIGINPUT_MEMBER_CODE_SIGNING_CONFIG_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   47     47   
    ::aws_smithy_schema::ShapeId::from_static(
   48     48   
        "com.amazonaws.lambda.synthetic#PutFunctionCodeSigningConfigInput$CodeSigningConfigArn",
   49     49   
        "com.amazonaws.lambda.synthetic",
   50     50   
        "PutFunctionCodeSigningConfigInput",
   51     51   
    ),
   52     52   
    ::aws_smithy_schema::ShapeType::String,
   53         -
    "code_signing_config_arn",
          53  +
    "CodeSigningConfigArn",
   54     54   
    0,
   55     55   
);
   56     56   
static PUTFUNCTIONCODESIGNINGCONFIGINPUT_MEMBER_FUNCTION_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   57     57   
    ::aws_smithy_schema::ShapeId::from_static(
   58     58   
        "com.amazonaws.lambda.synthetic#PutFunctionCodeSigningConfigInput$FunctionName",
   59     59   
        "com.amazonaws.lambda.synthetic",
   60     60   
        "PutFunctionCodeSigningConfigInput",
   61     61   
    ),
   62     62   
    ::aws_smithy_schema::ShapeType::String,
   63         -
    "function_name",
          63  +
    "FunctionName",
   64     64   
    1,
   65     65   
)
   66     66   
.with_http_label();
   67     67   
static PUTFUNCTIONCODESIGNINGCONFIGINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   68     68   
    PUTFUNCTIONCODESIGNINGCONFIGINPUT_SCHEMA_ID,
   69     69   
    ::aws_smithy_schema::ShapeType::Structure,
   70     70   
    &[
   71     71   
        &PUTFUNCTIONCODESIGNINGCONFIGINPUT_MEMBER_CODE_SIGNING_CONFIG_ARN,
   72     72   
        &PUTFUNCTIONCODESIGNINGCONFIGINPUT_MEMBER_FUNCTION_NAME,
   73     73   
    ],
   74         -
);
          74  +
)
          75  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          76  +
    "PUT",
          77  +
    "/2020-06-30/functions/{FunctionName}/code-signing-config",
          78  +
    None,
          79  +
));
   75     80   
impl PutFunctionCodeSigningConfigInput {
   76     81   
    /// The schema for this shape.
   77     82   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTFUNCTIONCODESIGNINGCONFIGINPUT_SCHEMA;
   78     83   
}
   79     84   
impl ::aws_smithy_schema::serde::SerializableStruct for PutFunctionCodeSigningConfigInput {
   80     85   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   81     86   
    fn serialize_members(
   82     87   
        &self,
   83     88   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   84     89   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   85     90   
        if let Some(ref val) = self.code_signing_config_arn {
   86     91   
            ser.write_string(&PUTFUNCTIONCODESIGNINGCONFIGINPUT_MEMBER_CODE_SIGNING_CONFIG_ARN, val)?;
   87     92   
        }
   88     93   
        if let Some(ref val) = self.function_name {
   89     94   
            ser.write_string(&PUTFUNCTIONCODESIGNINGCONFIGINPUT_MEMBER_FUNCTION_NAME, val)?;
   90     95   
        }
   91     96   
        Ok(())
   92     97   
    }
   93     98   
}
   94     99   
impl PutFunctionCodeSigningConfigInput {
   95    100   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   96         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   97         -
        deserializer: &mut D,
         101  +
    pub fn deserialize(
         102  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   98    103   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   99    104   
        #[allow(unused_variables, unused_mut)]
  100    105   
        let mut builder = Self::builder();
  101    106   
        #[allow(
  102    107   
            unused_variables,
  103    108   
            unreachable_code,
  104    109   
            clippy::single_match,
  105    110   
            clippy::match_single_binding,
  106    111   
            clippy::diverging_sub_expression
  107    112   
        )]
  108         -
        deserializer.read_struct(&PUTFUNCTIONCODESIGNINGCONFIGINPUT_SCHEMA, (), |_, member, deser| {
         113  +
        deserializer.read_struct(&PUTFUNCTIONCODESIGNINGCONFIGINPUT_SCHEMA, &mut |member, deser| {
  109    114   
            match member.member_index() {
  110    115   
                Some(0) => {
  111    116   
                    builder.code_signing_config_arn = Some(deser.read_string(member)?);
  112    117   
                }
  113    118   
                Some(1) => {
  114    119   
                    builder.function_name = Some(deser.read_string(member)?);
  115    120   
                }
  116    121   
                _ => {}
  117    122   
            }
  118    123   
            Ok(())
  119    124   
        })?;
         125  +
        builder.code_signing_config_arn = builder.code_signing_config_arn.or(Some(String::new()));
         126  +
        builder.function_name = builder.function_name.or(Some(String::new()));
  120    127   
        builder
  121    128   
            .build()
  122    129   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  123    130   
    }
  124    131   
}
         132  +
impl PutFunctionCodeSigningConfigInput {
         133  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         134  +
    pub fn deserialize_with_response(
         135  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         136  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         137  +
        _status: u16,
         138  +
        _body: &[u8],
         139  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         140  +
        Self::deserialize(deserializer)
         141  +
    }
         142  +
}
  125    143   
impl PutFunctionCodeSigningConfigInput {
  126    144   
    /// Creates a new builder-style object to manufacture [`PutFunctionCodeSigningConfigInput`](crate::operation::put_function_code_signing_config::PutFunctionCodeSigningConfigInput).
  127    145   
    pub fn builder() -> crate::operation::put_function_code_signing_config::builders::PutFunctionCodeSigningConfigInputBuilder {
  128    146   
        crate::operation::put_function_code_signing_config::builders::PutFunctionCodeSigningConfigInputBuilder::default()
  129    147   
    }
  130    148   
}
  131    149   
  132    150   
/// A builder for [`PutFunctionCodeSigningConfigInput`](crate::operation::put_function_code_signing_config::PutFunctionCodeSigningConfigInput).
  133    151   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  134    152   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/lambda/src/operation/put_function_code_signing_config/_put_function_code_signing_config_output.rs

@@ -26,26 +142,194 @@
   46     46   
    "com.amazonaws.lambda.synthetic",
   47     47   
    "PutFunctionCodeSigningConfigOutput",
   48     48   
);
   49     49   
static PUTFUNCTIONCODESIGNINGCONFIGOUTPUT_MEMBER_CODE_SIGNING_CONFIG_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   50     50   
    ::aws_smithy_schema::ShapeId::from_static(
   51     51   
        "com.amazonaws.lambda.synthetic#PutFunctionCodeSigningConfigOutput$CodeSigningConfigArn",
   52     52   
        "com.amazonaws.lambda.synthetic",
   53     53   
        "PutFunctionCodeSigningConfigOutput",
   54     54   
    ),
   55     55   
    ::aws_smithy_schema::ShapeType::String,
   56         -
    "code_signing_config_arn",
          56  +
    "CodeSigningConfigArn",
   57     57   
    0,
   58     58   
);
   59     59   
static PUTFUNCTIONCODESIGNINGCONFIGOUTPUT_MEMBER_FUNCTION_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   60     60   
    ::aws_smithy_schema::ShapeId::from_static(
   61     61   
        "com.amazonaws.lambda.synthetic#PutFunctionCodeSigningConfigOutput$FunctionName",
   62     62   
        "com.amazonaws.lambda.synthetic",
   63     63   
        "PutFunctionCodeSigningConfigOutput",
   64     64   
    ),
   65     65   
    ::aws_smithy_schema::ShapeType::String,
   66         -
    "function_name",
          66  +
    "FunctionName",
   67     67   
    1,
   68     68   
);
          69  +
static PUTFUNCTIONCODESIGNINGCONFIGOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          70  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          71  +
    ::aws_smithy_schema::ShapeType::String,
          72  +
    "request_id",
          73  +
    2,
          74  +
)
          75  +
.with_http_header("x-amzn-requestid");
   69     76   
static PUTFUNCTIONCODESIGNINGCONFIGOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   70     77   
    PUTFUNCTIONCODESIGNINGCONFIGOUTPUT_SCHEMA_ID,
   71     78   
    ::aws_smithy_schema::ShapeType::Structure,
   72     79   
    &[
   73     80   
        &PUTFUNCTIONCODESIGNINGCONFIGOUTPUT_MEMBER_CODE_SIGNING_CONFIG_ARN,
   74     81   
        &PUTFUNCTIONCODESIGNINGCONFIGOUTPUT_MEMBER_FUNCTION_NAME,
          82  +
        &PUTFUNCTIONCODESIGNINGCONFIGOUTPUT_MEMBER__REQUEST_ID,
   75     83   
    ],
   76     84   
);
   77     85   
impl PutFunctionCodeSigningConfigOutput {
   78     86   
    /// The schema for this shape.
   79     87   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTFUNCTIONCODESIGNINGCONFIGOUTPUT_SCHEMA;
   80     88   
}
   81     89   
impl ::aws_smithy_schema::serde::SerializableStruct for PutFunctionCodeSigningConfigOutput {
   82     90   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   83     91   
    fn serialize_members(
   84     92   
        &self,
   85     93   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   86     94   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   87     95   
        {
   88     96   
            let val = &self.code_signing_config_arn;
   89     97   
            ser.write_string(&PUTFUNCTIONCODESIGNINGCONFIGOUTPUT_MEMBER_CODE_SIGNING_CONFIG_ARN, val)?;
   90     98   
        }
   91     99   
        {
   92    100   
            let val = &self.function_name;
   93    101   
            ser.write_string(&PUTFUNCTIONCODESIGNINGCONFIGOUTPUT_MEMBER_FUNCTION_NAME, val)?;
   94    102   
        }
   95    103   
        Ok(())
   96    104   
    }
   97    105   
}
   98    106   
impl PutFunctionCodeSigningConfigOutput {
   99    107   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  100         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  101         -
        deserializer: &mut D,
         108  +
    pub fn deserialize(
         109  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         110  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         111  +
        #[allow(unused_variables, unused_mut)]
         112  +
        let mut builder = Self::builder();
         113  +
        #[allow(
         114  +
            unused_variables,
         115  +
            unreachable_code,
         116  +
            clippy::single_match,
         117  +
            clippy::match_single_binding,
         118  +
            clippy::diverging_sub_expression
         119  +
        )]
         120  +
        deserializer.read_struct(&PUTFUNCTIONCODESIGNINGCONFIGOUTPUT_SCHEMA, &mut |member, deser| {
         121  +
            match member.member_index() {
         122  +
                Some(0) => {
         123  +
                    builder.code_signing_config_arn = Some(deser.read_string(member)?);
         124  +
                }
         125  +
                Some(1) => {
         126  +
                    builder.function_name = Some(deser.read_string(member)?);
         127  +
                }
         128  +
                Some(2) => {
         129  +
                    builder._request_id = Some(deser.read_string(member)?);
         130  +
                }
         131  +
                _ => {}
         132  +
            }
         133  +
            Ok(())
         134  +
        })?;
         135  +
        builder.code_signing_config_arn = builder.code_signing_config_arn.or(Some(String::new()));
         136  +
        builder.function_name = builder.function_name.or(Some(String::new()));
         137  +
        builder
         138  +
            .build()
         139  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         140  +
    }
         141  +
}
         142  +
impl PutFunctionCodeSigningConfigOutput {
         143  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         144  +
    /// Header-bound members are read directly from headers, avoiding runtime
         145  +
    /// member iteration overhead. Body members are read via the deserializer.
         146  +
    pub fn deserialize_with_response(
         147  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         148  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         149  +
        _status: u16,
         150  +
        _body: &[u8],
  102    151   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  103    152   
        #[allow(unused_variables, unused_mut)]
  104    153   
        let mut builder = Self::builder();
         154  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         155  +
            builder._request_id = Some(val.to_string());
         156  +
        }
  105    157   
        #[allow(
  106    158   
            unused_variables,
  107    159   
            unreachable_code,
  108    160   
            clippy::single_match,
  109    161   
            clippy::match_single_binding,
  110    162   
            clippy::diverging_sub_expression
  111    163   
        )]
  112         -
        deserializer.read_struct(&PUTFUNCTIONCODESIGNINGCONFIGOUTPUT_SCHEMA, (), |_, member, deser| {
         164  +
        deserializer.read_struct(&PUTFUNCTIONCODESIGNINGCONFIGOUTPUT_SCHEMA, &mut |member, deser| {
  113    165   
            match member.member_index() {
  114    166   
                Some(0) => {
  115    167   
                    builder.code_signing_config_arn = Some(deser.read_string(member)?);
  116    168   
                }
  117    169   
                Some(1) => {
  118    170   
                    builder.function_name = Some(deser.read_string(member)?);
  119    171   
                }
  120    172   
                _ => {}
  121    173   
            }
  122    174   
            Ok(())

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

tmp-codegen-diff/aws-sdk/sdk/lambda/src/operation/put_function_concurrency/_put_function_concurrency_input.rs

@@ -23,23 +154,172 @@
   43     43   
    "com.amazonaws.lambda.synthetic",
   44     44   
    "PutFunctionConcurrencyInput",
   45     45   
);
   46     46   
static PUTFUNCTIONCONCURRENCYINPUT_MEMBER_FUNCTION_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   47     47   
    ::aws_smithy_schema::ShapeId::from_static(
   48     48   
        "com.amazonaws.lambda.synthetic#PutFunctionConcurrencyInput$FunctionName",
   49     49   
        "com.amazonaws.lambda.synthetic",
   50     50   
        "PutFunctionConcurrencyInput",
   51     51   
    ),
   52     52   
    ::aws_smithy_schema::ShapeType::String,
   53         -
    "function_name",
          53  +
    "FunctionName",
   54     54   
    0,
   55     55   
)
   56     56   
.with_http_label();
   57     57   
static PUTFUNCTIONCONCURRENCYINPUT_MEMBER_RESERVED_CONCURRENT_EXECUTIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   58     58   
    ::aws_smithy_schema::ShapeId::from_static(
   59     59   
        "com.amazonaws.lambda.synthetic#PutFunctionConcurrencyInput$ReservedConcurrentExecutions",
   60     60   
        "com.amazonaws.lambda.synthetic",
   61     61   
        "PutFunctionConcurrencyInput",
   62     62   
    ),
   63     63   
    ::aws_smithy_schema::ShapeType::Integer,
   64         -
    "reserved_concurrent_executions",
          64  +
    "ReservedConcurrentExecutions",
   65     65   
    1,
   66     66   
);
   67     67   
static PUTFUNCTIONCONCURRENCYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   68     68   
    PUTFUNCTIONCONCURRENCYINPUT_SCHEMA_ID,
   69     69   
    ::aws_smithy_schema::ShapeType::Structure,
   70     70   
    &[
   71     71   
        &PUTFUNCTIONCONCURRENCYINPUT_MEMBER_FUNCTION_NAME,
   72     72   
        &PUTFUNCTIONCONCURRENCYINPUT_MEMBER_RESERVED_CONCURRENT_EXECUTIONS,
   73     73   
    ],
   74         -
);
          74  +
)
          75  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          76  +
    "PUT",
          77  +
    "/2017-10-31/functions/{FunctionName}/concurrency",
          78  +
    None,
          79  +
));
   75     80   
impl PutFunctionConcurrencyInput {
   76     81   
    /// The schema for this shape.
   77     82   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTFUNCTIONCONCURRENCYINPUT_SCHEMA;
   78     83   
}
   79     84   
impl ::aws_smithy_schema::serde::SerializableStruct for PutFunctionConcurrencyInput {
   80     85   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   81     86   
    fn serialize_members(
   82     87   
        &self,
   83     88   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   84     89   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   85     90   
        if let Some(ref val) = self.function_name {
   86     91   
            ser.write_string(&PUTFUNCTIONCONCURRENCYINPUT_MEMBER_FUNCTION_NAME, val)?;
   87     92   
        }
   88     93   
        if let Some(ref val) = self.reserved_concurrent_executions {
   89     94   
            ser.write_integer(&PUTFUNCTIONCONCURRENCYINPUT_MEMBER_RESERVED_CONCURRENT_EXECUTIONS, *val)?;
   90     95   
        }
   91     96   
        Ok(())
   92     97   
    }
   93     98   
}
   94     99   
impl PutFunctionConcurrencyInput {
   95    100   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   96         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   97         -
        deserializer: &mut D,
         101  +
    pub fn deserialize(
         102  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   98    103   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   99    104   
        #[allow(unused_variables, unused_mut)]
  100    105   
        let mut builder = Self::builder();
  101    106   
        #[allow(
  102    107   
            unused_variables,
  103    108   
            unreachable_code,
  104    109   
            clippy::single_match,
  105    110   
            clippy::match_single_binding,
  106    111   
            clippy::diverging_sub_expression
  107    112   
        )]
  108         -
        deserializer.read_struct(&PUTFUNCTIONCONCURRENCYINPUT_SCHEMA, (), |_, member, deser| {
         113  +
        deserializer.read_struct(&PUTFUNCTIONCONCURRENCYINPUT_SCHEMA, &mut |member, deser| {
  109    114   
            match member.member_index() {
  110    115   
                Some(0) => {
  111    116   
                    builder.function_name = Some(deser.read_string(member)?);
  112    117   
                }
  113    118   
                Some(1) => {
  114    119   
                    builder.reserved_concurrent_executions = Some(deser.read_integer(member)?);
  115    120   
                }
  116    121   
                _ => {}
  117    122   
            }
  118    123   
            Ok(())
  119    124   
        })?;
         125  +
        builder.function_name = builder.function_name.or(Some(String::new()));
         126  +
        builder.reserved_concurrent_executions = builder.reserved_concurrent_executions.or(Some(0i32));
  120    127   
        builder
  121    128   
            .build()
  122    129   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  123    130   
    }
  124    131   
}
         132  +
impl PutFunctionConcurrencyInput {
         133  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         134  +
    pub fn deserialize_with_response(
         135  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         136  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         137  +
        _status: u16,
         138  +
        _body: &[u8],
         139  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         140  +
        Self::deserialize(deserializer)
         141  +
    }
         142  +
}
  125    143   
impl PutFunctionConcurrencyInput {
  126    144   
    /// Creates a new builder-style object to manufacture [`PutFunctionConcurrencyInput`](crate::operation::put_function_concurrency::PutFunctionConcurrencyInput).
  127    145   
    pub fn builder() -> crate::operation::put_function_concurrency::builders::PutFunctionConcurrencyInputBuilder {
  128    146   
        crate::operation::put_function_concurrency::builders::PutFunctionConcurrencyInputBuilder::default()
  129    147   
    }
  130    148   
}
  131    149   
  132    150   
/// A builder for [`PutFunctionConcurrencyInput`](crate::operation::put_function_concurrency::PutFunctionConcurrencyInput).
  133    151   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  134    152   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/lambda/src/operation/put_function_concurrency/_put_function_concurrency_output.rs

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

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

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