AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/stop_query/_stop_query_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/stop_query/_stop_query_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/tag_log_group.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 `TagLogGroup`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct TagLogGroup;
    6      6   
impl TagLogGroup {
    7      7   
    /// Creates a new `TagLogGroup`
    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::tag_log_group::TagLogGroupInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::tag_log_group::TagLogGroupOutput::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::tag_log_group::TagLogGroupInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::tag_log_group::TagLogGroupOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::tag_log_group::TagLogGroupError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,306 @@
  138    142   
                crate::operation::tag_log_group::TagLogGroupError,
  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 TagLogGroupResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for TagLogGroupResponseDeserializer {
  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_tag_log_group::de_tag_log_group_http_error(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::tag_log_group::TagLogGroupError::unhandled(generic)),
         175  +
                    ))
         176  +
                }
         177  +
            };
         178  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         179  +
            let protocol = _cfg
         180  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         181  +
                .expect("a SharedClientProtocol is required");
         182  +
            let err = match error_code {
         183  +
                "InvalidParameterException" => crate::operation::tag_log_group::TagLogGroupError::InvalidParameterException({
         184  +
                    let mut tmp = match protocol
         185  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         186  +
                        .and_then(|mut deser| {
         187  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         188  +
                                &mut *deser,
         189  +
                                response.headers(),
         190  +
                                response.status().into(),
         191  +
                                body,
         192  +
                            )
         193  +
                        }) {
         194  +
                        ::std::result::Result::Ok(val) => val,
         195  +
                        ::std::result::Result::Err(e) => {
         196  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         197  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         198  +
                            ))
         199  +
                        }
         200  +
                    };
         201  +
                    tmp.meta = generic;
         202  +
                    if tmp.message.is_none() {
         203  +
                        tmp.message = _error_message;
         204  +
                    }
         205  +
                    tmp
         206  +
                }),
         207  +
                "ResourceNotFoundException" => crate::operation::tag_log_group::TagLogGroupError::ResourceNotFoundException({
         208  +
                    let mut tmp = match protocol
         209  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         210  +
                        .and_then(|mut deser| {
         211  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         212  +
                                &mut *deser,
         213  +
                                response.headers(),
         214  +
                                response.status().into(),
         215  +
                                body,
         216  +
                            )
         217  +
                        }) {
         218  +
                        ::std::result::Result::Ok(val) => val,
         219  +
                        ::std::result::Result::Err(e) => {
         220  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         221  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         222  +
                            ))
         223  +
                        }
         224  +
                    };
         225  +
                    tmp.meta = generic;
         226  +
                    if tmp.message.is_none() {
         227  +
                        tmp.message = _error_message;
         228  +
                    }
         229  +
                    tmp
         230  +
                }),
         231  +
                _ => crate::operation::tag_log_group::TagLogGroupError::generic(generic),
         232  +
            };
         233  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         234  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         235  +
            ))
  160    236   
        } else {
  161         -
            crate::protocol_serde::shape_tag_log_group::de_tag_log_group_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         237  +
            let protocol = _cfg
         238  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         239  +
                .expect("a SharedClientProtocol is required");
         240  +
            let mut deser = protocol.deserialize_response(response, TagLogGroup::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         241  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         242  +
            })?;
         243  +
            let body = response.body().bytes().expect("body loaded");
         244  +
            let output = crate::operation::tag_log_group::TagLogGroupOutput::deserialize_with_response(
         245  +
                &mut *deser,
         246  +
                response.headers(),
         247  +
                response.status().into(),
         248  +
                body,
         249  +
            )
         250  +
            .map_err(|e| {
         251  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         252  +
            })?;
         253  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         254  +
        }
  164    255   
    }
  165    256   
}
  166    257   
#[derive(Debug)]
  167    258   
