AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_integration/_put_integration_input.rs

@@ -9,9 +159,168 @@
   29     29   
    "com.amazonaws.cloudwatchlogs.synthetic",
   30     30   
    "PutIntegrationInput",
   31     31   
);
   32     32   
static PUTINTEGRATIONINPUT_MEMBER_INTEGRATION_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   33     33   
    ::aws_smithy_schema::ShapeId::from_static(
   34     34   
        "com.amazonaws.cloudwatchlogs.synthetic#PutIntegrationInput$integrationName",
   35     35   
        "com.amazonaws.cloudwatchlogs.synthetic",
   36     36   
        "PutIntegrationInput",
   37     37   
    ),
   38     38   
    ::aws_smithy_schema::ShapeType::String,
   39         -
    "integration_name",
          39  +
    "integrationName",
   40     40   
    0,
   41     41   
);
   42     42   
static PUTINTEGRATIONINPUT_MEMBER_RESOURCE_CONFIG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   43     43   
    ::aws_smithy_schema::ShapeId::from_static(
   44     44   
        "com.amazonaws.cloudwatchlogs.synthetic#PutIntegrationInput$resourceConfig",
   45     45   
        "com.amazonaws.cloudwatchlogs.synthetic",
   46     46   
        "PutIntegrationInput",
   47     47   
    ),
   48     48   
    ::aws_smithy_schema::ShapeType::Union,
   49         -
    "resource_config",
          49  +
    "resourceConfig",
   50     50   
    1,
   51     51   
);
   52     52   
static PUTINTEGRATIONINPUT_MEMBER_INTEGRATION_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.cloudwatchlogs.synthetic#PutIntegrationInput$integrationType",
   55     55   
        "com.amazonaws.cloudwatchlogs.synthetic",
   56     56   
        "PutIntegrationInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::String,
   59         -
    "integration_type",
          59  +
    "integrationType",
   60     60   
    2,
   61     61   
);
   62     62   
static PUTINTEGRATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   63     63   
    PUTINTEGRATIONINPUT_SCHEMA_ID,
   64     64   
    ::aws_smithy_schema::ShapeType::Structure,
   65     65   
    &[
   66     66   
        &PUTINTEGRATIONINPUT_MEMBER_INTEGRATION_NAME,
   67     67   
        &PUTINTEGRATIONINPUT_MEMBER_RESOURCE_CONFIG,
   68     68   
        &PUTINTEGRATIONINPUT_MEMBER_INTEGRATION_TYPE,
   69     69   
    ],
   70     70   
);
   71     71   
impl PutIntegrationInput {
   72     72   
    /// The schema for this shape.
   73     73   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTINTEGRATIONINPUT_SCHEMA;
   74     74   
}
   75     75   
impl ::aws_smithy_schema::serde::SerializableStruct for PutIntegrationInput {
   76     76   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   77     77   
    fn serialize_members(
   78     78   
        &self,
   79     79   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   80     80   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   81     81   
        if let Some(ref val) = self.integration_name {
   82     82   
            ser.write_string(&PUTINTEGRATIONINPUT_MEMBER_INTEGRATION_NAME, val)?;
   83     83   
        }
   84     84   
        if let Some(ref val) = self.resource_config {
   85         -
            ser.write_null(&PUTINTEGRATIONINPUT_MEMBER_RESOURCE_CONFIG)?;
          85  +
            ser.write_struct(&PUTINTEGRATIONINPUT_MEMBER_RESOURCE_CONFIG, val)?;
   86     86   
        }
   87     87   
        if let Some(ref val) = self.integration_type {
   88     88   
            ser.write_string(&PUTINTEGRATIONINPUT_MEMBER_INTEGRATION_TYPE, val.as_str())?;
   89     89   
        }
   90     90   
        Ok(())
   91     91   
    }
   92     92   
}
   93     93   
impl PutIntegrationInput {
   94     94   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   95         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   96         -
        deserializer: &mut D,
          95  +
    pub fn deserialize(
          96  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   97     97   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   98     98   
        #[allow(unused_variables, unused_mut)]
   99     99   
        let mut builder = Self::builder();
  100    100   
        #[allow(
  101    101   
            unused_variables,
  102    102   
            unreachable_code,
  103    103   
            clippy::single_match,
  104    104   
            clippy::match_single_binding,
  105    105   
            clippy::diverging_sub_expression
  106    106   
        )]
  107         -
        deserializer.read_struct(&PUTINTEGRATIONINPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&PUTINTEGRATIONINPUT_SCHEMA, &mut |member, deser| {
  108    108   
            match member.member_index() {
  109    109   
                Some(0) => {
  110    110   
                    builder.integration_name = Some(deser.read_string(member)?);
  111    111   
                }
  112    112   
                Some(1) => {
  113         -
                    builder.resource_config = Some({
  114         -
                        let _ = member;
  115         -
                        todo!("deserialize aggregate")
  116         -
                    });
         113  +
                    builder.resource_config = Some(crate::types::ResourceConfig::deserialize(deser)?);
  117    114   
                }
  118    115   
                Some(2) => {
  119    116   
                    builder.integration_type = Some(crate::types::IntegrationType::from(deser.read_string(member)?.as_str()));
  120    117   
                }
  121    118   
                _ => {}
  122    119   
            }
  123    120   
            Ok(())
  124    121   
        })?;
         122  +
        builder.integration_name = builder.integration_name.or(Some(String::new()));
  125    123   
        builder
  126    124   
            .build()
  127    125   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  128    126   
    }
  129    127   
}
         128  +
impl PutIntegrationInput {
         129  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         130  +
    pub fn deserialize_with_response(
         131  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         132  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         133  +
        _status: u16,
         134  +
        _body: &[u8],
         135  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         136  +
        Self::deserialize(deserializer)
         137  +
    }
         138  +
}
  130    139   
