AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

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

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

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

@@ -50,50 +239,308 @@
   70     70   
    "com.amazonaws.lambda.synthetic",
   71     71   
    "GetFunctionUrlConfigOutput",
   72     72   
);
   73     73   
static GETFUNCTIONURLCONFIGOUTPUT_MEMBER_FUNCTION_URL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   74     74   
    ::aws_smithy_schema::ShapeId::from_static(
   75     75   
        "com.amazonaws.lambda.synthetic#GetFunctionUrlConfigOutput$FunctionUrl",
   76     76   
        "com.amazonaws.lambda.synthetic",
   77     77   
        "GetFunctionUrlConfigOutput",
   78     78   
    ),
   79     79   
    ::aws_smithy_schema::ShapeType::String,
   80         -
    "function_url",
          80  +
    "FunctionUrl",
   81     81   
    0,
   82     82   
);
   83     83   
static GETFUNCTIONURLCONFIGOUTPUT_MEMBER_FUNCTION_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   84     84   
    ::aws_smithy_schema::ShapeId::from_static(
   85     85   
        "com.amazonaws.lambda.synthetic#GetFunctionUrlConfigOutput$FunctionArn",
   86     86   
        "com.amazonaws.lambda.synthetic",
   87     87   
        "GetFunctionUrlConfigOutput",
   88     88   
    ),
   89     89   
    ::aws_smithy_schema::ShapeType::String,
   90         -
    "function_arn",
          90  +
    "FunctionArn",
   91     91   
    1,
   92     92   
);
   93     93   
static GETFUNCTIONURLCONFIGOUTPUT_MEMBER_AUTH_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   94     94   
    ::aws_smithy_schema::ShapeId::from_static(
   95     95   
        "com.amazonaws.lambda.synthetic#GetFunctionUrlConfigOutput$AuthType",
   96     96   
        "com.amazonaws.lambda.synthetic",
   97     97   
        "GetFunctionUrlConfigOutput",
   98     98   
    ),
   99     99   
    ::aws_smithy_schema::ShapeType::String,
  100         -
    "auth_type",
         100  +
    "AuthType",
  101    101   
    2,
  102    102   
);
  103    103   
static GETFUNCTIONURLCONFIGOUTPUT_MEMBER_CORS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  104    104   
    ::aws_smithy_schema::ShapeId::from_static(
  105    105   
        "com.amazonaws.lambda.synthetic#GetFunctionUrlConfigOutput$Cors",
  106    106   
        "com.amazonaws.lambda.synthetic",
  107    107   
        "GetFunctionUrlConfigOutput",
  108    108   
    ),
  109    109   
    ::aws_smithy_schema::ShapeType::Structure,
  110         -
    "cors",
         110  +
    "Cors",
  111    111   
    3,
  112    112   
);
  113    113   
static GETFUNCTIONURLCONFIGOUTPUT_MEMBER_CREATION_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  114    114   
    ::aws_smithy_schema::ShapeId::from_static(
  115    115   
        "com.amazonaws.lambda.synthetic#GetFunctionUrlConfigOutput$CreationTime",
  116    116   
        "com.amazonaws.lambda.synthetic",
  117    117   
        "GetFunctionUrlConfigOutput",
  118    118   
    ),
  119    119   
    ::aws_smithy_schema::ShapeType::String,
  120         -
    "creation_time",
         120  +
    "CreationTime",
  121    121   
    4,
  122    122   
);
  123    123   
static GETFUNCTIONURLCONFIGOUTPUT_MEMBER_LAST_MODIFIED_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  124    124   
    ::aws_smithy_schema::ShapeId::from_static(
  125    125   
        "com.amazonaws.lambda.synthetic#GetFunctionUrlConfigOutput$LastModifiedTime",
  126    126   
        "com.amazonaws.lambda.synthetic",
  127    127   
        "GetFunctionUrlConfigOutput",
  128    128   
    ),
  129    129   
    ::aws_smithy_schema::ShapeType::String,
  130         -
    "last_modified_time",
         130  +
    "LastModifiedTime",
  131    131   
    5,
  132    132   
);
  133    133   
static GETFUNCTIONURLCONFIGOUTPUT_MEMBER_INVOKE_MODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  134    134   
    ::aws_smithy_schema::ShapeId::from_static(
  135    135   
        "com.amazonaws.lambda.synthetic#GetFunctionUrlConfigOutput$InvokeMode",
  136    136   
        "com.amazonaws.lambda.synthetic",
  137    137   
        "GetFunctionUrlConfigOutput",
  138    138   
    ),
  139    139   
    ::aws_smithy_schema::ShapeType::String,
  140         -
    "invoke_mode",
         140  +
    "InvokeMode",
  141    141   
    6,
  142    142   
);
         143  +
static GETFUNCTIONURLCONFIGOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         144  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         145  +
    ::aws_smithy_schema::ShapeType::String,
         146  +
    "request_id",
         147  +
    7,
         148  +
)
         149  +
.with_http_header("x-amzn-requestid");
  143    150   
static GETFUNCTIONURLCONFIGOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  144    151   
    GETFUNCTIONURLCONFIGOUTPUT_SCHEMA_ID,
  145    152   
    ::aws_smithy_schema::ShapeType::Structure,
  146    153   
    &[
  147    154   
        &GETFUNCTIONURLCONFIGOUTPUT_MEMBER_FUNCTION_URL,
  148    155   
        &GETFUNCTIONURLCONFIGOUTPUT_MEMBER_FUNCTION_ARN,
  149    156   
        &GETFUNCTIONURLCONFIGOUTPUT_MEMBER_AUTH_TYPE,
  150    157   
        &GETFUNCTIONURLCONFIGOUTPUT_MEMBER_CORS,
  151    158   
        &GETFUNCTIONURLCONFIGOUTPUT_MEMBER_CREATION_TIME,
  152    159   
        &GETFUNCTIONURLCONFIGOUTPUT_MEMBER_LAST_MODIFIED_TIME,
  153    160   
        &GETFUNCTIONURLCONFIGOUTPUT_MEMBER_INVOKE_MODE,
         161  +
        &GETFUNCTIONURLCONFIGOUTPUT_MEMBER__REQUEST_ID,
  154    162   
    ],
  155    163   
);
  156    164   
