AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c

Files changed:

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde.rs

@@ -1,1 +492,0 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn parse_http_error_metadata(
           3  +
    _response_status: u16,
           4  +
    response_headers: &::aws_smithy_runtime_api::http::Headers,
           5  +
    response_body: &[u8],
           6  +
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
           7  +
    crate::json_errors::parse_error_metadata(response_body, response_headers)
           8  +
}
           9  +
    2     10   
pub(crate) fn type_erase_result<O, E>(
    3     11   
    result: ::std::result::Result<O, E>,
    4     12   
) -> ::std::result::Result<
    5     13   
    ::aws_smithy_runtime_api::client::interceptors::context::Output,
    6     14   
    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
    7     15   
>
    8     16   
where
    9     17   
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   10     18   
    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   11     19   
{
   12     20   
    result
   13     21   
        .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
   14     22   
        .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
   15     23   
        .map_err(::std::convert::Into::into)
   16     24   
}
   17     25   
   18         -
pub fn parse_http_error_metadata(
   19         -
    _response_status: u16,
   20         -
    response_headers: &::aws_smithy_runtime_api::http::Headers,
   21         -
    response_body: &[u8],
   22         -
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
   23         -
    crate::json_errors::parse_error_metadata(response_body, response_headers)
   24         -
}
   25         -
   26         -
pub(crate) mod shape_add_layer_version_permission;
   27         -
   28         -
pub(crate) mod shape_add_permission;
   29         -
   30         -
pub(crate) mod shape_create_alias;
   31         -
   32         -
pub(crate) mod shape_create_code_signing_config;
   33         -
   34         -
pub(crate) mod shape_create_event_source_mapping;
   35         -
   36         -
pub(crate) mod shape_create_function;
   37         -
   38         -
pub(crate) mod shape_create_function_url_config;
   39         -
   40         -
pub(crate) mod shape_delete_alias;
   41         -
   42         -
pub(crate) mod shape_delete_code_signing_config;
   43         -
   44         -
pub(crate) mod shape_delete_event_source_mapping;
   45         -
   46         -
pub(crate) mod shape_delete_function;
   47         -
   48         -
pub(crate) mod shape_delete_function_code_signing_config;
   49         -
   50         -
pub(crate) mod shape_delete_function_concurrency;
   51         -
   52         -
pub(crate) mod shape_delete_function_event_invoke_config;
   53         -
   54         -
pub(crate) mod shape_delete_function_url_config;
   55         -
   56         -
pub(crate) mod shape_delete_layer_version;
   57         -
   58         -
pub(crate) mod shape_delete_provisioned_concurrency_config;
   59         -
   60         -
pub(crate) mod shape_get_account_settings;
   61         -
   62         -
pub(crate) mod shape_get_alias;
   63         -
   64         -
pub(crate) mod shape_get_code_signing_config;
   65         -
   66         -
pub(crate) mod shape_get_event_source_mapping;
   67         -
   68         -
pub(crate) mod shape_get_function;
   69         -
   70         -
pub(crate) mod shape_get_function_code_signing_config;
   71         -
   72         -
pub(crate) mod shape_get_function_concurrency;
   73         -
   74         -
pub(crate) mod shape_get_function_configuration;
   75         -
   76         -
pub(crate) mod shape_get_function_event_invoke_config;
   77         -
   78         -
pub(crate) mod shape_get_function_recursion_config;
   79         -
   80         -
pub(crate) mod shape_get_function_url_config;
   81         -
   82         -
pub(crate) mod shape_get_layer_version;
   83         -
   84         -
pub(crate) mod shape_get_layer_version_by_arn;
   85         -
   86         -
pub(crate) mod shape_get_layer_version_policy;
   87         -
   88         -
pub(crate) mod shape_get_policy;
   89         -
   90         -
pub(crate) mod shape_get_provisioned_concurrency_config;
   91         -
   92         -
pub(crate) mod shape_get_runtime_management_config;
   93         -
   94         -
pub(crate) mod shape_invoke;
   95         -
   96         -
pub(crate) mod shape_invoke_async;
   97         -
   98         -
pub(crate) mod shape_invoke_async_input;
   99         -
  100         -
pub(crate) mod shape_invoke_input;
  101         -
  102     26   
pub(crate) mod shape_invoke_with_response_stream;
  103     27   
  104         -
pub(crate) mod shape_invoke_with_response_stream_input;
  105         -
  106         -
pub(crate) mod shape_list_aliases;
  107         -
  108         -
pub(crate) mod shape_list_code_signing_configs;
  109         -
  110         -
pub(crate) mod shape_list_event_source_mappings;
  111         -
  112         -
pub(crate) mod shape_list_function_event_invoke_configs;
  113         -
  114         -
pub(crate) mod shape_list_function_url_configs;
  115         -
  116         -
pub(crate) mod shape_list_functions;
  117         -
  118         -
pub(crate) mod shape_list_functions_by_code_signing_config;
  119         -
  120         -
pub(crate) mod shape_list_layer_versions;
  121         -
  122         -
