AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12

Files changed:

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| {
         262  +
            match member.member_index() {
         263  +
                Some(0) => {
         264  +
                    builder.content = Some(crate::types::LayerVersionContentOutput::deserialize(deser)?);
         265  +
                }
         266  +
                Some(1) => {
         267  +
                    builder.layer_arn = Some(deser.read_string(member)?);
         268  +
                }
         269  +
                Some(2) => {
         270  +
                    builder.layer_version_arn = Some(deser.read_string(member)?);
         271  +
                }
         272  +
                Some(3) => {
         273  +
                    builder.description = Some(deser.read_string(member)?);
         274  +
                }
         275  +
                Some(4) => {
         276  +
                    builder.created_date = Some(deser.read_string(member)?);
         277  +
                }
         278  +
                Some(5) => {
         279  +
                    builder.version = Some(deser.read_long(member)?);
         280  +
                }
         281  +
                Some(6) => {
         282  +
                    builder.compatible_runtimes = Some({
         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
         289  +
                    });
         290  +
                }
         291  +
                Some(7) => {
         292  +
                    builder.license_info = Some(deser.read_string(member)?);
         293  +
                }
         294  +
                Some(8) => {
         295  +
                    builder.compatible_architectures = Some({
         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| {
  254    337   
            match member.member_index() {
  255    338   
                Some(0) => {
  256    339   
                    builder.content = Some(crate::types::LayerVersionContentOutput::deserialize(deser)?);
  257    340   
                }
  258    341   
                Some(1) => {
  259    342   
                    builder.layer_arn = Some(deser.read_string(member)?);
  260    343   
                }
  261    344   
                Some(2) => {
  262    345   
                    builder.layer_version_arn = Some(deser.read_string(member)?);
  263    346   
                }
  264    347   
                Some(3) => {
  265    348   
                    builder.description = Some(deser.read_string(member)?);
  266    349   
                }
  267    350   
                Some(4) => {
  268    351   
                    builder.created_date = Some(deser.read_string(member)?);
  269    352   
                }
  270    353   
                Some(5) => {
  271    354   
                    builder.version = Some(deser.read_long(member)?);
  272    355   
                }
  273    356   
                Some(6) => {
  274    357   
                    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         -
                        })?
         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
  284    364   
                    });
  285    365   
                }
  286    366   
                Some(7) => {
  287    367   
                    builder.license_info = Some(deser.read_string(member)?);
  288    368   
                }
  289    369   
                Some(8) => {
  290    370   
                    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         -
                        })?
         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,393 @@
  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)
         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  +
                }
         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_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  +
            ))
  160    288   
        } else {
  161         -
            crate::protocol_serde::shape_get_layer_version_policy::de_get_layer_version_policy_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         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         -
                    ));
         323  +
        let protocol = _cfg
         324  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         325  +
            .expect("a SharedClientProtocol is required");
         326  +
        if protocol.supports_http_bindings() {
         327  +
            let mut request = protocol
         328  +
                .serialize_body(&input, GetLayerVersionPolicy::INPUT_SCHEMA, "", _cfg)
         329  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         330  +
            {
         331  +
                let mut uri = "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy".to_string();
         332  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         333  +
                if let Some(ref val) = input.layer_name {
         334  +
                    uri = uri.replace("{LayerName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  199    335   
                }
  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         -
                    ));
         336  +
                if let Some(ref val) = input.version_number {
         337  +
                    uri = uri.replace("{VersionNumber}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  211    338   
                }
  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))
         339  +
                if !query_params.is_empty() {
         340  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         341  +
                    let pairs: Vec<String> = query_params
         342  +
                        .iter()
         343  +
                        .map(|(k, v)| {
         344  +
                            format!(
         345  +
                                "{}={}",
         346  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         347  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         348  +
                            )
         349  +
                        })
         350  +
                        .collect();
         351  +
                    uri.push_str(&pairs.join("&"));
         352  +
                }
         353  +
                request.set_uri(uri.as_str()).expect("valid URI");
  229    354   
            }
  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("");
  234    355   
  235         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         356  +
            return ::std::result::Result::Ok(request);
         357  +
        } else {
         358  +
            let mut request = protocol
         359  +
                .serialize_request(&input, GetLayerVersionPolicy::INPUT_SCHEMA, "", _cfg)
         360  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         361  +
         362  +
            return ::std::result::Result::Ok(request);
         363  +
        }
  236    364   
    }
  237    365   
}
  238    366   