impl GetFunctionUrlConfigOutput {
  157    165   
    /// The schema for this shape.
  158    166   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETFUNCTIONURLCONFIGOUTPUT_SCHEMA;
  159    167   
}
  160    168   
impl ::aws_smithy_schema::serde::SerializableStruct for GetFunctionUrlConfigOutput {
  161    169   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  162    170   
    fn serialize_members(
  163    171   
        &self,
  164    172   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  165    173   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  166    174   
        {
  167    175   
            let val = &self.function_url;
  168    176   
            ser.write_string(&GETFUNCTIONURLCONFIGOUTPUT_MEMBER_FUNCTION_URL, val)?;
  169    177   
        }
  170    178   
        {
  171    179   
            let val = &self.function_arn;
  172    180   
            ser.write_string(&GETFUNCTIONURLCONFIGOUTPUT_MEMBER_FUNCTION_ARN, val)?;
  173    181   
        }
  174    182   
        {
  175    183   
            let val = &self.auth_type;
  176    184   
            ser.write_string(&GETFUNCTIONURLCONFIGOUTPUT_MEMBER_AUTH_TYPE, val.as_str())?;
  177    185   
        }
  178    186   
        if let Some(ref val) = self.cors {
  179    187   
            ser.write_struct(&GETFUNCTIONURLCONFIGOUTPUT_MEMBER_CORS, val)?;
  180    188   
        }
  181    189   
        {
  182    190   
            let val = &self.creation_time;
  183    191   
            ser.write_string(&GETFUNCTIONURLCONFIGOUTPUT_MEMBER_CREATION_TIME, val)?;
  184    192   
        }
  185    193   
        {
  186    194   
            let val = &self.last_modified_time;
  187    195   
            ser.write_string(&GETFUNCTIONURLCONFIGOUTPUT_MEMBER_LAST_MODIFIED_TIME, val)?;
  188    196   
        }
  189    197   
        if let Some(ref val) = self.invoke_mode {
  190    198   
            ser.write_string(&GETFUNCTIONURLCONFIGOUTPUT_MEMBER_INVOKE_MODE, val.as_str())?;
  191    199   
        }
  192    200   
        Ok(())
  193    201   
    }
  194    202   
}
  195    203   
impl GetFunctionUrlConfigOutput {
  196    204   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  197         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  198         -
        deserializer: &mut D,
         205  +
    pub fn deserialize(
         206  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         207  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         208  +
        #[allow(unused_variables, unused_mut)]
         209  +
        let mut builder = Self::builder();
         210  +
        #[allow(
         211  +
            unused_variables,
         212  +
            unreachable_code,
         213  +
            clippy::single_match,
         214  +
            clippy::match_single_binding,
         215  +
            clippy::diverging_sub_expression
         216  +
        )]
         217  +
        deserializer.read_struct(&GETFUNCTIONURLCONFIGOUTPUT_SCHEMA, &mut |member, deser| {
         218  +
            match member.member_index() {
         219  +
                Some(0) => {
         220  +
                    builder.function_url = Some(deser.read_string(member)?);
         221  +
                }
         222  +
                Some(1) => {
         223  +
                    builder.function_arn = Some(deser.read_string(member)?);
         224  +
                }
         225  +
                Some(2) => {
         226  +
                    builder.auth_type = Some(crate::types::FunctionUrlAuthType::from(deser.read_string(member)?.as_str()));
         227  +
                }
         228  +
                Some(3) => {
         229  +
                    builder.cors = Some(crate::types::Cors::deserialize(deser)?);
         230  +
                }
         231  +
                Some(4) => {
         232  +
                    builder.creation_time = Some(deser.read_string(member)?);
         233  +
                }
         234  +
                Some(5) => {
         235  +
                    builder.last_modified_time = Some(deser.read_string(member)?);
         236  +
                }
         237  +
                Some(6) => {
         238  +
                    builder.invoke_mode = Some(crate::types::InvokeMode::from(deser.read_string(member)?.as_str()));
         239  +
                }
         240  +
                Some(7) => {
         241  +
                    builder._request_id = Some(deser.read_string(member)?);
         242  +
                }
         243  +
                _ => {}
         244  +
            }
         245  +
            Ok(())
         246  +
        })?;
         247  +
        builder.function_url = builder.function_url.or(Some(String::new()));
         248  +
        builder.function_arn = builder.function_arn.or(Some(String::new()));
         249  +
        builder.creation_time = builder.creation_time.or(Some(String::new()));
         250  +
        builder.last_modified_time = builder.last_modified_time.or(Some(String::new()));
         251  +
        builder
         252  +
            .build()
         253  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         254  +
    }
         255  +
}
         256  +