pub(crate) mod shape_list_layers;
  123         -
  124         -
pub(crate) mod shape_list_provisioned_concurrency_configs;
  125         -
  126         -
pub(crate) mod shape_list_tags;
  127         -
  128         -
pub(crate) mod shape_list_versions_by_function;
  129         -
  130         -
pub(crate) mod shape_publish_layer_version;
  131         -
  132         -
pub(crate) mod shape_publish_version;
  133         -
  134         -
pub(crate) mod shape_put_function_code_signing_config;
  135         -
  136         -
pub(crate) mod shape_put_function_concurrency;
  137         -
  138         -
pub(crate) mod shape_put_function_event_invoke_config;
  139         -
  140         -
pub(crate) mod shape_put_function_recursion_config;
  141         -
  142         -
pub(crate) mod shape_put_provisioned_concurrency_config;
  143         -
  144         -
pub(crate) mod shape_put_runtime_management_config;
  145         -
  146         -
pub(crate) mod shape_remove_layer_version_permission;
  147         -
  148         -
pub(crate) mod shape_remove_permission;
  149         -
  150         -
pub(crate) mod shape_tag_resource;
  151         -
  152         -
pub(crate) mod shape_untag_resource;
  153         -
  154         -
pub(crate) mod shape_update_alias;
  155         -
  156         -
pub(crate) mod shape_update_code_signing_config;
  157         -
  158         -
pub(crate) mod shape_update_event_source_mapping;
  159         -
  160         -
pub(crate) mod shape_update_function_code;
  161         -
  162         -
pub(crate) mod shape_update_function_configuration;
  163         -
  164         -
pub(crate) mod shape_update_function_event_invoke_config;
          28  +
pub(crate) mod shape_invoke_with_response_stream_output;
  165     29   
  166         -
pub(crate) mod shape_update_function_url_config;
          30  +
pub fn parse_event_stream_error_metadata(
          31  +
    payload: &::bytes::Bytes,
          32  +
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
          33  +
    crate::json_errors::parse_error_metadata(payload, &::aws_smithy_runtime_api::http::Headers::new())
          34  +
}
  167     35   
  168     36   
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
  169     37   
    if data.is_empty() {
  170     38   
        b"{}"
  171     39   
    } else {
  172     40   
        data
  173     41   
    }
  174     42   
}
  175     43   
  176         -
pub(crate) mod shape_add_layer_version_permission_input;
  177         -
  178         -
pub(crate) mod shape_add_permission_input;
  179         -
  180         -
pub(crate) mod shape_code_signing_config_not_found_exception;
  181         -
  182         -
pub(crate) mod shape_code_storage_exceeded_exception;
  183         -
  184         -
pub(crate) mod shape_code_verification_failed_exception;
  185         -
  186         -
pub(crate) mod shape_create_alias_input;
  187         -
  188         -
pub(crate) mod shape_create_code_signing_config_input;
  189         -
  190         -
pub(crate) mod shape_create_event_source_mapping_input;
  191         -
  192         -
pub(crate) mod shape_create_function_input;
  193         -
  194         -
pub(crate) mod shape_create_function_url_config_input;
  195         -
  196         -
pub(crate) mod shape_ec2_access_denied_exception;
  197         -
  198         -
pub(crate) mod shape_ec2_throttled_exception;
  199         -
  200         -
pub(crate) mod shape_ec2_unexpected_exception;
  201         -
  202         -
pub(crate) mod shape_efs_mount_connectivity_exception;
  203         -
  204         -
pub(crate) mod shape_efs_mount_failure_exception;
  205         -
  206         -
pub(crate) mod shape_efs_mount_timeout_exception;
  207         -
  208         -
pub(crate) mod shape_efsio_exception;
  209         -
  210         -
pub(crate) mod shape_eni_limit_reached_exception;
  211         -
  212         -
pub(crate) mod shape_invalid_code_signature_exception;
  213         -
  214         -
pub(crate) mod shape_invalid_parameter_value_exception;
  215         -
  216         -
pub(crate) mod shape_invalid_request_content_exception;
  217         -
  218         -
pub(crate) mod shape_invalid_runtime_exception;
  219         -
  220         -
pub(crate) mod shape_invalid_security_group_id_exception;
  221         -
  222         -
pub(crate) mod shape_invalid_subnet_id_exception;
  223         -
  224         -
pub(crate) mod shape_invalid_zip_file_exception;
  225         -
  226         -
pub(crate) mod shape_invoke_output;
  227         -
  228         -
pub(crate) mod shape_invoke_with_response_stream_output;
  229         -
  230         -
pub(crate) mod shape_kms_access_denied_exception;
  231         -
  232         -
pub(crate) mod shape_kms_disabled_exception;
  233         -
  234         -
pub(crate) mod shape_kms_invalid_state_exception;
  235         -
  236         -
pub(crate) mod shape_kms_not_found_exception;
  237         -
  238         -
pub(crate) mod shape_policy_length_exceeded_exception;
  239         -
  240         -
