AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

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

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

@@ -35,35 +203,220 @@
   55     55   
    "com.amazonaws.lambda.synthetic",
   56     56   
    "ListAliasesInput",
   57     57   
);
   58     58   
static LISTALIASESINPUT_MEMBER_FUNCTION_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   59     59   
    ::aws_smithy_schema::ShapeId::from_static(
   60     60   
        "com.amazonaws.lambda.synthetic#ListAliasesInput$FunctionName",
   61     61   
        "com.amazonaws.lambda.synthetic",
   62     62   
        "ListAliasesInput",
   63     63   
    ),
   64     64   
    ::aws_smithy_schema::ShapeType::String,
   65         -
    "function_name",
          65  +
    "FunctionName",
   66     66   
    0,
   67     67   
)
   68     68   
.with_http_label();
   69     69   
static LISTALIASESINPUT_MEMBER_FUNCTION_VERSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   70     70   
    ::aws_smithy_schema::ShapeId::from_static(
   71     71   
        "com.amazonaws.lambda.synthetic#ListAliasesInput$FunctionVersion",
   72     72   
        "com.amazonaws.lambda.synthetic",
   73     73   
        "ListAliasesInput",
   74     74   
    ),
   75     75   
    ::aws_smithy_schema::ShapeType::String,
   76         -
    "function_version",
          76  +
    "FunctionVersion",
   77     77   
    1,
   78     78   
)
   79     79   
.with_http_query("FunctionVersion");
   80     80   
static LISTALIASESINPUT_MEMBER_MARKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   81     81   
    ::aws_smithy_schema::ShapeId::from_static(
   82     82   
        "com.amazonaws.lambda.synthetic#ListAliasesInput$Marker",
   83     83   
        "com.amazonaws.lambda.synthetic",
   84     84   
        "ListAliasesInput",
   85     85   
    ),
   86     86   
    ::aws_smithy_schema::ShapeType::String,
   87         -
    "marker",
          87  +
    "Marker",
   88     88   
    2,
   89     89   
)
   90     90   
.with_http_query("Marker");
   91     91   
static LISTALIASESINPUT_MEMBER_MAX_ITEMS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   92     92   
    ::aws_smithy_schema::ShapeId::from_static(
   93     93   
        "com.amazonaws.lambda.synthetic#ListAliasesInput$MaxItems",
   94     94   
        "com.amazonaws.lambda.synthetic",
   95     95   
        "ListAliasesInput",
   96     96   
    ),
   97     97   
    ::aws_smithy_schema::ShapeType::Integer,
   98         -
    "max_items",
          98  +
    "MaxItems",
   99     99   
    3,
  100    100   
)
  101    101   
.with_http_query("MaxItems");
  102    102   
static LISTALIASESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  103    103   
    LISTALIASESINPUT_SCHEMA_ID,
  104    104   
    ::aws_smithy_schema::ShapeType::Structure,
  105    105   
    &[
  106    106   
        &LISTALIASESINPUT_MEMBER_FUNCTION_NAME,
  107    107   
        &LISTALIASESINPUT_MEMBER_FUNCTION_VERSION,
  108    108   
        &LISTALIASESINPUT_MEMBER_MARKER,
  109    109   
        &LISTALIASESINPUT_MEMBER_MAX_ITEMS,
  110    110   
    ],
  111         -
);
         111  +
)
         112  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
         113  +
    "GET",
         114  +
    "/2015-03-31/functions/{FunctionName}/aliases",
         115  +
    None,
         116  +
));
  112    117   
impl ListAliasesInput {
  113    118   
    /// The schema for this shape.
  114    119   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTALIASESINPUT_SCHEMA;
  115    120   
}
  116    121   
