AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

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

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

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

@@ -24,24 +188,244 @@
   44     44   
    "com.amazonaws.lambda.synthetic",
   45     45   
    "InvokeWithResponseStreamOutput",
   46     46   
);
   47     47   
static INVOKEWITHRESPONSESTREAMOUTPUT_MEMBER_STATUS_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   48     48   
    ::aws_smithy_schema::ShapeId::from_static(
   49     49   
        "com.amazonaws.lambda.synthetic#InvokeWithResponseStreamOutput$StatusCode",
   50     50   
        "com.amazonaws.lambda.synthetic",
   51     51   
        "InvokeWithResponseStreamOutput",
   52     52   
    ),
   53     53   
    ::aws_smithy_schema::ShapeType::Integer,
   54         -
    "status_code",
          54  +
    "StatusCode",
   55     55   
    0,
   56     56   
)
   57     57   
.with_http_response_code();
   58     58   
static INVOKEWITHRESPONSESTREAMOUTPUT_MEMBER_EXECUTED_VERSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   59     59   
    ::aws_smithy_schema::ShapeId::from_static(
   60     60   
        "com.amazonaws.lambda.synthetic#InvokeWithResponseStreamOutput$ExecutedVersion",
   61     61   
        "com.amazonaws.lambda.synthetic",
   62     62   
        "InvokeWithResponseStreamOutput",
   63     63   
    ),
   64     64   
    ::aws_smithy_schema::ShapeType::String,
   65         -
    "executed_version",
          65  +
    "ExecutedVersion",
   66     66   
    1,
   67     67   
)
   68     68   
.with_http_header("X-Amz-Executed-Version");
   69     69   
static INVOKEWITHRESPONSESTREAMOUTPUT_MEMBER_EVENT_STREAM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   70     70   
    ::aws_smithy_schema::ShapeId::from_static(
   71     71   
        "com.amazonaws.lambda.synthetic#InvokeWithResponseStreamOutput$EventStream",
   72     72   
        "com.amazonaws.lambda.synthetic",
   73     73   
        "InvokeWithResponseStreamOutput",
   74     74   
    ),
   75     75   
    ::aws_smithy_schema::ShapeType::Union,
   76         -
    "event_stream",
          76  +
    "EventStream",
   77     77   
    2,
   78     78   
)
   79     79   
.with_http_payload();
   80     80   
static INVOKEWITHRESPONSESTREAMOUTPUT_MEMBER_RESPONSE_STREAM_CONTENT_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   81     81   
    ::aws_smithy_schema::ShapeId::from_static(
   82     82   
        "com.amazonaws.lambda.synthetic#InvokeWithResponseStreamOutput$ResponseStreamContentType",
   83     83   
        "com.amazonaws.lambda.synthetic",
   84     84   
        "InvokeWithResponseStreamOutput",
   85     85   
    ),
   86     86   
    ::aws_smithy_schema::ShapeType::String,
   87         -
    "response_stream_content_type",
          87  +
    "ResponseStreamContentType",
   88     88   
    3,
   89     89   
)
   90     90   
.with_http_header("Content-Type");
          91  +
static INVOKEWITHRESPONSESTREAMOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          92  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          93  +
    ::aws_smithy_schema::ShapeType::String,
          94  +
    "request_id",
          95  +
    4,
          96  +
)
          97  +
.with_http_header("x-amzn-requestid");
   91     98   
static INVOKEWITHRESPONSESTREAMOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   92     99   
    INVOKEWITHRESPONSESTREAMOUTPUT_SCHEMA_ID,
   93    100   
    ::aws_smithy_schema::ShapeType::Structure,
   94    101   
    &[
   95    102   
        &INVOKEWITHRESPONSESTREAMOUTPUT_MEMBER_STATUS_CODE,
   96    103   
        &INVOKEWITHRESPONSESTREAMOUTPUT_MEMBER_EXECUTED_VERSION,
   97    104   
        &INVOKEWITHRESPONSESTREAMOUTPUT_MEMBER_EVENT_STREAM,
   98    105   
        &INVOKEWITHRESPONSESTREAMOUTPUT_MEMBER_RESPONSE_STREAM_CONTENT_TYPE,
         106  +
        &INVOKEWITHRESPONSESTREAMOUTPUT_MEMBER__REQUEST_ID,
   99    107   
    ],
  100    108   
);
  101    109   