impl GetFunctionUrlConfigOutput {
         257  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         258  +
    /// Header-bound members are read directly from headers, avoiding runtime
         259  +
    /// member iteration overhead. Body members are read via the deserializer.
         260  +
    pub fn deserialize_with_response(
         261  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         262  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         263  +
        _status: u16,
         264  +
        _body: &[u8],
  199    265   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  200    266   
        #[allow(unused_variables, unused_mut)]
  201    267   
        let mut builder = Self::builder();
         268  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         269  +
            builder._request_id = Some(val.to_string());
         270  +
        }
  202    271   
        #[allow(
  203    272   
            unused_variables,
  204    273   
            unreachable_code,
  205    274   
            clippy::single_match,
  206    275   
            clippy::match_single_binding,
  207    276   
            clippy::diverging_sub_expression
  208    277   
        )]
  209         -
        deserializer.read_struct(&GETFUNCTIONURLCONFIGOUTPUT_SCHEMA, (), |_, member, deser| {
         278  +
        deserializer.read_struct(&GETFUNCTIONURLCONFIGOUTPUT_SCHEMA, &mut |member, deser| {
  210    279   
            match member.member_index() {
  211    280   
                Some(0) => {
  212    281   
                    builder.function_url = Some(deser.read_string(member)?);
  213    282   
                }
  214    283   
                Some(1) => {
  215    284   
                    builder.function_arn = Some(deser.read_string(member)?);
  216    285   
                }
  217    286   
                Some(2) => {
  218    287   
                    builder.auth_type = Some(crate::types::FunctionUrlAuthType::from(deser.read_string(member)?.as_str()));
  219    288   
                }

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

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

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

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

@@ -54,54 +209,217 @@
   74     74   
    "com.amazonaws.lambda.synthetic",
   75     75   
    "GetLayerVersionOutput",
   76     76   
);
   77     77   
static GETLAYERVERSIONOUTPUT_MEMBER_CONTENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   78     78   
    ::aws_smithy_schema::ShapeId::from_static(
   79     79   
        "com.amazonaws.lambda.synthetic#GetLayerVersionOutput$Content",
   80     80   
        "com.amazonaws.lambda.synthetic",
   81     81   
        "GetLayerVersionOutput",
   82     82   
    ),
   83     83   
    ::aws_smithy_schema::ShapeType::Structure,
   84         -
    "content",
          84  +
    "Content",
   85     85   
    0,
   86     86   
);
   87     87   
static GETLAYERVERSIONOUTPUT_MEMBER_LAYER_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   88     88   
    ::aws_smithy_schema::ShapeId::from_static(
   89     89   
        "com.amazonaws.lambda.synthetic#GetLayerVersionOutput$LayerArn",
   90     90   
        "com.amazonaws.lambda.synthetic",
   91     91   
        "GetLayerVersionOutput",
   92     92   
    ),
   93     93   
    ::aws_smithy_schema::ShapeType::String,
   94         -
    "layer_arn",
          94  +
    "LayerArn",
   95     95   
    1,
   96     96   
);
   97     97   
static GETLAYERVERSIONOUTPUT_MEMBER_LAYER_VERSION_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   98     98   
    ::aws_smithy_schema::ShapeId::from_static(
   99     99   
        "com.amazonaws.lambda.synthetic#GetLayerVersionOutput$LayerVersionArn",
  100    100   
        "com.amazonaws.lambda.synthetic",
  101    101   
        "GetLayerVersionOutput",
  102    102   
    ),
  103    103   
    ::aws_smithy_schema::ShapeType::String,
  104         -
    "layer_version_arn",
         104  +
    "LayerVersionArn",
  105    105   
    2,
  106    106   
);
  107    107   
static GETLAYERVERSIONOUTPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  108    108   
    ::aws_smithy_schema::ShapeId::from_static(
  109    109   
        "com.amazonaws.lambda.synthetic#GetLayerVersionOutput$Description",
  110    110   
        "com.amazonaws.lambda.synthetic",
  111    111   
        "GetLayerVersionOutput",
  112    112   
    ),
  113    113   
    ::aws_smithy_schema::ShapeType::String,
  114         -
    "description",
         114  +
    "Description",
  115    115   
    3,
  116    116   
);
  117    117   
static GETLAYERVERSIONOUTPUT_MEMBER_CREATED_DATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  118    118   
    ::aws_smithy_schema::ShapeId::from_static(
  119    119   
        "com.amazonaws.lambda.synthetic#GetLayerVersionOutput$CreatedDate",
  120    120   
        "com.amazonaws.lambda.synthetic",
  121    121   
        "GetLayerVersionOutput",
  122    122   
    ),
  123    123   
    ::aws_smithy_schema::ShapeType::String,
  124         -
    "created_date",
         124  +
    "CreatedDate",
  125    125   
    4,
  126    126   
);
  127    127   
static GETLAYERVERSIONOUTPUT_MEMBER_VERSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  128    128   
    ::aws_smithy_schema::ShapeId::from_static(
  129    129   
        "com.amazonaws.lambda.synthetic#GetLayerVersionOutput$Version",
  130    130   
        "com.amazonaws.lambda.synthetic",
  131    131   
        "GetLayerVersionOutput",
  132    132   
    ),
  133    133   
    ::aws_smithy_schema::ShapeType::Long,
  134         -
    "version",
         134  +
    "Version",
  135    135   
    5,
  136    136   
);
  137    137   
static GETLAYERVERSIONOUTPUT_MEMBER_COMPATIBLE_RUNTIMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  138    138   
    ::aws_smithy_schema::ShapeId::from_static(
  139    139   
        "com.amazonaws.lambda.synthetic#GetLayerVersionOutput$CompatibleRuntimes",
  140    140   
        "com.amazonaws.lambda.synthetic",
  141    141   
        "GetLayerVersionOutput",
  142    142   
    ),
  143    143   
    ::aws_smithy_schema::ShapeType::List,
  144         -
    "compatible_runtimes",
         144  +
    "CompatibleRuntimes",
  145    145   
    6,
  146    146   
);
  147    147   
static GETLAYERVERSIONOUTPUT_MEMBER_LICENSE_INFO: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  148    148   
    ::aws_smithy_schema::ShapeId::from_static(
  149    149   
        "com.amazonaws.lambda.synthetic#GetLayerVersionOutput$LicenseInfo",
  150    150   
        "com.amazonaws.lambda.synthetic",
  151    151   
        "GetLayerVersionOutput",
  152    152   
    ),
  153    153   
    ::aws_smithy_schema::ShapeType::String,
  154         -
    "license_info",
         154  +
    "LicenseInfo",
  155    155   
    7,
  156    156   
);
  157    157   