impl ::aws_smithy_schema::serde::SerializableStruct for ListAliasesInput {
  117    122   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  118    123   
    fn serialize_members(
  119    124   
        &self,
  120    125   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  121    126   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  122    127   
        if let Some(ref val) = self.function_name {
  123    128   
            ser.write_string(&LISTALIASESINPUT_MEMBER_FUNCTION_NAME, val)?;
  124    129   
        }
  125    130   
        if let Some(ref val) = self.function_version {
  126    131   
            ser.write_string(&LISTALIASESINPUT_MEMBER_FUNCTION_VERSION, val)?;
  127    132   
        }
  128    133   
        if let Some(ref val) = self.marker {
  129    134   
            ser.write_string(&LISTALIASESINPUT_MEMBER_MARKER, val)?;
  130    135   
        }
  131    136   
        if let Some(ref val) = self.max_items {
  132    137   
            ser.write_integer(&LISTALIASESINPUT_MEMBER_MAX_ITEMS, *val)?;
  133    138   
        }
  134    139   
        Ok(())
  135    140   
    }
  136    141   
}
  137    142   
impl ListAliasesInput {
  138    143   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  139         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  140         -
        deserializer: &mut D,
         144  +
    pub fn deserialize(
         145  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  141    146   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  142    147   
        #[allow(unused_variables, unused_mut)]
  143    148   
        let mut builder = Self::builder();
  144    149   
        #[allow(
  145    150   
            unused_variables,
  146    151   
            unreachable_code,
  147    152   
            clippy::single_match,
  148    153   
            clippy::match_single_binding,
  149    154   
            clippy::diverging_sub_expression
  150    155   
        )]
  151         -
        deserializer.read_struct(&LISTALIASESINPUT_SCHEMA, (), |_, member, deser| {
         156  +
        deserializer.read_struct(&LISTALIASESINPUT_SCHEMA, &mut |member, deser| {
  152    157   
            match member.member_index() {
  153    158   
                Some(0) => {
  154    159   
                    builder.function_name = Some(deser.read_string(member)?);
  155    160   
                }
  156    161   
                Some(1) => {
  157    162   
                    builder.function_version = Some(deser.read_string(member)?);
  158    163   
                }
  159    164   
                Some(2) => {
  160    165   
                    builder.marker = Some(deser.read_string(member)?);
  161    166   
                }
  162    167   
                Some(3) => {
  163    168   
                    builder.max_items = Some(deser.read_integer(member)?);
  164    169   
                }
  165    170   
                _ => {}
  166    171   
            }
  167    172   
            Ok(())
  168    173   
        })?;
         174  +
        builder.function_name = builder.function_name.or(Some(String::new()));
  169    175   
        builder
  170    176   
            .build()
  171    177   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  172    178   
    }
  173    179   
}
         180  +
impl ListAliasesInput {
         181  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         182  +
    pub fn deserialize_with_response(
         183  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         184  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         185  +
        _status: u16,
         186  +
        _body: &[u8],
         187  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         188  +
        Self::deserialize(deserializer)
         189  +
    }
         190  +
}
  174    191   
impl ListAliasesInput {
  175    192   
    /// Creates a new builder-style object to manufacture [`ListAliasesInput`](crate::operation::list_aliases::ListAliasesInput).
  176    193   
    pub fn builder() -> crate::operation::list_aliases::builders::ListAliasesInputBuilder {
  177    194   
        crate::operation::list_aliases::builders::ListAliasesInputBuilder::default()
  178    195   
    }
  179    196   
}
  180    197   
  181    198   
/// A builder for [`ListAliasesInput`](crate::operation::list_aliases::ListAliasesInput).
  182    199   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  183    200   
#[non_exhaustive]

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

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

tmp-codegen-diff/aws-sdk/sdk/lambda/src/operation/list_code_signing_configs.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 `ListCodeSigningConfigs`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListCodeSigningConfigs;
    6      6   