pub(crate) mod shape_precondition_failed_exception;
  241         -
  242         -
pub(crate) mod shape_provisioned_concurrency_config_not_found_exception;
  243         -
  244         -
pub(crate) mod shape_publish_layer_version_input;
  245         -
  246         -
pub(crate) mod shape_publish_version_input;
  247         -
  248         -
pub(crate) mod shape_put_function_code_signing_config_input;
  249         -
  250         -
pub(crate) mod shape_put_function_concurrency_input;
  251         -
  252         -
pub(crate) mod shape_put_function_event_invoke_config_input;
  253         -
  254         -
pub(crate) mod shape_put_function_recursion_config_input;
  255         -
  256         -
pub(crate) mod shape_put_provisioned_concurrency_config_input;
  257         -
  258         -
pub(crate) mod shape_put_runtime_management_config_input;
  259         -
  260         -
pub(crate) mod shape_recursive_invocation_exception;
  261         -
  262         -
pub(crate) mod shape_request_too_large_exception;
  263         -
  264         -
pub(crate) mod shape_resource_conflict_exception;
  265         -
  266         -
pub(crate) mod shape_resource_in_use_exception;
  267         -
  268         -
pub(crate) mod shape_resource_not_found_exception;
  269         -
  270         -
pub(crate) mod shape_resource_not_ready_exception;
  271         -
  272         -
pub(crate) mod shape_service_exception;
  273         -
  274         -
pub(crate) mod shape_snap_start_exception;
  275         -
  276         -
pub(crate) mod shape_snap_start_not_ready_exception;
  277         -
  278         -
pub(crate) mod shape_snap_start_timeout_exception;
  279         -
  280         -
pub(crate) mod shape_subnet_ip_address_limit_reached_exception;
  281         -
  282         -
pub(crate) mod shape_tag_resource_input;
  283         -
  284         -
pub(crate) mod shape_too_many_requests_exception;
  285         -
  286         -
pub(crate) mod shape_unsupported_media_type_exception;
  287         -
  288         -
pub(crate) mod shape_update_alias_input;
  289         -
  290         -
pub(crate) mod shape_update_code_signing_config_input;
  291         -
  292         -
pub(crate) mod shape_update_event_source_mapping_input;
  293         -
  294         -
pub(crate) mod shape_update_function_code_input;
  295         -
  296         -
pub(crate) mod shape_update_function_configuration_input;
  297         -
  298         -
pub(crate) mod shape_update_function_event_invoke_config_input;
  299         -
  300         -
pub(crate) mod shape_update_function_url_config_input;
  301         -
  302         -
pub fn parse_event_stream_error_metadata(
  303         -
    payload: &::bytes::Bytes,
  304         -
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
  305         -
    crate::json_errors::parse_error_metadata(payload, &::aws_smithy_runtime_api::http::Headers::new())
  306         -
}
  307         -
  308         -
pub(crate) mod shape_account_limit;
  309         -
  310         -
pub(crate) mod shape_account_usage;
  311         -
  312         -
pub(crate) mod shape_alias_list;
  313         -
  314         -
pub(crate) mod shape_alias_routing_configuration;
  315         -
  316         -
pub(crate) mod shape_allowed_publishers;
  317         -
  318         -
pub(crate) mod shape_amazon_managed_kafka_event_source_config;
  319         -
  320         -
pub(crate) mod shape_architectures_list;
  321         -
  322         -
pub(crate) mod shape_code_signing_config;
  323         -
  324         -
pub(crate) mod shape_code_signing_config_list;
  325         -
  326         -
pub(crate) mod shape_code_signing_policies;
  327         -
  328         -
pub(crate) mod shape_compatible_architectures;
  329         -
  330         -
pub(crate) mod shape_compatible_runtimes;
  331         -
  332         -
pub(crate) mod shape_concurrency;
  333         -
  334         -
pub(crate) mod shape_cors;
  335         -
  336         -
pub(crate) mod shape_dead_letter_config;
  337         -
  338         -
pub(crate) mod shape_destination_config;
  339         -
  340         -
pub(crate) mod shape_document_db_event_source_config;
  341         -
  342         -
pub(crate) mod shape_environment;
  343         -
  344         -
pub(crate) mod shape_environment_response;
  345         -
  346         -
pub(crate) mod shape_ephemeral_storage;
  347         -
  348         -
pub(crate) mod shape_event_source_mapping_metrics_config;
  349         -
  350         -
pub(crate) mod shape_event_source_mappings_list;
  351         -
  352         -
pub(crate) mod shape_file_system_config;
  353         -
  354         -
pub(crate) mod shape_file_system_config_list;
  355         -
  356         -
pub(crate) mod shape_filter_criteria;
  357         -
  358         -
pub(crate) mod shape_filter_criteria_error;
  359         -
  360         -
pub(crate) mod shape_function_arn_list;
  361         -
  362         -
pub(crate) mod shape_function_code;
  363         -
  364         -
pub(crate) mod shape_function_code_location;
  365         -
  366         -
pub(crate) mod shape_function_configuration;
  367         -
  368         -
