AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

tmp-codegen-diff/aws-sdk/sdk/lambda/src/operation/invoke.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 `Invoke`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct Invoke;
    6      6   
impl Invoke {
    7      7   
    /// Creates a new `Invoke`
    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::invoke::InvokeInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::invoke::InvokeOutput::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::invoke::InvokeInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::invoke::InvokeOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::invoke::InvokeError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -107,111 +253,974 @@
  127    131   
                crate::operation::invoke::InvokeError,
  128    132   
            >::new());
  129    133   
  130    134   
        ::std::borrow::Cow::Owned(rcb)
  131    135   
    }
  132    136   
}
  133    137   
  134    138   
#[derive(Debug)]
  135    139   
struct InvokeResponseDeserializer;
  136    140   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for InvokeResponseDeserializer {
  137         -
    fn deserialize_nonstreaming(
         141  +
    fn deserialize_nonstreaming_with_config(
  138    142   
        &self,
  139    143   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         144  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  140    145   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  141    146   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  142         -
        let headers = response.headers();
  143         -
        let body = response.body().bytes().expect("body loaded");
  144    147   
        #[allow(unused_mut)]
  145    148   
        let mut force_error = false;
  146    149   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  147         -
        let parse_result = if !success && status != 200 || force_error {
  148         -
            crate::protocol_serde::shape_invoke::de_invoke_http_error(status, headers, body)
         150  +
        if !success && status != 200 || force_error {
         151  +
            let headers = response.headers();
         152  +
            let body = response.body().bytes().expect("body loaded");
         153  +
            #[allow(unused_mut)]
         154  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         155  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         156  +
            })?;
         157  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         158  +
            let generic = generic_builder.build();
         159  +
            let error_code = match generic.code() {
         160  +
                ::std::option::Option::Some(code) => code,
         161  +
                ::std::option::Option::None => {
         162  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         163  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::invoke::InvokeError::unhandled(generic)),
         164  +
                    ))
         165  +
                }
         166  +
            };
         167  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         168  +
            let protocol = _cfg
         169  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         170  +
                .expect("a SharedClientProtocol is required");
         171  +
            let err = match error_code {
         172  +
                "EC2AccessDeniedException" => crate::operation::invoke::InvokeError::Ec2AccessDeniedException({
         173  +
                    let mut tmp = match protocol
         174  +
                        .deserialize_response(response, crate::types::error::Ec2AccessDeniedException::SCHEMA, _cfg)
         175  +
                        .and_then(|mut deser| {
         176  +
                            crate::types::error::Ec2AccessDeniedException::deserialize_with_response(
         177  +
                                &mut *deser,
         178  +
                                response.headers(),
         179  +
                                response.status().into(),
         180  +
                                body,
         181  +
                            )
         182  +
                        }) {
         183  +
                        ::std::result::Result::Ok(val) => val,
         184  +
                        ::std::result::Result::Err(e) => {
         185  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         186  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         187  +
                            ))
         188  +
                        }
         189  +
                    };
         190  +
                    tmp.meta = generic;
         191  +
                    if tmp.message.is_none() {
         192  +
                        tmp.message = _error_message;
         193  +
                    }
         194  +
                    tmp
         195  +
                }),
         196  +
                "EC2ThrottledException" => crate::operation::invoke::InvokeError::Ec2ThrottledException({
         197  +
                    let mut tmp = match protocol
         198  +
                        .deserialize_response(response, crate::types::error::Ec2ThrottledException::SCHEMA, _cfg)
         199  +
                        .and_then(|mut deser| {
         200  +
                            crate::types::error::Ec2ThrottledException::deserialize_with_response(
         201  +
                                &mut *deser,
         202  +
                                response.headers(),
         203  +
                                response.status().into(),
         204  +
                                body,
         205  +
                            )
         206  +
                        }) {
         207  +
                        ::std::result::Result::Ok(val) => val,
         208  +
                        ::std::result::Result::Err(e) => {
         209  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         210  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         211  +
                            ))
         212  +
                        }
         213  +
                    };
         214  +
                    tmp.meta = generic;
         215  +
                    if tmp.message.is_none() {
         216  +
                        tmp.message = _error_message;
         217  +
                    }
         218  +
                    tmp
         219  +
                }),
         220  +
                "EC2UnexpectedException" => crate::operation::invoke::InvokeError::Ec2UnexpectedException({
         221  +
                    let mut tmp = match protocol
         222  +
                        .deserialize_response(response, crate::types::error::Ec2UnexpectedException::SCHEMA, _cfg)
         223  +
                        .and_then(|mut deser| {
         224  +
                            crate::types::error::Ec2UnexpectedException::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  +
                "EFSIOException" => crate::operation::invoke::InvokeError::EfsioException({
         245  +
                    let mut tmp = match protocol
         246  +
                        .deserialize_response(response, crate::types::error::EfsioException::SCHEMA, _cfg)
         247  +
                        .and_then(|mut deser| {
         248  +
                            crate::types::error::EfsioException::deserialize_with_response(
         249  +
                                &mut *deser,
         250  +
                                response.headers(),
         251  +
                                response.status().into(),
         252  +
                                body,
         253  +
                            )
         254  +
                        }) {
         255  +
                        ::std::result::Result::Ok(val) => val,
         256  +
                        ::std::result::Result::Err(e) => {
         257  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         258  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         259  +
                            ))
         260  +
                        }
         261  +
                    };
         262  +
                    tmp.meta = generic;
         263  +
                    if tmp.message.is_none() {
         264  +
                        tmp.message = _error_message;
         265  +
                    }
         266  +
                    tmp
         267  +
                }),
         268  +
                "EFSMountConnectivityException" => crate::operation::invoke::InvokeError::EfsMountConnectivityException({
         269  +
                    let mut tmp = match protocol
         270  +
                        .deserialize_response(response, crate::types::error::EfsMountConnectivityException::SCHEMA, _cfg)
         271  +
                        .and_then(|mut deser| {
         272  +
                            crate::types::error::EfsMountConnectivityException::deserialize_with_response(
         273  +
                                &mut *deser,
         274  +
                                response.headers(),
         275  +
                                response.status().into(),
         276  +
                                body,
         277  +
                            )
         278  +
                        }) {
         279  +
                        ::std::result::Result::Ok(val) => val,
         280  +
                        ::std::result::Result::Err(e) => {
         281  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         282  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         283  +
                            ))
         284  +
                        }
         285  +
                    };
         286  +
                    tmp.meta = generic;
         287  +
                    if tmp.message.is_none() {
         288  +
                        tmp.message = _error_message;
         289  +
                    }
         290  +
                    tmp
         291  +
                }),
         292  +
                "EFSMountFailureException" => crate::operation::invoke::InvokeError::EfsMountFailureException({
         293  +
                    let mut tmp = match protocol
         294  +
                        .deserialize_response(response, crate::types::error::EfsMountFailureException::SCHEMA, _cfg)
         295  +
                        .and_then(|mut deser| {
         296  +
                            crate::types::error::EfsMountFailureException::deserialize_with_response(
         297  +
                                &mut *deser,
         298  +
                                response.headers(),
         299  +
                                response.status().into(),
         300  +
                                body,
         301  +
                            )
         302  +
                        }) {
         303  +
                        ::std::result::Result::Ok(val) => val,
         304  +
                        ::std::result::Result::Err(e) => {
         305  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         306  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         307  +
                            ))
         308  +
                        }
         309  +
                    };
         310  +
                    tmp.meta = generic;
         311  +
                    if tmp.message.is_none() {
         312  +
                        tmp.message = _error_message;
         313  +
                    }
         314  +
                    tmp
         315  +
                }),
         316  +
                "EFSMountTimeoutException" => crate::operation::invoke::InvokeError::EfsMountTimeoutException({
         317  +
                    let mut tmp = match protocol
         318  +
                        .deserialize_response(response, crate::types::error::EfsMountTimeoutException::SCHEMA, _cfg)
         319  +
                        .and_then(|mut deser| {
         320  +
                            crate::types::error::EfsMountTimeoutException::deserialize_with_response(
         321  +
                                &mut *deser,
         322  +
                                response.headers(),
         323  +
                                response.status().into(),
         324  +
                                body,
         325  +
                            )
         326  +
                        }) {
         327  +
                        ::std::result::Result::Ok(val) => val,
         328  +
                        ::std::result::Result::Err(e) => {
         329  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         330  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         331  +
                            ))
         332  +
                        }
         333  +
                    };
         334  +
                    tmp.meta = generic;
         335  +
                    if tmp.message.is_none() {
         336  +
                        tmp.message = _error_message;
         337  +
                    }
         338  +
                    tmp
         339  +
                }),
         340  +
                "ENILimitReachedException" => crate::operation::invoke::InvokeError::EniLimitReachedException({
         341  +
                    let mut tmp = match protocol
         342  +
                        .deserialize_response(response, crate::types::error::EniLimitReachedException::SCHEMA, _cfg)
         343  +
                        .and_then(|mut deser| {
         344  +
                            crate::types::error::EniLimitReachedException::deserialize_with_response(
         345  +
                                &mut *deser,
         346  +
                                response.headers(),
         347  +
                                response.status().into(),
         348  +
                                body,
         349  +
                            )
         350  +
                        }) {
         351  +
                        ::std::result::Result::Ok(val) => val,
         352  +
                        ::std::result::Result::Err(e) => {
         353  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         354  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         355  +
                            ))
         356  +
                        }
         357  +
                    };
         358  +
                    tmp.meta = generic;
         359  +
                    if tmp.message.is_none() {
         360  +
                        tmp.message = _error_message;
         361  +
                    }
         362  +
                    tmp
         363  +
                }),
         364  +
                "InvalidParameterValueException" => crate::operation::invoke::InvokeError::InvalidParameterValueException({
         365  +
                    let mut tmp = match protocol
         366  +
                        .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         367  +
                        .and_then(|mut deser| {
         368  +
                            crate::types::error::InvalidParameterValueException::deserialize_with_response(
         369  +
                                &mut *deser,
         370  +
                                response.headers(),
         371  +
                                response.status().into(),
         372  +
                                body,
         373  +
                            )
         374  +
                        }) {
         375  +
                        ::std::result::Result::Ok(val) => val,
         376  +
                        ::std::result::Result::Err(e) => {
         377  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         378  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         379  +
                            ))
         380  +
                        }
         381  +
                    };
         382  +
                    tmp.meta = generic;
         383  +
                    if tmp.message.is_none() {
         384  +
                        tmp.message = _error_message;
         385  +
                    }
         386  +
                    tmp
         387  +
                }),
         388  +
                "InvalidRequestContentException" => crate::operation::invoke::InvokeError::InvalidRequestContentException({
         389  +
                    let mut tmp = match protocol
         390  +
                        .deserialize_response(response, crate::types::error::InvalidRequestContentException::SCHEMA, _cfg)
         391  +
                        .and_then(|mut deser| {
         392  +
                            crate::types::error::InvalidRequestContentException::deserialize_with_response(
         393  +
                                &mut *deser,
         394  +
                                response.headers(),
         395  +
                                response.status().into(),
         396  +
                                body,
         397  +
                            )
         398  +
                        }) {
         399  +
                        ::std::result::Result::Ok(val) => val,
         400  +
                        ::std::result::Result::Err(e) => {
         401  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         402  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         403  +
                            ))
         404  +
                        }
         405  +
                    };
         406  +
                    tmp.meta = generic;
         407  +
                    if tmp.message.is_none() {
         408  +
                        tmp.message = _error_message;
         409  +
                    }
         410  +
                    tmp
         411  +
                }),
         412  +
                "InvalidRuntimeException" => crate::operation::invoke::InvokeError::InvalidRuntimeException({
         413  +
                    let mut tmp = match protocol
         414  +
                        .deserialize_response(response, crate::types::error::InvalidRuntimeException::SCHEMA, _cfg)
         415  +
                        .and_then(|mut deser| {
         416  +
                            crate::types::error::InvalidRuntimeException::deserialize_with_response(
         417  +
                                &mut *deser,
         418  +
                                response.headers(),
         419  +
                                response.status().into(),
         420  +
                                body,
         421  +
                            )
         422  +
                        }) {
         423  +
                        ::std::result::Result::Ok(val) => val,
         424  +
                        ::std::result::Result::Err(e) => {
         425  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         426  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         427  +
                            ))
         428  +
                        }
         429  +
                    };
         430  +
                    tmp.meta = generic;
         431  +
                    if tmp.message.is_none() {
         432  +
                        tmp.message = _error_message;
         433  +
                    }
         434  +
                    tmp
         435  +
                }),
         436  +
                "InvalidSecurityGroupIDException" => crate::operation::invoke::InvokeError::InvalidSecurityGroupIdException({
         437  +
                    let mut tmp = match protocol
         438  +
                        .deserialize_response(response, crate::types::error::InvalidSecurityGroupIdException::SCHEMA, _cfg)
         439  +
                        .and_then(|mut deser| {
         440  +
                            crate::types::error::InvalidSecurityGroupIdException::deserialize_with_response(
         441  +
                                &mut *deser,
         442  +
                                response.headers(),
         443  +
                                response.status().into(),
         444  +
                                body,
         445  +
                            )
         446  +
                        }) {
         447  +
                        ::std::result::Result::Ok(val) => val,
         448  +
                        ::std::result::Result::Err(e) => {
         449  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         450  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         451  +
                            ))
         452  +
                        }
         453  +
                    };
         454  +
                    tmp.meta = generic;
         455  +
                    if tmp.message.is_none() {
         456  +
                        tmp.message = _error_message;
         457  +
                    }
         458  +
                    tmp
         459  +
                }),
         460  +
                "InvalidSubnetIDException" => crate::operation::invoke::InvokeError::InvalidSubnetIdException({
         461  +
                    let mut tmp = match protocol
         462  +
                        .deserialize_response(response, crate::types::error::InvalidSubnetIdException::SCHEMA, _cfg)
         463  +
                        .and_then(|mut deser| {
         464  +
                            crate::types::error::InvalidSubnetIdException::deserialize_with_response(
         465  +
                                &mut *deser,
         466  +
                                response.headers(),
         467  +
                                response.status().into(),
         468  +
                                body,
         469  +
                            )
         470  +
                        }) {
         471  +
                        ::std::result::Result::Ok(val) => val,
         472  +
                        ::std::result::Result::Err(e) => {
         473  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         474  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         475  +
                            ))
         476  +
                        }
         477  +
                    };
         478  +
                    tmp.meta = generic;
         479  +
                    if tmp.message.is_none() {
         480  +
                        tmp.message = _error_message;
         481  +
                    }
         482  +
                    tmp
         483  +
                }),
         484  +
                "InvalidZipFileException" => crate::operation::invoke::InvokeError::InvalidZipFileException({
         485  +
                    let mut tmp = match protocol
         486  +
                        .deserialize_response(response, crate::types::error::InvalidZipFileException::SCHEMA, _cfg)
         487  +
                        .and_then(|mut deser| {
         488  +
                            crate::types::error::InvalidZipFileException::deserialize_with_response(
         489  +
                                &mut *deser,
         490  +
                                response.headers(),
         491  +
                                response.status().into(),
         492  +
                                body,
         493  +
                            )
         494  +
                        }) {
         495  +
                        ::std::result::Result::Ok(val) => val,
         496  +
                        ::std::result::Result::Err(e) => {
         497  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         498  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         499  +
                            ))
         500  +
                        }
         501  +
                    };
         502  +
                    tmp.meta = generic;
         503  +
                    if tmp.message.is_none() {
         504  +
                        tmp.message = _error_message;
         505  +
                    }
         506  +
                    tmp
         507  +
                }),
         508  +
                "KMSAccessDeniedException" => crate::operation::invoke::InvokeError::KmsAccessDeniedException({
         509  +
                    let mut tmp = match protocol
         510  +
                        .deserialize_response(response, crate::types::error::KmsAccessDeniedException::SCHEMA, _cfg)
         511  +
                        .and_then(|mut deser| {
         512  +
                            crate::types::error::KmsAccessDeniedException::deserialize_with_response(
         513  +
                                &mut *deser,
         514  +
                                response.headers(),
         515  +
                                response.status().into(),
         516  +
                                body,
         517  +
                            )
         518  +
                        }) {
         519  +
                        ::std::result::Result::Ok(val) => val,
         520  +
                        ::std::result::Result::Err(e) => {
         521  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         522  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         523  +
                            ))
         524  +
                        }
         525  +
                    };
         526  +
                    tmp.meta = generic;
         527  +
                    if tmp.message.is_none() {
         528  +
                        tmp.message = _error_message;
         529  +
                    }
         530  +
                    tmp
         531  +
                }),
         532  +
                "KMSDisabledException" => crate::operation::invoke::InvokeError::KmsDisabledException({
         533  +
                    let mut tmp = match protocol
         534  +
                        .deserialize_response(response, crate::types::error::KmsDisabledException::SCHEMA, _cfg)
         535  +
                        .and_then(|mut deser| {
         536  +
                            crate::types::error::KmsDisabledException::deserialize_with_response(
         537  +
                                &mut *deser,
         538  +
                                response.headers(),
         539  +
                                response.status().into(),
         540  +
                                body,
         541  +
                            )
         542  +
                        }) {
         543  +
                        ::std::result::Result::Ok(val) => val,
         544  +
                        ::std::result::Result::Err(e) => {
         545  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         546  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         547  +
                            ))
         548  +
                        }
         549  +
                    };
         550  +
                    tmp.meta = generic;
         551  +
                    if tmp.message.is_none() {
         552  +
                        tmp.message = _error_message;
         553  +
                    }
         554  +
                    tmp
         555  +
                }),
         556  +
                "KMSInvalidStateException" => crate::operation::invoke::InvokeError::KmsInvalidStateException({
         557  +
                    let mut tmp = match protocol
         558  +
                        .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         559  +
                        .and_then(|mut deser| {
         560  +
                            crate::types::error::KmsInvalidStateException::deserialize_with_response(
         561  +
                                &mut *deser,
         562  +
                                response.headers(),
         563  +
                                response.status().into(),
         564  +
                                body,
         565  +
                            )
         566  +
                        }) {
         567  +
                        ::std::result::Result::Ok(val) => val,
         568  +
                        ::std::result::Result::Err(e) => {
         569  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         570  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         571  +
                            ))
         572  +
                        }
         573  +
                    };
         574  +
                    tmp.meta = generic;
         575  +
                    if tmp.message.is_none() {
         576  +
                        tmp.message = _error_message;
         577  +
                    }
         578  +
                    tmp
         579  +
                }),
         580  +
                "KMSNotFoundException" => crate::operation::invoke::InvokeError::KmsNotFoundException({
         581  +
                    let mut tmp = match protocol
         582  +
                        .deserialize_response(response, crate::types::error::KmsNotFoundException::SCHEMA, _cfg)
         583  +
                        .and_then(|mut deser| {
         584  +
                            crate::types::error::KmsNotFoundException::deserialize_with_response(
         585  +
                                &mut *deser,
         586  +
                                response.headers(),
         587  +
                                response.status().into(),
         588  +
                                body,
         589  +
                            )
         590  +
                        }) {
         591  +
                        ::std::result::Result::Ok(val) => val,
         592  +
                        ::std::result::Result::Err(e) => {
         593  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         594  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         595  +
                            ))
         596  +
                        }
         597  +
                    };
         598  +
                    tmp.meta = generic;
         599  +
                    if tmp.message.is_none() {
         600  +
                        tmp.message = _error_message;
         601  +
                    }
         602  +
                    tmp
         603  +
                }),
         604  +
                "RecursiveInvocationException" => crate::operation::invoke::InvokeError::RecursiveInvocationException({
         605  +
                    let mut tmp = match protocol
         606  +
                        .deserialize_response(response, crate::types::error::RecursiveInvocationException::SCHEMA, _cfg)
         607  +
                        .and_then(|mut deser| {
         608  +
                            crate::types::error::RecursiveInvocationException::deserialize_with_response(
         609  +
                                &mut *deser,
         610  +
                                response.headers(),
         611  +
                                response.status().into(),
         612  +
                                body,
         613  +
                            )
         614  +
                        }) {
         615  +
                        ::std::result::Result::Ok(val) => val,
         616  +
                        ::std::result::Result::Err(e) => {
         617  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         618  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         619  +
                            ))
         620  +
                        }
         621  +
                    };
         622  +
                    tmp.meta = generic;
         623  +
                    if tmp.message.is_none() {
         624  +
                        tmp.message = _error_message;
         625  +
                    }
         626  +
                    tmp
         627  +
                }),
         628  +
                "RequestTooLargeException" => crate::operation::invoke::InvokeError::RequestTooLargeException({
         629  +
                    let mut tmp = match protocol
         630  +
                        .deserialize_response(response, crate::types::error::RequestTooLargeException::SCHEMA, _cfg)
         631  +
                        .and_then(|mut deser| {
         632  +
                            crate::types::error::RequestTooLargeException::deserialize_with_response(
         633  +
                                &mut *deser,
         634  +
                                response.headers(),
         635  +
                                response.status().into(),
         636  +
                                body,
         637  +
                            )
         638  +
                        }) {
         639  +
                        ::std::result::Result::Ok(val) => val,
         640  +
                        ::std::result::Result::Err(e) => {
         641  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         642  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         643  +
                            ))
         644  +
                        }
         645  +
                    };
         646  +
                    tmp.meta = generic;
         647  +
                    if tmp.message.is_none() {
         648  +
                        tmp.message = _error_message;
         649  +
                    }
         650  +
                    tmp
         651  +
                }),
         652  +
                "ResourceConflictException" => crate::operation::invoke::InvokeError::ResourceConflictException({
         653  +
                    let mut tmp = match protocol
         654  +
                        .deserialize_response(response, crate::types::error::ResourceConflictException::SCHEMA, _cfg)
         655  +
                        .and_then(|mut deser| {
         656  +
                            crate::types::error::ResourceConflictException::deserialize_with_response(
         657  +
                                &mut *deser,
         658  +
                                response.headers(),
         659  +
                                response.status().into(),
         660  +
                                body,
         661  +
                            )
         662  +
                        }) {
         663  +
                        ::std::result::Result::Ok(val) => val,
         664  +
                        ::std::result::Result::Err(e) => {
         665  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         666  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         667  +
                            ))
         668  +
                        }
         669  +
                    };
         670  +
                    tmp.meta = generic;
         671  +
                    if tmp.message.is_none() {
         672  +
                        tmp.message = _error_message;
         673  +
                    }
         674  +
                    tmp
         675  +
                }),
         676  +
                "ResourceNotFoundException" => crate::operation::invoke::InvokeError::ResourceNotFoundException({
         677  +
                    let mut tmp = match protocol
         678  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         679  +
                        .and_then(|mut deser| {
         680  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         681  +
                                &mut *deser,
         682  +
                                response.headers(),
         683  +
                                response.status().into(),
         684  +
                                body,
         685  +
                            )
         686  +
                        }) {
         687  +
                        ::std::result::Result::Ok(val) => val,
         688  +
                        ::std::result::Result::Err(e) => {
         689  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         690  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         691  +
                            ))
         692  +
                        }
         693  +
                    };
         694  +
                    tmp.meta = generic;
         695  +
                    if tmp.message.is_none() {
         696  +
                        tmp.message = _error_message;
         697  +
                    }
         698  +
                    tmp
         699  +
                }),
         700  +
                "ResourceNotReadyException" => crate::operation::invoke::InvokeError::ResourceNotReadyException({
         701  +
                    let mut tmp = match protocol
         702  +
                        .deserialize_response(response, crate::types::error::ResourceNotReadyException::SCHEMA, _cfg)
         703  +
                        .and_then(|mut deser| {
         704  +
                            crate::types::error::ResourceNotReadyException::deserialize_with_response(
         705  +
                                &mut *deser,
         706  +
                                response.headers(),
         707  +
                                response.status().into(),
         708  +
                                body,
         709  +
                            )
         710  +
                        }) {
         711  +
                        ::std::result::Result::Ok(val) => val,
         712  +
                        ::std::result::Result::Err(e) => {
         713  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         714  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         715  +
                            ))
         716  +
                        }
         717  +
                    };
         718  +
                    tmp.meta = generic;
         719  +
                    if tmp.message.is_none() {
         720  +
                        tmp.message = _error_message;
         721  +
                    }
         722  +
                    tmp
         723  +
                }),
         724  +
                "ServiceException" => crate::operation::invoke::InvokeError::ServiceException({
         725  +
                    let mut tmp = match protocol
         726  +
                        .deserialize_response(response, crate::types::error::ServiceException::SCHEMA, _cfg)
         727  +
                        .and_then(|mut deser| {
         728  +
                            crate::types::error::ServiceException::deserialize_with_response(
         729  +
                                &mut *deser,
         730  +
                                response.headers(),
         731  +
                                response.status().into(),
         732  +
                                body,
         733  +
                            )
         734  +
                        }) {
         735  +
                        ::std::result::Result::Ok(val) => val,
         736  +
                        ::std::result::Result::Err(e) => {
         737  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         738  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         739  +
                            ))
         740  +
                        }
         741  +
                    };
         742  +
                    tmp.meta = generic;
         743  +
                    if tmp.message.is_none() {
         744  +
                        tmp.message = _error_message;
         745  +
                    }
         746  +
                    tmp
         747  +
                }),
         748  +
                "SnapStartException" => crate::operation::invoke::InvokeError::SnapStartException({
         749  +
                    let mut tmp = match protocol
         750  +
                        .deserialize_response(response, crate::types::error::SnapStartException::SCHEMA, _cfg)
         751  +
                        .and_then(|mut deser| {
         752  +
                            crate::types::error::SnapStartException::deserialize_with_response(
         753  +
                                &mut *deser,
         754  +
                                response.headers(),
         755  +
                                response.status().into(),
         756  +
                                body,
         757  +
                            )
         758  +
                        }) {
         759  +
                        ::std::result::Result::Ok(val) => val,
         760  +
                        ::std::result::Result::Err(e) => {
         761  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         762  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         763  +
                            ))
         764  +
                        }
         765  +
                    };
         766  +
                    tmp.meta = generic;
         767  +
                    if tmp.message.is_none() {
         768  +
                        tmp.message = _error_message;
         769  +
                    }
         770  +
                    tmp
         771  +
                }),
         772  +
                "SnapStartNotReadyException" => crate::operation::invoke::InvokeError::SnapStartNotReadyException({
         773  +
                    let mut tmp = match protocol
         774  +
                        .deserialize_response(response, crate::types::error::SnapStartNotReadyException::SCHEMA, _cfg)
         775  +
                        .and_then(|mut deser| {
         776  +
                            crate::types::error::SnapStartNotReadyException::deserialize_with_response(
         777  +
                                &mut *deser,
         778  +
                                response.headers(),
         779  +
                                response.status().into(),
         780  +
                                body,
         781  +
                            )
         782  +
                        }) {
         783  +
                        ::std::result::Result::Ok(val) => val,
         784  +
                        ::std::result::Result::Err(e) => {
         785  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         786  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         787  +
                            ))
         788  +
                        }
         789  +
                    };
         790  +
                    tmp.meta = generic;
         791  +
                    if tmp.message.is_none() {
         792  +
                        tmp.message = _error_message;
         793  +
                    }
         794  +
                    tmp
         795  +
                }),
         796  +
                "SnapStartTimeoutException" => crate::operation::invoke::InvokeError::SnapStartTimeoutException({
         797  +
                    let mut tmp = match protocol
         798  +
                        .deserialize_response(response, crate::types::error::SnapStartTimeoutException::SCHEMA, _cfg)
         799  +
                        .and_then(|mut deser| {
         800  +
                            crate::types::error::SnapStartTimeoutException::deserialize_with_response(
         801  +
                                &mut *deser,
         802  +
                                response.headers(),
         803  +
                                response.status().into(),
         804  +
                                body,
         805  +
                            )
         806  +
                        }) {
         807  +
                        ::std::result::Result::Ok(val) => val,
         808  +
                        ::std::result::Result::Err(e) => {
         809  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         810  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         811  +
                            ))
         812  +
                        }
         813  +
                    };
         814  +
                    tmp.meta = generic;
         815  +
                    if tmp.message.is_none() {
         816  +
                        tmp.message = _error_message;
         817  +
                    }
         818  +
                    tmp
         819  +
                }),
         820  +
                "SubnetIPAddressLimitReachedException" => crate::operation::invoke::InvokeError::SubnetIpAddressLimitReachedException({
         821  +
                    let mut tmp = match protocol
         822  +
                        .deserialize_response(response, crate::types::error::SubnetIpAddressLimitReachedException::SCHEMA, _cfg)
         823  +
                        .and_then(|mut deser| {
         824  +
                            crate::types::error::SubnetIpAddressLimitReachedException::deserialize_with_response(
         825  +
                                &mut *deser,
         826  +
                                response.headers(),
         827  +
                                response.status().into(),
         828  +
                                body,
         829  +
                            )
         830  +
                        }) {
         831  +
                        ::std::result::Result::Ok(val) => val,
         832  +
                        ::std::result::Result::Err(e) => {
         833  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         834  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         835  +
                            ))
         836  +
                        }
         837  +
                    };
         838  +
                    tmp.meta = generic;
         839  +
                    if tmp.message.is_none() {
         840  +
                        tmp.message = _error_message;
         841  +
                    }
         842  +
                    tmp
         843  +
                }),
         844  +
                "TooManyRequestsException" => crate::operation::invoke::InvokeError::TooManyRequestsException({
         845  +
                    let mut tmp = match protocol
         846  +
                        .deserialize_response(response, crate::types::error::TooManyRequestsException::SCHEMA, _cfg)
         847  +
                        .and_then(|mut deser| {
         848  +
                            crate::types::error::TooManyRequestsException::deserialize_with_response(
         849  +
                                &mut *deser,
         850  +
                                response.headers(),
         851  +
                                response.status().into(),
         852  +
                                body,
         853  +
                            )
         854  +
                        }) {
         855  +
                        ::std::result::Result::Ok(val) => val,
         856  +
                        ::std::result::Result::Err(e) => {
         857  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         858  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         859  +
                            ))
         860  +
                        }
         861  +
                    };
         862  +
                    tmp.meta = generic;
         863  +
                    if tmp.message.is_none() {
         864  +
                        tmp.message = _error_message;
         865  +
                    }
         866  +
                    tmp
         867  +
                }),
         868  +
                "UnsupportedMediaTypeException" => crate::operation::invoke::InvokeError::UnsupportedMediaTypeException({
         869  +
                    let mut tmp = match protocol
         870  +
                        .deserialize_response(response, crate::types::error::UnsupportedMediaTypeException::SCHEMA, _cfg)
         871  +
                        .and_then(|mut deser| {
         872  +
                            crate::types::error::UnsupportedMediaTypeException::deserialize_with_response(
         873  +
                                &mut *deser,
         874  +
                                response.headers(),
         875  +
                                response.status().into(),
         876  +
                                body,
         877  +
                            )
         878  +
                        }) {
         879  +
                        ::std::result::Result::Ok(val) => val,
         880  +
                        ::std::result::Result::Err(e) => {
         881  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         882  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         883  +
                            ))
         884  +
                        }
         885  +
                    };
         886  +
                    tmp.meta = generic;
         887  +
                    if tmp.message.is_none() {
         888  +
                        tmp.message = _error_message;
         889  +
                    }
         890  +
                    tmp
         891  +
                }),
         892  +
                _ => crate::operation::invoke::InvokeError::generic(generic),
         893  +
            };
         894  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         895  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         896  +
            ))
  149    897   
        } else {
  150         -
            crate::protocol_serde::shape_invoke::de_invoke_http_response(status, headers, body)
  151         -
        };
  152         -
        crate::protocol_serde::type_erase_result(parse_result)
         898  +
            let protocol = _cfg
         899  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         900  +
                .expect("a SharedClientProtocol is required");
         901  +
            let mut deser = protocol.deserialize_response(response, Invoke::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         902  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         903  +
            })?;
         904  +
            let body = response.body().bytes().expect("body loaded");
         905  +
            let output =
         906  +
                crate::operation::invoke::InvokeOutput::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body)
         907  +
                    .map_err(|e| {
         908  +
                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
         909  +
                            e,
         910  +
                        ))
         911  +
                    })?;
         912  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         913  +
        }
  153    914   
    }
  154    915   
}
  155    916   