impl InvokeWithResponseStreamOutput {
  102    110   
    /// The schema for this shape.
  103    111   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INVOKEWITHRESPONSESTREAMOUTPUT_SCHEMA;
  104    112   
}
  105    113   
impl ::aws_smithy_schema::serde::SerializableStruct for InvokeWithResponseStreamOutput {
  106    114   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  107    115   
    fn serialize_members(
  108    116   
        &self,
  109    117   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  110    118   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  111    119   
        {
  112    120   
            let val = &self.status_code;
  113    121   
            ser.write_integer(&INVOKEWITHRESPONSESTREAMOUTPUT_MEMBER_STATUS_CODE, *val)?;
  114    122   
        }
  115    123   
        if let Some(ref val) = self.executed_version {
  116    124   
            ser.write_string(&INVOKEWITHRESPONSESTREAMOUTPUT_MEMBER_EXECUTED_VERSION, val)?;
  117    125   
        }
  118         -
        {
  119         -
            let val = &self.event_stream;
  120         -
            ser.write_null(&INVOKEWITHRESPONSESTREAMOUTPUT_MEMBER_EVENT_STREAM)?;
  121         -
        }
  122    126   
        if let Some(ref val) = self.response_stream_content_type {
  123    127   
            ser.write_string(&INVOKEWITHRESPONSESTREAMOUTPUT_MEMBER_RESPONSE_STREAM_CONTENT_TYPE, val)?;
  124    128   
        }
  125    129   
        Ok(())
  126    130   
    }
  127    131   
}
  128    132   
impl InvokeWithResponseStreamOutput {
  129    133   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  130         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  131         -
        deserializer: &mut D,
         134  +
    pub fn deserialize(
         135  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  132    136   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  133    137   
        #[allow(unused_variables, unused_mut)]
  134    138   
        let mut builder = Self::builder();
  135    139   
        #[allow(
  136    140   
            unused_variables,
  137    141   
            unreachable_code,
  138    142   
            clippy::single_match,
  139    143   
            clippy::match_single_binding,
  140    144   
            clippy::diverging_sub_expression
  141    145   
        )]
  142         -
        deserializer.read_struct(&INVOKEWITHRESPONSESTREAMOUTPUT_SCHEMA, (), |_, member, deser| {
         146  +
        deserializer.read_struct(&INVOKEWITHRESPONSESTREAMOUTPUT_SCHEMA, &mut |member, deser| {
  143    147   
            match member.member_index() {
  144    148   
                Some(0) => {
  145    149   
                    builder.status_code = Some(deser.read_integer(member)?);
  146    150   
                }
  147    151   
                Some(1) => {
  148    152   
                    builder.executed_version = Some(deser.read_string(member)?);
  149    153   
                }
  150    154   
                Some(2) => {
  151    155   
                    builder.event_stream = Some({
  152    156   
                        let _ = member;
  153         -
                        todo!("deserialize aggregate")
         157  +
                        todo!("deserialize streaming union")
  154    158   
                    });
  155    159   
                }
  156    160   
                Some(3) => {
  157    161   
                    builder.response_stream_content_type = Some(deser.read_string(member)?);
  158    162   
                }
         163  +
                Some(4) => {
         164  +
                    builder._request_id = Some(deser.read_string(member)?);
         165  +
                }
         166  +
                _ => {}
         167  +
            }
         168  +
            Ok(())
         169  +
        })?;
         170  +
        builder
         171  +
            .build()
         172  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         173  +
    }
         174  +
}
         175  +