pub(crate) mod shape_function_event_invoke_config_list;
  369         -
  370         -
pub(crate) mod shape_function_list;
  371         -
  372         -
pub(crate) mod shape_function_response_type_list;
  373         -
  374         -
pub(crate) mod shape_function_url_config_list;
  375         -
  376         -
pub(crate) mod shape_image_config;
  377         -
  378         -
pub(crate) mod shape_image_config_response;
  379         -
  380         -
pub(crate) mod shape_layer_version_content_input;
  381         -
  382         -
pub(crate) mod shape_layer_version_content_output;
  383         -
  384         -
pub(crate) mod shape_layer_versions_list;
  385         -
  386         -
pub(crate) mod shape_layers_list;
  387         -
  388         -
pub(crate) mod shape_layers_reference_list;
  389         -
  390         -
pub(crate) mod shape_logging_config;
  391         -
  392         -
pub(crate) mod shape_provisioned_concurrency_config_list;
  393         -
  394         -
pub(crate) mod shape_provisioned_poller_config;
  395         -
  396         -
pub(crate) mod shape_queues;
  397         -
  398         -
pub(crate) mod shape_runtime_version_config;
  399         -
  400         -
pub(crate) mod shape_scaling_config;
  401         -
  402         -
pub(crate) mod shape_self_managed_event_source;
  403         -
  404         -
pub(crate) mod shape_self_managed_kafka_event_source_config;
  405         -
  406         -
pub(crate) mod shape_snap_start;
  407         -
  408         -
pub(crate) mod shape_snap_start_response;
  409         -
  410         -
pub(crate) mod shape_source_access_configuration;
  411         -
  412         -
pub(crate) mod shape_source_access_configurations;
  413         -
  414         -
pub(crate) mod shape_tags;
  415         -
  416         -
pub(crate) mod shape_tags_error;
  417         -
  418         -
pub(crate) mod shape_topics;
  419         -
  420         -
pub(crate) mod shape_tracing_config;
  421         -
  422         -
pub(crate) mod shape_tracing_config_response;
  423         -
  424         -
pub(crate) mod shape_vpc_config;
  425         -
  426         -
pub(crate) mod shape_vpc_config_response;
  427         -
  428         -
pub(crate) mod shape_additional_version_weights;
  429         -
  430         -
pub(crate) mod shape_alias_configuration;
  431         -
  432         -
pub(crate) mod shape_allow_methods_list;
  433         -
  434         -
pub(crate) mod shape_allow_origins_list;
  435         -
  436         -
pub(crate) mod shape_endpoints;
  437         -
  438         -
pub(crate) mod shape_environment_error;
  439         -
  440         -
pub(crate) mod shape_environment_variables;
  441         -
  442         -
pub(crate) mod shape_event_source_mapping_configuration;
  443         -
  444         -
pub(crate) mod shape_event_source_mapping_metric_list;
  445         -
  446         -
pub(crate) mod shape_filter;
  447         -
  448         -
pub(crate) mod shape_filter_list;
  449         -
  450         -
pub(crate) mod shape_function_event_invoke_config;
  451         -
  452         -
pub(crate) mod shape_function_url_config;
  453         -
  454         -
pub(crate) mod shape_headers_list;
  455         -
  456         -
pub(crate) mod shape_image_config_error;
  457         -
  458     44   
pub(crate) mod shape_invoke_with_response_stream_complete_event;
  459         -
  460         -
pub(crate) mod shape_kafka_schema_registry_config;
  461         -
  462         -
pub(crate) mod shape_layer;
  463         -
  464         -
pub(crate) mod shape_layer_versions_list_item;
  465         -
  466         -
pub(crate) mod shape_layers_list_item;
  467         -
  468         -
pub(crate) mod shape_on_failure;
  469         -
  470         -
pub(crate) mod shape_on_success;
  471         -
  472         -
pub(crate) mod shape_provisioned_concurrency_config_list_item;
  473         -
  474         -
pub(crate) mod shape_runtime_version_error;
  475         -
  476         -
pub(crate) mod shape_security_group_ids;
  477         -
  478         -
pub(crate) mod shape_subnet_ids;
  479         -
  480         -
pub(crate) mod shape_endpoint_lists;
  481         -
  482         -
pub(crate) mod shape_kafka_schema_registry_access_config;
  483         -
  484         -
pub(crate) mod shape_kafka_schema_registry_access_config_list;
  485         -
  486         -
pub(crate) mod shape_kafka_schema_validation_config;
  487         -
  488         -
pub(crate) mod shape_kafka_schema_validation_config_list;
  489         -
  490         -
pub(crate) mod shape_signing_profile_version_arns;
  491         -
  492         -
pub(crate) mod shape_string_list;

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_account_limit.rs