impl PutIntegrationInput {
  131    140   
    /// Creates a new builder-style object to manufacture [`PutIntegrationInput`](crate::operation::put_integration::PutIntegrationInput).
  132    141   
    pub fn builder() -> crate::operation::put_integration::builders::PutIntegrationInputBuilder {
  133    142   
        crate::operation::put_integration::builders::PutIntegrationInputBuilder::default()
  134    143   
    }
  135    144   
}
  136    145   
  137    146   
/// A builder for [`PutIntegrationInput`](crate::operation::put_integration::PutIntegrationInput).
  138    147   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  139    148   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_integration/_put_integration_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_log_events.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 `PutLogEvents`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutLogEvents;
    6      6   
impl PutLogEvents {
    7      7   
    /// Creates a new `PutLogEvents`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_log_events::PutLogEventsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_log_events::PutLogEventsOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::put_log_events::PutLogEventsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::put_log_events::PutLogEventsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::put_log_events::PutLogEventsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +245,402 @@
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct PutLogEventsResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutLogEventsResponseDeserializer {
  148    152   
    fn deserialize_nonstreaming(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_put_log_events::de_put_log_events_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::put_log_events::PutLogEventsError::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  +
                "DataAlreadyAcceptedException" => crate::operation::put_log_events::PutLogEventsError::DataAlreadyAcceptedException({
         184  +
                    let mut tmp = match protocol
         185  +
                        .deserialize_response(response, crate::types::error::DataAlreadyAcceptedException::SCHEMA, _cfg)
         186  +
                        .and_then(|mut deser| {
         187  +
                            crate::types::error::DataAlreadyAcceptedException::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  +
                "InvalidParameterException" => crate::operation::put_log_events::PutLogEventsError::InvalidParameterException({
         208  +
                    let mut tmp = match protocol
         209  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         210  +
                        .and_then(|mut deser| {
         211  +
                            crate::types::error::InvalidParameterException::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  +
                "InvalidSequenceTokenException" => crate::operation::put_log_events::PutLogEventsError::InvalidSequenceTokenException({
         232  +
                    let mut tmp = match protocol
         233  +
                        .deserialize_response(response, crate::types::error::InvalidSequenceTokenException::SCHEMA, _cfg)
         234  +
                        .and_then(|mut deser| {
         235  +
                            crate::types::error::InvalidSequenceTokenException::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  +
                "ResourceNotFoundException" => crate::operation::put_log_events::PutLogEventsError::ResourceNotFoundException({
         256  +
                    let mut tmp = match protocol
         257  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         258  +
                        .and_then(|mut deser| {
         259  +
                            crate::types::error::ResourceNotFoundException::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  +
                "ServiceUnavailableException" => crate::operation::put_log_events::PutLogEventsError::ServiceUnavailableException({
         280  +
                    let mut tmp = match protocol
         281  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         282  +
                        .and_then(|mut deser| {
         283  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         284  +
                                &mut *deser,
         285  +
                                response.headers(),
         286  +
                                response.status().into(),
         287  +
                                body,
         288  +
                            )
         289  +
                        }) {
         290  +
                        ::std::result::Result::Ok(val) => val,
         291  +
                        ::std::result::Result::Err(e) => {
         292  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         293  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         294  +
                            ))
         295  +
                        }
         296  +
                    };
         297  +
                    tmp.meta = generic;
         298  +
                    if tmp.message.is_none() {
         299  +
                        tmp.message = _error_message;
         300  +
                    }
         301  +
                    tmp
         302  +
                }),
         303  +
                "UnrecognizedClientException" => crate::operation::put_log_events::PutLogEventsError::UnrecognizedClientException({
         304  +
                    let mut tmp = match protocol
         305  +
                        .deserialize_response(response, crate::types::error::UnrecognizedClientException::SCHEMA, _cfg)
         306  +
                        .and_then(|mut deser| {
         307  +
                            crate::types::error::UnrecognizedClientException::deserialize_with_response(
         308  +
                                &mut *deser,
         309  +
                                response.headers(),
         310  +
                                response.status().into(),
         311  +
                                body,
         312  +
                            )
         313  +
                        }) {
         314  +
                        ::std::result::Result::Ok(val) => val,
         315  +
                        ::std::result::Result::Err(e) => {
         316  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         317  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         318  +
                            ))
         319  +
                        }
         320  +
                    };
         321  +
                    tmp.meta = generic;
         322  +
                    if tmp.message.is_none() {
         323  +
                        tmp.message = _error_message;
         324  +
                    }
         325  +
                    tmp
         326  +
                }),
         327  +
                _ => crate::operation::put_log_events::PutLogEventsError::generic(generic),
         328  +
            };
         329  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         330  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         331  +
            ))
  160    332   
        } else {
  161         -
            crate::protocol_serde::shape_put_log_events::de_put_log_events_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         333  +
            let protocol = _cfg
         334  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         335  +
                .expect("a SharedClientProtocol is required");
         336  +
            let mut deser = protocol.deserialize_response(response, PutLogEvents::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         337  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         338  +
            })?;
         339  +
            let body = response.body().bytes().expect("body loaded");
         340  +
            let output = crate::operation::put_log_events::PutLogEventsOutput::deserialize_with_response(
         341  +
                &mut *deser,
         342  +
                response.headers(),
         343  +
                response.status().into(),
         344  +
                body,
         345  +
            )
         346  +
            .map_err(|e| {
         347  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         348  +
            })?;
         349  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         350  +
        }
  164    351   
    }
  165    352   
}
  166    353   
#[derive(Debug)]
  167    354   
struct PutLogEventsRequestSerializer;
  168    355   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutLogEventsRequestSerializer {
  169    356   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    357   
    fn serialize_input(
  171    358   
        &self,
  172    359   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    360   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    361   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    362   
        let input = input
  176    363   
            .downcast::<crate::operation::put_log_events::PutLogEventsInput>()
  177    364   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::put_log_events::PutLogEventsInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                ::std::write!(output, "/").expect("formatting should succeed");
  190         -
                ::std::result::Result::Ok(())
  191         -
            }
  192         -
            #[allow(clippy::unnecessary_wraps)]
  193         -
            fn update_http_builder(
  194         -
                input: &crate::operation::put_log_events::PutLogEventsInput,
  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.PutLogEvents",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_put_log_events::ser_put_log_events_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())
         365  +
        let protocol = _cfg
         366  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         367  +
            .expect("a SharedClientProtocol is required");
         368  +
        let mut request = protocol
         369  +
            .serialize_request(&input, PutLogEvents::INPUT_SCHEMA, "", _cfg)
         370  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         371  +
         372  +
        return ::std::result::Result::Ok(request);
  216    373   
    }
  217    374   
}
  218    375   
#[derive(Debug)]
  219    376   
struct PutLogEventsEndpointParamsInterceptor;
  220    377   
  221    378   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutLogEventsEndpointParamsInterceptor {
  222    379   
    fn name(&self) -> &'static str {
  223    380   
        "PutLogEventsEndpointParamsInterceptor"
  224    381   
    }
  225    382   

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_log_events/_put_log_events_input.rs

@@ -27,27 +117,117 @@
   47     47   
    "com.amazonaws.cloudwatchlogs.synthetic",
   48     48   
    "PutLogEventsInput",
   49     49   
);
   50     50   
static PUTLOGEVENTSINPUT_MEMBER_LOG_GROUP_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   51     51   
    ::aws_smithy_schema::ShapeId::from_static(
   52     52   
        "com.amazonaws.cloudwatchlogs.synthetic#PutLogEventsInput$logGroupName",
   53     53   
        "com.amazonaws.cloudwatchlogs.synthetic",
   54     54   
        "PutLogEventsInput",
   55     55   
    ),
   56     56   
    ::aws_smithy_schema::ShapeType::String,
   57         -
    "log_group_name",
          57  +
    "logGroupName",
   58     58   
    0,
   59     59   
);
   60     60   
static PUTLOGEVENTSINPUT_MEMBER_LOG_STREAM_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   61     61   
    ::aws_smithy_schema::ShapeId::from_static(
   62     62   
        "com.amazonaws.cloudwatchlogs.synthetic#PutLogEventsInput$logStreamName",
   63     63   
        "com.amazonaws.cloudwatchlogs.synthetic",
   64     64   
        "PutLogEventsInput",
   65     65   
    ),
   66     66   
    ::aws_smithy_schema::ShapeType::String,
   67         -
    "log_stream_name",
          67  +
    "logStreamName",
   68     68   
    1,
   69     69   
);
   70     70   
static PUTLOGEVENTSINPUT_MEMBER_LOG_EVENTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "com.amazonaws.cloudwatchlogs.synthetic#PutLogEventsInput$logEvents",
   73     73   
        "com.amazonaws.cloudwatchlogs.synthetic",
   74     74   
        "PutLogEventsInput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::List,
   77         -
    "log_events",
          77  +
    "logEvents",
   78     78   
    2,
   79     79   
);
   80     80   
static PUTLOGEVENTSINPUT_MEMBER_SEQUENCE_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   81     81   
    ::aws_smithy_schema::ShapeId::from_static(
   82     82   
        "com.amazonaws.cloudwatchlogs.synthetic#PutLogEventsInput$sequenceToken",
   83     83   
        "com.amazonaws.cloudwatchlogs.synthetic",
   84     84   
        "PutLogEventsInput",
   85     85   
    ),
   86     86   
    ::aws_smithy_schema::ShapeType::String,
   87         -
    "sequence_token",
          87  +
    "sequenceToken",
   88     88   
    3,
   89     89   
);
   90     90   
static PUTLOGEVENTSINPUT_MEMBER_ENTITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   91     91   
    ::aws_smithy_schema::ShapeId::from_static(
   92     92   
        "com.amazonaws.cloudwatchlogs.synthetic#PutLogEventsInput$entity",
   93     93   
        "com.amazonaws.cloudwatchlogs.synthetic",
   94     94   
        "PutLogEventsInput",
   95     95   
    ),
   96     96   
    ::aws_smithy_schema::ShapeType::Structure,
   97     97   
    "entity",
@@ -119,119 +226,237 @@
  139    139   
            ser.write_string(&PUTLOGEVENTSINPUT_MEMBER_SEQUENCE_TOKEN, val)?;
  140    140   
        }
  141    141   
        if let Some(ref val) = self.entity {
  142    142   
            ser.write_struct(&PUTLOGEVENTSINPUT_MEMBER_ENTITY, val)?;
  143    143   
        }
  144    144   
        Ok(())
  145    145   
    }
  146    146   
}
  147    147   