impl InvokeWithResponseStreamOutput {
         176  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         177  +
    /// Header-bound members are read directly from headers, avoiding runtime
         178  +
    /// member iteration overhead. Body members are read via the deserializer.
         179  +
    pub fn deserialize_with_response(
         180  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         181  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         182  +
        _status: u16,
         183  +
        _body: &[u8],
         184  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         185  +
        #[allow(unused_variables, unused_mut)]
         186  +
        let mut builder = Self::builder();
         187  +
        if let Some(val) = headers.get("X-Amz-Executed-Version") {
         188  +
            builder.executed_version = Some(val.to_string());
         189  +
        }
         190  +
        if let Some(val) = headers.get("Content-Type") {
         191  +
            builder.response_stream_content_type = Some(val.to_string());
         192  +
        }
         193  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         194  +
            builder._request_id = Some(val.to_string());
         195  +
        }
         196  +
        builder.status_code = Some(_status as i32);
         197  +
        #[allow(
         198  +
            unused_variables,
         199  +
            unreachable_code,
         200  +
            clippy::single_match,
         201  +
            clippy::match_single_binding,
         202  +
            clippy::diverging_sub_expression
         203  +
        )]
         204  +
        deserializer.read_struct(&INVOKEWITHRESPONSESTREAMOUTPUT_SCHEMA, &mut |member, deser| {
         205  +
            match member.member_index() {
         206  +
                Some(0) => { /* read from headers above */ }
         207  +
                Some(1) => { /* read from headers above */ }
         208  +
                Some(2) => {
         209  +
                    builder.event_stream = Some({
         210  +
                        let _ = member;
         211  +
                        todo!("deserialize streaming union")
         212  +
                    });
         213  +
                }
         214  +
                Some(3) => { /* read from headers above */ }
  159    215   
                _ => {}
  160    216   
            }
  161    217   
            Ok(())
  162    218   
        })?;
  163    219   
        builder
  164    220   
            .build()
  165    221   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  166    222   
    }
  167    223   
}
  168    224   
impl ::aws_types::request_id::RequestId for InvokeWithResponseStreamOutput {

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   
    > {
@@ -118,122 +268,390 @@
  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    149   
    fn deserialize_nonstreaming(
  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         -
                    ));
         314  +
        let protocol = _cfg
         315  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         316  +
            .expect("a SharedClientProtocol is required");
         317  +
        if protocol.supports_http_bindings() {
         318  +
            let mut request = protocol
         319  +
                .serialize_body(&input, ListAliases::INPUT_SCHEMA, "", _cfg)
         320  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         321  +
            {
         322  +
                let mut uri = "/2015-03-31/functions/{FunctionName}/aliases".to_string();
         323  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         324  +
                if let Some(ref val) = input.function_name {
         325  +
                    uri = uri.replace("{FunctionName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  196    326   
                }
  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         -
                    }
         327  +
                if let Some(ref val) = input.function_version {
         328  +
                    query_params.push(("FunctionVersion".to_string(), val.to_string()));
  210    329   
                }
  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         -
                    }
         330  +
                if let Some(ref val) = input.marker {
         331  +
                    query_params.push(("Marker".to_string(), val.to_string()));
  215    332   
                }
  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         -
                    }
         333  +
                if let Some(ref val) = input.max_items {
         334  +
                    query_params.push(("MaxItems".to_string(), val.to_string()));
  220    335   
                }
  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))
         336  +
                if !query_params.is_empty() {
         337  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         338  +
                    let pairs: Vec<String> = query_params
         339  +
                        .iter()
         340  +
                        .map(|(k, v)| {
         341  +
                            format!(
         342  +
                                "{}={}",
         343  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         344  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         345  +
                            )
         346  +
                        })
         347  +
                        .collect();
         348  +
                    uri.push_str(&pairs.join("&"));
         349  +
                }
         350  +
                request.set_uri(uri.as_str()).expect("valid URI");
  232    351   
            }
  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("");
  237    352   
  238         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         353  +
            return ::std::result::Result::Ok(request);
         354  +
        } else {
         355  +
            let mut request = protocol
         356  +
                .serialize_request(&input, ListAliases::INPUT_SCHEMA, "", _cfg)
         357  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         358  +
         359  +
            return ::std::result::Result::Ok(request);
         360  +
        }
  239    361   
    }
  240    362   
}
  241    363   
#[derive(Debug)]
  242    364   
