AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_query_definition/_put_query_definition_input.rs

@@ -33,33 +249,252 @@
   53     53   
    "com.amazonaws.cloudwatchlogs.synthetic",
   54     54   
    "PutQueryDefinitionInput",
   55     55   
);
   56     56   
static PUTQUERYDEFINITIONINPUT_MEMBER_QUERY_LANGUAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   57     57   
    ::aws_smithy_schema::ShapeId::from_static(
   58     58   
        "com.amazonaws.cloudwatchlogs.synthetic#PutQueryDefinitionInput$queryLanguage",
   59     59   
        "com.amazonaws.cloudwatchlogs.synthetic",
   60     60   
        "PutQueryDefinitionInput",
   61     61   
    ),
   62     62   
    ::aws_smithy_schema::ShapeType::String,
   63         -
    "query_language",
          63  +
    "queryLanguage",
   64     64   
    0,
   65     65   
);
   66     66   
static PUTQUERYDEFINITIONINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   67     67   
    ::aws_smithy_schema::ShapeId::from_static(
   68     68   
        "com.amazonaws.cloudwatchlogs.synthetic#PutQueryDefinitionInput$name",
   69     69   
        "com.amazonaws.cloudwatchlogs.synthetic",
   70     70   
        "PutQueryDefinitionInput",
   71     71   
    ),
   72     72   
    ::aws_smithy_schema::ShapeType::String,
   73     73   
    "name",
   74     74   
    1,
   75     75   
);
   76     76   
static PUTQUERYDEFINITIONINPUT_MEMBER_QUERY_DEFINITION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   77     77   
    ::aws_smithy_schema::ShapeId::from_static(
   78     78   
        "com.amazonaws.cloudwatchlogs.synthetic#PutQueryDefinitionInput$queryDefinitionId",
   79     79   
        "com.amazonaws.cloudwatchlogs.synthetic",
   80     80   
        "PutQueryDefinitionInput",
   81     81   
    ),
   82     82   
    ::aws_smithy_schema::ShapeType::String,
   83         -
    "query_definition_id",
          83  +
    "queryDefinitionId",
   84     84   
    2,
   85     85   
);
   86     86   
static PUTQUERYDEFINITIONINPUT_MEMBER_LOG_GROUP_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   87     87   
    ::aws_smithy_schema::ShapeId::from_static(
   88     88   
        "com.amazonaws.cloudwatchlogs.synthetic#PutQueryDefinitionInput$logGroupNames",
   89     89   
        "com.amazonaws.cloudwatchlogs.synthetic",
   90     90   
        "PutQueryDefinitionInput",
   91     91   
    ),
   92     92   
    ::aws_smithy_schema::ShapeType::List,
   93         -
    "log_group_names",
          93  +
    "logGroupNames",
   94     94   
    3,
   95     95   
);
   96     96   
static PUTQUERYDEFINITIONINPUT_MEMBER_QUERY_STRING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   97     97   
    ::aws_smithy_schema::ShapeId::from_static(
   98     98   
        "com.amazonaws.cloudwatchlogs.synthetic#PutQueryDefinitionInput$queryString",
   99     99   
        "com.amazonaws.cloudwatchlogs.synthetic",
  100    100   
        "PutQueryDefinitionInput",
  101    101   
    ),
  102    102   
    ::aws_smithy_schema::ShapeType::String,
  103         -
    "query_string",
         103  +
    "queryString",
  104    104   
    4,
  105    105   
);
  106    106   
static PUTQUERYDEFINITIONINPUT_MEMBER_CLIENT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  107    107   
    ::aws_smithy_schema::ShapeId::from_static(
  108    108   
        "com.amazonaws.cloudwatchlogs.synthetic#PutQueryDefinitionInput$clientToken",
  109    109   
        "com.amazonaws.cloudwatchlogs.synthetic",
  110    110   
        "PutQueryDefinitionInput",
  111    111   
    ),
  112    112   
    ::aws_smithy_schema::ShapeType::String,
  113         -
    "client_token",
         113  +
    "clientToken",
  114    114   
    5,
  115    115   
);
  116    116   
static PUTQUERYDEFINITIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  117    117   
    PUTQUERYDEFINITIONINPUT_SCHEMA_ID,
  118    118   
    ::aws_smithy_schema::ShapeType::Structure,
  119    119   
    &[
  120    120   
        &PUTQUERYDEFINITIONINPUT_MEMBER_QUERY_LANGUAGE,
  121    121   
        &PUTQUERYDEFINITIONINPUT_MEMBER_NAME,
  122    122   
        &PUTQUERYDEFINITIONINPUT_MEMBER_QUERY_DEFINITION_ID,
  123    123   
        &PUTQUERYDEFINITIONINPUT_MEMBER_LOG_GROUP_NAMES,
  124    124   
        &PUTQUERYDEFINITIONINPUT_MEMBER_QUERY_STRING,
  125    125   
        &PUTQUERYDEFINITIONINPUT_MEMBER_CLIENT_TOKEN,
  126    126   
    ],
  127    127   
);
  128    128   
impl PutQueryDefinitionInput {
  129    129   
    /// The schema for this shape.
  130    130   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTQUERYDEFINITIONINPUT_SCHEMA;
  131    131   
}
  132    132   
impl ::aws_smithy_schema::serde::SerializableStruct for PutQueryDefinitionInput {
  133    133   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  134    134   
    fn serialize_members(
  135    135   
        &self,
  136    136   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  137    137   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  138    138   
        if let Some(ref val) = self.query_language {
  139    139   
            ser.write_string(&PUTQUERYDEFINITIONINPUT_MEMBER_QUERY_LANGUAGE, val.as_str())?;
  140    140   
        }
  141    141   
        if let Some(ref val) = self.name {
  142    142   
            ser.write_string(&PUTQUERYDEFINITIONINPUT_MEMBER_NAME, val)?;
  143    143   
        }
  144    144   
        if let Some(ref val) = self.query_definition_id {
  145    145   
            ser.write_string(&PUTQUERYDEFINITIONINPUT_MEMBER_QUERY_DEFINITION_ID, val)?;
  146    146   
        }
  147    147   
        if let Some(ref val) = self.log_group_names {
  148    148   
            ser.write_list(
  149    149   
                &PUTQUERYDEFINITIONINPUT_MEMBER_LOG_GROUP_NAMES,
  150    150   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  151    151   
                    for item in val {
  152    152   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
  153    153   
                    }
  154    154   
                    Ok(())
  155    155   
                },
  156    156   
            )?;
  157    157   
        }
  158    158   
        if let Some(ref val) = self.query_string {
  159    159   
            ser.write_string(&PUTQUERYDEFINITIONINPUT_MEMBER_QUERY_STRING, val)?;
  160    160   
        }
  161    161   
        if let Some(ref val) = self.client_token {
  162    162   
            ser.write_string(&PUTQUERYDEFINITIONINPUT_MEMBER_CLIENT_TOKEN, val)?;
  163    163   
        }
  164    164   
        Ok(())
  165    165   
    }
  166    166   
}
  167    167   