impl ListCodeSigningConfigs {
    7      7   
    /// Creates a new `ListCodeSigningConfigs`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_code_signing_configs::ListCodeSigningConfigsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_code_signing_configs::ListCodeSigningConfigsOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::list_code_signing_configs::ListCodeSigningConfigsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_code_signing_configs::ListCodeSigningConfigsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_code_signing_configs::ListCodeSigningConfigsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +254,312 @@
  138    142   
                crate::operation::list_code_signing_configs::ListCodeSigningConfigsError,
  139    143   
            >::new());
  140    144   
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct ListCodeSigningConfigsResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListCodeSigningConfigsResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_list_code_signing_configs::de_list_code_signing_configs_http_error(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         175  +
                            crate::operation::list_code_signing_configs::ListCodeSigningConfigsError::unhandled(generic),
         176  +
                        ),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "InvalidParameterValueException" => {
         186  +
                    crate::operation::list_code_signing_configs::ListCodeSigningConfigsError::InvalidParameterValueException({
         187  +
                        let mut tmp = match protocol
         188  +
                            .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         189  +
                            .and_then(|mut deser| {
         190  +
                                crate::types::error::InvalidParameterValueException::deserialize_with_response(
         191  +
                                    &mut *deser,
         192  +
                                    response.headers(),
         193  +
                                    response.status().into(),
         194  +
                                    body,
         195  +
                                )
         196  +
                            }) {
         197  +
                            ::std::result::Result::Ok(val) => val,
         198  +
                            ::std::result::Result::Err(e) => {
         199  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         200  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         201  +
                                ))
         202  +
                            }
         203  +
                        };
         204  +
                        tmp.meta = generic;
         205  +
                        if tmp.message.is_none() {
         206  +
                            tmp.message = _error_message;
         207  +
                        }
         208  +
                        tmp
         209  +
                    })
         210  +
                }
         211  +
                "ServiceException" => crate::operation::list_code_signing_configs::ListCodeSigningConfigsError::ServiceException({
         212  +
                    let mut tmp = match protocol
         213  +
                        .deserialize_response(response, crate::types::error::ServiceException::SCHEMA, _cfg)
         214  +
                        .and_then(|mut deser| {
         215  +
                            crate::types::error::ServiceException::deserialize_with_response(
         216  +
                                &mut *deser,
         217  +
                                response.headers(),
         218  +
                                response.status().into(),
         219  +
                                body,
         220  +
                            )
         221  +
                        }) {
         222  +
                        ::std::result::Result::Ok(val) => val,
         223  +
                        ::std::result::Result::Err(e) => {
         224  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         225  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         226  +
                            ))
         227  +
                        }
         228  +
                    };
         229  +
                    tmp.meta = generic;
         230  +
                    if tmp.message.is_none() {
         231  +
                        tmp.message = _error_message;
         232  +
                    }
         233  +
                    tmp
         234  +
                }),
         235  +
                _ => crate::operation::list_code_signing_configs::ListCodeSigningConfigsError::generic(generic),
         236  +
            };
         237  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         238  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         239  +
            ))
  160    240   
        } else {
  161         -
            crate::protocol_serde::shape_list_code_signing_configs::de_list_code_signing_configs_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         241  +
            let protocol = _cfg
         242  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         243  +
                .expect("a SharedClientProtocol is required");
         244  +
            let mut deser = protocol
         245  +
                .deserialize_response(response, ListCodeSigningConfigs::OUTPUT_SCHEMA, _cfg)
         246  +
                .map_err(|e| {
         247  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         248  +
                })?;
         249  +
            let body = response.body().bytes().expect("body loaded");
         250  +
            let output = crate::operation::list_code_signing_configs::ListCodeSigningConfigsOutput::deserialize_with_response(
         251  +
                &mut *deser,
         252  +
                response.headers(),
         253  +
                response.status().into(),
         254  +
                body,
         255  +
            )
         256  +
            .map_err(|e| {
         257  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         258  +
            })?;
         259  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         260  +
        }
  164    261   
    }
  165    262   
}
  166    263   
#[derive(Debug)]
  167    264   