#[derive(Debug)]
  156    917   
struct InvokeRequestSerializer;
  157    918   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for InvokeRequestSerializer {
  158    919   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  159    920   
    fn serialize_input(
  160    921   
        &self,
  161    922   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  162    923   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  163    924   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  164    925   
        let input = input.downcast::<crate::operation::invoke::InvokeInput>().expect("correct type");
  165         -
        let _header_serialization_settings = _cfg
  166         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  167         -
            .cloned()
  168         -
            .unwrap_or_default();
  169         -
        let mut request_builder = {
  170         -
            #[allow(clippy::uninlined_format_args)]
  171         -
            fn uri_base(
  172         -
                _input: &crate::operation::invoke::InvokeInput,
  173         -
                output: &mut ::std::string::String,
  174         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  175         -
                use ::std::fmt::Write as _;
  176         -
                let input_1 = &_input.function_name;
  177         -
                let input_1 = input_1
  178         -
                    .as_ref()
  179         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("function_name", "cannot be empty or unset"))?;
  180         -
                let function_name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  181         -
                if function_name.is_empty() {
  182         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  183         -
                        "function_name",
  184         -
                        "cannot be empty or unset",
  185         -
                    ));
  186         -
                }
  187         -
                ::std::write!(output, "/2015-03-31/functions/{FunctionName}/invocations", FunctionName = function_name)
  188         -
                    .expect("formatting should succeed");
  189         -
                ::std::result::Result::Ok(())
         926  +
        let protocol = _cfg
         927  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         928  +
            .expect("a SharedClientProtocol is required");
         929  +
        let mut input = input;
         930  +
        let payload = input.payload.take();
         931  +
        let mut request = protocol
         932  +
            .serialize_request(&input, Invoke::INPUT_SCHEMA, "", _cfg)
         933  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         934  +
        if let ::std::option::Option::Some(payload) = payload {
         935  +
            *request.body_mut() = ::aws_smithy_types::body::SdkBody::from(payload.into_inner());
         936  +
            if !request.headers().contains_key("Content-Type") {
         937  +
                request.headers_mut().insert("Content-Type", "application/octet-stream");
  190    938   
            }
  191         -
            fn uri_query(
  192         -
                _input: &crate::operation::invoke::InvokeInput,
  193         -
                mut output: &mut ::std::string::String,
  194         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  195         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  196         -
                if let ::std::option::Option::Some(inner_2) = &_input.qualifier {
  197         -
                    {
  198         -
                        query.push_kv("Qualifier", &::aws_smithy_http::query::fmt_string(inner_2));
  199         -
                    }
  200         -
                }
  201         -
                ::std::result::Result::Ok(())
         939  +
            if let ::std::option::Option::Some(content_length) = request.body().content_length() {
         940  +
                request.headers_mut().insert("Content-Length", content_length.to_string());
  202    941   
            }
  203         -
            #[allow(clippy::unnecessary_wraps)]
  204         -
            fn update_http_builder(
  205         -
                input: &crate::operation::invoke::InvokeInput,
  206         -
                builder: ::http_1x::request::Builder,
  207         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  208         -
                let mut uri = ::std::string::String::new();
  209         -
                uri_base(input, &mut uri)?;
  210         -
                uri_query(input, &mut uri)?;
  211         -
                let builder = crate::protocol_serde::shape_invoke::ser_invoke_headers(input, builder)?;
  212         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  213         -
            }
  214         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  215         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/octet-stream");
  216         -
            builder
  217         -
        };
  218         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_invoke_input::ser_payload_http_payload(input.payload)?);
  219         -
        if let Some(content_length) = body.content_length() {
  220         -
            let content_length = content_length.to_string();
  221         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  222    942   
        }
  223         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         943  +
         944  +
        return ::std::result::Result::Ok(request);
  224    945   
    }
  225    946   
}
  226    947   