impl PutLogEventsInput {
  148    148   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  149         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  150         -
        deserializer: &mut D,
         149  +
    pub fn deserialize(
         150  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  151    151   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  152    152   
        #[allow(unused_variables, unused_mut)]
  153    153   
        let mut builder = Self::builder();
  154    154   
        #[allow(
  155    155   
            unused_variables,
  156    156   
            unreachable_code,
  157    157   
            clippy::single_match,
  158    158   
            clippy::match_single_binding,
  159    159   
            clippy::diverging_sub_expression
  160    160   
        )]
  161         -
        deserializer.read_struct(&PUTLOGEVENTSINPUT_SCHEMA, (), |_, member, deser| {
         161  +
        deserializer.read_struct(&PUTLOGEVENTSINPUT_SCHEMA, &mut |member, deser| {
  162    162   
            match member.member_index() {
  163    163   
                Some(0) => {
  164    164   
                    builder.log_group_name = Some(deser.read_string(member)?);
  165    165   
                }
  166    166   
                Some(1) => {
  167    167   
                    builder.log_stream_name = Some(deser.read_string(member)?);
  168    168   
                }
  169    169   
                Some(2) => {
  170    170   
                    builder.log_events = Some({
  171         -
                        let container = if let Some(cap) = deser.container_size() {
  172         -
                            Vec::with_capacity(cap)
  173         -
                        } else {
  174         -
                            Vec::new()
  175         -
                        };
  176         -
                        deser.read_list(member, container, |mut list, deser| {
  177         -
                            list.push(crate::types::InputLogEvent::deserialize(deser)?);
  178         -
                            Ok(list)
  179         -
                        })?
         171  +
                        let mut container = Vec::new();
         172  +
                        deser.read_list(member, &mut |deser| {
         173  +
                            container.push(crate::types::InputLogEvent::deserialize(deser)?);
         174  +
                            Ok(())
         175  +
                        })?;
         176  +
                        container
  180    177   
                    });
  181    178   
                }
  182    179   
                Some(3) => {
  183    180   
                    builder.sequence_token = Some(deser.read_string(member)?);
  184    181   
                }
  185    182   
                Some(4) => {
  186    183   
                    builder.entity = Some(crate::types::Entity::deserialize(deser)?);
  187    184   
                }
  188    185   
                _ => {}
  189    186   
            }
  190    187   
            Ok(())
  191    188   
        })?;
         189  +
        builder.log_group_name = builder.log_group_name.or(Some(String::new()));
         190  +
        builder.log_stream_name = builder.log_stream_name.or(Some(String::new()));
         191  +
        builder.log_events = builder.log_events.or(Some(Vec::new()));
  192    192   
        builder
  193    193   
            .build()
  194    194   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  195    195   
    }
  196    196   
}
         197  +