struct ListCodeSigningConfigsRequestSerializer;
  168    265   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListCodeSigningConfigsRequestSerializer {
  169    266   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    267   
    fn serialize_input(
  171    268   
        &self,
  172    269   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    270   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    271   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    272   
        let input = input
  176    273   
            .downcast::<crate::operation::list_code_signing_configs::ListCodeSigningConfigsInput>()
  177    274   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::list_code_signing_configs::ListCodeSigningConfigsInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                ::std::write!(output, "/2020-04-22/code-signing-configs").expect("formatting should succeed");
  190         -
                ::std::result::Result::Ok(())
  191         -
            }
  192         -
            fn uri_query(
  193         -
                _input: &crate::operation::list_code_signing_configs::ListCodeSigningConfigsInput,
  194         -
                mut output: &mut ::std::string::String,
  195         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  196         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  197         -
                if let ::std::option::Option::Some(inner_1) = &_input.marker {
  198         -
                    {
  199         -
                        query.push_kv("Marker", &::aws_smithy_http::query::fmt_string(inner_1));
  200         -
                    }
  201         -
                }
  202         -
                if let ::std::option::Option::Some(inner_2) = &_input.max_items {
  203         -
                    {
  204         -
                        query.push_kv("MaxItems", ::aws_smithy_types::primitive::Encoder::from(*inner_2).encode());
  205         -
                    }
  206         -
                }
  207         -
                ::std::result::Result::Ok(())
  208         -
            }
  209         -
            #[allow(clippy::unnecessary_wraps)]
  210         -
            fn update_http_builder(
  211         -
                input: &crate::operation::list_code_signing_configs::ListCodeSigningConfigsInput,
  212         -
                builder: ::http_1x::request::Builder,
  213         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  214         -
                let mut uri = ::std::string::String::new();
  215         -
                uri_base(input, &mut uri)?;
  216         -
                uri_query(input, &mut uri)?;
  217         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  218         -
            }
  219         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  220         -
            builder
  221         -
        };
  222         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
         275  +
        let protocol = _cfg
         276  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         277  +
            .expect("a SharedClientProtocol is required");
         278  +
        let mut request = protocol
         279  +
            .serialize_request(&input, ListCodeSigningConfigs::INPUT_SCHEMA, "", _cfg)
         280  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
  223    281   
  224         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         282  +
        return ::std::result::Result::Ok(request);
  225    283   
    }
  226    284   
}
  227    285   
#[derive(Debug)]
  228    286   
struct ListCodeSigningConfigsEndpointParamsInterceptor;
  229    287   
  230    288   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListCodeSigningConfigsEndpointParamsInterceptor {
  231    289   
    fn name(&self) -> &'static str {
  232    290   
        "ListCodeSigningConfigsEndpointParamsInterceptor"
  233    291   
    }
  234    292   

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

@@ -3,3 +132,144 @@
   23     23   
    "com.amazonaws.lambda.synthetic",
   24     24   
    "ListCodeSigningConfigsInput",
   25     25   
);
   26     26   
static LISTCODESIGNINGCONFIGSINPUT_MEMBER_MARKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   27     27   
    ::aws_smithy_schema::ShapeId::from_static(
   28     28   
        "com.amazonaws.lambda.synthetic#ListCodeSigningConfigsInput$Marker",
   29     29   
        "com.amazonaws.lambda.synthetic",
   30     30   
        "ListCodeSigningConfigsInput",
   31     31   
    ),
   32     32   
    ::aws_smithy_schema::ShapeType::String,
   33         -
    "marker",
          33  +
    "Marker",
   34     34   
    0,
   35     35   
)
   36     36   
.with_http_query("Marker");
   37     37   
static LISTCODESIGNINGCONFIGSINPUT_MEMBER_MAX_ITEMS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   38     38   
    ::aws_smithy_schema::ShapeId::from_static(
   39     39   
        "com.amazonaws.lambda.synthetic#ListCodeSigningConfigsInput$MaxItems",
   40     40   
        "com.amazonaws.lambda.synthetic",
   41     41   
        "ListCodeSigningConfigsInput",
   42     42   
    ),
   43     43   
    ::aws_smithy_schema::ShapeType::Integer,
   44         -
    "max_items",
          44  +
    "MaxItems",
   45     45   
    1,
   46     46   
)
   47     47   
.with_http_query("MaxItems");
   48     48   
static LISTCODESIGNINGCONFIGSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   49     49   
    LISTCODESIGNINGCONFIGSINPUT_SCHEMA_ID,
   50     50   
    ::aws_smithy_schema::ShapeType::Structure,
   51     51   
    &[&LISTCODESIGNINGCONFIGSINPUT_MEMBER_MARKER, &LISTCODESIGNINGCONFIGSINPUT_MEMBER_MAX_ITEMS],
   52         -
);
          52  +
)
          53  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/2020-04-22/code-signing-configs", None));
   53     54   
impl ListCodeSigningConfigsInput {
   54     55   
    /// The schema for this shape.
   55     56   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTCODESIGNINGCONFIGSINPUT_SCHEMA;
   56     57   
}
   57     58   
impl ::aws_smithy_schema::serde::SerializableStruct for ListCodeSigningConfigsInput {
   58     59   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   59     60   
    fn serialize_members(
   60     61   
        &self,
   61     62   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   62     63   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   63     64   
        if let Some(ref val) = self.marker {
   64     65   
            ser.write_string(&LISTCODESIGNINGCONFIGSINPUT_MEMBER_MARKER, val)?;
   65     66   
        }
   66     67   
        if let Some(ref val) = self.max_items {
   67     68   
            ser.write_integer(&LISTCODESIGNINGCONFIGSINPUT_MEMBER_MAX_ITEMS, *val)?;
   68     69   
        }
   69     70   
        Ok(())
   70     71   
    }
   71     72   
}
   72     73   
impl ListCodeSigningConfigsInput {
   73     74   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   74         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   75         -
        deserializer: &mut D,
          75  +
    pub fn deserialize(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   76     77   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   77     78   
        #[allow(unused_variables, unused_mut)]
   78     79   
        let mut builder = Self::builder();
   79     80   
        #[allow(
   80     81   
            unused_variables,
   81     82   
            unreachable_code,
   82     83   
            clippy::single_match,
   83     84   
            clippy::match_single_binding,
   84     85   
            clippy::diverging_sub_expression
   85     86   
        )]
   86         -
        deserializer.read_struct(&LISTCODESIGNINGCONFIGSINPUT_SCHEMA, (), |_, member, deser| {
          87  +
        deserializer.read_struct(&LISTCODESIGNINGCONFIGSINPUT_SCHEMA, &mut |member, deser| {
   87     88   
            match member.member_index() {
   88     89   
                Some(0) => {
   89     90   
                    builder.marker = Some(deser.read_string(member)?);
   90     91   
                }
   91     92   
                Some(1) => {
   92     93   
                    builder.max_items = Some(deser.read_integer(member)?);
   93     94   
                }
   94     95   
                _ => {}
   95     96   
            }
   96     97   
            Ok(())
   97     98   
        })?;
   98     99   
        builder
   99    100   
            .build()
  100    101   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  101    102   
    }
  102    103   
}
         104  +
impl ListCodeSigningConfigsInput {
         105  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         106  +
    pub fn deserialize_with_response(
         107  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         108  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         109  +
        _status: u16,
         110  +
        _body: &[u8],
         111  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         112  +
        Self::deserialize(deserializer)
         113  +
    }
         114  +
}
  103    115   
impl ListCodeSigningConfigsInput {
  104    116   
    /// Creates a new builder-style object to manufacture [`ListCodeSigningConfigsInput`](crate::operation::list_code_signing_configs::ListCodeSigningConfigsInput).
  105    117   
    pub fn builder() -> crate::operation::list_code_signing_configs::builders::ListCodeSigningConfigsInputBuilder {
  106    118   
        crate::operation::list_code_signing_configs::builders::ListCodeSigningConfigsInputBuilder::default()
  107    119   
    }
  108    120   
}
  109    121   
  110    122   
/// A builder for [`ListCodeSigningConfigsInput`](crate::operation::list_code_signing_configs::ListCodeSigningConfigsInput).
  111    123   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  112    124   
#[non_exhaustive]

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

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

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

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

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