#[derive(Debug)]
  227    948   
struct InvokeEndpointParamsInterceptor;
  228    949   
  229    950   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InvokeEndpointParamsInterceptor {
  230    951   
    fn name(&self) -> &'static str {
  231    952   
        "InvokeEndpointParamsInterceptor"
  232    953   
    }
  233    954   

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

@@ -77,77 +276,311 @@
   97     97   
    "com.amazonaws.lambda.synthetic",
   98     98   
    "InvokeInput",
   99     99   
);
  100    100   
static INVOKEINPUT_MEMBER_FUNCTION_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  101    101   
    ::aws_smithy_schema::ShapeId::from_static(
  102    102   
        "com.amazonaws.lambda.synthetic#InvokeInput$FunctionName",
  103    103   
        "com.amazonaws.lambda.synthetic",
  104    104   
        "InvokeInput",
  105    105   
    ),
  106    106   
    ::aws_smithy_schema::ShapeType::String,
  107         -
    "function_name",
         107  +
    "FunctionName",
  108    108   
    0,
  109    109   
)
  110    110   
.with_http_label();
  111    111   
static INVOKEINPUT_MEMBER_INVOCATION_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  112    112   
    ::aws_smithy_schema::ShapeId::from_static(
  113    113   
        "com.amazonaws.lambda.synthetic#InvokeInput$InvocationType",
  114    114   
        "com.amazonaws.lambda.synthetic",
  115    115   
        "InvokeInput",
  116    116   
    ),
  117    117   
    ::aws_smithy_schema::ShapeType::String,
  118         -
    "invocation_type",
         118  +
    "InvocationType",
  119    119   
    1,
  120    120   
)
  121    121   