#[derive(Debug)]
  239    367   
struct GetLayerVersionPolicyEndpointParamsInterceptor;
  240    368   
  241    369   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetLayerVersionPolicyEndpointParamsInterceptor {
  242    370   
    fn name(&self) -> &'static str {
  243    371   
        "GetLayerVersionPolicyEndpointParamsInterceptor"
  244    372   
    }
  245    373   

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

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

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

@@ -4,4 +118,166 @@
   24     24   
    "com.amazonaws.lambda.synthetic",
   25     25   
    "GetLayerVersionPolicyOutput",
   26     26   
);
   27     27   
static GETLAYERVERSIONPOLICYOUTPUT_MEMBER_POLICY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   28     28   
    ::aws_smithy_schema::ShapeId::from_static(
   29     29   
        "com.amazonaws.lambda.synthetic#GetLayerVersionPolicyOutput$Policy",
   30     30   
        "com.amazonaws.lambda.synthetic",
   31     31   
        "GetLayerVersionPolicyOutput",
   32     32   
    ),
   33     33   
    ::aws_smithy_schema::ShapeType::String,
   34         -
    "policy",
          34  +
    "Policy",
   35     35   
    0,
   36     36   
);
   37     37   
static GETLAYERVERSIONPOLICYOUTPUT_MEMBER_REVISION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   38     38   
    ::aws_smithy_schema::ShapeId::from_static(
   39     39   
        "com.amazonaws.lambda.synthetic#GetLayerVersionPolicyOutput$RevisionId",
   40     40   
        "com.amazonaws.lambda.synthetic",
   41     41   
        "GetLayerVersionPolicyOutput",
   42     42   
    ),
   43     43   
    ::aws_smithy_schema::ShapeType::String,
   44         -
    "revision_id",
          44  +
    "RevisionId",
   45     45   
    1,
   46     46   
);
          47  +
static GETLAYERVERSIONPOLICYOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          48  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          49  +
    ::aws_smithy_schema::ShapeType::String,
          50  +
    "request_id",
          51  +
    2,
          52  +
)
          53  +
.with_http_header("x-amzn-requestid");
   47     54   
static GETLAYERVERSIONPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   48     55   
    GETLAYERVERSIONPOLICYOUTPUT_SCHEMA_ID,
   49     56   
    ::aws_smithy_schema::ShapeType::Structure,
   50     57   
    &[
   51     58   
        &GETLAYERVERSIONPOLICYOUTPUT_MEMBER_POLICY,
   52     59   
        &GETLAYERVERSIONPOLICYOUTPUT_MEMBER_REVISION_ID,
          60  +
        &GETLAYERVERSIONPOLICYOUTPUT_MEMBER__REQUEST_ID,
   53     61   
    ],
   54     62   
);
   55     63   
impl GetLayerVersionPolicyOutput {
   56     64   
    /// The schema for this shape.
   57     65   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETLAYERVERSIONPOLICYOUTPUT_SCHEMA;
   58     66   
}
   59     67   
impl ::aws_smithy_schema::serde::SerializableStruct for GetLayerVersionPolicyOutput {
   60     68   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   61     69   
    fn serialize_members(
   62     70   
        &self,
   63     71   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   64     72   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   65     73   
        if let Some(ref val) = self.policy {
   66     74   
            ser.write_string(&GETLAYERVERSIONPOLICYOUTPUT_MEMBER_POLICY, val)?;
   67     75   
        }
   68     76   
        if let Some(ref val) = self.revision_id {
   69     77   
            ser.write_string(&GETLAYERVERSIONPOLICYOUTPUT_MEMBER_REVISION_ID, val)?;
   70     78   
        }
   71     79   
        Ok(())
   72     80   
    }
   73     81   
}
   74     82   