impl PutLogEventsInput {
         198  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         199  +
    pub fn deserialize_with_response(
         200  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         201  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         202  +
        _status: u16,
         203  +
        _body: &[u8],
         204  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         205  +
        Self::deserialize(deserializer)
         206  +
    }
         207  +
}
  197    208   
impl PutLogEventsInput {
  198    209   
    /// Creates a new builder-style object to manufacture [`PutLogEventsInput`](crate::operation::put_log_events::PutLogEventsInput).
  199    210   
    pub fn builder() -> crate::operation::put_log_events::builders::PutLogEventsInputBuilder {
  200    211   
        crate::operation::put_log_events::builders::PutLogEventsInputBuilder::default()
  201    212   
    }
  202    213   
}
  203    214   
  204    215   
/// A builder for [`PutLogEventsInput`](crate::operation::put_log_events::PutLogEventsInput).
  205    216   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  206    217   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_log_events/_put_log_events_output.rs

@@ -20,20 +148,199 @@
   40     40   
    "com.amazonaws.cloudwatchlogs.synthetic",
   41     41   
    "PutLogEventsOutput",
   42     42   
);
   43     43   
static PUTLOGEVENTSOUTPUT_MEMBER_NEXT_SEQUENCE_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   44     44   
    ::aws_smithy_schema::ShapeId::from_static(
   45     45   
        "com.amazonaws.cloudwatchlogs.synthetic#PutLogEventsOutput$nextSequenceToken",
   46     46   
        "com.amazonaws.cloudwatchlogs.synthetic",
   47     47   
        "PutLogEventsOutput",
   48     48   
    ),
   49     49   
    ::aws_smithy_schema::ShapeType::String,
   50         -
    "next_sequence_token",
          50  +
    "nextSequenceToken",
   51     51   
    0,
   52     52   
);
   53     53   
static PUTLOGEVENTSOUTPUT_MEMBER_REJECTED_LOG_EVENTS_INFO: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   54     54   
    ::aws_smithy_schema::ShapeId::from_static(
   55     55   
        "com.amazonaws.cloudwatchlogs.synthetic#PutLogEventsOutput$rejectedLogEventsInfo",
   56     56   
        "com.amazonaws.cloudwatchlogs.synthetic",
   57     57   
        "PutLogEventsOutput",
   58     58   
    ),
   59     59   
    ::aws_smithy_schema::ShapeType::Structure,
   60         -
    "rejected_log_events_info",
          60  +
    "rejectedLogEventsInfo",
   61     61   
    1,
   62     62   
);
   63     63   
static PUTLOGEVENTSOUTPUT_MEMBER_REJECTED_ENTITY_INFO: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   64     64   
    ::aws_smithy_schema::ShapeId::from_static(
   65     65   
        "com.amazonaws.cloudwatchlogs.synthetic#PutLogEventsOutput$rejectedEntityInfo",
   66     66   
        "com.amazonaws.cloudwatchlogs.synthetic",
   67     67   
        "PutLogEventsOutput",
   68     68   
    ),
   69     69   
    ::aws_smithy_schema::ShapeType::Structure,
   70         -
    "rejected_entity_info",
          70  +
    "rejectedEntityInfo",
   71     71   
    2,
   72     72   
);
          73  +
static PUTLOGEVENTSOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          74  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          75  +
    ::aws_smithy_schema::ShapeType::String,
          76  +
    "request_id",
          77  +
    3,
          78  +
)
          79  +
.with_http_header("x-amzn-requestid");
   73     80   
static PUTLOGEVENTSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   74     81   
    PUTLOGEVENTSOUTPUT_SCHEMA_ID,
   75     82   
    ::aws_smithy_schema::ShapeType::Structure,
   76     83   
    &[
   77     84   
        &PUTLOGEVENTSOUTPUT_MEMBER_NEXT_SEQUENCE_TOKEN,
   78     85   
        &PUTLOGEVENTSOUTPUT_MEMBER_REJECTED_LOG_EVENTS_INFO,
   79     86   
        &PUTLOGEVENTSOUTPUT_MEMBER_REJECTED_ENTITY_INFO,
          87  +
        &PUTLOGEVENTSOUTPUT_MEMBER__REQUEST_ID,
   80     88   
    ],
   81     89   
);
   82     90   
impl PutLogEventsOutput {
   83     91   
    /// The schema for this shape.
   84     92   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTLOGEVENTSOUTPUT_SCHEMA;
   85     93   
}
   86     94   
impl ::aws_smithy_schema::serde::SerializableStruct for PutLogEventsOutput {
   87     95   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   88     96   
    fn serialize_members(
   89     97   
        &self,
   90     98   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   91     99   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   92    100   
        if let Some(ref val) = self.next_sequence_token {
   93    101   
            ser.write_string(&PUTLOGEVENTSOUTPUT_MEMBER_NEXT_SEQUENCE_TOKEN, val)?;
   94    102   
        }
   95    103   
        if let Some(ref val) = self.rejected_log_events_info {
   96    104   
            ser.write_struct(&PUTLOGEVENTSOUTPUT_MEMBER_REJECTED_LOG_EVENTS_INFO, val)?;
   97    105   
        }
   98    106   
        if let Some(ref val) = self.rejected_entity_info {
   99    107   
            ser.write_struct(&PUTLOGEVENTSOUTPUT_MEMBER_REJECTED_ENTITY_INFO, val)?;
  100    108   
        }
  101    109   
        Ok(())
  102    110   
    }
  103    111   
}
  104    112   
impl PutLogEventsOutput {
  105    113   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  106         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  107         -
        deserializer: &mut D,
         114  +
    pub fn deserialize(
         115  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  108    116   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  109    117   
        #[allow(unused_variables, unused_mut)]
  110    118   
        let mut builder = Self::builder();
  111    119   
        #[allow(
  112    120   
            unused_variables,
  113    121   
            unreachable_code,
  114    122   
            clippy::single_match,
  115    123   
            clippy::match_single_binding,
  116    124   
            clippy::diverging_sub_expression
  117    125   
        )]
  118         -
        deserializer.read_struct(&PUTLOGEVENTSOUTPUT_SCHEMA, (), |_, member, deser| {
         126  +
        deserializer.read_struct(&PUTLOGEVENTSOUTPUT_SCHEMA, &mut |member, deser| {
         127  +
            match member.member_index() {
         128  +
                Some(0) => {
         129  +
                    builder.next_sequence_token = Some(deser.read_string(member)?);
         130  +
                }
         131  +
                Some(1) => {
         132  +
                    builder.rejected_log_events_info = Some(crate::types::RejectedLogEventsInfo::deserialize(deser)?);
         133  +
                }
         134  +
                Some(2) => {
         135  +
                    builder.rejected_entity_info = Some(crate::types::RejectedEntityInfo::deserialize(deser)?);
         136  +
                }
         137  +
                Some(3) => {
         138  +
                    builder._request_id = Some(deser.read_string(member)?);
         139  +
                }
         140  +
                _ => {}
         141  +
            }
         142  +
            Ok(())
         143  +
        })?;
         144  +
        Ok(builder.build())
         145  +
    }
         146  +
}
         147  +