static GETLAYERVERSIONOUTPUT_MEMBER_COMPATIBLE_ARCHITECTURES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  158    158   
    ::aws_smithy_schema::ShapeId::from_static(
  159    159   
        "com.amazonaws.lambda.synthetic#GetLayerVersionOutput$CompatibleArchitectures",
  160    160   
        "com.amazonaws.lambda.synthetic",
  161    161   
        "GetLayerVersionOutput",
  162    162   
    ),
  163    163   
    ::aws_smithy_schema::ShapeType::List,
  164         -
    "compatible_architectures",
         164  +
    "CompatibleArchitectures",
  165    165   
    8,
  166    166   
);
         167  +
static GETLAYERVERSIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         168  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         169  +
    ::aws_smithy_schema::ShapeType::String,
         170  +
    "request_id",
         171  +
    9,
         172  +
)
         173  +
.with_http_header("x-amzn-requestid");
  167    174   
static GETLAYERVERSIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  168    175   
    GETLAYERVERSIONOUTPUT_SCHEMA_ID,
  169    176   
    ::aws_smithy_schema::ShapeType::Structure,
  170    177   
    &[
  171    178   
        &GETLAYERVERSIONOUTPUT_MEMBER_CONTENT,
  172    179   
        &GETLAYERVERSIONOUTPUT_MEMBER_LAYER_ARN,
  173    180   
        &GETLAYERVERSIONOUTPUT_MEMBER_LAYER_VERSION_ARN,
  174    181   
        &GETLAYERVERSIONOUTPUT_MEMBER_DESCRIPTION,
  175    182   
        &GETLAYERVERSIONOUTPUT_MEMBER_CREATED_DATE,
  176    183   
        &GETLAYERVERSIONOUTPUT_MEMBER_VERSION,
  177    184   
        &GETLAYERVERSIONOUTPUT_MEMBER_COMPATIBLE_RUNTIMES,
  178    185   
        &GETLAYERVERSIONOUTPUT_MEMBER_LICENSE_INFO,
  179    186   
        &GETLAYERVERSIONOUTPUT_MEMBER_COMPATIBLE_ARCHITECTURES,
         187  +
        &GETLAYERVERSIONOUTPUT_MEMBER__REQUEST_ID,
  180    188   
    ],
  181    189   
);
  182    190   
impl GetLayerVersionOutput {
  183    191   
    /// The schema for this shape.
  184    192   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETLAYERVERSIONOUTPUT_SCHEMA;
  185    193   
}
  186    194   
impl ::aws_smithy_schema::serde::SerializableStruct for GetLayerVersionOutput {
  187    195   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  188    196   
    fn serialize_members(
  189    197   
        &self,
@@ -211,219 +329,406 @@
  231    239   
                    }
  232    240   
                    Ok(())
  233    241   
                },
  234    242   
            )?;
  235    243   
        }
  236    244   
        Ok(())
  237    245   
    }
  238    246   
}
  239    247   
impl GetLayerVersionOutput {
  240    248   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  241         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  242         -
        deserializer: &mut D,
         249  +
    pub fn deserialize(
         250  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  243    251   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  244    252   
        #[allow(unused_variables, unused_mut)]
  245    253   
        let mut builder = Self::builder();
  246    254   
        #[allow(
  247    255   
            unused_variables,
  248    256   
            unreachable_code,
  249    257   
            clippy::single_match,
  250    258   
            clippy::match_single_binding,
  251    259   
            clippy::diverging_sub_expression
  252    260   
        )]
  253         -
        deserializer.read_struct(&GETLAYERVERSIONOUTPUT_SCHEMA, (), |_, member, deser| {
         261  +
        deserializer.read_struct(&GETLAYERVERSIONOUTPUT_SCHEMA, &mut |member, deser| {
  254    262   
            match member.member_index() {
  255    263   
                Some(0) => {
  256    264   
                    builder.content = Some(crate::types::LayerVersionContentOutput::deserialize(deser)?);
  257    265   
                }
  258    266   
                Some(1) => {
  259    267   
                    builder.layer_arn = Some(deser.read_string(member)?);
  260    268   
                }
  261    269   
                Some(2) => {
  262    270   
                    builder.layer_version_arn = Some(deser.read_string(member)?);
  263    271   
                }
  264    272   
                Some(3) => {
  265    273   
                    builder.description = Some(deser.read_string(member)?);
  266    274   
                }
  267    275   
                Some(4) => {
  268    276   
                    builder.created_date = Some(deser.read_string(member)?);
  269    277   
                }
  270    278   
                Some(5) => {
  271    279   
                    builder.version = Some(deser.read_long(member)?);
  272    280   
                }
  273    281   
                Some(6) => {
  274    282   
                    builder.compatible_runtimes = Some({
  275         -
                        let container = if let Some(cap) = deser.container_size() {
  276         -
                            Vec::with_capacity(cap)
  277         -
                        } else {
  278         -
                            Vec::new()
  279         -
                        };
  280         -
                        deser.read_list(member, container, |mut list, deser| {
  281         -
                            list.push(crate::types::Runtime::from(deser.read_string(member)?.as_str()));
  282         -
                            Ok(list)
  283         -
                        })?
         283  +
                        let mut container = Vec::new();
         284  +
                        deser.read_list(member, &mut |deser| {
         285  +
                            container.push(crate::types::Runtime::from(deser.read_string(member)?.as_str()));
         286  +
                            Ok(())
         287  +
                        })?;
         288  +
                        container
  284    289   
                    });
  285    290   
                }
  286    291   
                Some(7) => {
  287    292   
                    builder.license_info = Some(deser.read_string(member)?);
  288    293   
                }
  289    294   
                Some(8) => {
  290    295   
                    builder.compatible_architectures = Some({
  291         -
                        let container = if let Some(cap) = deser.container_size() {
  292         -
                            Vec::with_capacity(cap)
  293         -
                        } else {
  294         -
                            Vec::new()
  295         -
                        };
  296         -
                        deser.read_list(member, container, |mut list, deser| {
  297         -
                            list.push(crate::types::Architecture::from(deser.read_string(member)?.as_str()));
  298         -
                            Ok(list)
  299         -
                        })?
         296  +
                        let mut container = Vec::new();
         297  +
                        deser.read_list(member, &mut |deser| {
         298  +
                            container.push(crate::types::Architecture::from(deser.read_string(member)?.as_str()));
         299  +
                            Ok(())
         300  +
                        })?;
         301  +
                        container
         302  +
                    });
         303  +
                }
         304  +
                Some(9) => {
         305  +
                    builder._request_id = Some(deser.read_string(member)?);
         306  +
                }
         307  +
                _ => {}
         308  +
            }
         309  +
            Ok(())
         310  +
        })?;
         311  +
        Ok(builder.build())
         312  +
    }
         313  +
}
         314  +
