AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

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

@@ -29,29 +179,198 @@
   49     49   
    "com.amazonaws.lambda.synthetic",
   50     50   
    "PutProvisionedConcurrencyConfigInput",
   51     51   
);
   52     52   
static PUTPROVISIONEDCONCURRENCYCONFIGINPUT_MEMBER_FUNCTION_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.lambda.synthetic#PutProvisionedConcurrencyConfigInput$FunctionName",
   55     55   
        "com.amazonaws.lambda.synthetic",
   56     56   
        "PutProvisionedConcurrencyConfigInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::String,
   59         -
    "function_name",
          59  +
    "FunctionName",
   60     60   
    0,
   61     61   
)
   62     62   
.with_http_label();
   63     63   
static PUTPROVISIONEDCONCURRENCYCONFIGINPUT_MEMBER_QUALIFIER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   64     64   
    ::aws_smithy_schema::ShapeId::from_static(
   65     65   
        "com.amazonaws.lambda.synthetic#PutProvisionedConcurrencyConfigInput$Qualifier",
   66     66   
        "com.amazonaws.lambda.synthetic",
   67     67   
        "PutProvisionedConcurrencyConfigInput",
   68     68   
    ),
   69     69   
    ::aws_smithy_schema::ShapeType::String,
   70         -
    "qualifier",
          70  +
    "Qualifier",
   71     71   
    1,
   72     72   
)
   73     73   
.with_http_query("Qualifier");
   74     74   
static PUTPROVISIONEDCONCURRENCYCONFIGINPUT_MEMBER_PROVISIONED_CONCURRENT_EXECUTIONS: ::aws_smithy_schema::Schema =
   75     75   
    ::aws_smithy_schema::Schema::new_member(
   76     76   
        ::aws_smithy_schema::ShapeId::from_static(
   77     77   
            "com.amazonaws.lambda.synthetic#PutProvisionedConcurrencyConfigInput$ProvisionedConcurrentExecutions",
   78     78   
            "com.amazonaws.lambda.synthetic",
   79     79   
            "PutProvisionedConcurrencyConfigInput",
   80     80   
        ),
   81     81   
        ::aws_smithy_schema::ShapeType::Integer,
   82         -
        "provisioned_concurrent_executions",
          82  +
        "ProvisionedConcurrentExecutions",
   83     83   
        2,
   84     84   
    );
   85     85   
static PUTPROVISIONEDCONCURRENCYCONFIGINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   86     86   
    PUTPROVISIONEDCONCURRENCYCONFIGINPUT_SCHEMA_ID,
   87     87   
    ::aws_smithy_schema::ShapeType::Structure,
   88     88   
    &[
   89     89   
        &PUTPROVISIONEDCONCURRENCYCONFIGINPUT_MEMBER_FUNCTION_NAME,
   90     90   
        &PUTPROVISIONEDCONCURRENCYCONFIGINPUT_MEMBER_QUALIFIER,
   91     91   
        &PUTPROVISIONEDCONCURRENCYCONFIGINPUT_MEMBER_PROVISIONED_CONCURRENT_EXECUTIONS,
   92     92   
    ],
   93         -
);
          93  +
)
          94  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          95  +
    "PUT",
          96  +
    "/2019-09-30/functions/{FunctionName}/provisioned-concurrency",
          97  +
    Some(202),
          98  +
));
   94     99   
impl PutProvisionedConcurrencyConfigInput {
   95    100   
    /// The schema for this shape.
   96    101   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTPROVISIONEDCONCURRENCYCONFIGINPUT_SCHEMA;
   97    102   
}
   98    103   
impl ::aws_smithy_schema::serde::SerializableStruct for PutProvisionedConcurrencyConfigInput {
   99    104   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  100    105   
    fn serialize_members(
  101    106   
        &self,
  102    107   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  103    108   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  104    109   
        if let Some(ref val) = self.function_name {
  105    110   
            ser.write_string(&PUTPROVISIONEDCONCURRENCYCONFIGINPUT_MEMBER_FUNCTION_NAME, val)?;
  106    111   
        }
  107    112   
        if let Some(ref val) = self.qualifier {
  108    113   
            ser.write_string(&PUTPROVISIONEDCONCURRENCYCONFIGINPUT_MEMBER_QUALIFIER, val)?;
  109    114   
        }
  110    115   
        if let Some(ref val) = self.provisioned_concurrent_executions {
  111    116   
            ser.write_integer(&PUTPROVISIONEDCONCURRENCYCONFIGINPUT_MEMBER_PROVISIONED_CONCURRENT_EXECUTIONS, *val)?;
  112    117   
        }
  113    118   
        Ok(())
  114    119   
    }
  115    120   
}
  116    121   