@@ -1,0 +68,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_account_limit<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::AccountLimit>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   12         -
            #[allow(unused_mut)]
   13         -
            let mut builder = crate::types::builders::AccountLimitBuilder::default();
   14         -
            loop {
   15         -
                match tokens.next().transpose()? {
   16         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   17         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   18         -
                        "TotalCodeSize" => {
   19         -
                            builder = builder.set_total_code_size(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   21         -
                                    .map(i64::try_from)
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "CodeSizeUnzipped" => {
   26         -
                            builder = builder.set_code_size_unzipped(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   28         -
                                    .map(i64::try_from)
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "CodeSizeZipped" => {
   33         -
                            builder = builder.set_code_size_zipped(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   35         -
                                    .map(i64::try_from)
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "ConcurrentExecutions" => {
   40         -
                            builder = builder.set_concurrent_executions(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   42         -
                                    .map(i32::try_from)
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "UnreservedConcurrentExecutions" => {
   47         -
                            builder = builder.set_unreserved_concurrent_executions(
   48         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   49         -
                                    .map(i32::try_from)
   50         -
                                    .transpose()?,
   51         -
                            );
   52         -
                        }
   53         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   54         -
                    },
   55         -
                    other => {
   56         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   57         -
                            "expected object key or end object, found: {other:?}"
   58         -
                        )))
   59         -
                    }
   60         -
                }
   61         -
            }
   62         -
            Ok(Some(builder.build()))
   63         -
        }
   64         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   65         -
            "expected start object or null",
   66         -
        )),
   67         -
    }
   68         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_account_usage.rs

@@ -1,0 +47,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_account_usage<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::AccountUsage>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   12         -
            #[allow(unused_mut)]
   13         -
            let mut builder = crate::types::builders::AccountUsageBuilder::default();
   14         -
            loop {
   15         -
                match tokens.next().transpose()? {
   16         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   17         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   18         -
                        "TotalCodeSize" => {
   19         -
                            builder = builder.set_total_code_size(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   21         -
                                    .map(i64::try_from)
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "FunctionCount" => {
   26         -
                            builder = builder.set_function_count(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   28         -
                                    .map(i64::try_from)
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   33         -
                    },
   34         -
                    other => {
   35         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   36         -
                            "expected object key or end object, found: {other:?}"
   37         -
                        )))
   38         -
                    }
   39         -
                }
   40         -
            }
   41         -
            Ok(Some(builder.build()))
   42         -
        }
   43         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   44         -
            "expected start object or null",
   45         -
        )),
   46         -
    }
   47         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_add_layer_version_permission.rs