struct TagLogGroupRequestSerializer;
  168    259   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for TagLogGroupRequestSerializer {
  169    260   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    261   
    fn serialize_input(
  171    262   
        &self,
  172    263   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    264   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    265   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    266   
        let input = input
  176    267   
            .downcast::<crate::operation::tag_log_group::TagLogGroupInput>()
  177    268   
            .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::tag_log_group::TagLogGroupInput,
  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::tag_log_group::TagLogGroupInput,
  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.TagLogGroup",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_tag_log_group::ser_tag_log_group_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())
         269  +
        let protocol = _cfg
         270  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         271  +
            .expect("a SharedClientProtocol is required");
         272  +
        let mut request = protocol
         273  +
            .serialize_request(&input, TagLogGroup::INPUT_SCHEMA, "", _cfg)
         274  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         275  +
         276  +
        return ::std::result::Result::Ok(request);
  216    277   
    }
  217    278   
}
  218    279   
#[derive(Debug)]
  219    280   
struct TagLogGroupEndpointParamsInterceptor;
  220    281   
  221    282   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for TagLogGroupEndpointParamsInterceptor {
  222    283   
    fn name(&self) -> &'static str {
  223    284   
        "TagLogGroupEndpointParamsInterceptor"
  224    285   
    }
  225    286   

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/tag_log_group/_tag_log_group_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/tag_log_group/_tag_log_group_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 TagLogGroupOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static TAGLOGGROUPOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.cloudwatchlogs.synthetic#TagLogGroupOutput",
   10     10   
    "com.amazonaws.cloudwatchlogs.synthetic",
   11     11   
    "TagLogGroupOutput",
   12     12   
);
   13         -
static TAGLOGGROUPOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(TAGLOGGROUPOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static TAGLOGGROUPOUTPUT_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 TAGLOGGROUPOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    TAGLOGGROUPOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&TAGLOGGROUPOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl TagLogGroupOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TAGLOGGROUPOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for TagLogGroupOutput {
   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 TagLogGroupOutput {
   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(&TAGLOGGROUPOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&TAGLOGGROUPOUTPUT_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 TagLogGroupOutput {
          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 TagLogGroupOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl TagLogGroupOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`TagLogGroupOutput`](crate::operation::tag_log_group::TagLogGroupOutput).
   58     89   
    pub fn builder() -> crate::operation::tag_log_group::builders::TagLogGroupOutputBuilder {
   59     90   
        crate::operation::tag_log_group::builders::TagLogGroupOutputBuilder::default()
   60     91   
    }

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/tag_resource.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 `TagResource`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct TagResource;
    6      6   
impl TagResource {
    7      7   
    /// Creates a new `TagResource`
    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::tag_resource::TagResourceInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::tag_resource::TagResourceOutput::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::tag_resource::TagResourceInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::tag_resource::TagResourceOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::tag_resource::TagResourceError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,354 @@
  138    142   
                crate::operation::tag_resource::TagResourceError,
  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 TagResourceResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for TagResourceResponseDeserializer {
  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_tag_resource::de_tag_resource_http_error(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::tag_resource::TagResourceError::unhandled(generic)),
         175  +
                    ))
         176  +
                }
         177  +
            };
         178  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         179  +
            let protocol = _cfg
         180  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         181  +
                .expect("a SharedClientProtocol is required");
         182  +
            let err = match error_code {
         183  +
                "InvalidParameterException" => crate::operation::tag_resource::TagResourceError::InvalidParameterException({
         184  +
                    let mut tmp = match protocol
         185  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         186  +
                        .and_then(|mut deser| {
         187  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         188  +
                                &mut *deser,
         189  +
                                response.headers(),
         190  +
                                response.status().into(),
         191  +
                                body,
         192  +
                            )
         193  +
                        }) {
         194  +
                        ::std::result::Result::Ok(val) => val,
         195  +
                        ::std::result::Result::Err(e) => {
         196  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         197  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         198  +
                            ))
         199  +
                        }
         200  +
                    };
         201  +
                    tmp.meta = generic;
         202  +
                    if tmp.message.is_none() {
         203  +
                        tmp.message = _error_message;
         204  +
                    }
         205  +
                    tmp
         206  +
                }),
         207  +
                "ResourceNotFoundException" => crate::operation::tag_resource::TagResourceError::ResourceNotFoundException({
         208  +
                    let mut tmp = match protocol
         209  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         210  +
                        .and_then(|mut deser| {
         211  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         212  +
                                &mut *deser,
         213  +
                                response.headers(),
         214  +
                                response.status().into(),
         215  +
                                body,
         216  +
                            )
         217  +
                        }) {
         218  +
                        ::std::result::Result::Ok(val) => val,
         219  +
                        ::std::result::Result::Err(e) => {
         220  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         221  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         222  +
                            ))
         223  +
                        }
         224  +
                    };
         225  +
                    tmp.meta = generic;
         226  +
                    if tmp.message.is_none() {
         227  +
                        tmp.message = _error_message;
         228  +
                    }
         229  +
                    tmp
         230  +
                }),
         231  +
                "ServiceUnavailableException" => crate::operation::tag_resource::TagResourceError::ServiceUnavailableException({
         232  +
                    let mut tmp = match protocol
         233  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         234  +
                        .and_then(|mut deser| {
         235  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         236  +
                                &mut *deser,
         237  +
                                response.headers(),
         238  +
                                response.status().into(),
         239  +
                                body,
         240  +
                            )
         241  +
                        }) {
         242  +
                        ::std::result::Result::Ok(val) => val,
         243  +
                        ::std::result::Result::Err(e) => {
         244  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         245  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         246  +
                            ))
         247  +
                        }
         248  +
                    };
         249  +
                    tmp.meta = generic;
         250  +
                    if tmp.message.is_none() {
         251  +
                        tmp.message = _error_message;
         252  +
                    }
         253  +
                    tmp
         254  +
                }),
         255  +
                "TooManyTagsException" => crate::operation::tag_resource::TagResourceError::TooManyTagsException({
         256  +
                    let mut tmp = match protocol
         257  +
                        .deserialize_response(response, crate::types::error::TooManyTagsException::SCHEMA, _cfg)
         258  +
                        .and_then(|mut deser| {
         259  +
                            crate::types::error::TooManyTagsException::deserialize_with_response(
         260  +
                                &mut *deser,
         261  +
                                response.headers(),
         262  +
                                response.status().into(),
         263  +
                                body,
         264  +
                            )
         265  +
                        }) {
         266  +
                        ::std::result::Result::Ok(val) => val,
         267  +
                        ::std::result::Result::Err(e) => {
         268  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         269  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         270  +
                            ))
         271  +
                        }
         272  +
                    };
         273  +
                    tmp.meta = generic;
         274  +
                    if tmp.message.is_none() {
         275  +
                        tmp.message = _error_message;
         276  +
                    }
         277  +
                    tmp
         278  +
                }),
         279  +
                _ => crate::operation::tag_resource::TagResourceError::generic(generic),
         280  +
            };
         281  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         282  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         283  +
            ))
  160    284   
        } else {
  161         -
            crate::protocol_serde::shape_tag_resource::de_tag_resource_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         285  +
            let protocol = _cfg
         286  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         287  +
                .expect("a SharedClientProtocol is required");
         288  +
            let mut deser = protocol.deserialize_response(response, TagResource::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         289  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         290  +
            })?;
         291  +
            let body = response.body().bytes().expect("body loaded");
         292  +
            let output = crate::operation::tag_resource::TagResourceOutput::deserialize_with_response(
         293  +
                &mut *deser,
         294  +
                response.headers(),
         295  +
                response.status().into(),
         296  +
                body,
         297  +
            )
         298  +
            .map_err(|e| {
         299  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         300  +
            })?;
         301  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         302  +
        }
  164    303   
    }
  165    304   
}
  166    305   
#[derive(Debug)]
  167    306   
struct TagResourceRequestSerializer;
  168    307   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for TagResourceRequestSerializer {
  169    308   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    309   
    fn serialize_input(
  171    310   
        &self,
  172    311   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    312   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    313   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    314   
        let input = input
  176    315   
            .downcast::<crate::operation::tag_resource::TagResourceInput>()
  177    316   
            .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::tag_resource::TagResourceInput,
  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::tag_resource::TagResourceInput,
  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.TagResource",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_tag_resource::ser_tag_resource_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())
         317  +
        let protocol = _cfg
         318  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         319  +
            .expect("a SharedClientProtocol is required");
         320  +
        let mut request = protocol
         321  +
            .serialize_request(&input, TagResource::INPUT_SCHEMA, "", _cfg)
         322  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         323  +
         324  +
        return ::std::result::Result::Ok(request);
  216    325   
    }
  217    326   
}
  218    327   