impl PutQueryDefinitionInput {
  168    168   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  169         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  170         -
        deserializer: &mut D,
         169  +
    pub fn deserialize(
         170  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  171    171   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  172    172   
        #[allow(unused_variables, unused_mut)]
  173    173   
        let mut builder = Self::builder();
  174    174   
        #[allow(
  175    175   
            unused_variables,
  176    176   
            unreachable_code,
  177    177   
            clippy::single_match,
  178    178   
            clippy::match_single_binding,
  179    179   
            clippy::diverging_sub_expression
  180    180   
        )]
  181         -
        deserializer.read_struct(&PUTQUERYDEFINITIONINPUT_SCHEMA, (), |_, member, deser| {
         181  +
        deserializer.read_struct(&PUTQUERYDEFINITIONINPUT_SCHEMA, &mut |member, deser| {
  182    182   
            match member.member_index() {
  183    183   
                Some(0) => {
  184    184   
                    builder.query_language = Some(crate::types::QueryLanguage::from(deser.read_string(member)?.as_str()));
  185    185   
                }
  186    186   
                Some(1) => {
  187    187   
                    builder.name = Some(deser.read_string(member)?);
  188    188   
                }
  189    189   
                Some(2) => {
  190    190   
                    builder.query_definition_id = Some(deser.read_string(member)?);
  191    191   
                }
  192    192   
                Some(3) => {
  193         -
                    builder.log_group_names = Some({
  194         -
                        let container = if let Some(cap) = deser.container_size() {
  195         -
                            Vec::with_capacity(cap)
  196         -
                        } else {
  197         -
                            Vec::new()
  198         -
                        };
  199         -
                        deser.read_list(member, container, |mut list, deser| {
  200         -
                            list.push(deser.read_string(member)?);
  201         -
                            Ok(list)
  202         -
                        })?
  203         -
                    });
         193  +
                    builder.log_group_names = Some(deser.read_string_list(member)?);
  204    194   
                }
  205    195   
                Some(4) => {
  206    196   
                    builder.query_string = Some(deser.read_string(member)?);
  207    197   
                }
  208    198   
                Some(5) => {
  209    199   
                    builder.client_token = Some(deser.read_string(member)?);
  210    200   
                }
  211    201   
                _ => {}
  212    202   
            }
  213    203   
            Ok(())
  214    204   
        })?;
         205  +
        builder.name = builder.name.or(Some(String::new()));
         206  +
        builder.query_string = builder.query_string.or(Some(String::new()));
  215    207   
        builder
  216    208   
            .build()
  217    209   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  218    210   
    }
  219    211   
}
         212  +
impl PutQueryDefinitionInput {
         213  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         214  +
    pub fn deserialize_with_response(
         215  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         216  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         217  +
        _status: u16,
         218  +
        _body: &[u8],
         219  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         220  +
        Self::deserialize(deserializer)
         221  +
    }
         222  +
}
  220    223   
impl PutQueryDefinitionInput {
  221    224   
    /// Creates a new builder-style object to manufacture [`PutQueryDefinitionInput`](crate::operation::put_query_definition::PutQueryDefinitionInput).
  222    225   
    pub fn builder() -> crate::operation::put_query_definition::builders::PutQueryDefinitionInputBuilder {
  223    226   
        crate::operation::put_query_definition::builders::PutQueryDefinitionInputBuilder::default()
  224    227   
    }
  225    228   
}
  226    229   
  227    230   
/// A builder for [`PutQueryDefinitionInput`](crate::operation::put_query_definition::PutQueryDefinitionInput).
  228    231   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  229    232   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_query_definition/_put_query_definition_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_resource_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 `PutResourcePolicy`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutResourcePolicy;
    6      6   
impl PutResourcePolicy {
    7      7   
    /// Creates a new `PutResourcePolicy`
    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::put_resource_policy::PutResourcePolicyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_resource_policy::PutResourcePolicyOutput::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::put_resource_policy::PutResourcePolicyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::put_resource_policy::PutResourcePolicyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::put_resource_policy::PutResourcePolicyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,382 @@
  138    142   
                crate::operation::put_resource_policy::PutResourcePolicyError,
  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 PutResourcePolicyResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutResourcePolicyResponseDeserializer {
  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_put_resource_policy::de_put_resource_policy_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_put_resource_policy::de_put_resource_policy_http_response(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         175  +
                            crate::operation::put_resource_policy::PutResourcePolicyError::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  +
                "InvalidParameterException" => crate::operation::put_resource_policy::PutResourcePolicyError::InvalidParameterException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         190  +
                                &mut *deser,
         191  +
                                response.headers(),
         192  +
                                response.status().into(),
         193  +
                                body,
         194  +
                            )
         195  +
                        }) {
         196  +
                        ::std::result::Result::Ok(val) => val,
         197  +
                        ::std::result::Result::Err(e) => {
         198  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         199  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         200  +
                            ))
         201  +
                        }
  162    202   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         203  +
                    tmp.meta = generic;
         204  +
                    if tmp.message.is_none() {
         205  +
                        tmp.message = _error_message;
         206  +
                    }
         207  +
                    tmp
         208  +
                }),
         209  +
                "LimitExceededException" => crate::operation::put_resource_policy::PutResourcePolicyError::LimitExceededException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::LimitExceededException::deserialize_with_response(
         214  +
                                &mut *deser,
         215  +
                                response.headers(),
         216  +
                                response.status().into(),
         217  +
                                body,
         218  +
                            )
         219  +
                        }) {
         220  +
                        ::std::result::Result::Ok(val) => val,
         221  +
                        ::std::result::Result::Err(e) => {
         222  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         223  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         224  +
                            ))
         225  +
                        }
         226  +
                    };
         227  +
                    tmp.meta = generic;
         228  +
                    if tmp.message.is_none() {
         229  +
                        tmp.message = _error_message;
         230  +
                    }
         231  +
                    tmp
         232  +
                }),
         233  +
                "OperationAbortedException" => crate::operation::put_resource_policy::PutResourcePolicyError::OperationAbortedException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::OperationAbortedException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::OperationAbortedException::deserialize_with_response(
         238  +
                                &mut *deser,
         239  +
                                response.headers(),
         240  +
                                response.status().into(),
         241  +
                                body,
         242  +
                            )
         243  +
                        }) {
         244  +
                        ::std::result::Result::Ok(val) => val,
         245  +
                        ::std::result::Result::Err(e) => {
         246  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         247  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         248  +
                            ))
         249  +
                        }
         250  +
                    };
         251  +
                    tmp.meta = generic;
         252  +
                    if tmp.message.is_none() {
         253  +
                        tmp.message = _error_message;
         254  +
                    }
         255  +
                    tmp
         256  +
                }),
         257  +
                "ResourceNotFoundException" => crate::operation::put_resource_policy::PutResourcePolicyError::ResourceNotFoundException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    if tmp.message.is_none() {
         277  +
                        tmp.message = _error_message;
         278  +
                    }
         279  +
                    tmp
         280  +
                }),
         281  +
                "ServiceUnavailableException" => crate::operation::put_resource_policy::PutResourcePolicyError::ServiceUnavailableException({
         282  +
                    let mut tmp = match protocol
         283  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         284  +
                        .and_then(|mut deser| {
         285  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         286  +
                                &mut *deser,
         287  +
                                response.headers(),
         288  +
                                response.status().into(),
         289  +
                                body,
         290  +
                            )
         291  +
                        }) {
         292  +
                        ::std::result::Result::Ok(val) => val,
         293  +
                        ::std::result::Result::Err(e) => {
         294  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         295  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         296  +
                            ))
         297  +
                        }
         298  +
                    };
         299  +
                    tmp.meta = generic;
         300  +
                    if tmp.message.is_none() {
         301  +
                        tmp.message = _error_message;
         302  +
                    }
         303  +
                    tmp
         304  +
                }),
         305  +
                _ => crate::operation::put_resource_policy::PutResourcePolicyError::generic(generic),
         306  +
            };
         307  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         308  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         309  +
            ))
         310  +
        } else {
         311  +
            let protocol = _cfg
         312  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         313  +
                .expect("a SharedClientProtocol is required");
         314  +
            let mut deser = protocol
         315  +
                .deserialize_response(response, PutResourcePolicy::OUTPUT_SCHEMA, _cfg)
         316  +
                .map_err(|e| {
         317  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         318  +
                })?;
         319  +
            let body = response.body().bytes().expect("body loaded");
         320  +
            let output = crate::operation::put_resource_policy::PutResourcePolicyOutput::deserialize_with_response(
         321  +
                &mut *deser,
         322  +
                response.headers(),
         323  +
                response.status().into(),
         324  +
                body,
         325  +
            )
         326  +
            .map_err(|e| {
         327  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         328  +
            })?;
         329  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         330  +
        }
  164    331   
    }
  165    332   
}
  166    333   