impl PutLogEventsOutput {
         148  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         149  +
    /// Header-bound members are read directly from headers, avoiding runtime
         150  +
    /// member iteration overhead. Body members are read via the deserializer.
         151  +
    pub fn deserialize_with_response(
         152  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         153  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         154  +
        _status: u16,
         155  +
        _body: &[u8],
         156  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         157  +
        #[allow(unused_variables, unused_mut)]
         158  +
        let mut builder = Self::builder();
         159  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         160  +
            builder._request_id = Some(val.to_string());
         161  +
        }
         162  +
        #[allow(
         163  +
            unused_variables,
         164  +
            unreachable_code,
         165  +
            clippy::single_match,
         166  +
            clippy::match_single_binding,
         167  +
            clippy::diverging_sub_expression
         168  +
        )]
         169  +
        deserializer.read_struct(&PUTLOGEVENTSOUTPUT_SCHEMA, &mut |member, deser| {
  119    170   
            match member.member_index() {
  120    171   
                Some(0) => {
  121    172   
                    builder.next_sequence_token = Some(deser.read_string(member)?);
  122    173   
                }
  123    174   
                Some(1) => {
  124    175   
                    builder.rejected_log_events_info = Some(crate::types::RejectedLogEventsInfo::deserialize(deser)?);
  125    176   
                }
  126    177   
                Some(2) => {
  127    178   
                    builder.rejected_entity_info = Some(crate::types::RejectedEntityInfo::deserialize(deser)?);
  128    179   
                }

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_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 `PutMetricFilter`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutMetricFilter;
    6      6   
impl PutMetricFilter {
    7      7   
    /// Creates a new `PutMetricFilter`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_metric_filter::PutMetricFilterInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_metric_filter::PutMetricFilterOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::put_metric_filter::PutMetricFilterInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::put_metric_filter::PutMetricFilterOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::put_metric_filter::PutMetricFilterError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +245,406 @@
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct PutMetricFilterResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutMetricFilterResponseDeserializer {
  148    152   
    fn deserialize_nonstreaming(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_put_metric_filter::de_put_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::put_metric_filter::PutMetricFilterError::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  +
                "InvalidOperationException" => crate::operation::put_metric_filter::PutMetricFilterError::InvalidOperationException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::InvalidOperationException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::InvalidOperationException::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  +
                "InvalidParameterException" => crate::operation::put_metric_filter::PutMetricFilterError::InvalidParameterException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::InvalidParameterException::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  +
                "LimitExceededException" => crate::operation::put_metric_filter::PutMetricFilterError::LimitExceededException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::LimitExceededException::deserialize_with_response(
         238  +
                                &mut *deser,
         239  +
                                response.headers(),
         240  +
                                response.status().into(),
         241  +
                                body,
         242  +
                            )
         243  +
                        }) {
         244  +
                        ::std::result::Result::Ok(val) => val,
         245  +
                        ::std::result::Result::Err(e) => {
         246  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         247  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         248  +
                            ))
         249  +
                        }
         250  +
                    };
         251  +
                    tmp.meta = generic;
         252  +
                    if tmp.message.is_none() {
         253  +
                        tmp.message = _error_message;
         254  +
                    }
         255  +
                    tmp
         256  +
                }),
         257  +
                "OperationAbortedException" => crate::operation::put_metric_filter::PutMetricFilterError::OperationAbortedException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::OperationAbortedException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::OperationAbortedException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    if tmp.message.is_none() {
         277  +
                        tmp.message = _error_message;
         278  +
                    }
         279  +
                    tmp
         280  +
                }),
         281  +
                "ResourceNotFoundException" => crate::operation::put_metric_filter::PutMetricFilterError::ResourceNotFoundException({
         282  +
                    let mut tmp = match protocol
         283  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         284  +
                        .and_then(|mut deser| {
         285  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         286  +
                                &mut *deser,
         287  +
                                response.headers(),
         288  +
                                response.status().into(),
         289  +
                                body,
         290  +
                            )
         291  +
                        }) {
         292  +
                        ::std::result::Result::Ok(val) => val,
         293  +
                        ::std::result::Result::Err(e) => {
         294  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         295  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         296  +
                            ))
         297  +
                        }
         298  +
                    };
         299  +
                    tmp.meta = generic;
         300  +
                    if tmp.message.is_none() {
         301  +
                        tmp.message = _error_message;
         302  +
                    }
         303  +
                    tmp
         304  +
                }),
         305  +
                "ServiceUnavailableException" => crate::operation::put_metric_filter::PutMetricFilterError::ServiceUnavailableException({
         306  +
                    let mut tmp = match protocol
         307  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         308  +
                        .and_then(|mut deser| {
         309  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         310  +
                                &mut *deser,
         311  +
                                response.headers(),
         312  +
                                response.status().into(),
         313  +
                                body,
         314  +
                            )
         315  +
                        }) {
         316  +
                        ::std::result::Result::Ok(val) => val,
         317  +
                        ::std::result::Result::Err(e) => {
         318  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         319  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         320  +
                            ))
         321  +
                        }
         322  +
                    };
         323  +
                    tmp.meta = generic;
         324  +
                    if tmp.message.is_none() {
         325  +
                        tmp.message = _error_message;
         326  +
                    }
         327  +
                    tmp
         328  +
                }),
         329  +
                _ => crate::operation::put_metric_filter::PutMetricFilterError::generic(generic),
         330  +
            };
         331  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         332  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         333  +
            ))
  160    334   
        } else {
  161         -
            crate::protocol_serde::shape_put_metric_filter::de_put_metric_filter_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         335  +
            let protocol = _cfg
         336  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         337  +
                .expect("a SharedClientProtocol is required");
         338  +
            let mut deser = protocol
         339  +
                .deserialize_response(response, PutMetricFilter::OUTPUT_SCHEMA, _cfg)
         340  +
                .map_err(|e| {
         341  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         342  +
                })?;
         343  +
            let body = response.body().bytes().expect("body loaded");
         344  +
            let output = crate::operation::put_metric_filter::PutMetricFilterOutput::deserialize_with_response(
         345  +
                &mut *deser,
         346  +
                response.headers(),
         347  +
                response.status().into(),
         348  +
                body,
         349  +
            )
         350  +
            .map_err(|e| {
         351  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         352  +
            })?;
         353  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         354  +
        }
  164    355   
    }
  165    356   
}
  166    357   
#[derive(Debug)]
  167    358   
struct PutMetricFilterRequestSerializer;
  168    359   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutMetricFilterRequestSerializer {
  169    360   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    361   
    fn serialize_input(
  171    362   
        &self,
  172    363   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    364   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    365   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    366   
        let input = input
  176    367   
            .downcast::<crate::operation::put_metric_filter::PutMetricFilterInput>()
  177    368   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::put_metric_filter::PutMetricFilterInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                ::std::write!(output, "/").expect("formatting should succeed");
  190         -
                ::std::result::Result::Ok(())
  191         -
            }
  192         -
            #[allow(clippy::unnecessary_wraps)]
  193         -
            fn update_http_builder(
  194         -
                input: &crate::operation::put_metric_filter::PutMetricFilterInput,
  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.PutMetricFilter",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_put_metric_filter::ser_put_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())
         369  +
        let protocol = _cfg
         370  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         371  +
            .expect("a SharedClientProtocol is required");
         372  +
        let mut request = protocol
         373  +
            .serialize_request(&input, PutMetricFilter::INPUT_SCHEMA, "", _cfg)
         374  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         375  +
         376  +
        return ::std::result::Result::Ok(request);
  216    377   
    }
  217    378   
}
  218    379   
#[derive(Debug)]
  219    380   
struct PutMetricFilterEndpointParamsInterceptor;
  220    381   
  221    382   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutMetricFilterEndpointParamsInterceptor {
  222    383   
    fn name(&self) -> &'static str {
  223    384   
        "PutMetricFilterEndpointParamsInterceptor"
  224    385   
    }
  225    386   

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_metric_filter/_put_metric_filter_input.rs