impl PutProvisionedConcurrencyConfigInput {
  117    122   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  118         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  119         -
        deserializer: &mut D,
         123  +
    pub fn deserialize(
         124  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  120    125   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  121    126   
        #[allow(unused_variables, unused_mut)]
  122    127   
        let mut builder = Self::builder();
  123    128   
        #[allow(
  124    129   
            unused_variables,
  125    130   
            unreachable_code,
  126    131   
            clippy::single_match,
  127    132   
            clippy::match_single_binding,
  128    133   
            clippy::diverging_sub_expression
  129    134   
        )]
  130         -
        deserializer.read_struct(&PUTPROVISIONEDCONCURRENCYCONFIGINPUT_SCHEMA, (), |_, member, deser| {
         135  +
        deserializer.read_struct(&PUTPROVISIONEDCONCURRENCYCONFIGINPUT_SCHEMA, &mut |member, deser| {
  131    136   
            match member.member_index() {
  132    137   
                Some(0) => {
  133    138   
                    builder.function_name = Some(deser.read_string(member)?);
  134    139   
                }
  135    140   
                Some(1) => {
  136    141   
                    builder.qualifier = Some(deser.read_string(member)?);
  137    142   
                }
  138    143   
                Some(2) => {
  139    144   
                    builder.provisioned_concurrent_executions = Some(deser.read_integer(member)?);
  140    145   
                }
  141    146   
                _ => {}
  142    147   
            }
  143    148   
            Ok(())
  144    149   
        })?;
         150  +
        builder.function_name = builder.function_name.or(Some(String::new()));
         151  +
        builder.qualifier = builder.qualifier.or(Some(String::new()));
         152  +
        builder.provisioned_concurrent_executions = builder.provisioned_concurrent_executions.or(Some(0i32));
  145    153   
        builder
  146    154   
            .build()
  147    155   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  148    156   
    }
  149    157   
}
         158  +
impl PutProvisionedConcurrencyConfigInput {
         159  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         160  +
    pub fn deserialize_with_response(
         161  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         162  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         163  +
        _status: u16,
         164  +
        _body: &[u8],
         165  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         166  +
        Self::deserialize(deserializer)
         167  +
    }
         168  +
}
  150    169   
impl PutProvisionedConcurrencyConfigInput {
  151    170   
    /// Creates a new builder-style object to manufacture [`PutProvisionedConcurrencyConfigInput`](crate::operation::put_provisioned_concurrency_config::PutProvisionedConcurrencyConfigInput).
  152    171   
    pub fn builder() -> crate::operation::put_provisioned_concurrency_config::builders::PutProvisionedConcurrencyConfigInputBuilder {
  153    172   
        crate::operation::put_provisioned_concurrency_config::builders::PutProvisionedConcurrencyConfigInputBuilder::default()
  154    173   
    }
  155    174   
}
  156    175   
  157    176   
/// A builder for [`PutProvisionedConcurrencyConfigInput`](crate::operation::put_provisioned_concurrency_config::PutProvisionedConcurrencyConfigInput).
  158    177   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  159    178   
#[non_exhaustive]

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

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

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

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

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

@@ -55,55 +221,238 @@
   75     75   
    "com.amazonaws.lambda.synthetic",
   76     76   
    "PutRuntimeManagementConfigInput",
   77     77   
);
   78     78   
static PUTRUNTIMEMANAGEMENTCONFIGINPUT_MEMBER_FUNCTION_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   79     79   
    ::aws_smithy_schema::ShapeId::from_static(
   80     80   
        "com.amazonaws.lambda.synthetic#PutRuntimeManagementConfigInput$FunctionName",
   81     81   
        "com.amazonaws.lambda.synthetic",
   82     82   
        "PutRuntimeManagementConfigInput",
   83     83   
    ),
   84     84   
    ::aws_smithy_schema::ShapeType::String,
   85         -
    "function_name",
          85  +
    "FunctionName",
   86     86   
    0,
   87     87   
)
   88     88   