struct ListAliasesEndpointParamsInterceptor;
  243    365   
  244    366   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListAliasesEndpointParamsInterceptor {
  245    367   
    fn name(&self) -> &'static str {
  246    368   
        "ListAliasesEndpointParamsInterceptor"
  247    369   
    }
  248    370   

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   
    > {
@@ -121,125 +254,345 @@
  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    152   
    fn deserialize_nonstreaming(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_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         -
                    }
         275  +
        let protocol = _cfg
         276  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         277  +
            .expect("a SharedClientProtocol is required");
         278  +
        if protocol.supports_http_bindings() {
         279  +
            let mut request = protocol
         280  +
                .serialize_body(&input, ListCodeSigningConfigs::INPUT_SCHEMA, "", _cfg)
         281  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         282  +
            {
         283  +
                let mut uri = "/2020-04-22/code-signing-configs".to_string();
         284  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         285  +
                if let Some(ref val) = input.marker {
         286  +
                    query_params.push(("Marker".to_string(), val.to_string()));
  201    287   
                }
  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         -
                    }
         288  +
                if let Some(ref val) = input.max_items {
         289  +
                    query_params.push(("MaxItems".to_string(), val.to_string()));
  206    290   
                }
  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))
         291  +
                if !query_params.is_empty() {
         292  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         293  +
                    let pairs: Vec<String> = query_params
         294  +
                        .iter()
         295  +
                        .map(|(k, v)| {
         296  +
                            format!(
         297  +
                                "{}={}",
         298  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         299  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         300  +
                            )
         301  +
                        })
         302  +
                        .collect();
         303  +
                    uri.push_str(&pairs.join("&"));
         304  +
                }
         305  +
                request.set_uri(uri.as_str()).expect("valid URI");
  218    306   
            }
  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("");
  223    307   
  224         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         308  +
            return ::std::result::Result::Ok(request);
         309  +
        } else {
         310  +
            let mut request = protocol
         311  +
                .serialize_request(&input, ListCodeSigningConfigs::INPUT_SCHEMA, "", _cfg)
         312  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         313  +
         314  +
            return ::std::result::Result::Ok(request);
         315  +
        }
  225    316   
    }
  226    317   
}
  227    318   
#[derive(Debug)]
  228    319   
struct ListCodeSigningConfigsEndpointParamsInterceptor;
  229    320   
  230    321   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListCodeSigningConfigsEndpointParamsInterceptor {
  231    322   
    fn name(&self) -> &'static str {
  232    323   
        "ListCodeSigningConfigsEndpointParamsInterceptor"
  233    324   
    }
  234    325   

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   
    > {
@@ -121,126 +264,402 @@
  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    153   
    fn deserialize_nonstreaming(
  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         -
                    }
         326  +
        let protocol = _cfg
         327  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         328  +
            .expect("a SharedClientProtocol is required");
         329  +
        if protocol.supports_http_bindings() {
         330  +
            let mut request = protocol
         331  +
                .serialize_body(&input, ListEventSourceMappings::INPUT_SCHEMA, "", _cfg)
         332  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         333  +
            {
         334  +
                let mut uri = "/2015-03-31/event-source-mappings".to_string();
         335  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         336  +
                if let Some(ref val) = input.event_source_arn {
         337  +
                    query_params.push(("EventSourceArn".to_string(), val.to_string()));
  201    338   
                }
  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         -
                    }
         339  +
                if let Some(ref val) = input.function_name {
         340  +
                    query_params.push(("FunctionName".to_string(), val.to_string()));
  206    341   
                }
  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         -
                    }
         342  +
                if let Some(ref val) = input.marker {
         343  +
                    query_params.push(("Marker".to_string(), val.to_string()));
  211    344   
                }
  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         -
                    }
         345  +
                if let Some(ref val) = input.max_items {
         346  +
                    query_params.push(("MaxItems".to_string(), val.to_string()));
  216    347   
                }
  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))
         348  +
                if !query_params.is_empty() {
         349  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         350  +
                    let pairs: Vec<String> = query_params
         351  +
                        .iter()
         352  +
                        .map(|(k, v)| {
         353  +
                            format!(
         354  +
                                "{}={}",
         355  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         356  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         357  +
                            )
         358  +
                        })
         359  +
                        .collect();
         360  +
                    uri.push_str(&pairs.join("&"));
         361  +
                }
         362  +
                request.set_uri(uri.as_str()).expect("valid URI");
  228    363   
            }
  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("");
  233    364   
  234         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         365  +
            return ::std::result::Result::Ok(request);
         366  +
        } else {
         367  +
            let mut request = protocol
         368  +
                .serialize_request(&input, ListEventSourceMappings::INPUT_SCHEMA, "", _cfg)
         369  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         370  +
         371  +
            return ::std::result::Result::Ok(request);
         372  +
        }
  235    373   
    }
  236    374   
}
  237    375   
#[derive(Debug)]
  238    376   
struct ListEventSourceMappingsEndpointParamsInterceptor;
  239    377   
  240    378   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListEventSourceMappingsEndpointParamsInterceptor {
  241    379   
    fn name(&self) -> &'static str {
  242    380   
        "ListEventSourceMappingsEndpointParamsInterceptor"
  243    381   
    }
  244    382