#[derive(Debug)]
  167    334   
struct PutResourcePolicyRequestSerializer;
  168    335   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutResourcePolicyRequestSerializer {
  169    336   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    337   
    fn serialize_input(
  171    338   
        &self,
  172    339   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    340   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    341   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    342   
        let input = input
  176    343   
            .downcast::<crate::operation::put_resource_policy::PutResourcePolicyInput>()
  177    344   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::put_resource_policy::PutResourcePolicyInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                ::std::write!(output, "/").expect("formatting should succeed");
  190         -
                ::std::result::Result::Ok(())
  191         -
            }
  192         -
            #[allow(clippy::unnecessary_wraps)]
  193         -
            fn update_http_builder(
  194         -
                input: &crate::operation::put_resource_policy::PutResourcePolicyInput,
  195         -
                builder: ::http_1x::request::Builder,
  196         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  197         -
                let mut uri = ::std::string::String::new();
  198         -
                uri_base(input, &mut uri)?;
  199         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  200         -
            }
  201         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  202         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  203         -
            builder = _header_serialization_settings.set_default_header(
  204         -
                builder,
  205         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  206         -
                "Logs_20140328.PutResourcePolicy",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_put_resource_policy::ser_put_resource_policy_input(&input)?);
  211         -
        if let Some(content_length) = body.content_length() {
  212         -
            let content_length = content_length.to_string();
  213         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  214         -
        }
  215         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         345  +
        let protocol = _cfg
         346  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         347  +
            .expect("a SharedClientProtocol is required");
         348  +
        let mut request = protocol
         349  +
            .serialize_request(&input, PutResourcePolicy::INPUT_SCHEMA, "", _cfg)
         350  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         351  +
         352  +
        return ::std::result::Result::Ok(request);
  216    353   
    }
  217    354   
}
  218    355   
#[derive(Debug)]
  219    356   
struct PutResourcePolicyEndpointParamsInterceptor;
  220    357   
  221    358   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutResourcePolicyEndpointParamsInterceptor {
  222    359   
    fn name(&self) -> &'static str {
  223    360   
        "PutResourcePolicyEndpointParamsInterceptor"
  224    361   
    }
  225    362   

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_resource_policy/_put_resource_policy_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_resource_policy/_put_resource_policy_output.rs

@@ -4,4 +118,166 @@
   24     24   
    "com.amazonaws.cloudwatchlogs.synthetic",
   25     25   
    "PutResourcePolicyOutput",
   26     26   
);
   27     27   
static PUTRESOURCEPOLICYOUTPUT_MEMBER_RESOURCE_POLICY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   28     28   
    ::aws_smithy_schema::ShapeId::from_static(
   29     29   
        "com.amazonaws.cloudwatchlogs.synthetic#PutResourcePolicyOutput$resourcePolicy",
   30     30   
        "com.amazonaws.cloudwatchlogs.synthetic",
   31     31   
        "PutResourcePolicyOutput",
   32     32   
    ),
   33     33   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    "resource_policy",
          34  +
    "resourcePolicy",
   35     35   
    0,
   36     36   
);
   37     37   
static PUTRESOURCEPOLICYOUTPUT_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.cloudwatchlogs.synthetic#PutResourcePolicyOutput$revisionId",
   40     40   
        "com.amazonaws.cloudwatchlogs.synthetic",
   41     41   
        "PutResourcePolicyOutput",
   42     42   
    ),
   43     43   
    ::aws_smithy_schema::ShapeType::String,
   44         -
    "revision_id",
          44  +
    "revisionId",
   45     45   
    1,
   46     46   
);
          47  +
static PUTRESOURCEPOLICYOUTPUT_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 PUTRESOURCEPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   48     55   
    PUTRESOURCEPOLICYOUTPUT_SCHEMA_ID,
   49     56   
    ::aws_smithy_schema::ShapeType::Structure,
   50     57   
    &[
   51     58   
        &PUTRESOURCEPOLICYOUTPUT_MEMBER_RESOURCE_POLICY,
   52     59   
        &PUTRESOURCEPOLICYOUTPUT_MEMBER_REVISION_ID,
          60  +
        &PUTRESOURCEPOLICYOUTPUT_MEMBER__REQUEST_ID,
   53     61   
    ],
   54     62   
);
   55     63   
impl PutResourcePolicyOutput {
   56     64   
    /// The schema for this shape.
   57     65   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTRESOURCEPOLICYOUTPUT_SCHEMA;
   58     66   
}
   59     67   