.with_http_label();
   89     89   
static PUTRUNTIMEMANAGEMENTCONFIGINPUT_MEMBER_QUALIFIER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   90     90   
    ::aws_smithy_schema::ShapeId::from_static(
   91     91   
        "com.amazonaws.lambda.synthetic#PutRuntimeManagementConfigInput$Qualifier",
   92     92   
        "com.amazonaws.lambda.synthetic",
   93     93   
        "PutRuntimeManagementConfigInput",
   94     94   
    ),
   95     95   
    ::aws_smithy_schema::ShapeType::String,
   96         -
    "qualifier",
          96  +
    "Qualifier",
   97     97   
    1,
   98     98   
)
   99     99   
.with_http_query("Qualifier");
  100    100   
static PUTRUNTIMEMANAGEMENTCONFIGINPUT_MEMBER_UPDATE_RUNTIME_ON: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  101    101   
    ::aws_smithy_schema::ShapeId::from_static(
  102    102   
        "com.amazonaws.lambda.synthetic#PutRuntimeManagementConfigInput$UpdateRuntimeOn",
  103    103   
        "com.amazonaws.lambda.synthetic",
  104    104   
        "PutRuntimeManagementConfigInput",
  105    105   
    ),
  106    106   
    ::aws_smithy_schema::ShapeType::String,
  107         -
    "update_runtime_on",
         107  +
    "UpdateRuntimeOn",
  108    108   
    2,
  109    109   
);
  110    110   
static PUTRUNTIMEMANAGEMENTCONFIGINPUT_MEMBER_RUNTIME_VERSION_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  111    111   
    ::aws_smithy_schema::ShapeId::from_static(
  112    112   
        "com.amazonaws.lambda.synthetic#PutRuntimeManagementConfigInput$RuntimeVersionArn",
  113    113   
        "com.amazonaws.lambda.synthetic",
  114    114   
        "PutRuntimeManagementConfigInput",
  115    115   
    ),
  116    116   
    ::aws_smithy_schema::ShapeType::String,
  117         -
    "runtime_version_arn",
         117  +
    "RuntimeVersionArn",
  118    118   
    3,
  119    119   
);
  120    120   
static PUTRUNTIMEMANAGEMENTCONFIGINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  121    121   
    PUTRUNTIMEMANAGEMENTCONFIGINPUT_SCHEMA_ID,
  122    122   
    ::aws_smithy_schema::ShapeType::Structure,
  123    123   
    &[
  124    124   
        &PUTRUNTIMEMANAGEMENTCONFIGINPUT_MEMBER_FUNCTION_NAME,
  125    125   
        &PUTRUNTIMEMANAGEMENTCONFIGINPUT_MEMBER_QUALIFIER,
  126    126   
        &PUTRUNTIMEMANAGEMENTCONFIGINPUT_MEMBER_UPDATE_RUNTIME_ON,
  127    127   
        &PUTRUNTIMEMANAGEMENTCONFIGINPUT_MEMBER_RUNTIME_VERSION_ARN,
  128    128   
    ],
  129         -
);
         129  +
)
         130  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
         131  +
    "PUT",
         132  +
    "/2021-07-20/functions/{FunctionName}/runtime-management-config",
         133  +
    None,
         134  +
));
  130    135   
impl PutRuntimeManagementConfigInput {
  131    136   
    /// The schema for this shape.
  132    137   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTRUNTIMEMANAGEMENTCONFIGINPUT_SCHEMA;
  133    138   
}
  134    139   
impl ::aws_smithy_schema::serde::SerializableStruct for PutRuntimeManagementConfigInput {
  135    140   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  136    141   
    fn serialize_members(
  137    142   
        &self,
  138    143   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  139    144   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  140    145   
        if let Some(ref val) = self.function_name {
  141    146   
            ser.write_string(&PUTRUNTIMEMANAGEMENTCONFIGINPUT_MEMBER_FUNCTION_NAME, val)?;
  142    147   
        }
  143    148   
        if let Some(ref val) = self.qualifier {
  144    149   
            ser.write_string(&PUTRUNTIMEMANAGEMENTCONFIGINPUT_MEMBER_QUALIFIER, val)?;
  145    150   
        }
  146    151   
        if let Some(ref val) = self.update_runtime_on {
  147    152   
            ser.write_string(&PUTRUNTIMEMANAGEMENTCONFIGINPUT_MEMBER_UPDATE_RUNTIME_ON, val.as_str())?;
  148    153   
        }
  149    154   
        if let Some(ref val) = self.runtime_version_arn {
  150    155   
            ser.write_string(&PUTRUNTIMEMANAGEMENTCONFIGINPUT_MEMBER_RUNTIME_VERSION_ARN, val)?;
  151    156   
        }
  152    157   
        Ok(())
  153    158   
    }
  154    159   
}
  155    160   