#[derive(Debug)]
  219    328   
struct TagResourceEndpointParamsInterceptor;
  220    329   
  221    330   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for TagResourceEndpointParamsInterceptor {
  222    331   
    fn name(&self) -> &'static str {
  223    332   
        "TagResourceEndpointParamsInterceptor"
  224    333   
    }
  225    334   

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/tag_resource/_tag_resource_input.rs

@@ -9,9 +155,158 @@
   29     29   
    "com.amazonaws.cloudwatchlogs.synthetic",
   30     30   
    "TagResourceInput",
   31     31   
);
   32     32   
static TAGRESOURCEINPUT_MEMBER_RESOURCE_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   33     33   
    ::aws_smithy_schema::ShapeId::from_static(
   34     34   
        "com.amazonaws.cloudwatchlogs.synthetic#TagResourceInput$resourceArn",
   35     35   
        "com.amazonaws.cloudwatchlogs.synthetic",
   36     36   
        "TagResourceInput",
   37     37   
    ),
   38     38   
    ::aws_smithy_schema::ShapeType::String,
   39         -
    "resource_arn",
          39  +
    "resourceArn",
   40     40   
    0,
   41     41   
);
   42     42   
static TAGRESOURCEINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   43     43   
    ::aws_smithy_schema::ShapeId::from_static(
   44     44   
        "com.amazonaws.cloudwatchlogs.synthetic#TagResourceInput$tags",
   45     45   
        "com.amazonaws.cloudwatchlogs.synthetic",
   46     46   
        "TagResourceInput",
   47     47   
    ),
   48     48   
    ::aws_smithy_schema::ShapeType::Map,
   49     49   
    "tags",
   50     50   
    1,
   51     51   
);
   52     52   
static TAGRESOURCEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   53     53   
    TAGRESOURCEINPUT_SCHEMA_ID,
   54     54   
    ::aws_smithy_schema::ShapeType::Structure,
   55     55   
    &[&TAGRESOURCEINPUT_MEMBER_RESOURCE_ARN, &TAGRESOURCEINPUT_MEMBER_TAGS],
   56     56   
);
   57     57   
impl TagResourceInput {
   58     58   
    /// The schema for this shape.
   59     59   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TAGRESOURCEINPUT_SCHEMA;
   60     60   
}
   61     61   
impl ::aws_smithy_schema::serde::SerializableStruct for TagResourceInput {
   62     62   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   63     63   
    fn serialize_members(
   64     64   
        &self,
   65     65   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   66     66   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   67     67   
        if let Some(ref val) = self.resource_arn {
   68     68   
            ser.write_string(&TAGRESOURCEINPUT_MEMBER_RESOURCE_ARN, val)?;
   69     69   
        }
   70     70   
        if let Some(ref val) = self.tags {
   71     71   
            ser.write_map(
   72     72   
                &TAGRESOURCEINPUT_MEMBER_TAGS,
   73     73   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   74     74   
                    for (key, value) in val {
   75     75   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
   76     76   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
   77     77   
                    }
   78     78   
                    Ok(())
   79     79   
                },
   80     80   
            )?;
   81     81   
        }
   82     82   
        Ok(())
   83     83   
    }
   84     84   
}
   85     85   