impl GetLayerVersionOutput {
         315  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         316  +
    /// Header-bound members are read directly from headers, avoiding runtime
         317  +
    /// member iteration overhead. Body members are read via the deserializer.
         318  +
    pub fn deserialize_with_response(
         319  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         320  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         321  +
        _status: u16,
         322  +
        _body: &[u8],
         323  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         324  +
        #[allow(unused_variables, unused_mut)]
         325  +
        let mut builder = Self::builder();
         326  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         327  +
            builder._request_id = Some(val.to_string());
         328  +
        }
         329  +
        #[allow(
         330  +
            unused_variables,
         331  +
            unreachable_code,
         332  +
            clippy::single_match,
         333  +
            clippy::match_single_binding,
         334  +
            clippy::diverging_sub_expression
         335  +
        )]
         336  +
        deserializer.read_struct(&GETLAYERVERSIONOUTPUT_SCHEMA, &mut |member, deser| {
         337  +
            match member.member_index() {
         338  +
                Some(0) => {
         339  +
                    builder.content = Some(crate::types::LayerVersionContentOutput::deserialize(deser)?);
         340  +
                }
         341  +
                Some(1) => {
         342  +
                    builder.layer_arn = Some(deser.read_string(member)?);
         343  +
                }
         344  +
                Some(2) => {
         345  +
                    builder.layer_version_arn = Some(deser.read_string(member)?);
         346  +
                }
         347  +
                Some(3) => {
         348  +
                    builder.description = Some(deser.read_string(member)?);
         349  +
                }
         350  +
                Some(4) => {
         351  +
                    builder.created_date = Some(deser.read_string(member)?);
         352  +
                }
         353  +
                Some(5) => {
         354  +
                    builder.version = Some(deser.read_long(member)?);
         355  +
                }
         356  +
                Some(6) => {
         357  +
                    builder.compatible_runtimes = Some({
         358  +
                        let mut container = Vec::new();
         359  +
                        deser.read_list(member, &mut |deser| {
         360  +
                            container.push(crate::types::Runtime::from(deser.read_string(member)?.as_str()));
         361  +
                            Ok(())
         362  +
                        })?;
         363  +
                        container
         364  +
                    });
         365  +
                }
         366  +
                Some(7) => {
         367  +
                    builder.license_info = Some(deser.read_string(member)?);
         368  +
                }
         369  +
                Some(8) => {
         370  +
                    builder.compatible_architectures = Some({
         371  +
                        let mut container = Vec::new();
         372  +
                        deser.read_list(member, &mut |deser| {
         373  +
                            container.push(crate::types::Architecture::from(deser.read_string(member)?.as_str()));
         374  +
                            Ok(())
         375  +
                        })?;
         376  +
                        container
  300    377   
                    });
  301    378   
                }
  302    379   
                _ => {}
  303    380   
            }
  304    381   
            Ok(())
  305    382   
        })?;
  306    383   
        Ok(builder.build())
  307    384   
    }
  308    385   
}
  309    386   
impl ::aws_types::request_id::RequestId for GetLayerVersionOutput {

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

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

@@ -1,1 +109,126 @@
   17     17   
    "com.amazonaws.lambda.synthetic",
   18     18   
    "GetLayerVersionByArnInput",
   19     19   
);
   20     20   
static GETLAYERVERSIONBYARNINPUT_MEMBER_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "com.amazonaws.lambda.synthetic#GetLayerVersionByArnInput$Arn",
   23     23   
        "com.amazonaws.lambda.synthetic",
   24     24   
        "GetLayerVersionByArnInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "arn",
          27  +
    "Arn",
   28     28   
    0,
   29     29   
)
   30     30   
.with_http_query("Arn");
   31     31   
static GETLAYERVERSIONBYARNINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     32   
    GETLAYERVERSIONBYARNINPUT_SCHEMA_ID,
   33     33   
    ::aws_smithy_schema::ShapeType::Structure,
   34     34   
    &[&GETLAYERVERSIONBYARNINPUT_MEMBER_ARN],
   35         -
);
          35  +
)
          36  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          37  +
    "GET",
          38  +
    "/2018-10-31/layers?find=LayerVersion",
          39  +
    None,
          40  +
));
   36     41   
impl GetLayerVersionByArnInput {
   37     42   
    /// The schema for this shape.
   38     43   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETLAYERVERSIONBYARNINPUT_SCHEMA;
   39     44   
}
   40     45   
impl ::aws_smithy_schema::serde::SerializableStruct for GetLayerVersionByArnInput {
   41     46   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   42     47   
    fn serialize_members(
   43     48   
        &self,
   44     49   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   45     50   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   46     51   
        if let Some(ref val) = self.arn {
   47     52   
            ser.write_string(&GETLAYERVERSIONBYARNINPUT_MEMBER_ARN, val)?;
   48     53   
        }
   49     54   
        Ok(())
   50     55   
    }
   51     56   
}
   52     57   