impl PutRuntimeManagementConfigInput {
  156    161   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  157         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  158         -
        deserializer: &mut D,
         162  +
    pub fn deserialize(
         163  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  159    164   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  160    165   
        #[allow(unused_variables, unused_mut)]
  161    166   
        let mut builder = Self::builder();
  162    167   
        #[allow(
  163    168   
            unused_variables,
  164    169   
            unreachable_code,
  165    170   
            clippy::single_match,
  166    171   
            clippy::match_single_binding,
  167    172   
            clippy::diverging_sub_expression
  168    173   
        )]
  169         -
        deserializer.read_struct(&PUTRUNTIMEMANAGEMENTCONFIGINPUT_SCHEMA, (), |_, member, deser| {
         174  +
        deserializer.read_struct(&PUTRUNTIMEMANAGEMENTCONFIGINPUT_SCHEMA, &mut |member, deser| {
  170    175   
            match member.member_index() {
  171    176   
                Some(0) => {
  172    177   
                    builder.function_name = Some(deser.read_string(member)?);
  173    178   
                }
  174    179   
                Some(1) => {
  175    180   
                    builder.qualifier = Some(deser.read_string(member)?);
  176    181   
                }
  177    182   
                Some(2) => {
  178    183   
                    builder.update_runtime_on = Some(crate::types::UpdateRuntimeOn::from(deser.read_string(member)?.as_str()));
  179    184   
                }
  180    185   
                Some(3) => {
  181    186   
                    builder.runtime_version_arn = Some(deser.read_string(member)?);
  182    187   
                }
  183    188   
                _ => {}
  184    189   
            }
  185    190   
            Ok(())
  186    191   
        })?;
         192  +
        builder.function_name = builder.function_name.or(Some(String::new()));
  187    193   
        builder
  188    194   
            .build()
  189    195   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  190    196   
    }
  191    197   
}
         198  +
impl PutRuntimeManagementConfigInput {
         199  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         200  +
    pub fn deserialize_with_response(
         201  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         202  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         203  +
        _status: u16,
         204  +
        _body: &[u8],
         205  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         206  +
        Self::deserialize(deserializer)
         207  +
    }
         208  +
}
  192    209   
impl PutRuntimeManagementConfigInput {
  193    210   
    /// Creates a new builder-style object to manufacture [`PutRuntimeManagementConfigInput`](crate::operation::put_runtime_management_config::PutRuntimeManagementConfigInput).
  194    211   
    pub fn builder() -> crate::operation::put_runtime_management_config::builders::PutRuntimeManagementConfigInputBuilder {
  195    212   
        crate::operation::put_runtime_management_config::builders::PutRuntimeManagementConfigInputBuilder::default()
  196    213   
    }
  197    214   
}
  198    215   
  199    216   
/// A builder for [`PutRuntimeManagementConfigInput`](crate::operation::put_runtime_management_config::PutRuntimeManagementConfigInput).
  200    217   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  201    218   
#[non_exhaustive]

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

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

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

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

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

@@ -15,15 +183,202 @@
   35     35   
    "com.amazonaws.lambda.synthetic",
   36     36   
    "RemoveLayerVersionPermissionInput",
   37     37   
);
   38     38   
static REMOVELAYERVERSIONPERMISSIONINPUT_MEMBER_LAYER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "com.amazonaws.lambda.synthetic#RemoveLayerVersionPermissionInput$LayerName",
   41     41   
        "com.amazonaws.lambda.synthetic",
   42     42   
        "RemoveLayerVersionPermissionInput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::String,
   45         -
    "layer_name",
          45  +
    "LayerName",
   46     46   
    0,
   47     47   
)
   48     48   