impl GetLayerVersionPolicyOutput {
   75     83   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   76         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   77         -
        deserializer: &mut D,
          84  +
    pub fn deserialize(
          85  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          86  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          87  +
        #[allow(unused_variables, unused_mut)]
          88  +
        let mut builder = Self::builder();
          89  +
        #[allow(
          90  +
            unused_variables,
          91  +
            unreachable_code,
          92  +
            clippy::single_match,
          93  +
            clippy::match_single_binding,
          94  +
            clippy::diverging_sub_expression
          95  +
        )]
          96  +
        deserializer.read_struct(&GETLAYERVERSIONPOLICYOUTPUT_SCHEMA, &mut |member, deser| {
          97  +
            match member.member_index() {
          98  +
                Some(0) => {
          99  +
                    builder.policy = Some(deser.read_string(member)?);
         100  +
                }
         101  +
                Some(1) => {
         102  +
                    builder.revision_id = Some(deser.read_string(member)?);
         103  +
                }
         104  +
                Some(2) => {
         105  +
                    builder._request_id = Some(deser.read_string(member)?);
         106  +
                }
         107  +
                _ => {}
         108  +
            }
         109  +
            Ok(())
         110  +
        })?;
         111  +
        Ok(builder.build())
         112  +
    }
         113  +
}
         114  +
impl GetLayerVersionPolicyOutput {
         115  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         116  +
    /// Header-bound members are read directly from headers, avoiding runtime
         117  +
    /// member iteration overhead. Body members are read via the deserializer.
         118  +
    pub fn deserialize_with_response(
         119  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         120  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         121  +
        _status: u16,
         122  +
        _body: &[u8],
   78    123   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   79    124   
        #[allow(unused_variables, unused_mut)]
   80    125   
        let mut builder = Self::builder();
         126  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         127  +
            builder._request_id = Some(val.to_string());
         128  +
        }
   81    129   
        #[allow(
   82    130   
            unused_variables,
   83    131   
            unreachable_code,
   84    132   
            clippy::single_match,
   85    133   
            clippy::match_single_binding,
   86    134   
            clippy::diverging_sub_expression
   87    135   
        )]
   88         -
        deserializer.read_struct(&GETLAYERVERSIONPOLICYOUTPUT_SCHEMA, (), |_, member, deser| {
         136  +
        deserializer.read_struct(&GETLAYERVERSIONPOLICYOUTPUT_SCHEMA, &mut |member, deser| {
   89    137   
            match member.member_index() {
   90    138   
                Some(0) => {
   91    139   
                    builder.policy = Some(deser.read_string(member)?);
   92    140   
                }
   93    141   
                Some(1) => {
   94    142   
                    builder.revision_id = Some(deser.read_string(member)?);
   95    143   
                }
   96    144   
                _ => {}
   97    145   
            }
   98    146   
            Ok(())

tmp-codegen-diff/aws-sdk/sdk/lambda/src/operation/get_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 `GetPolicy`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct GetPolicy;
    6      6   
impl GetPolicy {
    7      7   
    /// Creates a new `GetPolicy`
    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_policy::GetPolicyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::get_policy::GetPolicyOutput::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_policy::GetPolicyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::get_policy::GetPolicyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::get_policy::GetPolicyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +256,382 @@
  135    139   
                crate::operation::get_policy::GetPolicyError,
  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 GetPolicyResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetPolicyResponseDeserializer {
  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_policy::de_get_policy_http_error(status, headers, body)
         158  +
        if !success && status != 200 || force_error {
         159  +
            let headers = response.headers();
         160  +
            let body = response.body().bytes().expect("body loaded");
         161  +
            #[allow(unused_mut)]
         162  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         163  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         164  +
            })?;
         165  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         166  +
            let generic = generic_builder.build();
         167  +
            let error_code = match generic.code() {
         168  +
                ::std::option::Option::Some(code) => code,
         169  +
                ::std::option::Option::None => {
         170  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         171  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::get_policy::GetPolicyError::unhandled(generic)),
         172  +
                    ))
         173  +
                }
         174  +
            };
         175  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         176  +
            let protocol = _cfg
         177  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         178  +
                .expect("a SharedClientProtocol is required");
         179  +
            let err = match error_code {
         180  +
                "InvalidParameterValueException" => crate::operation::get_policy::GetPolicyError::InvalidParameterValueException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::InvalidParameterValueException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
         197  +
                    };
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "ResourceNotFoundException" => crate::operation::get_policy::GetPolicyError::ResourceNotFoundException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "ServiceException" => crate::operation::get_policy::GetPolicyError::ServiceException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::ServiceException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::ServiceException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "TooManyRequestsException" => crate::operation::get_policy::GetPolicyError::TooManyRequestsException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::TooManyRequestsException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::TooManyRequestsException::deserialize_with_response(
         257  +
                                &mut *deser,
         258  +
                                response.headers(),
         259  +
                                response.status().into(),
         260  +
                                body,
         261  +
                            )
         262  +
                        }) {
         263  +
                        ::std::result::Result::Ok(val) => val,
         264  +
                        ::std::result::Result::Err(e) => {
         265  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         266  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         267  +
                            ))
         268  +
                        }
         269  +
                    };
         270  +
                    tmp.meta = generic;
         271  +
                    if tmp.message.is_none() {
         272  +
                        tmp.message = _error_message;
         273  +
                    }
         274  +
                    tmp
         275  +
                }),
         276  +
                _ => crate::operation::get_policy::GetPolicyError::generic(generic),
         277  +
            };
         278  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         279  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         280  +
            ))
  157    281   
        } else {
  158         -
            crate::protocol_serde::shape_get_policy::de_get_policy_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         282  +
            let protocol = _cfg
         283  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         284  +
                .expect("a SharedClientProtocol is required");
         285  +
            let mut deser = protocol.deserialize_response(response, GetPolicy::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         286  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         287  +
            })?;
         288  +
            let body = response.body().bytes().expect("body loaded");
         289  +
            let output = crate::operation::get_policy::GetPolicyOutput::deserialize_with_response(
         290  +
                &mut *deser,
         291  +
                response.headers(),
         292  +
                response.status().into(),
         293  +
                body,
         294  +
            )
         295  +
            .map_err(|e| {
         296  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         297  +
            })?;
         298  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         299  +
        }
  161    300   
    }
  162    301   
}
  163    302   