.with_http_header("X-Amz-Invocation-Type");
  122    122   
static INVOKEINPUT_MEMBER_LOG_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  123    123   
    ::aws_smithy_schema::ShapeId::from_static(
  124    124   
        "com.amazonaws.lambda.synthetic#InvokeInput$LogType",
  125    125   
        "com.amazonaws.lambda.synthetic",
  126    126   
        "InvokeInput",
  127    127   
    ),
  128    128   
    ::aws_smithy_schema::ShapeType::String,
  129         -
    "log_type",
         129  +
    "LogType",
  130    130   
    2,
  131    131   
)
  132    132   
.with_http_header("X-Amz-Log-Type");
  133    133   
static INVOKEINPUT_MEMBER_CLIENT_CONTEXT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  134    134   
    ::aws_smithy_schema::ShapeId::from_static(
  135    135   
        "com.amazonaws.lambda.synthetic#InvokeInput$ClientContext",
  136    136   
        "com.amazonaws.lambda.synthetic",
  137    137   
        "InvokeInput",
  138    138   
    ),
  139    139   
    ::aws_smithy_schema::ShapeType::String,
  140         -
    "client_context",
         140  +
    "ClientContext",
  141    141   
    3,
  142    142   
)
  143    143   
.with_http_header("X-Amz-Client-Context");
  144    144   