.with_http_label();
   49     49   
static REMOVELAYERVERSIONPERMISSIONINPUT_MEMBER_VERSION_NUMBER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   50     50   
    ::aws_smithy_schema::ShapeId::from_static(
   51     51   
        "com.amazonaws.lambda.synthetic#RemoveLayerVersionPermissionInput$VersionNumber",
   52     52   
        "com.amazonaws.lambda.synthetic",
   53     53   
        "RemoveLayerVersionPermissionInput",
   54     54   
    ),
   55     55   
    ::aws_smithy_schema::ShapeType::Long,
   56         -
    "version_number",
          56  +
    "VersionNumber",
   57     57   
    1,
   58     58   
)
   59     59   
.with_http_label();
   60     60   
static REMOVELAYERVERSIONPERMISSIONINPUT_MEMBER_STATEMENT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   61     61   
    ::aws_smithy_schema::ShapeId::from_static(
   62     62   
        "com.amazonaws.lambda.synthetic#RemoveLayerVersionPermissionInput$StatementId",
   63     63   
        "com.amazonaws.lambda.synthetic",
   64     64   
        "RemoveLayerVersionPermissionInput",
   65     65   
    ),
   66     66   
    ::aws_smithy_schema::ShapeType::String,
   67         -
    "statement_id",
          67  +
    "StatementId",
   68     68   
    2,
   69     69   
)
   70     70   
.with_http_label();
   71     71   
static REMOVELAYERVERSIONPERMISSIONINPUT_MEMBER_REVISION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   72     72   
    ::aws_smithy_schema::ShapeId::from_static(
   73     73   
        "com.amazonaws.lambda.synthetic#RemoveLayerVersionPermissionInput$RevisionId",
   74     74   
        "com.amazonaws.lambda.synthetic",
   75     75   
        "RemoveLayerVersionPermissionInput",
   76     76   
    ),
   77     77   
    ::aws_smithy_schema::ShapeType::String,
   78         -
    "revision_id",
          78  +
    "RevisionId",
   79     79   
    3,
   80     80   
)
   81     81   
.with_http_query("RevisionId");
   82     82   
static REMOVELAYERVERSIONPERMISSIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   83     83   
    REMOVELAYERVERSIONPERMISSIONINPUT_SCHEMA_ID,
   84     84   
    ::aws_smithy_schema::ShapeType::Structure,
   85     85   
    &[
   86     86   
        &REMOVELAYERVERSIONPERMISSIONINPUT_MEMBER_LAYER_NAME,
   87     87   
        &REMOVELAYERVERSIONPERMISSIONINPUT_MEMBER_VERSION_NUMBER,
   88     88   
        &REMOVELAYERVERSIONPERMISSIONINPUT_MEMBER_STATEMENT_ID,
   89     89   
        &REMOVELAYERVERSIONPERMISSIONINPUT_MEMBER_REVISION_ID,
   90     90   
    ],
   91         -
);
          91  +
)
          92  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          93  +
    "DELETE",
          94  +
    "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy/{StatementId}",
          95  +
    Some(204),
          96  +
));
   92     97   
impl RemoveLayerVersionPermissionInput {
   93     98   
    /// The schema for this shape.
   94     99   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &REMOVELAYERVERSIONPERMISSIONINPUT_SCHEMA;
   95    100   
}
   96    101   
impl ::aws_smithy_schema::serde::SerializableStruct for RemoveLayerVersionPermissionInput {
   97    102   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   98    103   
    fn serialize_members(
   99    104   
        &self,
  100    105   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  101    106   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  102    107   
        if let Some(ref val) = self.layer_name {
  103    108   
            ser.write_string(&REMOVELAYERVERSIONPERMISSIONINPUT_MEMBER_LAYER_NAME, val)?;
  104    109   
        }
  105    110   
        if let Some(ref val) = self.version_number {
  106    111   
            ser.write_long(&REMOVELAYERVERSIONPERMISSIONINPUT_MEMBER_VERSION_NUMBER, *val)?;
  107    112   
        }
  108    113   
        if let Some(ref val) = self.statement_id {
  109    114   
            ser.write_string(&REMOVELAYERVERSIONPERMISSIONINPUT_MEMBER_STATEMENT_ID, val)?;
  110    115   
        }
  111    116   
        if let Some(ref val) = self.revision_id {
  112    117   
            ser.write_string(&REMOVELAYERVERSIONPERMISSIONINPUT_MEMBER_REVISION_ID, val)?;
  113    118   
        }
  114    119   
        Ok(())
  115    120   
    }
  116    121   
}
  117    122   