#[derive(Debug)]
  164    303   
struct GetPolicyRequestSerializer;
  165    304   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetPolicyRequestSerializer {
  166    305   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    306   
    fn serialize_input(
  168    307   
        &self,
  169    308   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    309   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    310   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    311   
        let input = input.downcast::<crate::operation::get_policy::GetPolicyInput>().expect("correct type");
  173         -
        let _header_serialization_settings = _cfg
  174         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  175         -
            .cloned()
  176         -
            .unwrap_or_default();
  177         -
        let mut request_builder = {
  178         -
            #[allow(clippy::uninlined_format_args)]
  179         -
            fn uri_base(
  180         -
                _input: &crate::operation::get_policy::GetPolicyInput,
  181         -
                output: &mut ::std::string::String,
  182         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  183         -
                use ::std::fmt::Write as _;
  184         -
                let input_1 = &_input.function_name;
  185         -
                let input_1 = input_1
  186         -
                    .as_ref()
  187         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("function_name", "cannot be empty or unset"))?;
  188         -
                let function_name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  189         -
                if function_name.is_empty() {
  190         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  191         -
                        "function_name",
  192         -
                        "cannot be empty or unset",
  193         -
                    ));
         312  +
        let protocol = _cfg
         313  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         314  +
            .expect("a SharedClientProtocol is required");
         315  +
        if protocol.supports_http_bindings() {
         316  +
            let mut request = protocol
         317  +
                .serialize_body(&input, GetPolicy::INPUT_SCHEMA, "", _cfg)
         318  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         319  +
            {
         320  +
                let mut uri = "/2015-03-31/functions/{FunctionName}/policy".to_string();
         321  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         322  +
                if let Some(ref val) = input.function_name {
         323  +
                    uri = uri.replace("{FunctionName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  194    324   
                }
  195         -
                ::std::write!(output, "/2015-03-31/functions/{FunctionName}/policy", FunctionName = function_name)
  196         -
                    .expect("formatting should succeed");
  197         -
                ::std::result::Result::Ok(())
  198         -
            }
  199         -
            fn uri_query(
  200         -
                _input: &crate::operation::get_policy::GetPolicyInput,
  201         -
                mut output: &mut ::std::string::String,
  202         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  203         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  204         -
                if let ::std::option::Option::Some(inner_2) = &_input.qualifier {
  205         -
                    {
  206         -
                        query.push_kv("Qualifier", &::aws_smithy_http::query::fmt_string(inner_2));
  207         -
                    }
         325  +
                if let Some(ref val) = input.qualifier {
         326  +
                    query_params.push(("Qualifier".to_string(), val.to_string()));
  208    327   
                }
  209         -
                ::std::result::Result::Ok(())
  210         -
            }
  211         -
            #[allow(clippy::unnecessary_wraps)]
  212         -
            fn update_http_builder(
  213         -
                input: &crate::operation::get_policy::GetPolicyInput,
  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))
         328  +
                if !query_params.is_empty() {
         329  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         330  +
                    let pairs: Vec<String> = query_params
         331  +
                        .iter()
         332  +
                        .map(|(k, v)| {
         333  +
                            format!(
         334  +
                                "{}={}",
         335  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         336  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         337  +
                            )
         338  +
                        })
         339  +
                        .collect();
         340  +
                    uri.push_str(&pairs.join("&"));
         341  +
                }
         342  +
                request.set_uri(uri.as_str()).expect("valid URI");
  220    343   
            }
  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("");
  225    344   
  226         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         345  +
            return ::std::result::Result::Ok(request);
         346  +
        } else {
         347  +
            let mut request = protocol
         348  +
                .serialize_request(&input, GetPolicy::INPUT_SCHEMA, "", _cfg)
         349  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         350  +
         351  +
            return ::std::result::Result::Ok(request);
         352  +
        }
  227    353   
    }
  228    354   
}
  229    355   