static INVOKEINPUT_MEMBER_PAYLOAD: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  145    145   
    ::aws_smithy_schema::ShapeId::from_static(
  146    146   
        "com.amazonaws.lambda.synthetic#InvokeInput$Payload",
  147    147   
        "com.amazonaws.lambda.synthetic",
  148    148   
        "InvokeInput",
  149    149   
    ),
  150    150   
    ::aws_smithy_schema::ShapeType::Blob,
  151         -
    "payload",
         151  +
    "Payload",
  152    152   
    4,
  153    153   
)
  154    154   
.with_http_payload();
  155    155   
static INVOKEINPUT_MEMBER_QUALIFIER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  156    156   
    ::aws_smithy_schema::ShapeId::from_static(
  157    157   
        "com.amazonaws.lambda.synthetic#InvokeInput$Qualifier",
  158    158   
        "com.amazonaws.lambda.synthetic",
  159    159   
        "InvokeInput",
  160    160   
    ),
  161    161   
    ::aws_smithy_schema::ShapeType::String,
  162         -
    "qualifier",
         162  +
    "Qualifier",
  163    163   
    5,
  164    164   
)
  165    165   
.with_http_query("Qualifier");
  166    166   
static INVOKEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  167    167   
    INVOKEINPUT_SCHEMA_ID,
  168    168   
    ::aws_smithy_schema::ShapeType::Structure,
  169    169   
    &[
  170    170   
        &INVOKEINPUT_MEMBER_FUNCTION_NAME,
  171    171   
        &INVOKEINPUT_MEMBER_INVOCATION_TYPE,
  172    172   
        &INVOKEINPUT_MEMBER_LOG_TYPE,
  173    173   
        &INVOKEINPUT_MEMBER_CLIENT_CONTEXT,
  174    174   
        &INVOKEINPUT_MEMBER_PAYLOAD,
  175    175   
        &INVOKEINPUT_MEMBER_QUALIFIER,
  176    176   
    ],
  177         -
);
         177  +
)
         178  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
         179  +
    "POST",
         180  +
    "/2015-03-31/functions/{FunctionName}/invocations",
         181  +
    None,
         182  +
));
  178    183   