impl TagResourceInput {
   86     86   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   87         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   88         -
        deserializer: &mut D,
          87  +
    pub fn deserialize(
          88  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   89     89   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   90     90   
        #[allow(unused_variables, unused_mut)]
   91     91   
        let mut builder = Self::builder();
   92     92   
        #[allow(
   93     93   
            unused_variables,
   94     94   
            unreachable_code,
   95     95   
            clippy::single_match,
   96     96   
            clippy::match_single_binding,
   97     97   
            clippy::diverging_sub_expression
   98     98   
        )]
   99         -
        deserializer.read_struct(&TAGRESOURCEINPUT_SCHEMA, (), |_, member, deser| {
          99  +
        deserializer.read_struct(&TAGRESOURCEINPUT_SCHEMA, &mut |member, deser| {
  100    100   
            match member.member_index() {
  101    101   
                Some(0) => {
  102    102   
                    builder.resource_arn = Some(deser.read_string(member)?);
  103    103   
                }
  104    104   
                Some(1) => {
  105         -
                    builder.tags = Some({
  106         -
                        let container = if let Some(cap) = deser.container_size() {
  107         -
                            std::collections::HashMap::with_capacity(cap)
  108         -
                        } else {
  109         -
                            std::collections::HashMap::new()
  110         -
                        };
  111         -
                        deser.read_map(member, container, |mut map, key, deser| {
  112         -
                            map.insert(key, deser.read_string(member)?);
  113         -
                            Ok(map)
  114         -
                        })?
  115         -
                    });
         105  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
  116    106   
                }
  117    107   
                _ => {}
  118    108   
            }
  119    109   
            Ok(())
  120    110   
        })?;
         111  +
        builder.resource_arn = builder.resource_arn.or(Some(String::new()));
         112  +
        builder.tags = builder.tags.or(Some(::std::collections::HashMap::new()));
  121    113   
        builder
  122    114   
            .build()
  123    115   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  124    116   
    }
  125    117   
}
         118  +
impl TagResourceInput {
         119  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         120  +
    pub fn deserialize_with_response(
         121  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         122  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         123  +
        _status: u16,
         124  +
        _body: &[u8],
         125  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         126  +
        Self::deserialize(deserializer)
         127  +
    }
         128  +
}
  126    129   
impl TagResourceInput {
  127    130   
    /// Creates a new builder-style object to manufacture [`TagResourceInput`](crate::operation::tag_resource::TagResourceInput).
  128    131   
    pub fn builder() -> crate::operation::tag_resource::builders::TagResourceInputBuilder {
  129    132   
        crate::operation::tag_resource::builders::TagResourceInputBuilder::default()
  130    133   
    }
  131    134   
}
  132    135   
  133    136   
/// A builder for [`TagResourceInput`](crate::operation::tag_resource::TagResourceInput).
  134    137   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  135    138   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/tag_resource/_tag_resource_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 TagResourceOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static TAGRESOURCEOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.cloudwatchlogs.synthetic#TagResourceOutput",
   10     10   
    "com.amazonaws.cloudwatchlogs.synthetic",
   11     11   
    "TagResourceOutput",
   12     12   
);
   13         -
static TAGRESOURCEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(TAGRESOURCEOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static TAGRESOURCEOUTPUT_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 TAGRESOURCEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    TAGRESOURCEOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&TAGRESOURCEOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl TagResourceOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TAGRESOURCEOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for TagResourceOutput {
   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 TagResourceOutput {
   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(&TAGRESOURCEOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&TAGRESOURCEOUTPUT_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 TagResourceOutput {
          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 TagResourceOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl TagResourceOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`TagResourceOutput`](crate::operation::tag_resource::TagResourceOutput).
   58     89   
    pub fn builder() -> crate::operation::tag_resource::builders::TagResourceOutputBuilder {
   59     90   
        crate::operation::tag_resource::builders::TagResourceOutputBuilder::default()
   60     91   
    }

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/test_metric_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 `TestMetricFilter`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct TestMetricFilter;
    6      6   
impl TestMetricFilter {
    7      7   
    /// Creates a new `TestMetricFilter`
    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::test_metric_filter::TestMetricFilterInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::test_metric_filter::TestMetricFilterOutput::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::test_metric_filter::TestMetricFilterInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::test_metric_filter::TestMetricFilterOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::test_metric_filter::TestMetricFilterError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,310 @@
  138    142   
                crate::operation::test_metric_filter::TestMetricFilterError,
  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 TestMetricFilterResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for TestMetricFilterResponseDeserializer {
  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_test_metric_filter::de_test_metric_filter_http_error(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::test_metric_filter::TestMetricFilterError::unhandled(
         175  +
                            generic,
         176  +
                        )),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "InvalidParameterException" => crate::operation::test_metric_filter::TestMetricFilterError::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  +
                        }
         202  +
                    };
         203  +
                    tmp.meta = generic;
         204  +
                    if tmp.message.is_none() {
         205  +
                        tmp.message = _error_message;
         206  +
                    }
         207  +
                    tmp
         208  +
                }),
         209  +
                "ServiceUnavailableException" => crate::operation::test_metric_filter::TestMetricFilterError::ServiceUnavailableException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::ServiceUnavailableException::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  +
                _ => crate::operation::test_metric_filter::TestMetricFilterError::generic(generic),
         234  +
            };
         235  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         236  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         237  +
            ))
  160    238   
        } else {
  161         -
            crate::protocol_serde::shape_test_metric_filter::de_test_metric_filter_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         239  +
            let protocol = _cfg
         240  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         241  +
                .expect("a SharedClientProtocol is required");
         242  +
            let mut deser = protocol
         243  +
                .deserialize_response(response, TestMetricFilter::OUTPUT_SCHEMA, _cfg)
         244  +
                .map_err(|e| {
         245  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         246  +
                })?;
         247  +
            let body = response.body().bytes().expect("body loaded");
         248  +
            let output = crate::operation::test_metric_filter::TestMetricFilterOutput::deserialize_with_response(
         249  +
                &mut *deser,
         250  +
                response.headers(),
         251  +
                response.status().into(),
         252  +
                body,
         253  +
            )
         254  +
            .map_err(|e| {
         255  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         256  +
            })?;
         257  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         258  +
        }
  164    259   
    }
  165    260   
}
  166    261   