@@ -1,0 +228,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_add_layer_version_permission_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::add_layer_version_permission::AddLayerVersionPermissionOutput,
    9         -
    crate::operation::add_layer_version_permission::AddLayerVersionPermissionError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => {
   19         -
            return Err(crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "InvalidParameterValueException" => {
   28         -
            crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::InvalidParameterValueException({
   29         -
                #[allow(unused_mut)]
   30         -
                let mut tmp = {
   31         -
                    #[allow(unused_mut)]
   32         -
                    let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   33         -
                    output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   34         -
                        _response_body,
   35         -
                        output,
   36         -
                    )
   37         -
                    .map_err(crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::unhandled)?;
   38         -
                    let output = output.meta(generic);
   39         -
                    output.build()
   40         -
                };
   41         -
                if tmp.message.is_none() {
   42         -
                    tmp.message = _error_message;
   43         -
                }
   44         -
                tmp
   45         -
            })
   46         -
        }
   47         -
        "PolicyLengthExceededException" => {
   48         -
            crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::PolicyLengthExceededException({
   49         -
                #[allow(unused_mut)]
   50         -
                let mut tmp = {
   51         -
                    #[allow(unused_mut)]
   52         -
                    let mut output = crate::types::error::builders::PolicyLengthExceededExceptionBuilder::default();
   53         -
                    output = crate::protocol_serde::shape_policy_length_exceeded_exception::de_policy_length_exceeded_exception_json_err(
   54         -
                        _response_body,
   55         -
                        output,
   56         -
                    )
   57         -
                    .map_err(crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::unhandled)?;
   58         -
                    let output = output.meta(generic);
   59         -
                    output.build()
   60         -
                };
   61         -
                if tmp.message.is_none() {
   62         -
                    tmp.message = _error_message;
   63         -
                }
   64         -
                tmp
   65         -
            })
   66         -
        }
   67         -
        "PreconditionFailedException" => {
   68         -
            crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::PreconditionFailedException({
   69         -
                #[allow(unused_mut)]
   70         -
                let mut tmp = {
   71         -
                    #[allow(unused_mut)]
   72         -
                    let mut output = crate::types::error::builders::PreconditionFailedExceptionBuilder::default();
   73         -
                    output =
   74         -
                        crate::protocol_serde::shape_precondition_failed_exception::de_precondition_failed_exception_json_err(_response_body, output)
   75         -
                            .map_err(crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::unhandled)?;
   76         -
                    let output = output.meta(generic);
   77         -
                    output.build()
   78         -
                };
   79         -
                if tmp.message.is_none() {
   80         -
                    tmp.message = _error_message;
   81         -
                }
   82         -
                tmp
   83         -
            })
   84         -
        }
   85         -
        "ResourceConflictException" => crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::ResourceConflictException({
   86         -
            #[allow(unused_mut)]
   87         -
            let mut tmp = {
   88         -
                #[allow(unused_mut)]
   89         -
                let mut output = crate::types::error::builders::ResourceConflictExceptionBuilder::default();
   90         -
                output = crate::protocol_serde::shape_resource_conflict_exception::de_resource_conflict_exception_json_err(_response_body, output)
   91         -
                    .map_err(crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::unhandled)?;
   92         -
                let output = output.meta(generic);
   93         -
                output.build()
   94         -
            };
   95         -
            if tmp.message.is_none() {
   96         -
                tmp.message = _error_message;
   97         -
            }
   98         -
            tmp
   99         -
        }),
  100         -
        "ResourceNotFoundException" => crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::ResourceNotFoundException({
  101         -
            #[allow(unused_mut)]
  102         -
            let mut tmp = {
  103         -
                #[allow(unused_mut)]
  104         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
  105         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
  106         -
                    .map_err(crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::unhandled)?;
  107         -
                let output = output.meta(generic);
  108         -
                output.build()
  109         -
            };
  110         -
            if tmp.message.is_none() {
  111         -
                tmp.message = _error_message;
  112         -
            }
  113         -
            tmp
  114         -
        }),
  115         -
        "ServiceException" => crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::ServiceException({
  116         -
            #[allow(unused_mut)]
  117         -
            let mut tmp = {
  118         -
                #[allow(unused_mut)]
  119         -
                let mut output = crate::types::error::builders::ServiceExceptionBuilder::default();
  120         -
                output = crate::protocol_serde::shape_service_exception::de_service_exception_json_err(_response_body, output)
  121         -
                    .map_err(crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::unhandled)?;
  122         -
                let output = output.meta(generic);
  123         -
                output.build()
  124         -
            };
  125         -
            if tmp.message.is_none() {
  126         -
                tmp.message = _error_message;
  127         -
            }
  128         -
            tmp
  129         -
        }),
  130         -
        "TooManyRequestsException" => crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::TooManyRequestsException({
  131         -
            #[allow(unused_mut)]
  132         -
            let mut tmp = {
  133         -
                #[allow(unused_mut)]
  134         -
                let mut output = crate::types::error::builders::TooManyRequestsExceptionBuilder::default();
  135         -
                output = crate::protocol_serde::shape_too_many_requests_exception::de_too_many_requests_exception_json_err(_response_body, output)
  136         -
                    .map_err(crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::unhandled)?;
  137         -
                output = output.set_retry_after_seconds(
  138         -
                    crate::protocol_serde::shape_too_many_requests_exception::de_retry_after_seconds_header(_response_headers).map_err(|_| {
  139         -
                        crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::unhandled(
  140         -
                            "Failed to parse retryAfterSeconds from header `Retry-After",
  141         -
                        )
  142         -
                    })?,
  143         -
                );
  144         -
                let output = output.meta(generic);
  145         -
                output.build()
  146         -
            };
  147         -
            if tmp.message.is_none() {
  148         -
                tmp.message = _error_message;
  149         -
            }
  150         -
            tmp
  151         -
        }),
  152         -
        _ => crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::generic(generic),
  153         -
    })
  154         -
}
  155         -
  156         -
#[allow(clippy::unnecessary_wraps)]
  157         -
pub fn de_add_layer_version_permission_http_response(
  158         -
    _response_status: u16,
  159         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  160         -
    _response_body: &[u8],
  161         -
) -> std::result::Result<
  162         -
    crate::operation::add_layer_version_permission::AddLayerVersionPermissionOutput,
  163         -
    crate::operation::add_layer_version_permission::AddLayerVersionPermissionError,
  164         -
> {
  165         -
    Ok({
  166         -
        #[allow(unused_mut)]
  167         -
        let mut output = crate::operation::add_layer_version_permission::builders::AddLayerVersionPermissionOutputBuilder::default();
  168         -
        output = crate::protocol_serde::shape_add_layer_version_permission::de_add_layer_version_permission(_response_body, output)
  169         -
            .map_err(crate::operation::add_layer_version_permission::AddLayerVersionPermissionError::unhandled)?;
  170         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  171         -
        output.build()
  172         -
    })
  173         -
}
  174         -
  175         -
pub fn ser_add_layer_version_permission_input(
  176         -
    input: &crate::operation::add_layer_version_permission::AddLayerVersionPermissionInput,
  177         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  178         -
    let mut out = String::new();
  179         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  180         -
    crate::protocol_serde::shape_add_layer_version_permission_input::ser_add_layer_version_permission_input_input(&mut object, input)?;
  181         -
    object.finish();
  182         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  183         -
}
  184         -
  185         -
pub(crate) fn de_add_layer_version_permission(
  186         -
    _value: &[u8],
  187         -
    mut builder: crate::operation::add_layer_version_permission::builders::AddLayerVersionPermissionOutputBuilder,
  188         -
) -> ::std::result::Result<
  189         -
    crate::operation::add_layer_version_permission::builders::AddLayerVersionPermissionOutputBuilder,
  190         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  191         -