impl ::aws_smithy_schema::serde::SerializableStruct for PutResourcePolicyOutput {
   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.resource_policy {
   66     74   
            ser.write_struct(&PUTRESOURCEPOLICYOUTPUT_MEMBER_RESOURCE_POLICY, val)?;
   67     75   
        }
   68     76   
        if let Some(ref val) = self.revision_id {
   69     77   
            ser.write_string(&PUTRESOURCEPOLICYOUTPUT_MEMBER_REVISION_ID, val)?;
   70     78   
        }
   71     79   
        Ok(())
   72     80   
    }
   73     81   
}
   74     82   
impl PutResourcePolicyOutput {
   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(&PUTRESOURCEPOLICYOUTPUT_SCHEMA, &mut |member, deser| {
          97  +
            match member.member_index() {
          98  +
                Some(0) => {
          99  +
                    builder.resource_policy = Some(crate::types::ResourcePolicy::deserialize(deser)?);
         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 PutResourcePolicyOutput {
         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(&PUTRESOURCEPOLICYOUTPUT_SCHEMA, (), |_, member, deser| {
         136  +
        deserializer.read_struct(&PUTRESOURCEPOLICYOUTPUT_SCHEMA, &mut |member, deser| {
   89    137   
            match member.member_index() {
   90    138   
                Some(0) => {
   91    139   
                    builder.resource_policy = Some(crate::types::ResourcePolicy::deserialize(deser)?);
   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/cloudwatchlogs/src/operation/put_retention_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 `PutRetentionPolicy`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutRetentionPolicy;
    6      6   
impl PutRetentionPolicy {
    7      7   
    /// Creates a new `PutRetentionPolicy`
    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::put_retention_policy::PutRetentionPolicyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_retention_policy::PutRetentionPolicyOutput::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::put_retention_policy::PutRetentionPolicyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::put_retention_policy::PutRetentionPolicyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::put_retention_policy::PutRetentionPolicyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -124,128 +252,364 @@
  144    148   
                crate::operation::put_retention_policy::PutRetentionPolicyError,
  145    149   
            >::new());
  146    150   
  147    151   
        ::std::borrow::Cow::Owned(rcb)
  148    152   
    }
  149    153   
}
  150    154   
  151    155   
#[derive(Debug)]
  152    156   
struct PutRetentionPolicyResponseDeserializer;
  153    157   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutRetentionPolicyResponseDeserializer {
  154         -
    fn deserialize_nonstreaming(
         158  +
    fn deserialize_nonstreaming_with_config(
  155    159   
        &self,
  156    160   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         161  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    162   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    163   
        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    164   
        #[allow(unused_mut)]
  162    165   
        let mut force_error = false;
  163    166   
        ::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_put_retention_policy::de_put_retention_policy_http_error(status, headers, body)
  166         -
        } else {
  167         -
            crate::protocol_serde::shape_put_retention_policy::de_put_retention_policy_http_response(status, headers, body)
         167  +
        if !success && status != 200 || force_error {
         168  +
            let headers = response.headers();
         169  +
            let body = response.body().bytes().expect("body loaded");
         170  +
            #[allow(unused_mut)]
         171  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         172  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         173  +
            })?;
         174  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         175  +
            let generic = generic_builder.build();
         176  +
            let error_code = match generic.code() {
         177  +
                ::std::option::Option::Some(code) => code,
         178  +
                ::std::option::Option::None => {
         179  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         180  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         181  +
                            crate::operation::put_retention_policy::PutRetentionPolicyError::unhandled(generic),
         182  +
                        ),
         183  +
                    ))
         184  +
                }
         185  +
            };
         186  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         187  +
            let protocol = _cfg
         188  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         189  +
                .expect("a SharedClientProtocol is required");
         190  +
            let err = match error_code {
         191  +
                "InvalidParameterException" => crate::operation::put_retention_policy::PutRetentionPolicyError::InvalidParameterException({
         192  +
                    let mut tmp = match protocol
         193  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         194  +
                        .and_then(|mut deser| {
         195  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         196  +
                                &mut *deser,
         197  +
                                response.headers(),
         198  +
                                response.status().into(),
         199  +
                                body,
         200  +
                            )
         201  +
                        }) {
         202  +
                        ::std::result::Result::Ok(val) => val,
         203  +
                        ::std::result::Result::Err(e) => {
         204  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         205  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         206  +
                            ))
         207  +
                        }
         208  +
                    };
         209  +
                    tmp.meta = generic;
         210  +
                    if tmp.message.is_none() {
         211  +
                        tmp.message = _error_message;
         212  +
                    }
         213  +
                    tmp
         214  +
                }),
         215  +
                "OperationAbortedException" => crate::operation::put_retention_policy::PutRetentionPolicyError::OperationAbortedException({
         216  +
                    let mut tmp = match protocol
         217  +
                        .deserialize_response(response, crate::types::error::OperationAbortedException::SCHEMA, _cfg)
         218  +
                        .and_then(|mut deser| {
         219  +
                            crate::types::error::OperationAbortedException::deserialize_with_response(
         220  +
                                &mut *deser,
         221  +
                                response.headers(),
         222  +
                                response.status().into(),
         223  +
                                body,
         224  +
                            )
         225  +
                        }) {
         226  +
                        ::std::result::Result::Ok(val) => val,
         227  +
                        ::std::result::Result::Err(e) => {
         228  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         229  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         230  +
                            ))
         231  +
                        }
  168    232   
                    };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         233  +
                    tmp.meta = generic;
         234  +
                    if tmp.message.is_none() {
         235  +
                        tmp.message = _error_message;
         236  +
                    }
         237  +
                    tmp
         238  +
                }),
         239  +
                "ResourceNotFoundException" => crate::operation::put_retention_policy::PutRetentionPolicyError::ResourceNotFoundException({
         240  +
                    let mut tmp = match protocol
         241  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         242  +
                        .and_then(|mut deser| {
         243  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         244  +
                                &mut *deser,
         245  +
                                response.headers(),
         246  +
                                response.status().into(),
         247  +
                                body,
         248  +
                            )
         249  +
                        }) {
         250  +
                        ::std::result::Result::Ok(val) => val,
         251  +
                        ::std::result::Result::Err(e) => {
         252  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         253  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         254  +
                            ))
         255  +
                        }
         256  +
                    };
         257  +
                    tmp.meta = generic;
         258  +
                    if tmp.message.is_none() {
         259  +
                        tmp.message = _error_message;
         260  +
                    }
         261  +
                    tmp
         262  +
                }),
         263  +
                "ServiceUnavailableException" => crate::operation::put_retention_policy::PutRetentionPolicyError::ServiceUnavailableException({
         264  +
                    let mut tmp = match protocol
         265  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         266  +
                        .and_then(|mut deser| {
         267  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         268  +
                                &mut *deser,
         269  +
                                response.headers(),
         270  +
                                response.status().into(),
         271  +
                                body,
         272  +
                            )
         273  +
                        }) {
         274  +
                        ::std::result::Result::Ok(val) => val,
         275  +
                        ::std::result::Result::Err(e) => {
         276  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         277  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         278  +
                            ))
         279  +
                        }
         280  +
                    };
         281  +
                    tmp.meta = generic;
         282  +
                    if tmp.message.is_none() {
         283  +
                        tmp.message = _error_message;
         284  +
                    }
         285  +
                    tmp
         286  +
                }),
         287  +
                _ => crate::operation::put_retention_policy::PutRetentionPolicyError::generic(generic),
         288  +
            };
         289  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         290  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         291  +
            ))
         292  +
        } else {
         293  +
            let protocol = _cfg
         294  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         295  +
                .expect("a SharedClientProtocol is required");
         296  +
            let mut deser = protocol
         297  +
                .deserialize_response(response, PutRetentionPolicy::OUTPUT_SCHEMA, _cfg)
         298  +
                .map_err(|e| {
         299  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         300  +
                })?;
         301  +
            let body = response.body().bytes().expect("body loaded");
         302  +
            let output = crate::operation::put_retention_policy::PutRetentionPolicyOutput::deserialize_with_response(
         303  +
                &mut *deser,
         304  +
                response.headers(),
         305  +
                response.status().into(),
         306  +
                body,
         307  +
            )
         308  +
            .map_err(|e| {
         309  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         310  +
            })?;
         311  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         312  +
        }
  170    313   
    }
  171    314   
}
  172    315   