#[derive(Debug)]
  167    262   
struct TestMetricFilterRequestSerializer;
  168    263   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for TestMetricFilterRequestSerializer {
  169    264   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    265   
    fn serialize_input(
  171    266   
        &self,
  172    267   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    268   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    269   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    270   
        let input = input
  176    271   
            .downcast::<crate::operation::test_metric_filter::TestMetricFilterInput>()
  177    272   
            .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::test_metric_filter::TestMetricFilterInput,
  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::test_metric_filter::TestMetricFilterInput,
  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.TestMetricFilter",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_test_metric_filter::ser_test_metric_filter_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())
         273  +
        let protocol = _cfg
         274  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         275  +
            .expect("a SharedClientProtocol is required");
         276  +
        let mut request = protocol
         277  +
            .serialize_request(&input, TestMetricFilter::INPUT_SCHEMA, "", _cfg)
         278  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         279  +
         280  +
        return ::std::result::Result::Ok(request);
  216    281   
    }
  217    282   
}
  218    283   
#[derive(Debug)]
  219    284   
struct TestMetricFilterEndpointParamsInterceptor;
  220    285   
  221    286   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for TestMetricFilterEndpointParamsInterceptor {
  222    287   
    fn name(&self) -> &'static str {
  223    288   
        "TestMetricFilterEndpointParamsInterceptor"
  224    289   
    }
  225    290   

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/test_metric_filter/_test_metric_filter_input.rs

@@ -5,5 +153,156 @@
   25     25   
    "com.amazonaws.cloudwatchlogs.synthetic",
   26     26   
    "TestMetricFilterInput",
   27     27   
);
   28     28   
static TESTMETRICFILTERINPUT_MEMBER_FILTER_PATTERN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   29     29   
    ::aws_smithy_schema::ShapeId::from_static(
   30     30   
        "com.amazonaws.cloudwatchlogs.synthetic#TestMetricFilterInput$filterPattern",
   31     31   
        "com.amazonaws.cloudwatchlogs.synthetic",
   32     32   
        "TestMetricFilterInput",
   33     33   
    ),
   34     34   
    ::aws_smithy_schema::ShapeType::String,
   35         -
    "filter_pattern",
          35  +
    "filterPattern",
   36     36   
    0,
   37     37   
);
   38     38   
static TESTMETRICFILTERINPUT_MEMBER_LOG_EVENT_MESSAGES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "com.amazonaws.cloudwatchlogs.synthetic#TestMetricFilterInput$logEventMessages",
   41     41   
        "com.amazonaws.cloudwatchlogs.synthetic",
   42     42   
        "TestMetricFilterInput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::List,
   45         -
    "log_event_messages",
          45  +
    "logEventMessages",
   46     46   
    1,
   47     47   
);
   48     48   
static TESTMETRICFILTERINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   49     49   
    TESTMETRICFILTERINPUT_SCHEMA_ID,
   50     50   
    ::aws_smithy_schema::ShapeType::Structure,
   51     51   
    &[
   52     52   
        &TESTMETRICFILTERINPUT_MEMBER_FILTER_PATTERN,
   53     53   
        &TESTMETRICFILTERINPUT_MEMBER_LOG_EVENT_MESSAGES,
   54     54   
    ],
   55     55   
);
   56     56   
impl TestMetricFilterInput {
   57     57   
    /// The schema for this shape.
   58     58   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TESTMETRICFILTERINPUT_SCHEMA;
   59     59   
}
   60     60   
impl ::aws_smithy_schema::serde::SerializableStruct for TestMetricFilterInput {
   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.filter_pattern {
   67     67   
            ser.write_string(&TESTMETRICFILTERINPUT_MEMBER_FILTER_PATTERN, val)?;
   68     68   
        }
   69     69   
        if let Some(ref val) = self.log_event_messages {
   70     70   
            ser.write_list(
   71     71   
                &TESTMETRICFILTERINPUT_MEMBER_LOG_EVENT_MESSAGES,
   72     72   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   73     73   
                    for item in val {
   74     74   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
   75     75   
                    }
   76     76   
                    Ok(())
   77     77   
                },
   78     78   
            )?;
   79     79   
        }
   80     80   
        Ok(())
   81     81   
    }
   82     82   
}
   83     83   
impl TestMetricFilterInput {
   84     84   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   85         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   86         -
        deserializer: &mut D,
          85  +
    pub fn deserialize(
          86  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   87     87   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   88     88   
        #[allow(unused_variables, unused_mut)]
   89     89   
        let mut builder = Self::builder();
   90     90   
        #[allow(
   91     91   
            unused_variables,
   92     92   
            unreachable_code,
   93     93   
            clippy::single_match,
   94     94   
            clippy::match_single_binding,
   95     95   
            clippy::diverging_sub_expression
   96     96   
        )]
   97         -
        deserializer.read_struct(&TESTMETRICFILTERINPUT_SCHEMA, (), |_, member, deser| {
          97  +
        deserializer.read_struct(&TESTMETRICFILTERINPUT_SCHEMA, &mut |member, deser| {
   98     98   
            match member.member_index() {
   99     99   
                Some(0) => {
  100    100   
                    builder.filter_pattern = Some(deser.read_string(member)?);
  101    101   
                }
  102    102   
                Some(1) => {
  103         -
                    builder.log_event_messages = Some({
  104         -
                        let container = if let Some(cap) = deser.container_size() {
  105         -
                            Vec::with_capacity(cap)
  106         -
                        } else {
  107         -
                            Vec::new()
  108         -
                        };
  109         -
                        deser.read_list(member, container, |mut list, deser| {
  110         -
                            list.push(deser.read_string(member)?);
  111         -
                            Ok(list)
  112         -
                        })?
  113         -
                    });
         103  +
                    builder.log_event_messages = Some(deser.read_string_list(member)?);
  114    104   
                }
  115    105   
                _ => {}
  116    106   
            }
  117    107   
            Ok(())
  118    108   
        })?;
         109  +
        builder.filter_pattern = builder.filter_pattern.or(Some(String::new()));
         110  +
        builder.log_event_messages = builder.log_event_messages.or(Some(Vec::new()));
  119    111   
        builder
  120    112   
            .build()
  121    113   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  122    114   
    }
  123    115   
}
         116  +
impl TestMetricFilterInput {
         117  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         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],
         123  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         124  +
        Self::deserialize(deserializer)
         125  +
    }
         126  +
}
  124    127   
impl TestMetricFilterInput {
  125    128   
    /// Creates a new builder-style object to manufacture [`TestMetricFilterInput`](crate::operation::test_metric_filter::TestMetricFilterInput).
  126    129   
    pub fn builder() -> crate::operation::test_metric_filter::builders::TestMetricFilterInputBuilder {
  127    130   
        crate::operation::test_metric_filter::builders::TestMetricFilterInputBuilder::default()
  128    131   
    }
  129    132   
}
  130    133   
  131    134   
/// A builder for [`TestMetricFilterInput`](crate::operation::test_metric_filter::TestMetricFilterInput).
  132    135   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  133    136   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/test_metric_filter/_test_metric_filter_output.rs

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