impl GetLayerVersionByArnInput {
   53     58   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          59  +
    pub fn deserialize(
          60  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     61   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     62   
        #[allow(unused_variables, unused_mut)]
   58     63   
        let mut builder = Self::builder();
   59     64   
        #[allow(
   60     65   
            unused_variables,
   61     66   
            unreachable_code,
   62     67   
            clippy::single_match,
   63     68   
            clippy::match_single_binding,
   64     69   
            clippy::diverging_sub_expression
   65     70   
        )]
   66         -
        deserializer.read_struct(&GETLAYERVERSIONBYARNINPUT_SCHEMA, (), |_, member, deser| {
          71  +
        deserializer.read_struct(&GETLAYERVERSIONBYARNINPUT_SCHEMA, &mut |member, deser| {
   67     72   
            match member.member_index() {
   68     73   
                Some(0) => {
   69     74   
                    builder.arn = Some(deser.read_string(member)?);
   70     75   
                }
   71     76   
                _ => {}
   72     77   
            }
   73     78   
            Ok(())
   74     79   
        })?;
          80  +
        builder.arn = builder.arn.or(Some(String::new()));
   75     81   
        builder
   76     82   
            .build()
   77     83   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   78     84   
    }
   79     85   
}
          86  +
impl GetLayerVersionByArnInput {
          87  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          88  +
    pub fn deserialize_with_response(
          89  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          90  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          91  +
        _status: u16,
          92  +
        _body: &[u8],
          93  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          94  +
        Self::deserialize(deserializer)
          95  +
    }
          96  +
}
   80     97   
impl GetLayerVersionByArnInput {
   81     98   
    /// Creates a new builder-style object to manufacture [`GetLayerVersionByArnInput`](crate::operation::get_layer_version_by_arn::GetLayerVersionByArnInput).
   82     99   
    pub fn builder() -> crate::operation::get_layer_version_by_arn::builders::GetLayerVersionByArnInputBuilder {
   83    100   
        crate::operation::get_layer_version_by_arn::builders::GetLayerVersionByArnInputBuilder::default()
   84    101   
    }
   85    102   
}
   86    103   
   87    104   
/// A builder for [`GetLayerVersionByArnInput`](crate::operation::get_layer_version_by_arn::GetLayerVersionByArnInput).
   88    105   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   89    106   
#[non_exhaustive]

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

@@ -54,54 +209,217 @@
   74     74   
    "com.amazonaws.lambda.synthetic",
   75     75   
    "GetLayerVersionByArnOutput",
   76     76   
);
   77     77   
static GETLAYERVERSIONBYARNOUTPUT_MEMBER_CONTENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   78     78   
    ::aws_smithy_schema::ShapeId::from_static(
   79     79   
        "com.amazonaws.lambda.synthetic#GetLayerVersionByArnOutput$Content",
   80     80   
        "com.amazonaws.lambda.synthetic",
   81     81   
        "GetLayerVersionByArnOutput",
   82     82   
    ),
   83     83   
    ::aws_smithy_schema::ShapeType::Structure,
   84         -
    "content",
          84  +
    "Content",
   85     85   
    0,
   86     86   
);
   87     87   
static GETLAYERVERSIONBYARNOUTPUT_MEMBER_LAYER_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   88     88   
    ::aws_smithy_schema::ShapeId::from_static(
   89     89   
        "com.amazonaws.lambda.synthetic#GetLayerVersionByArnOutput$LayerArn",
   90     90   
        "com.amazonaws.lambda.synthetic",
   91     91   
        "GetLayerVersionByArnOutput",
   92     92   
    ),
   93     93   
    ::aws_smithy_schema::ShapeType::String,
   94         -
    "layer_arn",
          94  +
    "LayerArn",
   95     95   
    1,
   96     96   
);
   97     97   
static GETLAYERVERSIONBYARNOUTPUT_MEMBER_LAYER_VERSION_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   98     98   
    ::aws_smithy_schema::ShapeId::from_static(
   99     99   
        "com.amazonaws.lambda.synthetic#GetLayerVersionByArnOutput$LayerVersionArn",
  100    100   
        "com.amazonaws.lambda.synthetic",
  101    101   
        "GetLayerVersionByArnOutput",
  102    102   
    ),
  103    103   
    ::aws_smithy_schema::ShapeType::String,
  104         -
    "layer_version_arn",
         104  +
    "LayerVersionArn",
  105    105   
    2,
  106    106   
);
  107    107   
static GETLAYERVERSIONBYARNOUTPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  108    108   
    ::aws_smithy_schema::ShapeId::from_static(
  109    109   
        "com.amazonaws.lambda.synthetic#GetLayerVersionByArnOutput$Description",
  110    110   
        "com.amazonaws.lambda.synthetic",
  111    111   
        "GetLayerVersionByArnOutput",
  112    112   
    ),
  113    113   
    ::aws_smithy_schema::ShapeType::String,
  114         -
    "description",
         114  +
    "Description",
  115    115   
    3,
  116    116   
);
  117    117   
static GETLAYERVERSIONBYARNOUTPUT_MEMBER_CREATED_DATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  118    118   
    ::aws_smithy_schema::ShapeId::from_static(
  119    119   
        "com.amazonaws.lambda.synthetic#GetLayerVersionByArnOutput$CreatedDate",
  120    120   
        "com.amazonaws.lambda.synthetic",
  121    121   
        "GetLayerVersionByArnOutput",
  122    122   
    ),
  123    123   
    ::aws_smithy_schema::ShapeType::String,
  124         -
    "created_date",
         124  +
    "CreatedDate",
  125    125   
    4,
  126    126   
);
  127    127   