@@ -39,39 +159,159 @@
   59     59   
    "com.amazonaws.cloudwatchlogs.synthetic",
   60     60   
    "PutMetricFilterInput",
   61     61   
);
   62     62   
static PUTMETRICFILTERINPUT_MEMBER_LOG_GROUP_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   63     63   
    ::aws_smithy_schema::ShapeId::from_static(
   64     64   
        "com.amazonaws.cloudwatchlogs.synthetic#PutMetricFilterInput$logGroupName",
   65     65   
        "com.amazonaws.cloudwatchlogs.synthetic",
   66     66   
        "PutMetricFilterInput",
   67     67   
    ),
   68     68   
    ::aws_smithy_schema::ShapeType::String,
   69         -
    "log_group_name",
          69  +
    "logGroupName",
   70     70   
    0,
   71     71   
);
   72     72   
static PUTMETRICFILTERINPUT_MEMBER_FILTER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.cloudwatchlogs.synthetic#PutMetricFilterInput$filterName",
   75     75   
        "com.amazonaws.cloudwatchlogs.synthetic",
   76     76   
        "PutMetricFilterInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::String,
   79         -
    "filter_name",
          79  +
    "filterName",
   80     80   
    1,
   81     81   
);
   82     82   
static PUTMETRICFILTERINPUT_MEMBER_FILTER_PATTERN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   83     83   
    ::aws_smithy_schema::ShapeId::from_static(
   84     84   
        "com.amazonaws.cloudwatchlogs.synthetic#PutMetricFilterInput$filterPattern",
   85     85   
        "com.amazonaws.cloudwatchlogs.synthetic",
   86     86   
        "PutMetricFilterInput",
   87     87   
    ),
   88     88   
    ::aws_smithy_schema::ShapeType::String,
   89         -
    "filter_pattern",
          89  +
    "filterPattern",
   90     90   
    2,
   91     91   
);
   92     92   
static PUTMETRICFILTERINPUT_MEMBER_METRIC_TRANSFORMATIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   93     93   
    ::aws_smithy_schema::ShapeId::from_static(
   94     94   
        "com.amazonaws.cloudwatchlogs.synthetic#PutMetricFilterInput$metricTransformations",
   95     95   
        "com.amazonaws.cloudwatchlogs.synthetic",
   96     96   
        "PutMetricFilterInput",
   97     97   
    ),
   98     98   
    ::aws_smithy_schema::ShapeType::List,
   99         -
    "metric_transformations",
          99  +
    "metricTransformations",
  100    100   
    3,
  101    101   
);
  102    102   
static PUTMETRICFILTERINPUT_MEMBER_APPLY_ON_TRANSFORMED_LOGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  103    103   
    ::aws_smithy_schema::ShapeId::from_static(
  104    104   
        "com.amazonaws.cloudwatchlogs.synthetic#PutMetricFilterInput$applyOnTransformedLogs",
  105    105   
        "com.amazonaws.cloudwatchlogs.synthetic",
  106    106   
        "PutMetricFilterInput",
  107    107   
    ),
  108    108   
    ::aws_smithy_schema::ShapeType::Boolean,
  109         -
    "apply_on_transformed_logs",
         109  +
    "applyOnTransformedLogs",
  110    110   
    4,
  111    111   
);
  112    112   
static PUTMETRICFILTERINPUT_MEMBER_FIELD_SELECTION_CRITERIA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  113    113   
    ::aws_smithy_schema::ShapeId::from_static(
  114    114   
        "com.amazonaws.cloudwatchlogs.synthetic#PutMetricFilterInput$fieldSelectionCriteria",
  115    115   
        "com.amazonaws.cloudwatchlogs.synthetic",
  116    116   
        "PutMetricFilterInput",
  117    117   
    ),
  118    118   
    ::aws_smithy_schema::ShapeType::String,
  119         -
    "field_selection_criteria",
         119  +
    "fieldSelectionCriteria",
  120    120   
    5,
  121    121   
);
  122    122   
static PUTMETRICFILTERINPUT_MEMBER_EMIT_SYSTEM_FIELD_DIMENSIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  123    123   
    ::aws_smithy_schema::ShapeId::from_static(
  124    124   
        "com.amazonaws.cloudwatchlogs.synthetic#PutMetricFilterInput$emitSystemFieldDimensions",
  125    125   
        "com.amazonaws.cloudwatchlogs.synthetic",
  126    126   
        "PutMetricFilterInput",
  127    127   
    ),
  128    128   
    ::aws_smithy_schema::ShapeType::List,
  129         -
    "emit_system_field_dimensions",
         129  +
    "emitSystemFieldDimensions",
  130    130   
    6,
  131    131   
);
  132    132   
static PUTMETRICFILTERINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  133    133   
    PUTMETRICFILTERINPUT_SCHEMA_ID,
  134    134   
    ::aws_smithy_schema::ShapeType::Structure,
  135    135   
    &[
  136    136   
        &PUTMETRICFILTERINPUT_MEMBER_LOG_GROUP_NAME,
  137    137   
        &PUTMETRICFILTERINPUT_MEMBER_FILTER_NAME,
  138    138   
        &PUTMETRICFILTERINPUT_MEMBER_FILTER_PATTERN,
  139    139   
        &PUTMETRICFILTERINPUT_MEMBER_METRIC_TRANSFORMATIONS,
@@ -167,167 +290,292 @@
  187    187   
                    }
  188    188   
                    Ok(())
  189    189   
                },
  190    190   
            )?;
  191    191   
        }
  192    192   
        Ok(())
  193    193   
    }
  194    194   
}
  195    195   