impl RemoveLayerVersionPermissionInput {
  118    123   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  119         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  120         -
        deserializer: &mut D,
         124  +
    pub fn deserialize(
         125  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  121    126   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  122    127   
        #[allow(unused_variables, unused_mut)]
  123    128   
        let mut builder = Self::builder();
  124    129   
        #[allow(
  125    130   
            unused_variables,
  126    131   
            unreachable_code,
  127    132   
            clippy::single_match,
  128    133   
            clippy::match_single_binding,
  129    134   
            clippy::diverging_sub_expression
  130    135   
        )]
  131         -
        deserializer.read_struct(&REMOVELAYERVERSIONPERMISSIONINPUT_SCHEMA, (), |_, member, deser| {
         136  +
        deserializer.read_struct(&REMOVELAYERVERSIONPERMISSIONINPUT_SCHEMA, &mut |member, deser| {
  132    137   
            match member.member_index() {
  133    138   
                Some(0) => {
  134    139   
                    builder.layer_name = Some(deser.read_string(member)?);
  135    140   
                }
  136    141   
                Some(1) => {
  137    142   
                    builder.version_number = Some(deser.read_long(member)?);
  138    143   
                }
  139    144   
                Some(2) => {
  140    145   
                    builder.statement_id = Some(deser.read_string(member)?);
  141    146   
                }
  142    147   
                Some(3) => {
  143    148   
                    builder.revision_id = Some(deser.read_string(member)?);
  144    149   
                }
  145    150   
                _ => {}
  146    151   
            }
  147    152   
            Ok(())
  148    153   
        })?;
         154  +
        builder.layer_name = builder.layer_name.or(Some(String::new()));
         155  +
        builder.version_number = builder.version_number.or(Some(0i64));
         156  +
        builder.statement_id = builder.statement_id.or(Some(String::new()));
  149    157   
        builder
  150    158   
            .build()
  151    159   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  152    160   
    }
  153    161   
}
         162  +
impl RemoveLayerVersionPermissionInput {
         163  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         164  +
    pub fn deserialize_with_response(
         165  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         166  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         167  +
        _status: u16,
         168  +
        _body: &[u8],
         169  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         170  +
        Self::deserialize(deserializer)
         171  +
    }
         172  +
}
  154    173   
impl RemoveLayerVersionPermissionInput {
  155    174   
    /// Creates a new builder-style object to manufacture [`RemoveLayerVersionPermissionInput`](crate::operation::remove_layer_version_permission::RemoveLayerVersionPermissionInput).
  156    175   
    pub fn builder() -> crate::operation::remove_layer_version_permission::builders::RemoveLayerVersionPermissionInputBuilder {
  157    176   
        crate::operation::remove_layer_version_permission::builders::RemoveLayerVersionPermissionInputBuilder::default()
  158    177   
    }
  159    178   
}
  160    179   
  161    180   
/// A builder for [`RemoveLayerVersionPermissionInput`](crate::operation::remove_layer_version_permission::RemoveLayerVersionPermissionInput).
  162    181   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  163    182   
#[non_exhaustive]

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

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

tmp-codegen-diff/aws-sdk/sdk/lambda/src/operation/remove_permission.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 `RemovePermission`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct RemovePermission;
    6      6   