#[derive(Debug)]
  230    356   
struct GetPolicyEndpointParamsInterceptor;
  231    357   
  232    358   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetPolicyEndpointParamsInterceptor {
  233    359   
    fn name(&self) -> &'static str {
  234    360   
        "GetPolicyEndpointParamsInterceptor"
  235    361   
    }
  236    362   

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

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

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

@@ -4,4 +115,166 @@
   24     24   
    "com.amazonaws.lambda.synthetic",
   25     25   
    "GetPolicyOutput",
   26     26   
);
   27     27   
static GETPOLICYOUTPUT_MEMBER_POLICY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   28     28   
    ::aws_smithy_schema::ShapeId::from_static(
   29     29   
        "com.amazonaws.lambda.synthetic#GetPolicyOutput$Policy",
   30     30   
        "com.amazonaws.lambda.synthetic",
   31     31   
        "GetPolicyOutput",
   32     32   
    ),
   33     33   
    ::aws_smithy_schema::ShapeType::String,
   34         -
    "policy",
          34  +
    "Policy",
   35     35   
    0,
   36     36   
);
   37     37   
static GETPOLICYOUTPUT_MEMBER_REVISION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   38     38   
    ::aws_smithy_schema::ShapeId::from_static(
   39     39   
        "com.amazonaws.lambda.synthetic#GetPolicyOutput$RevisionId",
   40     40   
        "com.amazonaws.lambda.synthetic",
   41     41   
        "GetPolicyOutput",
   42     42   
    ),
   43     43   
    ::aws_smithy_schema::ShapeType::String,
   44         -
    "revision_id",
          44  +
    "RevisionId",
   45     45   
    1,
   46     46   
);
          47  +
static GETPOLICYOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          48  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          49  +
    ::aws_smithy_schema::ShapeType::String,
          50  +
    "request_id",
          51  +
    2,
          52  +
)
          53  +
.with_http_header("x-amzn-requestid");
   47     54   
static GETPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   48     55   
    GETPOLICYOUTPUT_SCHEMA_ID,
   49     56   
    ::aws_smithy_schema::ShapeType::Structure,
   50         -
    &[&GETPOLICYOUTPUT_MEMBER_POLICY, &GETPOLICYOUTPUT_MEMBER_REVISION_ID],
          57  +
    &[
          58  +
        &GETPOLICYOUTPUT_MEMBER_POLICY,
          59  +
        &GETPOLICYOUTPUT_MEMBER_REVISION_ID,
          60  +
        &GETPOLICYOUTPUT_MEMBER__REQUEST_ID,
          61  +
    ],
   51     62   
);
   52     63   
impl GetPolicyOutput {
   53     64   
    /// The schema for this shape.
   54     65   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETPOLICYOUTPUT_SCHEMA;
   55     66   
}
   56     67   
impl ::aws_smithy_schema::serde::SerializableStruct for GetPolicyOutput {
   57     68   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   58     69   
    fn serialize_members(
   59     70   
        &self,
   60     71   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   61     72   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   62     73   
        if let Some(ref val) = self.policy {
   63     74   
            ser.write_string(&GETPOLICYOUTPUT_MEMBER_POLICY, val)?;
   64     75   
        }
   65     76   
        if let Some(ref val) = self.revision_id {
   66     77   
            ser.write_string(&GETPOLICYOUTPUT_MEMBER_REVISION_ID, val)?;
   67     78   
        }
   68     79   
        Ok(())
   69     80   
    }
   70     81   
}
   71     82   
impl GetPolicyOutput {
   72     83   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   73         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   74         -
        deserializer: &mut D,
          84  +
    pub fn deserialize(
          85  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          86  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          87  +
        #[allow(unused_variables, unused_mut)]
          88  +
        let mut builder = Self::builder();
          89  +
        #[allow(
          90  +
            unused_variables,
          91  +
            unreachable_code,
          92  +
            clippy::single_match,
          93  +
            clippy::match_single_binding,
          94  +
            clippy::diverging_sub_expression
          95  +
        )]
          96  +
        deserializer.read_struct(&GETPOLICYOUTPUT_SCHEMA, &mut |member, deser| {
          97  +
            match member.member_index() {
          98  +
                Some(0) => {
          99  +
                    builder.policy = Some(deser.read_string(member)?);
         100  +
                }
         101  +
                Some(1) => {
         102  +
                    builder.revision_id = Some(deser.read_string(member)?);
         103  +
                }
         104  +
                Some(2) => {
         105  +
                    builder._request_id = Some(deser.read_string(member)?);
         106  +
                }
         107  +
                _ => {}
         108  +
            }
         109  +
            Ok(())
         110  +
        })?;
         111  +
        Ok(builder.build())
         112  +
    }
         113  +
}
         114  +
impl GetPolicyOutput {
         115  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         116  +
    /// Header-bound members are read directly from headers, avoiding runtime
         117  +
    /// member iteration overhead. Body members are read via the deserializer.
         118  +
    pub fn deserialize_with_response(
         119  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         120  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         121  +
        _status: u16,
         122  +
        _body: &[u8],
   75    123   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   76    124   
        #[allow(unused_variables, unused_mut)]
   77    125   
        let mut builder = Self::builder();
         126  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         127  +
            builder._request_id = Some(val.to_string());
         128  +
        }
   78    129   
        #[allow(
   79    130   
            unused_variables,
   80    131   
            unreachable_code,
   81    132   
            clippy::single_match,
   82    133   
            clippy::match_single_binding,
   83    134   
            clippy::diverging_sub_expression
   84    135   
        )]
   85         -
        deserializer.read_struct(&GETPOLICYOUTPUT_SCHEMA, (), |_, member, deser| {
         136  +
        deserializer.read_struct(&GETPOLICYOUTPUT_SCHEMA, &mut |member, deser| {
   86    137   
            match member.member_index() {
   87    138   
                Some(0) => {
   88    139   
                    builder.policy = Some(deser.read_string(member)?);
   89    140   
                }
   90    141   
                Some(1) => {
   91    142   
                    builder.revision_id = Some(deser.read_string(member)?);
   92    143   
                }
   93    144   
                _ => {}
   94    145   
            }
   95    146   
            Ok(())

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

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