impl PutMetricFilterInput {
  196    196   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  197         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  198         -
        deserializer: &mut D,
         197  +
    pub fn deserialize(
         198  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  199    199   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  200    200   
        #[allow(unused_variables, unused_mut)]
  201    201   
        let mut builder = Self::builder();
  202    202   
        #[allow(
  203    203   
            unused_variables,
  204    204   
            unreachable_code,
  205    205   
            clippy::single_match,
  206    206   
            clippy::match_single_binding,
  207    207   
            clippy::diverging_sub_expression
  208    208   
        )]
  209         -
        deserializer.read_struct(&PUTMETRICFILTERINPUT_SCHEMA, (), |_, member, deser| {
         209  +
        deserializer.read_struct(&PUTMETRICFILTERINPUT_SCHEMA, &mut |member, deser| {
  210    210   
            match member.member_index() {
  211    211   
                Some(0) => {
  212    212   
                    builder.log_group_name = Some(deser.read_string(member)?);
  213    213   
                }
  214    214   
                Some(1) => {
  215    215   
                    builder.filter_name = Some(deser.read_string(member)?);
  216    216   
                }
  217    217   
                Some(2) => {
  218    218   
                    builder.filter_pattern = Some(deser.read_string(member)?);
  219    219   
                }
  220    220   
                Some(3) => {
  221    221   
                    builder.metric_transformations = Some({
  222         -
                        let container = if let Some(cap) = deser.container_size() {
  223         -
                            Vec::with_capacity(cap)
  224         -
                        } else {
  225         -
                            Vec::new()
  226         -
                        };
  227         -
                        deser.read_list(member, container, |mut list, deser| {
  228         -
                            list.push(crate::types::MetricTransformation::deserialize(deser)?);
  229         -
                            Ok(list)
  230         -
                        })?
         222  +
                        let mut container = Vec::new();
         223  +
                        deser.read_list(member, &mut |deser| {
         224  +
                            container.push(crate::types::MetricTransformation::deserialize(deser)?);
         225  +
                            Ok(())
         226  +
                        })?;
         227  +
                        container
  231    228   
                    });
  232    229   
                }
  233    230   
                Some(4) => {
  234    231   
                    builder.apply_on_transformed_logs = Some(deser.read_boolean(member)?);
  235    232   
                }
  236    233   
                Some(5) => {
  237    234   
                    builder.field_selection_criteria = Some(deser.read_string(member)?);
  238    235   
                }
  239    236   
                Some(6) => {
  240         -
                    builder.emit_system_field_dimensions = Some({
  241         -
                        let container = if let Some(cap) = deser.container_size() {
  242         -
                            Vec::with_capacity(cap)
  243         -
                        } else {
  244         -
                            Vec::new()
  245         -
                        };
  246         -
                        deser.read_list(member, container, |mut list, deser| {
  247         -
                            list.push(deser.read_string(member)?);
  248         -
                            Ok(list)
  249         -
                        })?
  250         -
                    });
         237  +
                    builder.emit_system_field_dimensions = Some(deser.read_string_list(member)?);
  251    238   
                }
  252    239   
                _ => {}
  253    240   
            }
  254    241   
            Ok(())
  255    242   
        })?;
         243  +
        builder.log_group_name = builder.log_group_name.or(Some(String::new()));
         244  +
        builder.filter_name = builder.filter_name.or(Some(String::new()));
         245  +
        builder.filter_pattern = builder.filter_pattern.or(Some(String::new()));
         246  +
        builder.metric_transformations = builder.metric_transformations.or(Some(Vec::new()));
  256    247   
        builder
  257    248   
            .build()
  258    249   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  259    250   
    }
  260    251   
}
         252  +
impl PutMetricFilterInput {
         253  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         254  +
    pub fn deserialize_with_response(
         255  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         256  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         257  +
        _status: u16,
         258  +
        _body: &[u8],
         259  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         260  +
        Self::deserialize(deserializer)
         261  +
    }
         262  +
}
  261    263   
impl PutMetricFilterInput {
  262    264   
    /// Creates a new builder-style object to manufacture [`PutMetricFilterInput`](crate::operation::put_metric_filter::PutMetricFilterInput).
  263    265   
    pub fn builder() -> crate::operation::put_metric_filter::builders::PutMetricFilterInputBuilder {
  264    266   
        crate::operation::put_metric_filter::builders::PutMetricFilterInputBuilder::default()
  265    267   
    }
  266    268   
}
  267    269   
  268    270   
/// A builder for [`PutMetricFilterInput`](crate::operation::put_metric_filter::PutMetricFilterInput).
  269    271   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  270    272   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_metric_filter/_put_metric_filter_output.rs

@@ -1,1 +80,111 @@
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct PutMetricFilterOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static PUTMETRICFILTEROUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.cloudwatchlogs.synthetic#PutMetricFilterOutput",
   10     10   
    "com.amazonaws.cloudwatchlogs.synthetic",
   11     11   
    "PutMetricFilterOutput",
   12     12   
);
   13         -
static PUTMETRICFILTEROUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(PUTMETRICFILTEROUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static PUTMETRICFILTEROUTPUT_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 PUTMETRICFILTEROUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    PUTMETRICFILTEROUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&PUTMETRICFILTEROUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl PutMetricFilterOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTMETRICFILTEROUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for PutMetricFilterOutput {
   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 PutMetricFilterOutput {
   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(&PUTMETRICFILTEROUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&PUTMETRICFILTEROUTPUT_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 PutMetricFilterOutput {
          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 PutMetricFilterOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl PutMetricFilterOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`PutMetricFilterOutput`](crate::operation::put_metric_filter::PutMetricFilterOutput).
   58     89   
    pub fn builder() -> crate::operation::put_metric_filter::builders::PutMetricFilterOutputBuilder {
   59     90   
        crate::operation::put_metric_filter::builders::PutMetricFilterOutputBuilder::default()
   60     91   
    }

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