#[derive(Debug)]
  173    316   
struct PutRetentionPolicyRequestSerializer;
  174    317   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutRetentionPolicyRequestSerializer {
  175    318   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    319   
    fn serialize_input(
  177    320   
        &self,
  178    321   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    322   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    323   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    324   
        let input = input
  182    325   
            .downcast::<crate::operation::put_retention_policy::PutRetentionPolicyInput>()
  183    326   
            .expect("correct type");
  184         -
        let _header_serialization_settings = _cfg
  185         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  186         -
            .cloned()
  187         -
            .unwrap_or_default();
  188         -
        let mut request_builder = {
  189         -
            #[allow(clippy::uninlined_format_args)]
  190         -
            fn uri_base(
  191         -
                _input: &crate::operation::put_retention_policy::PutRetentionPolicyInput,
  192         -
                output: &mut ::std::string::String,
  193         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  194         -
                use ::std::fmt::Write as _;
  195         -
                ::std::write!(output, "/").expect("formatting should succeed");
  196         -
                ::std::result::Result::Ok(())
  197         -
            }
  198         -
            #[allow(clippy::unnecessary_wraps)]
  199         -
            fn update_http_builder(
  200         -
                input: &crate::operation::put_retention_policy::PutRetentionPolicyInput,
  201         -
                builder: ::http_1x::request::Builder,
  202         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  203         -
                let mut uri = ::std::string::String::new();
  204         -
                uri_base(input, &mut uri)?;
  205         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  206         -
            }
  207         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  208         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  209         -
            builder = _header_serialization_settings.set_default_header(
  210         -
                builder,
  211         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  212         -
                "Logs_20140328.PutRetentionPolicy",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body =
  217         -
            ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_put_retention_policy::ser_put_retention_policy_input(&input)?);
  218         -
        if let Some(content_length) = body.content_length() {
  219         -
            let content_length = content_length.to_string();
  220         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  221         -
        }
  222         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         327  +
        let protocol = _cfg
         328  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         329  +
            .expect("a SharedClientProtocol is required");
         330  +
        let mut request = protocol
         331  +
            .serialize_request(&input, PutRetentionPolicy::INPUT_SCHEMA, "", _cfg)
         332  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         333  +
         334  +
        return ::std::result::Result::Ok(request);
  223    335   
    }
  224    336   
}
  225    337   
#[derive(Debug)]
  226    338   
struct PutRetentionPolicyEndpointParamsInterceptor;
  227    339   
  228    340   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutRetentionPolicyEndpointParamsInterceptor {
  229    341   
    fn name(&self) -> &'static str {
  230    342   
        "PutRetentionPolicyEndpointParamsInterceptor"
  231    343   
    }
  232    344   

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_retention_policy/_put_retention_policy_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_retention_policy/_put_retention_policy_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_subscription_filter.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 `PutSubscriptionFilter`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutSubscriptionFilter;
    6      6   
impl PutSubscriptionFilter {
    7      7   
    /// Creates a new `PutSubscriptionFilter`
    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::put_subscription_filter::PutSubscriptionFilterInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_subscription_filter::PutSubscriptionFilterOutput::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::put_subscription_filter::PutSubscriptionFilterInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::put_subscription_filter::PutSubscriptionFilterOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::put_subscription_filter::PutSubscriptionFilterError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -124,128 +253,414 @@
  144    148   
                crate::operation::put_subscription_filter::PutSubscriptionFilterError,
  145    149   
            >::new());
  146    150   
  147    151   
        ::std::borrow::Cow::Owned(rcb)
  148    152   
    }
  149    153   
}
  150    154   
  151    155   
#[derive(Debug)]
  152    156   