static GETLAYERVERSIONBYARNOUTPUT_MEMBER_VERSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  128    128   
    ::aws_smithy_schema::ShapeId::from_static(
  129    129   
        "com.amazonaws.lambda.synthetic#GetLayerVersionByArnOutput$Version",
  130    130   
        "com.amazonaws.lambda.synthetic",
  131    131   
        "GetLayerVersionByArnOutput",
  132    132   
    ),
  133    133   
    ::aws_smithy_schema::ShapeType::Long,
  134         -
    "version",
         134  +
    "Version",
  135    135   
    5,
  136    136   
);
  137    137   
static GETLAYERVERSIONBYARNOUTPUT_MEMBER_COMPATIBLE_RUNTIMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  138    138   
    ::aws_smithy_schema::ShapeId::from_static(
  139    139   
        "com.amazonaws.lambda.synthetic#GetLayerVersionByArnOutput$CompatibleRuntimes",
  140    140   
        "com.amazonaws.lambda.synthetic",
  141    141   
        "GetLayerVersionByArnOutput",
  142    142   
    ),
  143    143   
    ::aws_smithy_schema::ShapeType::List,
  144         -
    "compatible_runtimes",
         144  +
    "CompatibleRuntimes",
  145    145   
    6,
  146    146   
);
  147    147   
static GETLAYERVERSIONBYARNOUTPUT_MEMBER_LICENSE_INFO: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  148    148   
    ::aws_smithy_schema::ShapeId::from_static(
  149    149   
        "com.amazonaws.lambda.synthetic#GetLayerVersionByArnOutput$LicenseInfo",
  150    150   
        "com.amazonaws.lambda.synthetic",
  151    151   
        "GetLayerVersionByArnOutput",
  152    152   
    ),
  153    153   
    ::aws_smithy_schema::ShapeType::String,
  154         -
    "license_info",
         154  +
    "LicenseInfo",
  155    155   
    7,
  156    156   
);
  157    157   
static GETLAYERVERSIONBYARNOUTPUT_MEMBER_COMPATIBLE_ARCHITECTURES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  158    158   
    ::aws_smithy_schema::ShapeId::from_static(
  159    159   
        "com.amazonaws.lambda.synthetic#GetLayerVersionByArnOutput$CompatibleArchitectures",
  160    160   
        "com.amazonaws.lambda.synthetic",
  161    161   
        "GetLayerVersionByArnOutput",
  162    162   
    ),
  163    163   
    ::aws_smithy_schema::ShapeType::List,
  164         -
    "compatible_architectures",
         164  +
    "CompatibleArchitectures",
  165    165   
    8,
  166    166   
);
         167  +
static GETLAYERVERSIONBYARNOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         168  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         169  +
    ::aws_smithy_schema::ShapeType::String,
         170  +
    "request_id",
         171  +
    9,
         172  +
)
         173  +
.with_http_header("x-amzn-requestid");
  167    174   
static GETLAYERVERSIONBYARNOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  168    175   
    GETLAYERVERSIONBYARNOUTPUT_SCHEMA_ID,
  169    176   
    ::aws_smithy_schema::ShapeType::Structure,
  170    177   
    &[
  171    178   
        &GETLAYERVERSIONBYARNOUTPUT_MEMBER_CONTENT,
  172    179   
        &GETLAYERVERSIONBYARNOUTPUT_MEMBER_LAYER_ARN,
  173    180   
        &GETLAYERVERSIONBYARNOUTPUT_MEMBER_LAYER_VERSION_ARN,
  174    181   
        &GETLAYERVERSIONBYARNOUTPUT_MEMBER_DESCRIPTION,
  175    182   
        &GETLAYERVERSIONBYARNOUTPUT_MEMBER_CREATED_DATE,
  176    183   
        &GETLAYERVERSIONBYARNOUTPUT_MEMBER_VERSION,
  177    184   
        &GETLAYERVERSIONBYARNOUTPUT_MEMBER_COMPATIBLE_RUNTIMES,
  178    185   
        &GETLAYERVERSIONBYARNOUTPUT_MEMBER_LICENSE_INFO,
  179    186   
        &GETLAYERVERSIONBYARNOUTPUT_MEMBER_COMPATIBLE_ARCHITECTURES,
         187  +
        &GETLAYERVERSIONBYARNOUTPUT_MEMBER__REQUEST_ID,
  180    188   
    ],
  181    189   
);
  182    190   
impl GetLayerVersionByArnOutput {
  183    191   
    /// The schema for this shape.
  184    192   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETLAYERVERSIONBYARNOUTPUT_SCHEMA;
  185    193   
}
  186    194   
impl ::aws_smithy_schema::serde::SerializableStruct for GetLayerVersionByArnOutput {
  187    195   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  188    196   
    fn serialize_members(
  189    197   
        &self,
@@ -211,219 +329,406 @@
  231    239   
                    }
  232    240   
                    Ok(())
  233    241   
                },
  234    242   
            )?;
  235    243   
        }
  236    244   
        Ok(())
  237    245   
    }
  238    246   
}
  239    247   