impl RemovePermission {
    7      7   
    /// Creates a new `RemovePermission`
    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::remove_permission::RemovePermissionInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::remove_permission::RemovePermissionOutput::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::remove_permission::RemovePermissionInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::remove_permission::RemovePermissionOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::remove_permission::RemovePermissionError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +282,382 @@
  138    142   
                crate::operation::remove_permission::RemovePermissionError,
  139    143   
            >::new());
  140    144   
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct RemovePermissionResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for RemovePermissionResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 204 || force_error {
  159         -
            crate::protocol_serde::shape_remove_permission::de_remove_permission_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_remove_permission::de_remove_permission_http_response(status, headers, body)
         161  +
        if !success && status != 204 || 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(crate::operation::remove_permission::RemovePermissionError::unhandled(
         175  +
                            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" => crate::operation::remove_permission::RemovePermissionError::InvalidParameterValueException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::InvalidParameterValueException::deserialize_with_response(
         190  +
                                &mut *deser,
         191  +
                                response.headers(),
         192  +
                                response.status().into(),
         193  +
                                body,
         194  +
                            )
         195  +
                        }) {
         196  +
                        ::std::result::Result::Ok(val) => val,
         197  +
                        ::std::result::Result::Err(e) => {
         198  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         199  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         200  +
                            ))
         201  +
                        }
         202  +
                    };
         203  +
                    tmp.meta = generic;
         204  +
                    if tmp.message.is_none() {
         205  +
                        tmp.message = _error_message;
         206  +
                    }
         207  +
                    tmp
         208  +
                }),
         209  +
                "PreconditionFailedException" => crate::operation::remove_permission::RemovePermissionError::PreconditionFailedException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::PreconditionFailedException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::PreconditionFailedException::deserialize_with_response(
         214  +
                                &mut *deser,
         215  +
                                response.headers(),
         216  +
                                response.status().into(),
         217  +
                                body,
         218  +
                            )
         219  +
                        }) {
         220  +
                        ::std::result::Result::Ok(val) => val,
         221  +
                        ::std::result::Result::Err(e) => {
         222  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         223  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         224  +
                            ))
         225  +
                        }
         226  +
                    };
         227  +
                    tmp.meta = generic;
         228  +
                    if tmp.message.is_none() {
         229  +
                        tmp.message = _error_message;
         230  +
                    }
         231  +
                    tmp
         232  +
                }),
         233  +
                "ResourceNotFoundException" => crate::operation::remove_permission::RemovePermissionError::ResourceNotFoundException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         238  +
                                &mut *deser,
         239  +
                                response.headers(),
         240  +
                                response.status().into(),
         241  +
                                body,
         242  +
                            )
         243  +
                        }) {
         244  +
                        ::std::result::Result::Ok(val) => val,
         245  +
                        ::std::result::Result::Err(e) => {
         246  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         247  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         248  +
                            ))
         249  +
                        }
         250  +
                    };
         251  +
                    tmp.meta = generic;
         252  +
                    if tmp.message.is_none() {
         253  +
                        tmp.message = _error_message;
         254  +
                    }
         255  +
                    tmp
         256  +
                }),
         257  +
                "ServiceException" => crate::operation::remove_permission::RemovePermissionError::ServiceException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::ServiceException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::ServiceException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    if tmp.message.is_none() {
         277  +
                        tmp.message = _error_message;
         278  +
                    }
         279  +
                    tmp
         280  +
                }),
         281  +
                "TooManyRequestsException" => crate::operation::remove_permission::RemovePermissionError::TooManyRequestsException({
         282  +
                    let mut tmp = match protocol
         283  +
                        .deserialize_response(response, crate::types::error::TooManyRequestsException::SCHEMA, _cfg)
         284  +
                        .and_then(|mut deser| {
         285  +
                            crate::types::error::TooManyRequestsException::deserialize_with_response(
         286  +
                                &mut *deser,
         287  +
                                response.headers(),
         288  +
                                response.status().into(),
         289  +
                                body,
         290  +
                            )
         291  +
                        }) {
         292  +
                        ::std::result::Result::Ok(val) => val,
         293  +
                        ::std::result::Result::Err(e) => {
         294  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         295  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         296  +
                            ))
         297  +
                        }
  162    298   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         299  +
                    tmp.meta = generic;
         300  +
                    if tmp.message.is_none() {
         301  +
                        tmp.message = _error_message;
         302  +
                    }
         303  +
                    tmp
         304  +
                }),
         305  +
                _ => crate::operation::remove_permission::RemovePermissionError::generic(generic),
         306  +
            };
         307  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         308  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         309  +
            ))
         310  +
        } else {
         311  +
            let protocol = _cfg
         312  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         313  +
                .expect("a SharedClientProtocol is required");
         314  +
            let mut deser = protocol
         315  +
                .deserialize_response(response, RemovePermission::OUTPUT_SCHEMA, _cfg)
         316  +
                .map_err(|e| {
         317  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         318  +
                })?;
         319  +
            let body = response.body().bytes().expect("body loaded");
         320  +
            let output = crate::operation::remove_permission::RemovePermissionOutput::deserialize_with_response(
         321  +
                &mut *deser,
         322  +
                response.headers(),
         323  +
                response.status().into(),
         324  +
                body,
         325  +
            )
         326  +
            .map_err(|e| {
         327  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         328  +
            })?;
         329  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         330  +
        }
  164    331   
    }
  165    332   
}
  166    333   