struct PutSubscriptionFilterResponseDeserializer;
  153    157   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutSubscriptionFilterResponseDeserializer {
  154         -
    fn deserialize_nonstreaming(
         158  +
    fn deserialize_nonstreaming_with_config(
  155    159   
        &self,
  156    160   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         161  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    162   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    163   
        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    164   
        #[allow(unused_mut)]
  162    165   
        let mut force_error = false;
  163    166   
        ::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_put_subscription_filter::de_put_subscription_filter_http_error(status, headers, body)
  166         -
        } else {
  167         -
            crate::protocol_serde::shape_put_subscription_filter::de_put_subscription_filter_http_response(status, headers, body)
         167  +
        if !success && status != 200 || force_error {
         168  +
            let headers = response.headers();
         169  +
            let body = response.body().bytes().expect("body loaded");
         170  +
            #[allow(unused_mut)]
         171  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         172  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         173  +
            })?;
         174  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         175  +
            let generic = generic_builder.build();
         176  +
            let error_code = match generic.code() {
         177  +
                ::std::option::Option::Some(code) => code,
         178  +
                ::std::option::Option::None => {
         179  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         180  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         181  +
                            crate::operation::put_subscription_filter::PutSubscriptionFilterError::unhandled(generic),
         182  +
                        ),
         183  +
                    ))
         184  +
                }
         185  +
            };
         186  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         187  +
            let protocol = _cfg
         188  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         189  +
                .expect("a SharedClientProtocol is required");
         190  +
            let err = match error_code {
         191  +
                "InvalidOperationException" => crate::operation::put_subscription_filter::PutSubscriptionFilterError::InvalidOperationException({
         192  +
                    let mut tmp = match protocol
         193  +
                        .deserialize_response(response, crate::types::error::InvalidOperationException::SCHEMA, _cfg)
         194  +
                        .and_then(|mut deser| {
         195  +
                            crate::types::error::InvalidOperationException::deserialize_with_response(
         196  +
                                &mut *deser,
         197  +
                                response.headers(),
         198  +
                                response.status().into(),
         199  +
                                body,
         200  +
                            )
         201  +
                        }) {
         202  +
                        ::std::result::Result::Ok(val) => val,
         203  +
                        ::std::result::Result::Err(e) => {
         204  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         205  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         206  +
                            ))
         207  +
                        }
         208  +
                    };
         209  +
                    tmp.meta = generic;
         210  +
                    if tmp.message.is_none() {
         211  +
                        tmp.message = _error_message;
         212  +
                    }
         213  +
                    tmp
         214  +
                }),
         215  +
                "InvalidParameterException" => crate::operation::put_subscription_filter::PutSubscriptionFilterError::InvalidParameterException({
         216  +
                    let mut tmp = match protocol
         217  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         218  +
                        .and_then(|mut deser| {
         219  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         220  +
                                &mut *deser,
         221  +
                                response.headers(),
         222  +
                                response.status().into(),
         223  +
                                body,
         224  +
                            )
         225  +
                        }) {
         226  +
                        ::std::result::Result::Ok(val) => val,
         227  +
                        ::std::result::Result::Err(e) => {
         228  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         229  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         230  +
                            ))
         231  +
                        }
         232  +
                    };
         233  +
                    tmp.meta = generic;
         234  +
                    if tmp.message.is_none() {
         235  +
                        tmp.message = _error_message;
         236  +
                    }
         237  +
                    tmp
         238  +
                }),
         239  +
                "LimitExceededException" => crate::operation::put_subscription_filter::PutSubscriptionFilterError::LimitExceededException({
         240  +
                    let mut tmp = match protocol
         241  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         242  +
                        .and_then(|mut deser| {
         243  +
                            crate::types::error::LimitExceededException::deserialize_with_response(
         244  +
                                &mut *deser,
         245  +
                                response.headers(),
         246  +
                                response.status().into(),
         247  +
                                body,
         248  +
                            )
         249  +
                        }) {
         250  +
                        ::std::result::Result::Ok(val) => val,
         251  +
                        ::std::result::Result::Err(e) => {
         252  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         253  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         254  +
                            ))
         255  +
                        }
         256  +
                    };
         257  +
                    tmp.meta = generic;
         258  +
                    if tmp.message.is_none() {
         259  +
                        tmp.message = _error_message;
         260  +
                    }
         261  +
                    tmp
         262  +
                }),
         263  +
                "OperationAbortedException" => crate::operation::put_subscription_filter::PutSubscriptionFilterError::OperationAbortedException({
         264  +
                    let mut tmp = match protocol
         265  +
                        .deserialize_response(response, crate::types::error::OperationAbortedException::SCHEMA, _cfg)
         266  +
                        .and_then(|mut deser| {
         267  +
                            crate::types::error::OperationAbortedException::deserialize_with_response(
         268  +
                                &mut *deser,
         269  +
                                response.headers(),
         270  +
                                response.status().into(),
         271  +
                                body,
         272  +
                            )
         273  +
                        }) {
         274  +
                        ::std::result::Result::Ok(val) => val,
         275  +
                        ::std::result::Result::Err(e) => {
         276  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         277  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         278  +
                            ))
         279  +
                        }
         280  +
                    };
         281  +
                    tmp.meta = generic;
         282  +
                    if tmp.message.is_none() {
         283  +
                        tmp.message = _error_message;
         284  +
                    }
         285  +
                    tmp
         286  +
                }),
         287  +
                "ResourceNotFoundException" => crate::operation::put_subscription_filter::PutSubscriptionFilterError::ResourceNotFoundException({
         288  +
                    let mut tmp = match protocol
         289  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         290  +
                        .and_then(|mut deser| {
         291  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         292  +
                                &mut *deser,
         293  +
                                response.headers(),
         294  +
                                response.status().into(),
         295  +
                                body,
         296  +
                            )
         297  +
                        }) {
         298  +
                        ::std::result::Result::Ok(val) => val,
         299  +
                        ::std::result::Result::Err(e) => {
         300  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         301  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         302  +
                            ))
         303  +
                        }
         304  +
                    };
         305  +
                    tmp.meta = generic;
         306  +
                    if tmp.message.is_none() {
         307  +
                        tmp.message = _error_message;
         308  +
                    }
         309  +
                    tmp
         310  +
                }),
         311  +
                "ServiceUnavailableException" => {
         312  +
                    crate::operation::put_subscription_filter::PutSubscriptionFilterError::ServiceUnavailableException({
         313  +
                        let mut tmp = match protocol
         314  +
                            .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         315  +
                            .and_then(|mut deser| {
         316  +
                                crate::types::error::ServiceUnavailableException::deserialize_with_response(
         317  +
                                    &mut *deser,
         318  +
                                    response.headers(),
         319  +
                                    response.status().into(),
         320  +
                                    body,
         321  +
                                )
         322  +
                            }) {
         323  +
                            ::std::result::Result::Ok(val) => val,
         324  +
                            ::std::result::Result::Err(e) => {
         325  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         326  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         327  +
                                ))
         328  +
                            }
         329  +
                        };
         330  +
                        tmp.meta = generic;
         331  +
                        if tmp.message.is_none() {
         332  +
                            tmp.message = _error_message;
         333  +
                        }
         334  +
                        tmp
         335  +
                    })
         336  +
                }
         337  +
                _ => crate::operation::put_subscription_filter::PutSubscriptionFilterError::generic(generic),
  168    338   
            };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         339  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         340  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         341  +
            ))
         342  +
        } else {
         343  +
            let protocol = _cfg
         344  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         345  +
                .expect("a SharedClientProtocol is required");
         346  +
            let mut deser = protocol
         347  +
                .deserialize_response(response, PutSubscriptionFilter::OUTPUT_SCHEMA, _cfg)
         348  +
                .map_err(|e| {
         349  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         350  +
                })?;
         351  +
            let body = response.body().bytes().expect("body loaded");
         352  +
            let output = crate::operation::put_subscription_filter::PutSubscriptionFilterOutput::deserialize_with_response(
         353  +
                &mut *deser,
         354  +
                response.headers(),
         355  +
                response.status().into(),
         356  +
                body,
         357  +
            )
         358  +
            .map_err(|e| {
         359  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         360  +
            })?;
         361  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         362  +
        }
  170    363   
    }
  171    364   
}
  172    365   
#[derive(Debug)]
  173    366   