impl InvokeInput {
  179    184   
    /// The schema for this shape.
  180    185   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INVOKEINPUT_SCHEMA;
  181    186   
}
  182    187   
impl ::aws_smithy_schema::serde::SerializableStruct for InvokeInput {
  183    188   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  184    189   
    fn serialize_members(
  185    190   
        &self,
  186    191   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  187    192   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  188    193   
        if let Some(ref val) = self.function_name {
  189    194   
            ser.write_string(&INVOKEINPUT_MEMBER_FUNCTION_NAME, val)?;
  190    195   
        }
  191    196   
        if let Some(ref val) = self.invocation_type {
  192    197   
            ser.write_string(&INVOKEINPUT_MEMBER_INVOCATION_TYPE, val.as_str())?;
  193    198   
        }
  194    199   
        if let Some(ref val) = self.log_type {
  195    200   
            ser.write_string(&INVOKEINPUT_MEMBER_LOG_TYPE, val.as_str())?;
  196    201   
        }
  197    202   
        if let Some(ref val) = self.client_context {
  198    203   
            ser.write_string(&INVOKEINPUT_MEMBER_CLIENT_CONTEXT, val)?;
  199    204   
        }
  200    205   
        if let Some(ref val) = self.payload {
  201    206   
            ser.write_blob(&INVOKEINPUT_MEMBER_PAYLOAD, val)?;
  202    207   
        }
  203    208   
        if let Some(ref val) = self.qualifier {
  204    209   
            ser.write_string(&INVOKEINPUT_MEMBER_QUALIFIER, val)?;
  205    210   
        }
  206    211   
        Ok(())
  207    212   
    }
  208    213   
}
  209    214   