> {
  192         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  193         -
    let tokens = &mut tokens_owned;
  194         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  195         -
    loop {
  196         -
        match tokens.next().transpose()? {
  197         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  198         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  199         -
                "RevisionId" => {
  200         -
                    builder = builder.set_revision_id(
  201         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  202         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  203         -
                            .transpose()?,
  204         -
                    );
  205         -
                }
  206         -
                "Statement" => {
  207         -
                    builder = builder.set_statement(
  208         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  209         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  210         -
                            .transpose()?,
  211         -
                    );
  212         -
                }
  213         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  214         -
            },
  215         -
            other => {
  216         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  217         -
                    "expected object key or end object, found: {other:?}"
  218         -
                )))
  219         -
            }
  220         -
        }
  221         -
    }
  222         -
    if tokens.next().is_some() {
  223         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  224         -
            "found more JSON tokens after completing parsing",
  225         -
        ));
  226         -
    }
  227         -
    Ok(builder)
  228         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_add_layer_version_permission_input.rs

@@ -1,0 +19,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_add_layer_version_permission_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::add_layer_version_permission::AddLayerVersionPermissionInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.action {
    7         -
        object.key("Action").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.organization_id {
   10         -
        object.key("OrganizationId").string(var_2.as_str());
   11         -
    }
   12         -
    if let Some(var_3) = &input.principal {
   13         -
        object.key("Principal").string(var_3.as_str());
   14         -
    }
   15         -
    if let Some(var_4) = &input.statement_id {
   16         -
        object.key("StatementId").string(var_4.as_str());
   17         -
    }
   18         -
    Ok(())
   19         -
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_add_permission.rs

@@ -1,0 +203,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_add_permission_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::add_permission::AddPermissionOutput, crate::operation::add_permission::AddPermissionError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::add_permission::AddPermissionError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::add_permission::AddPermissionError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "InvalidParameterValueException" => crate::operation::add_permission::AddPermissionError::InvalidParameterValueException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err(
   26         -
                    _response_body,
   27         -
                    output,
   28         -
                )
   29         -
                .map_err(crate::operation::add_permission::AddPermissionError::unhandled)?;
   30         -
                let output = output.meta(generic);
   31         -
                output.build()
   32         -
            };
   33         -
            if tmp.message.is_none() {
   34         -
                tmp.message = _error_message;
   35         -
            }
   36         -
            tmp
   37         -
        }),
   38         -
        "PolicyLengthExceededException" => crate::operation::add_permission::AddPermissionError::PolicyLengthExceededException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::PolicyLengthExceededExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_policy_length_exceeded_exception::de_policy_length_exceeded_exception_json_err(
   44         -
                    _response_body,
   45         -
                    output,
   46         -
                )
   47         -
                .map_err(crate::operation::add_permission::AddPermissionError::unhandled)?;
   48         -
                let output = output.meta(generic);
   49         -
                output.build()
   50         -
            };
   51         -
            if tmp.message.is_none() {
   52         -
                tmp.message = _error_message;
   53         -
            }
   54         -
            tmp
   55         -
        }),
   56         -
        "PreconditionFailedException" => crate::operation::add_permission::AddPermissionError::PreconditionFailedException({
   57         -
            #[allow(unused_mut)]
   58         -
            let mut tmp = {
   59         -
                #[allow(unused_mut)]
   60         -
                let mut output = crate::types::error::builders::PreconditionFailedExceptionBuilder::default();
   61         -
                output =
   62         -
                    crate::protocol_serde::shape_precondition_failed_exception::de_precondition_failed_exception_json_err(_response_body, output)
   63         -
                        .map_err(crate::operation::add_permission::AddPermissionError::unhandled)?;
   64         -
                let output = output.meta(generic);
   65         -
                output.build()
   66         -
            };
   67         -
            if tmp.message.is_none() {
   68         -
                tmp.message = _error_message;
   69         -
            }
   70         -
            tmp
   71         -
        }),
   72         -
        "ResourceConflictException" => crate::operation::add_permission::AddPermissionError::ResourceConflictException({
   73         -
            #[allow(unused_mut)]
   74         -
            let mut tmp = {
   75         -
                #[allow(unused_mut)]
   76         -
                let mut output = crate::types::error::builders::ResourceConflictExceptionBuilder::default();
   77         -
                output = crate::protocol_serde::shape_resource_conflict_exception::de_resource_conflict_exception_json_err(_response_body, output)
   78         -
                    .map_err(crate::operation::add_permission::AddPermissionError::unhandled)?;
   79         -
                let output = output.meta(generic);
   80         -
                output.build()
   81         -
            };
   82         -
            if tmp.message.is_none() {
   83         -
                tmp.message = _error_message;
   84         -
            }
   85         -
            tmp
   86         -
        }),
   87         -
        "ResourceNotFoundException" => crate::operation::add_permission::AddPermissionError::ResourceNotFoundException({
   88         -
            #[allow(unused_mut)]
   89         -
            let mut tmp = {
   90         -
                #[allow(unused_mut)]
   91         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   92         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   93         -
                    .map_err(crate::operation::add_permission::AddPermissionError::unhandled)?;
   94         -
                let output = output.meta(generic);
   95         -
                output.build()
   96         -
            };
   97         -
            if tmp.message.is_none() {
   98         -
                tmp.message = _error_message;
   99         -
            }
  100         -
            tmp
  101         -
        }),
  102         -
        "ServiceException" => crate::operation::add_permission::AddPermissionError::ServiceException({
  103         -
            #[allow(unused_mut)]
  104         -
            let mut tmp = {
  105         -
                #[allow(unused_mut)]
  106         -
                let mut output = crate::types::error::builders::ServiceExceptionBuilder::default();
  107         -
                output = crate::protocol_serde::shape_service_exception::de_service_exception_json_err(_response_body, output)
  108         -
                    .map_err(crate::operation::add_permission::AddPermissionError::unhandled)?;
  109         -
                let output = output.meta(generic);
  110         -
                output.build()
  111         -
            };
  112         -
            if tmp.message.is_none() {
  113         -
                tmp.message = _error_message;
  114         -
            }
  115         -
            tmp
  116         -
        }),
  117         -
        "TooManyRequestsException" => crate::operation::add_permission::AddPermissionError::TooManyRequestsException({
  118         -
            #[allow(unused_mut)]
  119         -
            let mut tmp = {
  120         -
                #[allow(unused_mut)]
  121         -
                let mut output = crate::types::error::builders::TooManyRequestsExceptionBuilder::default();
  122         -
                output = crate::protocol_serde::shape_too_many_requests_exception::de_too_many_requests_exception_json_err(_response_body, output)
  123         -
                    .map_err(crate::operation::add_permission::AddPermissionError::unhandled)?;
  124         -
                output = output.set_retry_after_seconds(
  125         -
                    crate::protocol_serde::shape_too_many_requests_exception::de_retry_after_seconds_header(_response_headers).map_err(|_| {
  126         -
                        crate::operation::add_permission::AddPermissionError::unhandled("Failed to parse retryAfterSeconds from header `Retry-After")
  127         -
                    })?,
  128         -
                );
  129         -
                let output = output.meta(generic);
  130         -
                output.build()
  131         -
            };
  132         -
            if tmp.message.is_none() {
  133         -
                tmp.message = _error_message;
  134         -
            }
  135         -
            tmp
  136         -
        }),
  137         -
        _ => crate::operation::add_permission::AddPermissionError::generic(generic),
  138         -
    })
  139         -
}
  140         -
  141         -