struct PutSubscriptionFilterRequestSerializer;
  174    367   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutSubscriptionFilterRequestSerializer {
  175    368   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    369   
    fn serialize_input(
  177    370   
        &self,
  178    371   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    372   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    373   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    374   
        let input = input
  182    375   
            .downcast::<crate::operation::put_subscription_filter::PutSubscriptionFilterInput>()
  183    376   
            .expect("correct type");
  184         -
        let _header_serialization_settings = _cfg
  185         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  186         -
            .cloned()
  187         -
            .unwrap_or_default();
  188         -
        let mut request_builder = {
  189         -
            #[allow(clippy::uninlined_format_args)]
  190         -
            fn uri_base(
  191         -
                _input: &crate::operation::put_subscription_filter::PutSubscriptionFilterInput,
  192         -
                output: &mut ::std::string::String,
  193         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  194         -
                use ::std::fmt::Write as _;
  195         -
                ::std::write!(output, "/").expect("formatting should succeed");
  196         -
                ::std::result::Result::Ok(())
  197         -
            }
  198         -
            #[allow(clippy::unnecessary_wraps)]
  199         -
            fn update_http_builder(
  200         -
                input: &crate::operation::put_subscription_filter::PutSubscriptionFilterInput,
  201         -
                builder: ::http_1x::request::Builder,
  202         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  203         -
                let mut uri = ::std::string::String::new();
  204         -
                uri_base(input, &mut uri)?;
  205         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  206         -
            }
  207         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  208         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  209         -
            builder = _header_serialization_settings.set_default_header(
  210         -
                builder,
  211         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  212         -
                "Logs_20140328.PutSubscriptionFilter",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_put_subscription_filter::ser_put_subscription_filter_input(
  217         -
            &input,
  218         -
        )?);
  219         -
        if let Some(content_length) = body.content_length() {
  220         -
            let content_length = content_length.to_string();
  221         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  222         -
        }
  223         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         377  +
        let protocol = _cfg
         378  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         379  +
            .expect("a SharedClientProtocol is required");
         380  +
        let mut request = protocol
         381  +
            .serialize_request(&input, PutSubscriptionFilter::INPUT_SCHEMA, "", _cfg)
         382  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         383  +
         384  +
        return ::std::result::Result::Ok(request);
  224    385   
    }
  225    386   
}
  226    387   
#[derive(Debug)]
  227    388   
struct PutSubscriptionFilterEndpointParamsInterceptor;
  228    389   
  229    390   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutSubscriptionFilterEndpointParamsInterceptor {
  230    391   
    fn name(&self) -> &'static str {
  231    392   
        "PutSubscriptionFilterEndpointParamsInterceptor"
  232    393   
    }
  233    394   

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_subscription_filter/_put_subscription_filter_input.rs

@@ -71,71 +211,211 @@
   91     91   
    "com.amazonaws.cloudwatchlogs.synthetic",
   92     92   
    "PutSubscriptionFilterInput",
   93     93   
);
   94     94   
static PUTSUBSCRIPTIONFILTERINPUT_MEMBER_LOG_GROUP_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   95     95   
    ::aws_smithy_schema::ShapeId::from_static(
   96     96   
        "com.amazonaws.cloudwatchlogs.synthetic#PutSubscriptionFilterInput$logGroupName",
   97     97   
        "com.amazonaws.cloudwatchlogs.synthetic",
   98     98   
        "PutSubscriptionFilterInput",
   99     99   
    ),
  100    100   
    ::aws_smithy_schema::ShapeType::String,
  101         -
    "log_group_name",
         101  +
    "logGroupName",
  102    102   
    0,
  103    103   
);
  104    104   
static PUTSUBSCRIPTIONFILTERINPUT_MEMBER_FILTER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  105    105   
    ::aws_smithy_schema::ShapeId::from_static(
  106    106   
        "com.amazonaws.cloudwatchlogs.synthetic#PutSubscriptionFilterInput$filterName",
  107    107   
        "com.amazonaws.cloudwatchlogs.synthetic",
  108    108   
        "PutSubscriptionFilterInput",
  109    109   
    ),
  110    110   
    ::aws_smithy_schema::ShapeType::String,
  111         -
    "filter_name",
         111  +
    "filterName",
  112    112   
    1,
  113    113   
);
  114    114   
static PUTSUBSCRIPTIONFILTERINPUT_MEMBER_FILTER_PATTERN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  115    115   
    ::aws_smithy_schema::ShapeId::from_static(
  116    116   
        "com.amazonaws.cloudwatchlogs.synthetic#PutSubscriptionFilterInput$filterPattern",
  117    117   
        "com.amazonaws.cloudwatchlogs.synthetic",
  118    118   
        "PutSubscriptionFilterInput",
  119    119   
    ),
  120    120   
    ::aws_smithy_schema::ShapeType::String,
  121         -
    "filter_pattern",
         121  +
    "filterPattern",
  122    122   
    2,
  123    123   
);
  124    124   
static PUTSUBSCRIPTIONFILTERINPUT_MEMBER_DESTINATION_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  125    125   
    ::aws_smithy_schema::ShapeId::from_static(
  126    126   
        "com.amazonaws.cloudwatchlogs.synthetic#PutSubscriptionFilterInput$destinationArn",
  127    127   
        "com.amazonaws.cloudwatchlogs.synthetic",
  128    128   
        "PutSubscriptionFilterInput",
  129    129   
    ),
  130    130   
    ::aws_smithy_schema::ShapeType::String,
  131         -
    "destination_arn",
         131  +
    "destinationArn",
  132    132   
    3,
  133    133   
);
  134    134   
static PUTSUBSCRIPTIONFILTERINPUT_MEMBER_ROLE_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  135    135   
    ::aws_smithy_schema::ShapeId::from_static(
  136    136   
        "com.amazonaws.cloudwatchlogs.synthetic#PutSubscriptionFilterInput$roleArn",
  137    137   
        "com.amazonaws.cloudwatchlogs.synthetic",
  138    138   
        "PutSubscriptionFilterInput",
  139    139   
    ),
  140    140   
    ::aws_smithy_schema::ShapeType::String,
  141         -
    "role_arn",
         141  +
    "roleArn",
  142    142   
    4,
  143    143   
);
  144    144   
static PUTSUBSCRIPTIONFILTERINPUT_MEMBER_DISTRIBUTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  145    145   
    ::aws_smithy_schema::ShapeId::from_static(
  146    146   
        "com.amazonaws.cloudwatchlogs.synthetic#PutSubscriptionFilterInput$distribution",
  147    147   
        "com.amazonaws.cloudwatchlogs.synthetic",
  148    148   
        "PutSubscriptionFilterInput",
  149    149   
    ),
  150    150   
    ::aws_smithy_schema::ShapeType::String,
  151    151   
    "distribution",
  152    152   
    5,
  153    153   
);
  154    154   
static PUTSUBSCRIPTIONFILTERINPUT_MEMBER_APPLY_ON_TRANSFORMED_LOGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  155    155   
    ::aws_smithy_schema::ShapeId::from_static(
  156    156   
        "com.amazonaws.cloudwatchlogs.synthetic#PutSubscriptionFilterInput$applyOnTransformedLogs",
  157    157   
        "com.amazonaws.cloudwatchlogs.synthetic",
  158    158   
        "PutSubscriptionFilterInput",
  159    159   
    ),
  160    160   
    ::aws_smithy_schema::ShapeType::Boolean,
  161         -
    "apply_on_transformed_logs",
         161  +
    "applyOnTransformedLogs",
  162    162   
    6,
  163    163   
);
  164    164   