@@ -67,67 +235,251 @@
   87     87   
    "com.amazonaws.lambda.synthetic",
   88     88   
    "ListEventSourceMappingsInput",
   89     89   
);
   90     90   
static LISTEVENTSOURCEMAPPINGSINPUT_MEMBER_EVENT_SOURCE_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   91     91   
    ::aws_smithy_schema::ShapeId::from_static(
   92     92   
        "com.amazonaws.lambda.synthetic#ListEventSourceMappingsInput$EventSourceArn",
   93     93   
        "com.amazonaws.lambda.synthetic",
   94     94   
        "ListEventSourceMappingsInput",
   95     95   
    ),
   96     96   
    ::aws_smithy_schema::ShapeType::String,
   97         -
    "event_source_arn",
          97  +
    "EventSourceArn",
   98     98   
    0,
   99     99   
)
  100    100   
.with_http_query("EventSourceArn");
  101    101   
static LISTEVENTSOURCEMAPPINGSINPUT_MEMBER_FUNCTION_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  102    102   
    ::aws_smithy_schema::ShapeId::from_static(
  103    103   
        "com.amazonaws.lambda.synthetic#ListEventSourceMappingsInput$FunctionName",
  104    104   
        "com.amazonaws.lambda.synthetic",
  105    105   
        "ListEventSourceMappingsInput",
  106    106   
    ),
  107    107   
    ::aws_smithy_schema::ShapeType::String,
  108         -
    "function_name",
         108  +
    "FunctionName",
  109    109   
    1,
  110    110   
)
  111    111   
.with_http_query("FunctionName");
  112    112   
static LISTEVENTSOURCEMAPPINGSINPUT_MEMBER_MARKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  113    113   
    ::aws_smithy_schema::ShapeId::from_static(
  114    114   
        "com.amazonaws.lambda.synthetic#ListEventSourceMappingsInput$Marker",
  115    115   
        "com.amazonaws.lambda.synthetic",
  116    116   
        "ListEventSourceMappingsInput",
  117    117   
    ),
  118    118   
    ::aws_smithy_schema::ShapeType::String,
  119         -
    "marker",
         119  +
    "Marker",
  120    120   
    2,
  121    121   
)
  122    122   
.with_http_query("Marker");
  123    123   
static LISTEVENTSOURCEMAPPINGSINPUT_MEMBER_MAX_ITEMS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  124    124   
    ::aws_smithy_schema::ShapeId::from_static(
  125    125   
        "com.amazonaws.lambda.synthetic#ListEventSourceMappingsInput$MaxItems",
  126    126   
        "com.amazonaws.lambda.synthetic",
  127    127   
        "ListEventSourceMappingsInput",
  128    128   
    ),
  129    129   
    ::aws_smithy_schema::ShapeType::Integer,
  130         -
    "max_items",
         130  +
    "MaxItems",
  131    131   
    3,
  132    132   
)
  133    133   
.with_http_query("MaxItems");
  134    134   
static LISTEVENTSOURCEMAPPINGSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  135    135   
    LISTEVENTSOURCEMAPPINGSINPUT_SCHEMA_ID,
  136    136   
    ::aws_smithy_schema::ShapeType::Structure,
  137    137   
    &[
  138    138   
        &LISTEVENTSOURCEMAPPINGSINPUT_MEMBER_EVENT_SOURCE_ARN,
  139    139   
        &LISTEVENTSOURCEMAPPINGSINPUT_MEMBER_FUNCTION_NAME,
  140    140   
        &LISTEVENTSOURCEMAPPINGSINPUT_MEMBER_MARKER,
  141    141   
        &LISTEVENTSOURCEMAPPINGSINPUT_MEMBER_MAX_ITEMS,
  142    142   
    ],
  143         -
);
         143  +
)
         144  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
         145  +
    "GET",
         146  +
    "/2015-03-31/event-source-mappings",
         147  +
    None,
         148  +
));
  144    149   
impl ListEventSourceMappingsInput {
  145    150   
    /// The schema for this shape.
  146    151   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTEVENTSOURCEMAPPINGSINPUT_SCHEMA;
  147    152   
}
  148    153   