#[allow(clippy::unnecessary_wraps)]
  142         -
pub fn de_add_permission_http_response(
  143         -
    _response_status: u16,
  144         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  145         -
    _response_body: &[u8],
  146         -
) -> std::result::Result<crate::operation::add_permission::AddPermissionOutput, crate::operation::add_permission::AddPermissionError> {
  147         -
    Ok({
  148         -
        #[allow(unused_mut)]
  149         -
        let mut output = crate::operation::add_permission::builders::AddPermissionOutputBuilder::default();
  150         -
        output = crate::protocol_serde::shape_add_permission::de_add_permission(_response_body, output)
  151         -
            .map_err(crate::operation::add_permission::AddPermissionError::unhandled)?;
  152         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  153         -
        output.build()
  154         -
    })
  155         -
}
  156         -
  157         -
pub fn ser_add_permission_input(
  158         -
    input: &crate::operation::add_permission::AddPermissionInput,
  159         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  160         -
    let mut out = String::new();
  161         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  162         -
    crate::protocol_serde::shape_add_permission_input::ser_add_permission_input_input(&mut object, input)?;
  163         -
    object.finish();
  164         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  165         -
}
  166         -
  167         -
pub(crate) fn de_add_permission(
  168         -
    _value: &[u8],
  169         -
    mut builder: crate::operation::add_permission::builders::AddPermissionOutputBuilder,
  170         -
) -> ::std::result::Result<
  171         -
    crate::operation::add_permission::builders::AddPermissionOutputBuilder,
  172         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  173         -
> {
  174         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  175         -
    let tokens = &mut tokens_owned;
  176         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  177         -
    loop {
  178         -
        match tokens.next().transpose()? {
  179         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  180         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  181         -
                "Statement" => {
  182         -
                    builder = builder.set_statement(
  183         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  184         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  185         -
                            .transpose()?,
  186         -
                    );
  187         -
                }
  188         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  189         -
            },
  190         -
            other => {
  191         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  192         -
                    "expected object key or end object, found: {other:?}"
  193         -
                )))
  194         -
            }
  195         -
        }
  196         -
    }
  197         -
    if tokens.next().is_some() {
  198         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  199         -
            "found more JSON tokens after completing parsing",
  200         -
        ));
  201         -
    }
  202         -
    Ok(builder)
  203         -
}