impl InvokeInput {
  210    215   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  211         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  212         -
        deserializer: &mut D,
         216  +
    pub fn deserialize(
         217  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  213    218   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  214    219   
        #[allow(unused_variables, unused_mut)]
  215    220   
        let mut builder = Self::builder();
  216    221   
        #[allow(
  217    222   
            unused_variables,
  218    223   
            unreachable_code,
  219    224   
            clippy::single_match,
  220    225   
            clippy::match_single_binding,
  221    226   
            clippy::diverging_sub_expression
  222    227   
        )]
  223         -
        deserializer.read_struct(&INVOKEINPUT_SCHEMA, (), |_, member, deser| {
         228  +
        deserializer.read_struct(&INVOKEINPUT_SCHEMA, &mut |member, deser| {
  224    229   
            match member.member_index() {
  225    230   
                Some(0) => {
  226    231   
                    builder.function_name = Some(deser.read_string(member)?);
  227    232   
                }
  228    233   
                Some(1) => {
  229    234   
                    builder.invocation_type = Some(crate::types::InvocationType::from(deser.read_string(member)?.as_str()));
  230    235   
                }
  231    236   
                Some(2) => {
  232    237   
                    builder.log_type = Some(crate::types::LogType::from(deser.read_string(member)?.as_str()));
  233    238   
                }
  234    239   
                Some(3) => {
  235    240   
                    builder.client_context = Some(deser.read_string(member)?);
  236    241   
                }
  237    242   
                Some(4) => {
  238    243   
                    builder.payload = Some(deser.read_blob(member)?);
  239    244   
                }
  240    245   
                Some(5) => {
  241    246   
                    builder.qualifier = Some(deser.read_string(member)?);
  242    247   
                }
  243    248   
                _ => {}
  244    249   
            }
  245    250   
            Ok(())
  246    251   
        })?;
         252  +
        builder.function_name = builder.function_name.or(Some(String::new()));
         253  +
        builder
         254  +
            .build()
         255  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         256  +
    }
         257  +
}
         258  +
impl InvokeInput {
         259  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         260  +
    /// Header-bound members are read directly from headers, avoiding runtime
         261  +
    /// member iteration overhead. Body members are read via the deserializer.
         262  +
    pub fn deserialize_with_response(
         263  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         264  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         265  +
        _status: u16,
         266  +
        body: &[u8],
         267  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         268  +
        #[allow(unused_variables, unused_mut)]
         269  +
        let mut builder = Self::builder();
         270  +
        if let Some(val) = headers.get("X-Amz-Invocation-Type") {
         271  +
            builder.invocation_type = Some(crate::types::InvocationType::from(val));
         272  +
        }
         273  +
        if let Some(val) = headers.get("X-Amz-Log-Type") {
         274  +
            builder.log_type = Some(crate::types::LogType::from(val));
         275  +
        }
         276  +
        if let Some(val) = headers.get("X-Amz-Client-Context") {
         277  +
            builder.client_context = Some(val.to_string());
         278  +
        }
         279  +
        if !body.is_empty() {
         280  +
            builder.payload = Some(::aws_smithy_types::Blob::new(body.to_vec()));
         281  +
        }
  247    282   
        builder
  248    283   
            .build()
  249    284   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  250    285   
    }
  251    286   
}
  252    287   
impl InvokeInput {
  253    288   
    /// Creates a new builder-style object to manufacture [`InvokeInput`](crate::operation::invoke::InvokeInput).
  254    289   
    pub fn builder() -> crate::operation::invoke::builders::InvokeInputBuilder {
  255    290   
        crate::operation::invoke::builders::InvokeInputBuilder::default()
  256    291   
    }

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

@@ -34,34 +219,261 @@
   54     54   
    "com.amazonaws.lambda.synthetic",
   55     55   
    "InvokeOutput",
   56     56   
);
   57     57   
static INVOKEOUTPUT_MEMBER_STATUS_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   58     58   
    ::aws_smithy_schema::ShapeId::from_static(
   59     59   
        "com.amazonaws.lambda.synthetic#InvokeOutput$StatusCode",
   60     60   
        "com.amazonaws.lambda.synthetic",
   61     61   
        "InvokeOutput",
   62     62   
    ),
   63     63   
    ::aws_smithy_schema::ShapeType::Integer,
   64         -
    "status_code",
          64  +
    "StatusCode",
   65     65   
    0,
   66     66   
)
   67     67   
.with_http_response_code();
   68     68   
static INVOKEOUTPUT_MEMBER_FUNCTION_ERROR: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   69     69   
    ::aws_smithy_schema::ShapeId::from_static(
   70     70   
        "com.amazonaws.lambda.synthetic#InvokeOutput$FunctionError",
   71     71   
        "com.amazonaws.lambda.synthetic",
   72     72   
        "InvokeOutput",
   73     73   
    ),
   74     74   
    ::aws_smithy_schema::ShapeType::String,
   75         -
    "function_error",
          75  +
    "FunctionError",
   76     76   
    1,
   77     77   
)
   78     78   
.with_http_header("X-Amz-Function-Error");
   79     79   
static INVOKEOUTPUT_MEMBER_LOG_RESULT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   80     80   
    ::aws_smithy_schema::ShapeId::from_static(
   81     81   
        "com.amazonaws.lambda.synthetic#InvokeOutput$LogResult",
   82     82   
        "com.amazonaws.lambda.synthetic",
   83     83   
        "InvokeOutput",
   84     84   
    ),
   85     85   
    ::aws_smithy_schema::ShapeType::String,
   86         -
    "log_result",
          86  +
    "LogResult",
   87     87   
    2,
   88     88   
)
   89     89   
.with_http_header("X-Amz-Log-Result");
   90     90   
static INVOKEOUTPUT_MEMBER_PAYLOAD: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   91     91   
    ::aws_smithy_schema::ShapeId::from_static(
   92     92   
        "com.amazonaws.lambda.synthetic#InvokeOutput$Payload",
   93     93   
        "com.amazonaws.lambda.synthetic",
   94     94   
        "InvokeOutput",
   95     95   
    ),
   96     96   
    ::aws_smithy_schema::ShapeType::Blob,
   97         -
    "payload",
          97  +
    "Payload",
   98     98   
    3,
   99     99   
)
  100    100   