#[derive(Debug)]
  167    334   
struct RemovePermissionRequestSerializer;
  168    335   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for RemovePermissionRequestSerializer {
  169    336   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    337   
    fn serialize_input(
  171    338   
        &self,
  172    339   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    340   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    341   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    342   
        let input = input
  176    343   
            .downcast::<crate::operation::remove_permission::RemovePermissionInput>()
  177    344   
            .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::remove_permission::RemovePermissionInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                let input_1 = &_input.function_name;
  190         -
                let input_1 = input_1
  191         -
                    .as_ref()
  192         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("function_name", "cannot be empty or unset"))?;
  193         -
                let function_name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  194         -
                if function_name.is_empty() {
  195         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  196         -
                        "function_name",
  197         -
                        "cannot be empty or unset",
  198         -
                    ));
  199         -
                }
  200         -
                let input_2 = &_input.statement_id;
  201         -
                let input_2 = input_2
  202         -
                    .as_ref()
  203         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("statement_id", "cannot be empty or unset"))?;
  204         -
                let statement_id = ::aws_smithy_http::label::fmt_string(input_2, ::aws_smithy_http::label::EncodingStrategy::Default);
  205         -
                if statement_id.is_empty() {
  206         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  207         -
                        "statement_id",
  208         -
                        "cannot be empty or unset",
  209         -
                    ));
  210         -
                }
  211         -
                ::std::write!(
  212         -
                    output,
  213         -
                    "/2015-03-31/functions/{FunctionName}/policy/{StatementId}",
  214         -
                    FunctionName = function_name,
  215         -
                    StatementId = statement_id
  216         -
                )
  217         -
                .expect("formatting should succeed");
  218         -
                ::std::result::Result::Ok(())
  219         -
            }
  220         -
            fn uri_query(
  221         -
                _input: &crate::operation::remove_permission::RemovePermissionInput,
  222         -
                mut output: &mut ::std::string::String,
  223         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  224         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  225         -
                if let ::std::option::Option::Some(inner_3) = &_input.qualifier {
  226         -
                    {
  227         -
                        query.push_kv("Qualifier", &::aws_smithy_http::query::fmt_string(inner_3));
  228         -
                    }
  229         -
                }
  230         -
                if let ::std::option::Option::Some(inner_4) = &_input.revision_id {
  231         -
                    {
  232         -
                        query.push_kv("RevisionId", &::aws_smithy_http::query::fmt_string(inner_4));
  233         -
                    }
  234         -
                }
  235         -
                ::std::result::Result::Ok(())
  236         -
            }
  237         -
            #[allow(clippy::unnecessary_wraps)]
  238         -
            fn update_http_builder(
  239         -
                input: &crate::operation::remove_permission::RemovePermissionInput,
  240         -
                builder: ::http_1x::request::Builder,
  241         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  242         -
                let mut uri = ::std::string::String::new();
  243         -
                uri_base(input, &mut uri)?;
  244         -
                uri_query(input, &mut uri)?;
  245         -
                ::std::result::Result::Ok(builder.method("DELETE").uri(uri))
  246         -
            }
  247         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  248         -
            builder
  249         -
        };
  250         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
         345  +
        let protocol = _cfg
         346  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         347  +
            .expect("a SharedClientProtocol is required");
         348  +
        let mut request = protocol
         349  +
            .serialize_request(&input, RemovePermission::INPUT_SCHEMA, "", _cfg)
         350  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
  251    351   
  252         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         352  +
        return ::std::result::Result::Ok(request);
  253    353   
    }
  254    354   
}
  255    355   
#[derive(Debug)]
  256    356   
struct RemovePermissionEndpointParamsInterceptor;
  257    357   
  258    358   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RemovePermissionEndpointParamsInterceptor {
  259    359   
    fn name(&self) -> &'static str {
  260    360   
        "RemovePermissionEndpointParamsInterceptor"
  261    361   
    }
  262    362