impl GetLayerVersionByArnOutput {
  240    248   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  241         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  242         -
        deserializer: &mut D,
         249  +
    pub fn deserialize(
         250  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  243    251   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  244    252   
        #[allow(unused_variables, unused_mut)]
  245    253   
        let mut builder = Self::builder();
  246    254   
        #[allow(
  247    255   
            unused_variables,
  248    256   
            unreachable_code,
  249    257   
            clippy::single_match,
  250    258   
            clippy::match_single_binding,
  251    259   
            clippy::diverging_sub_expression
  252    260   
        )]
  253         -
        deserializer.read_struct(&GETLAYERVERSIONBYARNOUTPUT_SCHEMA, (), |_, member, deser| {
         261  +
        deserializer.read_struct(&GETLAYERVERSIONBYARNOUTPUT_SCHEMA, &mut |member, deser| {
  254    262   
            match member.member_index() {
  255    263   
                Some(0) => {
  256    264   
                    builder.content = Some(crate::types::LayerVersionContentOutput::deserialize(deser)?);
  257    265   
                }
  258    266   
                Some(1) => {
  259    267   
                    builder.layer_arn = Some(deser.read_string(member)?);
  260    268   
                }
  261    269   
                Some(2) => {
  262    270   
                    builder.layer_version_arn = Some(deser.read_string(member)?);
  263    271   
                }
  264    272   
                Some(3) => {
  265    273   
                    builder.description = Some(deser.read_string(member)?);
  266    274   
                }
  267    275   
                Some(4) => {
  268    276   
                    builder.created_date = Some(deser.read_string(member)?);
  269    277   
                }
  270    278   
                Some(5) => {
  271    279   
                    builder.version = Some(deser.read_long(member)?);
  272    280   
                }
  273    281   
                Some(6) => {
  274    282   
                    builder.compatible_runtimes = Some({
  275         -
                        let container = if let Some(cap) = deser.container_size() {
  276         -
                            Vec::with_capacity(cap)
  277         -
                        } else {
  278         -
                            Vec::new()
  279         -
                        };
  280         -
                        deser.read_list(member, container, |mut list, deser| {
  281         -
                            list.push(crate::types::Runtime::from(deser.read_string(member)?.as_str()));
  282         -
                            Ok(list)
  283         -
                        })?
         283  +
                        let mut container = Vec::new();
         284  +
                        deser.read_list(member, &mut |deser| {
         285  +
                            container.push(crate::types::Runtime::from(deser.read_string(member)?.as_str()));
         286  +
                            Ok(())
         287  +
                        })?;
         288  +
                        container
  284    289   
                    });
  285    290   
                }
  286    291   
                Some(7) => {
  287    292   
                    builder.license_info = Some(deser.read_string(member)?);
  288    293   
                }
  289    294   
                Some(8) => {
  290    295   
                    builder.compatible_architectures = Some({
  291         -
                        let container = if let Some(cap) = deser.container_size() {
  292         -
                            Vec::with_capacity(cap)
  293         -
                        } else {
  294         -
                            Vec::new()
  295         -
                        };
  296         -
                        deser.read_list(member, container, |mut list, deser| {
  297         -
                            list.push(crate::types::Architecture::from(deser.read_string(member)?.as_str()));
  298         -
                            Ok(list)
  299         -
                        })?
         296  +
                        let mut container = Vec::new();
         297  +
                        deser.read_list(member, &mut |deser| {
         298  +
                            container.push(crate::types::Architecture::from(deser.read_string(member)?.as_str()));
         299  +
                            Ok(())
         300  +
                        })?;
         301  +
                        container
         302  +
                    });
         303  +
                }
         304  +
                Some(9) => {
         305  +
                    builder._request_id = Some(deser.read_string(member)?);
         306  +
                }
         307  +
                _ => {}
         308  +
            }
         309  +
            Ok(())
         310  +
        })?;
         311  +
        Ok(builder.build())
         312  +
    }
         313  +
}
         314  +
impl GetLayerVersionByArnOutput {
         315  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         316  +
    /// Header-bound members are read directly from headers, avoiding runtime
         317  +
    /// member iteration overhead. Body members are read via the deserializer.
         318  +
    pub fn deserialize_with_response(
         319  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         320  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         321  +
        _status: u16,
         322  +
        _body: &[u8],
         323  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         324  +
        #[allow(unused_variables, unused_mut)]
         325  +
        let mut builder = Self::builder();
         326  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         327  +
            builder._request_id = Some(val.to_string());
         328  +
        }
         329  +
        #[allow(
         330  +
            unused_variables,
         331  +
            unreachable_code,
         332  +
            clippy::single_match,
         333  +
            clippy::match_single_binding,
         334  +
            clippy::diverging_sub_expression
         335  +
        )]
         336  +
        deserializer.read_struct(&GETLAYERVERSIONBYARNOUTPUT_SCHEMA, &mut |member, deser| {
         337  +
            match member.member_index() {
         338  +
                Some(0) => {
         339  +
                    builder.content = Some(crate::types::LayerVersionContentOutput::deserialize(deser)?);
         340  +
                }
         341  +
                Some(1) => {
         342  +
                    builder.layer_arn = Some(deser.read_string(member)?);
         343  +
                }
         344  +
                Some(2) => {
         345  +
                    builder.layer_version_arn = Some(deser.read_string(member)?);
         346  +
                }
         347  +
                Some(3) => {
         348  +
                    builder.description = Some(deser.read_string(member)?);
         349  +
                }
         350  +
                Some(4) => {
         351  +
                    builder.created_date = Some(deser.read_string(member)?);
         352  +
                }
         353  +
                Some(5) => {
         354  +
                    builder.version = Some(deser.read_long(member)?);
         355  +
                }
         356  +
                Some(6) => {
         357  +
                    builder.compatible_runtimes = Some({
         358  +
                        let mut container = Vec::new();
         359  +
                        deser.read_list(member, &mut |deser| {
         360  +
                            container.push(crate::types::Runtime::from(deser.read_string(member)?.as_str()));
         361  +
                            Ok(())
         362  +
                        })?;
         363  +
                        container
         364  +
                    });
         365  +
                }
         366  +
                Some(7) => {
         367  +
                    builder.license_info = Some(deser.read_string(member)?);
         368  +
                }
         369  +
                Some(8) => {
         370  +
                    builder.compatible_architectures = Some({
         371  +
                        let mut container = Vec::new();
         372  +
                        deser.read_list(member, &mut |deser| {
         373  +
                            container.push(crate::types::Architecture::from(deser.read_string(member)?.as_str()));
         374  +
                            Ok(())
         375  +
                        })?;
         376  +
                        container
  300    377   
                    });
  301    378   
                }
  302    379   
                _ => {}
  303    380   
            }
  304    381   
            Ok(())
  305    382   
        })?;
  306    383   
        Ok(builder.build())
  307    384   
    }
  308    385   
}
  309    386   
impl ::aws_types::request_id::RequestId for GetLayerVersionByArnOutput {

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