static PUTSUBSCRIPTIONFILTERINPUT_MEMBER_FIELD_SELECTION_CRITERIA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  165    165   
    ::aws_smithy_schema::ShapeId::from_static(
  166    166   
        "com.amazonaws.cloudwatchlogs.synthetic#PutSubscriptionFilterInput$fieldSelectionCriteria",
  167    167   
        "com.amazonaws.cloudwatchlogs.synthetic",
  168    168   
        "PutSubscriptionFilterInput",
  169    169   
    ),
  170    170   
    ::aws_smithy_schema::ShapeType::String,
  171         -
    "field_selection_criteria",
         171  +
    "fieldSelectionCriteria",
  172    172   
    7,
  173    173   
);
  174    174   
static PUTSUBSCRIPTIONFILTERINPUT_MEMBER_EMIT_SYSTEM_FIELDS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  175    175   
    ::aws_smithy_schema::ShapeId::from_static(
  176    176   
        "com.amazonaws.cloudwatchlogs.synthetic#PutSubscriptionFilterInput$emitSystemFields",
  177    177   
        "com.amazonaws.cloudwatchlogs.synthetic",
  178    178   
        "PutSubscriptionFilterInput",
  179    179   
    ),
  180    180   
    ::aws_smithy_schema::ShapeType::List,
  181         -
    "emit_system_fields",
         181  +
    "emitSystemFields",
  182    182   
    8,
  183    183   
);
  184    184   
static PUTSUBSCRIPTIONFILTERINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  185    185   
    PUTSUBSCRIPTIONFILTERINPUT_SCHEMA_ID,
  186    186   
    ::aws_smithy_schema::ShapeType::Structure,
  187    187   
    &[
  188    188   
        &PUTSUBSCRIPTIONFILTERINPUT_MEMBER_LOG_GROUP_NAME,
  189    189   
        &PUTSUBSCRIPTIONFILTERINPUT_MEMBER_FILTER_NAME,
  190    190   
        &PUTSUBSCRIPTIONFILTERINPUT_MEMBER_FILTER_PATTERN,
  191    191   
        &PUTSUBSCRIPTIONFILTERINPUT_MEMBER_DESTINATION_ARN,
@@ -219,219 +338,343 @@
  239    239   
                    }
  240    240   
                    Ok(())
  241    241   
                },
  242    242   
            )?;
  243    243   
        }
  244    244   
        Ok(())
  245    245   
    }
  246    246   
}
  247    247   
impl PutSubscriptionFilterInput {
  248    248   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  249         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  250         -
        deserializer: &mut D,
         249  +
    pub fn deserialize(
         250  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  251    251   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  252    252   
        #[allow(unused_variables, unused_mut)]
  253    253   
        let mut builder = Self::builder();
  254    254   
        #[allow(
  255    255   
            unused_variables,
  256    256   
            unreachable_code,
  257    257   
            clippy::single_match,
  258    258   
            clippy::match_single_binding,
  259    259   
            clippy::diverging_sub_expression
  260    260   
        )]
  261         -
        deserializer.read_struct(&PUTSUBSCRIPTIONFILTERINPUT_SCHEMA, (), |_, member, deser| {
         261  +
        deserializer.read_struct(&PUTSUBSCRIPTIONFILTERINPUT_SCHEMA, &mut |member, deser| {
  262    262   
            match member.member_index() {
  263    263   
                Some(0) => {
  264    264   
                    builder.log_group_name = Some(deser.read_string(member)?);
  265    265   
                }
  266    266   
                Some(1) => {
  267    267   
                    builder.filter_name = Some(deser.read_string(member)?);
  268    268   
                }
  269    269   
                Some(2) => {
  270    270   
                    builder.filter_pattern = Some(deser.read_string(member)?);
  271    271   
                }
  272    272   
                Some(3) => {
  273    273   
                    builder.destination_arn = Some(deser.read_string(member)?);
  274    274   
                }
  275    275   
                Some(4) => {
  276    276   
                    builder.role_arn = Some(deser.read_string(member)?);
  277    277   
                }
  278    278   
                Some(5) => {
  279    279   
                    builder.distribution = Some(crate::types::Distribution::from(deser.read_string(member)?.as_str()));
  280    280   
                }
  281    281   
                Some(6) => {
  282    282   
                    builder.apply_on_transformed_logs = Some(deser.read_boolean(member)?);
  283    283   
                }
  284    284   
                Some(7) => {
  285    285   
                    builder.field_selection_criteria = Some(deser.read_string(member)?);
  286    286   
                }
  287    287   
                Some(8) => {
  288         -
                    builder.emit_system_fields = Some({
  289         -
                        let container = if let Some(cap) = deser.container_size() {
  290         -
                            Vec::with_capacity(cap)
  291         -
                        } else {
  292         -
                            Vec::new()
  293         -
                        };
  294         -
                        deser.read_list(member, container, |mut list, deser| {
  295         -
                            list.push(deser.read_string(member)?);
  296         -
                            Ok(list)
  297         -
                        })?
  298         -
                    });
         288  +
                    builder.emit_system_fields = Some(deser.read_string_list(member)?);
  299    289   
                }
  300    290   
                _ => {}
  301    291   
            }
  302    292   
            Ok(())
  303    293   
        })?;
         294  +
        builder.log_group_name = builder.log_group_name.or(Some(String::new()));
         295  +
        builder.filter_name = builder.filter_name.or(Some(String::new()));
         296  +
        builder.filter_pattern = builder.filter_pattern.or(Some(String::new()));
         297  +
        builder.destination_arn = builder.destination_arn.or(Some(String::new()));
  304    298   
        builder
  305    299   
            .build()
  306    300   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  307    301   
    }
  308    302   
}
         303  +
impl PutSubscriptionFilterInput {
         304  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         305  +
    pub fn deserialize_with_response(
         306  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         307  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         308  +
        _status: u16,
         309  +
        _body: &[u8],
         310  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         311  +
        Self::deserialize(deserializer)
         312  +
    }
         313  +
}
  309    314   
impl PutSubscriptionFilterInput {
  310    315   
    /// Creates a new builder-style object to manufacture [`PutSubscriptionFilterInput`](crate::operation::put_subscription_filter::PutSubscriptionFilterInput).
  311    316   
    pub fn builder() -> crate::operation::put_subscription_filter::builders::PutSubscriptionFilterInputBuilder {
  312    317   
        crate::operation::put_subscription_filter::builders::PutSubscriptionFilterInputBuilder::default()
  313    318   
    }
  314    319   
}
  315    320   
  316    321   
/// A builder for [`PutSubscriptionFilterInput`](crate::operation::put_subscription_filter::PutSubscriptionFilterInput).
  317    322   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  318    323   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_subscription_filter/_put_subscription_filter_output.rs

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