.with_http_payload();
  101    101   
static INVOKEOUTPUT_MEMBER_EXECUTED_VERSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  102    102   
    ::aws_smithy_schema::ShapeId::from_static(
  103    103   
        "com.amazonaws.lambda.synthetic#InvokeOutput$ExecutedVersion",
  104    104   
        "com.amazonaws.lambda.synthetic",
  105    105   
        "InvokeOutput",
  106    106   
    ),
  107    107   
    ::aws_smithy_schema::ShapeType::String,
  108         -
    "executed_version",
         108  +
    "ExecutedVersion",
  109    109   
    4,
  110    110   
)
  111    111   
.with_http_header("X-Amz-Executed-Version");
         112  +
static INVOKEOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         113  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         114  +
    ::aws_smithy_schema::ShapeType::String,
         115  +
    "request_id",
         116  +
    5,
         117  +
)
         118  +
.with_http_header("x-amzn-requestid");
  112    119   
static INVOKEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  113    120   
    INVOKEOUTPUT_SCHEMA_ID,
  114    121   
    ::aws_smithy_schema::ShapeType::Structure,
  115    122   
    &[
  116    123   
        &INVOKEOUTPUT_MEMBER_STATUS_CODE,
  117    124   
        &INVOKEOUTPUT_MEMBER_FUNCTION_ERROR,
  118    125   
        &INVOKEOUTPUT_MEMBER_LOG_RESULT,
  119    126   
        &INVOKEOUTPUT_MEMBER_PAYLOAD,
  120    127   
        &INVOKEOUTPUT_MEMBER_EXECUTED_VERSION,
         128  +
        &INVOKEOUTPUT_MEMBER__REQUEST_ID,
  121    129   
    ],
  122    130   
);
  123    131   
impl InvokeOutput {
  124    132   
    /// The schema for this shape.
  125    133   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INVOKEOUTPUT_SCHEMA;
  126    134   
}
  127    135   
impl ::aws_smithy_schema::serde::SerializableStruct for InvokeOutput {
  128    136   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  129    137   
    fn serialize_members(
  130    138   
        &self,
  131    139   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  132    140   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  133    141   
        {
  134    142   
            let val = &self.status_code;
  135    143   
            ser.write_integer(&INVOKEOUTPUT_MEMBER_STATUS_CODE, *val)?;
  136    144   
        }
  137    145   
        if let Some(ref val) = self.function_error {
  138    146   
            ser.write_string(&INVOKEOUTPUT_MEMBER_FUNCTION_ERROR, val)?;
  139    147   
        }
  140    148   
        if let Some(ref val) = self.log_result {
  141    149   
            ser.write_string(&INVOKEOUTPUT_MEMBER_LOG_RESULT, val)?;
  142    150   
        }
  143    151   
        if let Some(ref val) = self.payload {
  144    152   
            ser.write_blob(&INVOKEOUTPUT_MEMBER_PAYLOAD, val)?;
  145    153   
        }
  146    154   
        if let Some(ref val) = self.executed_version {
  147    155   
            ser.write_string(&INVOKEOUTPUT_MEMBER_EXECUTED_VERSION, val)?;
  148    156   
        }
  149    157   
        Ok(())
  150    158   
    }
  151    159   
}
  152    160   
impl InvokeOutput {
  153    161   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  154         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  155         -
        deserializer: &mut D,
         162  +
    pub fn deserialize(
         163  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  156    164   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  157    165   
        #[allow(unused_variables, unused_mut)]
  158    166   
        let mut builder = Self::builder();
  159    167   
        #[allow(
  160    168   
            unused_variables,
  161    169   
            unreachable_code,
  162    170   
            clippy::single_match,
  163    171   
            clippy::match_single_binding,
  164    172   
            clippy::diverging_sub_expression
  165    173   
        )]
  166         -
        deserializer.read_struct(&INVOKEOUTPUT_SCHEMA, (), |_, member, deser| {
         174  +
        deserializer.read_struct(&INVOKEOUTPUT_SCHEMA, &mut |member, deser| {
  167    175   
            match member.member_index() {
  168    176   
                Some(0) => {
  169    177   
                    builder.status_code = Some(deser.read_integer(member)?);
  170    178   
                }
  171    179   
                Some(1) => {
  172    180   
                    builder.function_error = Some(deser.read_string(member)?);
  173    181   
                }
  174    182   
                Some(2) => {
  175    183   
                    builder.log_result = Some(deser.read_string(member)?);
  176    184   
                }
  177    185   
                Some(3) => {
  178    186   
                    builder.payload = Some(deser.read_blob(member)?);
  179    187   
                }
  180    188   
                Some(4) => {
  181    189   
                    builder.executed_version = Some(deser.read_string(member)?);
  182    190   
                }
         191  +
                Some(5) => {
         192  +
                    builder._request_id = Some(deser.read_string(member)?);
         193  +
                }
  183    194   
                _ => {}
  184    195   
            }
  185    196   
            Ok(())
  186    197   
        })?;
  187    198   
        Ok(builder.build())
  188    199   
    }
  189    200   
}
         201  +
impl InvokeOutput {
         202  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         203  +
    /// Header-bound members are read directly from headers, avoiding runtime
         204  +
    /// member iteration overhead. Body members are read via the deserializer.
         205  +
    pub fn deserialize_with_response(
         206  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         207  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         208  +
        _status: u16,
         209  +
        body: &[u8],
         210  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         211  +
        #[allow(unused_variables, unused_mut)]
         212  +
        let mut builder = Self::builder();
         213  +
        if let Some(val) = headers.get("X-Amz-Function-Error") {
         214  +
            builder.function_error = Some(val.to_string());
         215  +
        }
         216  +
        if let Some(val) = headers.get("X-Amz-Log-Result") {
         217  +
            builder.log_result = Some(val.to_string());
         218  +
        }
         219  +
        if let Some(val) = headers.get("X-Amz-Executed-Version") {
         220  +
            builder.executed_version = Some(val.to_string());
         221  +
        }
         222  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         223  +
            builder._request_id = Some(val.to_string());
         224  +
        }
         225  +
        builder.status_code = Some(_status as i32);
         226  +
        if !body.is_empty() {
         227  +
            builder.payload = Some(::aws_smithy_types::Blob::new(body.to_vec()));
         228  +
        }
         229  +
        Ok(builder.build())
         230  +
    }
         231  +
}
  190    232   
impl ::aws_types::request_id::RequestId for InvokeOutput {
  191    233   
    fn request_id(&self) -> Option<&str> {
  192    234   
        self._request_id.as_deref()
  193    235   
    }
  194    236   
}
  195    237   
impl InvokeOutput {
  196    238   
    /// Creates a new builder-style object to manufacture [`InvokeOutput`](crate::operation::invoke::InvokeOutput).
  197    239   
    pub fn builder() -> crate::operation::invoke::builders::InvokeOutputBuilder {
  198    240   
        crate::operation::invoke::builders::InvokeOutputBuilder::default()
  199    241   
    }

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