impl ::aws_smithy_schema::serde::SerializableStruct for ListEventSourceMappingsInput {
  149    154   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  150    155   
    fn serialize_members(
  151    156   
        &self,
  152    157   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  153    158   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  154    159   
        if let Some(ref val) = self.event_source_arn {
  155    160   
            ser.write_string(&LISTEVENTSOURCEMAPPINGSINPUT_MEMBER_EVENT_SOURCE_ARN, val)?;
  156    161   
        }
  157    162   
        if let Some(ref val) = self.function_name {
  158    163   
            ser.write_string(&LISTEVENTSOURCEMAPPINGSINPUT_MEMBER_FUNCTION_NAME, val)?;
  159    164   
        }
  160    165   
        if let Some(ref val) = self.marker {
  161    166   
            ser.write_string(&LISTEVENTSOURCEMAPPINGSINPUT_MEMBER_MARKER, val)?;
  162    167   
        }
  163    168   
        if let Some(ref val) = self.max_items {
  164    169   
            ser.write_integer(&LISTEVENTSOURCEMAPPINGSINPUT_MEMBER_MAX_ITEMS, *val)?;
  165    170   
        }
  166    171   
        Ok(())
  167    172   
    }
  168    173   
}
  169    174   
impl ListEventSourceMappingsInput {
  170    175   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  171         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  172         -
        deserializer: &mut D,
         176  +
    pub fn deserialize(
         177  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  173    178   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  174    179   
        #[allow(unused_variables, unused_mut)]
  175    180   
        let mut builder = Self::builder();
  176    181   
        #[allow(
  177    182   
            unused_variables,
  178    183   
            unreachable_code,
  179    184   
            clippy::single_match,
  180    185   
            clippy::match_single_binding,
  181    186   
            clippy::diverging_sub_expression
  182    187   
        )]
  183         -
        deserializer.read_struct(&LISTEVENTSOURCEMAPPINGSINPUT_SCHEMA, (), |_, member, deser| {
         188  +
        deserializer.read_struct(&LISTEVENTSOURCEMAPPINGSINPUT_SCHEMA, &mut |member, deser| {
  184    189   
            match member.member_index() {
  185    190   
                Some(0) => {
  186    191   
                    builder.event_source_arn = Some(deser.read_string(member)?);
  187    192   
                }
  188    193   
                Some(1) => {
  189    194   
                    builder.function_name = Some(deser.read_string(member)?);
  190    195   
                }
  191    196   
                Some(2) => {
  192    197   
                    builder.marker = Some(deser.read_string(member)?);
  193    198   
                }
  194    199   
                Some(3) => {
  195    200   
                    builder.max_items = Some(deser.read_integer(member)?);
  196    201   
                }
  197    202   
                _ => {}
  198    203   
            }
  199    204   
            Ok(())
  200    205   
        })?;
  201    206   
        builder
  202    207   
            .build()
  203    208   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  204    209   
    }
  205    210   
}
         211  +
impl ListEventSourceMappingsInput {
         212  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         213  +
    pub fn deserialize_with_response(
         214  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         215  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         216  +
        _status: u16,
         217  +
        _body: &[u8],
         218  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         219  +
        Self::deserialize(deserializer)
         220  +
    }
         221  +
}
  206    222   
impl ListEventSourceMappingsInput {
  207    223   
    /// Creates a new builder-style object to manufacture [`ListEventSourceMappingsInput`](crate::operation::list_event_source_mappings::ListEventSourceMappingsInput).
  208    224   
    pub fn builder() -> crate::operation::list_event_source_mappings::builders::ListEventSourceMappingsInputBuilder {
  209    225   
        crate::operation::list_event_source_mappings::builders::ListEventSourceMappingsInputBuilder::default()
  210    226   
    }
  211    227   
}
  212    228   
  213    229   
/// A builder for [`ListEventSourceMappingsInput`](crate::operation::list_event_source_mappings::ListEventSourceMappingsInput).
  214    230   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  215    231   
#[non_exhaustive]

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

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

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

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