AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/disassociate_kms_key/_disassociate_kms_key_input.rs

@@ -23,23 +153,164 @@
   43     43   
    "com.amazonaws.cloudwatchlogs.synthetic",
   44     44   
    "DisassociateKmsKeyInput",
   45     45   
);
   46     46   
static DISASSOCIATEKMSKEYINPUT_MEMBER_LOG_GROUP_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   47     47   
    ::aws_smithy_schema::ShapeId::from_static(
   48     48   
        "com.amazonaws.cloudwatchlogs.synthetic#DisassociateKmsKeyInput$logGroupName",
   49     49   
        "com.amazonaws.cloudwatchlogs.synthetic",
   50     50   
        "DisassociateKmsKeyInput",
   51     51   
    ),
   52     52   
    ::aws_smithy_schema::ShapeType::String,
   53         -
    "log_group_name",
          53  +
    "logGroupName",
   54     54   
    0,
   55     55   
);
   56     56   
static DISASSOCIATEKMSKEYINPUT_MEMBER_RESOURCE_IDENTIFIER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   57     57   
    ::aws_smithy_schema::ShapeId::from_static(
   58     58   
        "com.amazonaws.cloudwatchlogs.synthetic#DisassociateKmsKeyInput$resourceIdentifier",
   59     59   
        "com.amazonaws.cloudwatchlogs.synthetic",
   60     60   
        "DisassociateKmsKeyInput",
   61     61   
    ),
   62     62   
    ::aws_smithy_schema::ShapeType::String,
   63         -
    "resource_identifier",
          63  +
    "resourceIdentifier",
   64     64   
    1,
   65     65   
);
   66     66   
static DISASSOCIATEKMSKEYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   67     67   
    DISASSOCIATEKMSKEYINPUT_SCHEMA_ID,
   68     68   
    ::aws_smithy_schema::ShapeType::Structure,
   69     69   
    &[
   70     70   
        &DISASSOCIATEKMSKEYINPUT_MEMBER_LOG_GROUP_NAME,
   71     71   
        &DISASSOCIATEKMSKEYINPUT_MEMBER_RESOURCE_IDENTIFIER,
   72     72   
    ],
   73     73   
);
   74     74   
impl DisassociateKmsKeyInput {
   75     75   
    /// The schema for this shape.
   76     76   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DISASSOCIATEKMSKEYINPUT_SCHEMA;
   77     77   
}
   78     78   
impl ::aws_smithy_schema::serde::SerializableStruct for DisassociateKmsKeyInput {
   79     79   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   80     80   
    fn serialize_members(
   81     81   
        &self,
   82     82   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   83     83   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   84     84   
        if let Some(ref val) = self.log_group_name {
   85     85   
            ser.write_string(&DISASSOCIATEKMSKEYINPUT_MEMBER_LOG_GROUP_NAME, val)?;
   86     86   
        }
   87     87   
        if let Some(ref val) = self.resource_identifier {
   88     88   
            ser.write_string(&DISASSOCIATEKMSKEYINPUT_MEMBER_RESOURCE_IDENTIFIER, val)?;
   89     89   
        }
   90     90   
        Ok(())
   91     91   
    }
   92     92   
}
   93     93   
impl DisassociateKmsKeyInput {
   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(&DISASSOCIATEKMSKEYINPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&DISASSOCIATEKMSKEYINPUT_SCHEMA, &mut |member, deser| {
  108    108   
            match member.member_index() {
  109    109   
                Some(0) => {
  110    110   
                    builder.log_group_name = Some(deser.read_string(member)?);
  111    111   
                }
  112    112   
                Some(1) => {
  113    113   
                    builder.resource_identifier = Some(deser.read_string(member)?);
  114    114   
                }
  115    115   
                _ => {}
  116    116   
            }
  117    117   
            Ok(())
  118    118   
        })?;
  119    119   
        builder
  120    120   
            .build()
  121    121   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  122    122   
    }
  123    123   
}
         124  +
impl DisassociateKmsKeyInput {
         125  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         126  +
    pub fn deserialize_with_response(
         127  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         128  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         129  +
        _status: u16,
         130  +
        _body: &[u8],
         131  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         132  +
        Self::deserialize(deserializer)
         133  +
    }
         134  +
}
  124    135   
impl DisassociateKmsKeyInput {
  125    136   
    /// Creates a new builder-style object to manufacture [`DisassociateKmsKeyInput`](crate::operation::disassociate_kms_key::DisassociateKmsKeyInput).
  126    137   
    pub fn builder() -> crate::operation::disassociate_kms_key::builders::DisassociateKmsKeyInputBuilder {
  127    138   
        crate::operation::disassociate_kms_key::builders::DisassociateKmsKeyInputBuilder::default()
  128    139   
    }
  129    140   
}
  130    141   
  131    142   
/// A builder for [`DisassociateKmsKeyInput`](crate::operation::disassociate_kms_key::DisassociateKmsKeyInput).
  132    143   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  133    144   
#[non_exhaustive]

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/filter_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 `FilterLogEvents`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct FilterLogEvents;
    6      6   
impl FilterLogEvents {
    7      7   
    /// Creates a new `FilterLogEvents`
    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::filter_log_events::FilterLogEventsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::filter_log_events::FilterLogEventsOutput::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::filter_log_events::FilterLogEventsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::filter_log_events::FilterLogEventsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::filter_log_events::FilterLogEventsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +245,334 @@
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct FilterLogEventsResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for FilterLogEventsResponseDeserializer {
  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_filter_log_events::de_filter_log_events_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_filter_log_events::de_filter_log_events_http_response(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::filter_log_events::FilterLogEventsError::unhandled(
         175  +
                            generic,
         176  +
                        )),
         177  +
                    ))
         178  +
                }
  162    179   
            };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "InvalidParameterException" => crate::operation::filter_log_events::FilterLogEventsError::InvalidParameterException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         190  +
                                &mut *deser,
         191  +
                                response.headers(),
         192  +
                                response.status().into(),
         193  +
                                body,
         194  +
                            )
         195  +
                        }) {
         196  +
                        ::std::result::Result::Ok(val) => val,
         197  +
                        ::std::result::Result::Err(e) => {
         198  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         199  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         200  +
                            ))
         201  +
                        }
         202  +
                    };
         203  +
                    tmp.meta = generic;
         204  +
                    if tmp.message.is_none() {
         205  +
                        tmp.message = _error_message;
         206  +
                    }
         207  +
                    tmp
         208  +
                }),
         209  +
                "ResourceNotFoundException" => crate::operation::filter_log_events::FilterLogEventsError::ResourceNotFoundException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::ResourceNotFoundException::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  +
                "ServiceUnavailableException" => crate::operation::filter_log_events::FilterLogEventsError::ServiceUnavailableException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::ServiceUnavailableException::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  +
                _ => crate::operation::filter_log_events::FilterLogEventsError::generic(generic),
         258  +
            };
         259  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         260  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         261  +
            ))
         262  +
        } else {
         263  +
            let protocol = _cfg
         264  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         265  +
                .expect("a SharedClientProtocol is required");
         266  +
            let mut deser = protocol
         267  +
                .deserialize_response(response, FilterLogEvents::OUTPUT_SCHEMA, _cfg)
         268  +
                .map_err(|e| {
         269  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         270  +
                })?;
         271  +
            let body = response.body().bytes().expect("body loaded");
         272  +
            let output = crate::operation::filter_log_events::FilterLogEventsOutput::deserialize_with_response(
         273  +
                &mut *deser,
         274  +
                response.headers(),
         275  +
                response.status().into(),
         276  +
                body,
         277  +
            )
         278  +
            .map_err(|e| {
         279  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         280  +
            })?;
         281  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         282  +
        }
  164    283   
    }
  165    284   
}
  166    285   
#[derive(Debug)]
  167    286   
struct FilterLogEventsRequestSerializer;
  168    287   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for FilterLogEventsRequestSerializer {
  169    288   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    289   
    fn serialize_input(
  171    290   
        &self,
  172    291   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    292   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    293   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    294   
        let input = input
  176    295   
            .downcast::<crate::operation::filter_log_events::FilterLogEventsInput>()
  177    296   
            .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::filter_log_events::FilterLogEventsInput,
  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::filter_log_events::FilterLogEventsInput,
  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.FilterLogEvents",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_filter_log_events::ser_filter_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())
         297  +
        let protocol = _cfg
         298  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         299  +
            .expect("a SharedClientProtocol is required");
         300  +
        let mut request = protocol
         301  +
            .serialize_request(&input, FilterLogEvents::INPUT_SCHEMA, "", _cfg)
         302  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         303  +
         304  +
        return ::std::result::Result::Ok(request);
  216    305   
    }
  217    306   
}
  218    307   
#[derive(Debug)]
  219    308   
struct FilterLogEventsEndpointParamsInterceptor;
  220    309   
  221    310   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for FilterLogEventsEndpointParamsInterceptor {
  222    311   
    fn name(&self) -> &'static str {
  223    312   
        "FilterLogEventsEndpointParamsInterceptor"
  224    313   
    }
  225    314   

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/filter_log_events/_filter_log_events_input.rs

@@ -83,83 +213,213 @@
  103    103   
    "com.amazonaws.cloudwatchlogs.synthetic",
  104    104   
    "FilterLogEventsInput",
  105    105   
);
  106    106   
static FILTERLOGEVENTSINPUT_MEMBER_LOG_GROUP_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  107    107   
    ::aws_smithy_schema::ShapeId::from_static(
  108    108   
        "com.amazonaws.cloudwatchlogs.synthetic#FilterLogEventsInput$logGroupName",
  109    109   
        "com.amazonaws.cloudwatchlogs.synthetic",
  110    110   
        "FilterLogEventsInput",
  111    111   
    ),
  112    112   
    ::aws_smithy_schema::ShapeType::String,
  113         -
    "log_group_name",
         113  +
    "logGroupName",
  114    114   
    0,
  115    115   
);
  116    116   
static FILTERLOGEVENTSINPUT_MEMBER_LOG_GROUP_IDENTIFIER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  117    117   
    ::aws_smithy_schema::ShapeId::from_static(
  118    118   
        "com.amazonaws.cloudwatchlogs.synthetic#FilterLogEventsInput$logGroupIdentifier",
  119    119   
        "com.amazonaws.cloudwatchlogs.synthetic",
  120    120   
        "FilterLogEventsInput",
  121    121   
    ),
  122    122   
    ::aws_smithy_schema::ShapeType::String,
  123         -
    "log_group_identifier",
         123  +
    "logGroupIdentifier",
  124    124   
    1,
  125    125   
);
  126    126   
static FILTERLOGEVENTSINPUT_MEMBER_LOG_STREAM_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  127    127   
    ::aws_smithy_schema::ShapeId::from_static(
  128    128   
        "com.amazonaws.cloudwatchlogs.synthetic#FilterLogEventsInput$logStreamNames",
  129    129   
        "com.amazonaws.cloudwatchlogs.synthetic",
  130    130   
        "FilterLogEventsInput",
  131    131   
    ),
  132    132   
    ::aws_smithy_schema::ShapeType::List,
  133         -
    "log_stream_names",
         133  +
    "logStreamNames",
  134    134   
    2,
  135    135   
);
  136    136   
static FILTERLOGEVENTSINPUT_MEMBER_LOG_STREAM_NAME_PREFIX: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  137    137   
    ::aws_smithy_schema::ShapeId::from_static(
  138    138   
        "com.amazonaws.cloudwatchlogs.synthetic#FilterLogEventsInput$logStreamNamePrefix",
  139    139   
        "com.amazonaws.cloudwatchlogs.synthetic",
  140    140   
        "FilterLogEventsInput",
  141    141   
    ),
  142    142   
    ::aws_smithy_schema::ShapeType::String,
  143         -
    "log_stream_name_prefix",
         143  +
    "logStreamNamePrefix",
  144    144   
    3,
  145    145   
);
  146    146   
static FILTERLOGEVENTSINPUT_MEMBER_START_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  147    147   
    ::aws_smithy_schema::ShapeId::from_static(
  148    148   
        "com.amazonaws.cloudwatchlogs.synthetic#FilterLogEventsInput$startTime",
  149    149   
        "com.amazonaws.cloudwatchlogs.synthetic",
  150    150   
        "FilterLogEventsInput",
  151    151   
    ),
  152    152   
    ::aws_smithy_schema::ShapeType::Long,
  153         -
    "start_time",
         153  +
    "startTime",
  154    154   
    4,
  155    155   
);
  156    156   
static FILTERLOGEVENTSINPUT_MEMBER_END_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  157    157   
    ::aws_smithy_schema::ShapeId::from_static(
  158    158   
        "com.amazonaws.cloudwatchlogs.synthetic#FilterLogEventsInput$endTime",
  159    159   
        "com.amazonaws.cloudwatchlogs.synthetic",
  160    160   
        "FilterLogEventsInput",
  161    161   
    ),
  162    162   
    ::aws_smithy_schema::ShapeType::Long,
  163         -
    "end_time",
         163  +
    "endTime",
  164    164   
    5,
  165    165   
);
  166    166   
static FILTERLOGEVENTSINPUT_MEMBER_FILTER_PATTERN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  167    167   
    ::aws_smithy_schema::ShapeId::from_static(
  168    168   
        "com.amazonaws.cloudwatchlogs.synthetic#FilterLogEventsInput$filterPattern",
  169    169   
        "com.amazonaws.cloudwatchlogs.synthetic",
  170    170   
        "FilterLogEventsInput",
  171    171   
    ),
  172    172   
    ::aws_smithy_schema::ShapeType::String,
  173         -
    "filter_pattern",
         173  +
    "filterPattern",
  174    174   
    6,
  175    175   
);
  176    176   
static FILTERLOGEVENTSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  177    177   
    ::aws_smithy_schema::ShapeId::from_static(
  178    178   
        "com.amazonaws.cloudwatchlogs.synthetic#FilterLogEventsInput$nextToken",
  179    179   
        "com.amazonaws.cloudwatchlogs.synthetic",
  180    180   
        "FilterLogEventsInput",
  181    181   
    ),
  182    182   
    ::aws_smithy_schema::ShapeType::String,
  183         -
    "next_token",
         183  +
    "nextToken",
  184    184   
    7,
  185    185   
);
  186    186   
static FILTERLOGEVENTSINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  187    187   
    ::aws_smithy_schema::ShapeId::from_static(
  188    188   
        "com.amazonaws.cloudwatchlogs.synthetic#FilterLogEventsInput$limit",
  189    189   
        "com.amazonaws.cloudwatchlogs.synthetic",
  190    190   
        "FilterLogEventsInput",
  191    191   
    ),
  192    192   
    ::aws_smithy_schema::ShapeType::Integer,
  193    193   
    "limit",
@@ -259,259 +384,385 @@
  279    279   
            ser.write_boolean(&FILTERLOGEVENTSINPUT_MEMBER_INTERLEAVED, *val)?;
  280    280   
        }
  281    281   
        if let Some(ref val) = self.unmask {
  282    282   
            ser.write_boolean(&FILTERLOGEVENTSINPUT_MEMBER_UNMASK, *val)?;
  283    283   
        }
  284    284   
        Ok(())
  285    285   
    }
  286    286   
}
  287    287   
impl FilterLogEventsInput {
  288    288   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  289         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  290         -
        deserializer: &mut D,
         289  +
    pub fn deserialize(
         290  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  291    291   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  292    292   
        #[allow(unused_variables, unused_mut)]
  293    293   
        let mut builder = Self::builder();
  294    294   
        #[allow(
  295    295   
            unused_variables,
  296    296   
            unreachable_code,
  297    297   
            clippy::single_match,
  298    298   
            clippy::match_single_binding,
  299    299   
            clippy::diverging_sub_expression
  300    300   
        )]
  301         -
        deserializer.read_struct(&FILTERLOGEVENTSINPUT_SCHEMA, (), |_, member, deser| {
         301  +
        deserializer.read_struct(&FILTERLOGEVENTSINPUT_SCHEMA, &mut |member, deser| {
  302    302   
            match member.member_index() {
  303    303   
                Some(0) => {
  304    304   
                    builder.log_group_name = Some(deser.read_string(member)?);
  305    305   
                }
  306    306   
                Some(1) => {
  307    307   
                    builder.log_group_identifier = Some(deser.read_string(member)?);
  308    308   
                }
  309    309   
                Some(2) => {
  310         -
                    builder.log_stream_names = Some({
  311         -
                        let container = if let Some(cap) = deser.container_size() {
  312         -
                            Vec::with_capacity(cap)
  313         -
                        } else {
  314         -
                            Vec::new()
  315         -
                        };
  316         -
                        deser.read_list(member, container, |mut list, deser| {
  317         -
                            list.push(deser.read_string(member)?);
  318         -
                            Ok(list)
  319         -
                        })?
  320         -
                    });
         310  +
                    builder.log_stream_names = Some(deser.read_string_list(member)?);
  321    311   
                }
  322    312   
                Some(3) => {
  323    313   
                    builder.log_stream_name_prefix = Some(deser.read_string(member)?);
  324    314   
                }
  325    315   
                Some(4) => {
  326    316   
                    builder.start_time = Some(deser.read_long(member)?);
  327    317   
                }
  328    318   
                Some(5) => {
  329    319   
                    builder.end_time = Some(deser.read_long(member)?);
  330    320   
                }
  331    321   
                Some(6) => {
  332    322   
                    builder.filter_pattern = Some(deser.read_string(member)?);
  333    323   
                }
  334    324   
                Some(7) => {
  335    325   
                    builder.next_token = Some(deser.read_string(member)?);
  336    326   
                }
  337    327   
                Some(8) => {
  338    328   
                    builder.limit = Some(deser.read_integer(member)?);
  339    329   
                }
  340    330   
                Some(9) => {
  341    331   
                    builder.interleaved = Some(deser.read_boolean(member)?);
  342    332   
                }
  343    333   
                Some(10) => {
  344    334   
                    builder.unmask = Some(deser.read_boolean(member)?);
  345    335   
                }
  346    336   
                _ => {}
  347    337   
            }
  348    338   
            Ok(())
  349    339   
        })?;
  350    340   
        builder
  351    341   
            .build()
  352    342   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  353    343   
    }
  354    344   
}
         345  +
impl FilterLogEventsInput {
         346  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         347  +
    pub fn deserialize_with_response(
         348  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         349  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         350  +
        _status: u16,
         351  +
        _body: &[u8],
         352  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         353  +
        Self::deserialize(deserializer)
         354  +
    }
         355  +
}
  355    356   
impl FilterLogEventsInput {
  356    357   
    /// Creates a new builder-style object to manufacture [`FilterLogEventsInput`](crate::operation::filter_log_events::FilterLogEventsInput).
  357    358   
    pub fn builder() -> crate::operation::filter_log_events::builders::FilterLogEventsInputBuilder {
  358    359   
        crate::operation::filter_log_events::builders::FilterLogEventsInputBuilder::default()
  359    360   
    }
  360    361   
}
  361    362   
  362    363   
/// A builder for [`FilterLogEventsInput`](crate::operation::filter_log_events::FilterLogEventsInput).
  363    364   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  364    365   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/filter_log_events/_filter_log_events_output.rs

@@ -28,28 +187,246 @@
   48     48   
    "events",
   49     49   
    0,
   50     50   
);
   51     51   
static FILTERLOGEVENTSOUTPUT_MEMBER_SEARCHED_LOG_STREAMS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   52     52   
    ::aws_smithy_schema::ShapeId::from_static(
   53     53   
        "com.amazonaws.cloudwatchlogs.synthetic#FilterLogEventsOutput$searchedLogStreams",
   54     54   
        "com.amazonaws.cloudwatchlogs.synthetic",
   55     55   
        "FilterLogEventsOutput",
   56     56   
    ),
   57     57   
    ::aws_smithy_schema::ShapeType::List,
   58         -
    "searched_log_streams",
          58  +
    "searchedLogStreams",
   59     59   
    1,
   60     60   
);
   61     61   
static FILTERLOGEVENTSOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   62     62   
    ::aws_smithy_schema::ShapeId::from_static(
   63     63   
        "com.amazonaws.cloudwatchlogs.synthetic#FilterLogEventsOutput$nextToken",
   64     64   
        "com.amazonaws.cloudwatchlogs.synthetic",
   65     65   
        "FilterLogEventsOutput",
   66     66   
    ),
   67     67   
    ::aws_smithy_schema::ShapeType::String,
   68         -
    "next_token",
          68  +
    "nextToken",
   69     69   
    2,
   70     70   
);
          71  +
static FILTERLOGEVENTSOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          72  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          73  +
    ::aws_smithy_schema::ShapeType::String,
          74  +
    "request_id",
          75  +
    3,
          76  +
)
          77  +
.with_http_header("x-amzn-requestid");
   71     78   
static FILTERLOGEVENTSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   72     79   
    FILTERLOGEVENTSOUTPUT_SCHEMA_ID,
   73     80   
    ::aws_smithy_schema::ShapeType::Structure,
   74     81   
    &[
   75     82   
        &FILTERLOGEVENTSOUTPUT_MEMBER_EVENTS,
   76     83   
        &FILTERLOGEVENTSOUTPUT_MEMBER_SEARCHED_LOG_STREAMS,
   77     84   
        &FILTERLOGEVENTSOUTPUT_MEMBER_NEXT_TOKEN,
          85  +
        &FILTERLOGEVENTSOUTPUT_MEMBER__REQUEST_ID,
   78     86   
    ],
   79     87   
);
   80     88   
impl FilterLogEventsOutput {
   81     89   
    /// The schema for this shape.
   82     90   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &FILTERLOGEVENTSOUTPUT_SCHEMA;
   83     91   
}
   84     92   
impl ::aws_smithy_schema::serde::SerializableStruct for FilterLogEventsOutput {
   85     93   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   86     94   
    fn serialize_members(
   87     95   
        &self,
   88     96   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   89     97   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   90     98   
        if let Some(ref val) = self.events {
   91     99   
            ser.write_list(
   92    100   
                &FILTERLOGEVENTSOUTPUT_MEMBER_EVENTS,
   93    101   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   94    102   
                    for item in val {
   95    103   
                        ser.write_struct(crate::types::FilteredLogEvent::SCHEMA, item)?;
   96    104   
                    }
   97    105   
                    Ok(())
   98    106   
                },
   99    107   
            )?;
  100    108   
        }
  101    109   
        if let Some(ref val) = self.searched_log_streams {
  102    110   
            ser.write_list(
  103    111   
                &FILTERLOGEVENTSOUTPUT_MEMBER_SEARCHED_LOG_STREAMS,
  104    112   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  105    113   
                    for item in val {
  106    114   
                        ser.write_struct(crate::types::SearchedLogStream::SCHEMA, item)?;
  107    115   
                    }
  108    116   
                    Ok(())
  109    117   
                },
  110    118   
            )?;
  111    119   
        }
  112    120   
        if let Some(ref val) = self.next_token {
  113    121   
            ser.write_string(&FILTERLOGEVENTSOUTPUT_MEMBER_NEXT_TOKEN, val)?;
  114    122   
        }
  115    123   
        Ok(())
  116    124   
    }
  117    125   
}
  118    126   
impl FilterLogEventsOutput {
  119    127   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  120         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  121         -
        deserializer: &mut D,
         128  +
    pub fn deserialize(
         129  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  122    130   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  123    131   
        #[allow(unused_variables, unused_mut)]
  124    132   
        let mut builder = Self::builder();
  125    133   
        #[allow(
  126    134   
            unused_variables,
  127    135   
            unreachable_code,
  128    136   
            clippy::single_match,
  129    137   
            clippy::match_single_binding,
  130    138   
            clippy::diverging_sub_expression
  131    139   
        )]
  132         -
        deserializer.read_struct(&FILTERLOGEVENTSOUTPUT_SCHEMA, (), |_, member, deser| {
         140  +
        deserializer.read_struct(&FILTERLOGEVENTSOUTPUT_SCHEMA, &mut |member, deser| {
  133    141   
            match member.member_index() {
  134    142   
                Some(0) => {
  135    143   
                    builder.events = Some({
  136         -
                        let container = if let Some(cap) = deser.container_size() {
  137         -
                            Vec::with_capacity(cap)
  138         -
                        } else {
  139         -
                            Vec::new()
  140         -
                        };
  141         -
                        deser.read_list(member, container, |mut list, deser| {
  142         -
                            list.push(crate::types::FilteredLogEvent::deserialize(deser)?);
  143         -
                            Ok(list)
  144         -
                        })?
         144  +
                        let mut container = Vec::new();
         145  +
                        deser.read_list(member, &mut |deser| {
         146  +
                            container.push(crate::types::FilteredLogEvent::deserialize(deser)?);
         147  +
                            Ok(())
         148  +
                        })?;
         149  +
                        container
  145    150   
                    });
  146    151   
                }
  147    152   
                Some(1) => {
  148    153   
                    builder.searched_log_streams = Some({
  149         -
                        let container = if let Some(cap) = deser.container_size() {
  150         -
                            Vec::with_capacity(cap)
  151         -
                        } else {
  152         -
                            Vec::new()
  153         -
                        };
  154         -
                        deser.read_list(member, container, |mut list, deser| {
  155         -
                            list.push(crate::types::SearchedLogStream::deserialize(deser)?);
  156         -
                            Ok(list)
  157         -
                        })?
         154  +
                        let mut container = Vec::new();
         155  +
                        deser.read_list(member, &mut |deser| {
         156  +
                            container.push(crate::types::SearchedLogStream::deserialize(deser)?);
         157  +
                            Ok(())
         158  +
                        })?;
         159  +
                        container
         160  +
                    });
         161  +
                }
         162  +
                Some(2) => {
         163  +
                    builder.next_token = Some(deser.read_string(member)?);
         164  +
                }
         165  +
                Some(3) => {
         166  +
                    builder._request_id = Some(deser.read_string(member)?);
         167  +
                }
         168  +
                _ => {}
         169  +
            }
         170  +
            Ok(())
         171  +
        })?;
         172  +
        Ok(builder.build())
         173  +
    }
         174  +
}
         175  +
impl FilterLogEventsOutput {
         176  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         177  +
    /// Header-bound members are read directly from headers, avoiding runtime
         178  +
    /// member iteration overhead. Body members are read via the deserializer.
         179  +
    pub fn deserialize_with_response(
         180  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         181  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         182  +
        _status: u16,
         183  +
        _body: &[u8],
         184  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         185  +
        #[allow(unused_variables, unused_mut)]
         186  +
        let mut builder = Self::builder();
         187  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         188  +
            builder._request_id = Some(val.to_string());
         189  +
        }
         190  +
        #[allow(
         191  +
            unused_variables,
         192  +
            unreachable_code,
         193  +
            clippy::single_match,
         194  +
            clippy::match_single_binding,
         195  +
            clippy::diverging_sub_expression
         196  +
        )]
         197  +
        deserializer.read_struct(&FILTERLOGEVENTSOUTPUT_SCHEMA, &mut |member, deser| {
         198  +
            match member.member_index() {
         199  +
                Some(0) => {
         200  +
                    builder.events = Some({
         201  +
                        let mut container = Vec::new();
         202  +
                        deser.read_list(member, &mut |deser| {
         203  +
                            container.push(crate::types::FilteredLogEvent::deserialize(deser)?);
         204  +
                            Ok(())
         205  +
                        })?;
         206  +
                        container
         207  +
                    });
         208  +
                }
         209  +
                Some(1) => {
         210  +
                    builder.searched_log_streams = Some({
         211  +
                        let mut container = Vec::new();
         212  +
                        deser.read_list(member, &mut |deser| {
         213  +
                            container.push(crate::types::SearchedLogStream::deserialize(deser)?);
         214  +
                            Ok(())
         215  +
                        })?;
         216  +
                        container
  158    217   
                    });
  159    218   
                }
  160    219   
                Some(2) => {
  161    220   
                    builder.next_token = Some(deser.read_string(member)?);
  162    221   
                }
  163    222   
                _ => {}
  164    223   
            }
  165    224   
            Ok(())
  166    225   
        })?;
  167    226   
        Ok(builder.build())

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

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/get_data_protection_policy/_get_data_protection_policy_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/get_data_protection_policy/_get_data_protection_policy_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/get_delivery.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 `GetDelivery`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct GetDelivery;
    6      6   
impl GetDelivery {
    7      7   
    /// Creates a new `GetDelivery`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::get_delivery::GetDeliveryInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::get_delivery::GetDeliveryOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::get_delivery::GetDeliveryInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::get_delivery::GetDeliveryOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::get_delivery::GetDeliveryError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +245,378 @@
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct GetDeliveryResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetDeliveryResponseDeserializer {
  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_get_delivery::de_get_delivery_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_get_delivery::de_get_delivery_http_response(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::get_delivery::GetDeliveryError::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  +
                "ResourceNotFoundException" => crate::operation::get_delivery::GetDeliveryError::ResourceNotFoundException({
         184  +
                    let mut tmp = match protocol
         185  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         186  +
                        .and_then(|mut deser| {
         187  +
                            crate::types::error::ResourceNotFoundException::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  +
                        }
  162    200   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         201  +
                    tmp.meta = generic;
         202  +
                    if tmp.message.is_none() {
         203  +
                        tmp.message = _error_message;
         204  +
                    }
         205  +
                    tmp
         206  +
                }),
         207  +
                "ServiceQuotaExceededException" => crate::operation::get_delivery::GetDeliveryError::ServiceQuotaExceededException({
         208  +
                    let mut tmp = match protocol
         209  +
                        .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         210  +
                        .and_then(|mut deser| {
         211  +
                            crate::types::error::ServiceQuotaExceededException::deserialize_with_response(
         212  +
                                &mut *deser,
         213  +
                                response.headers(),
         214  +
                                response.status().into(),
         215  +
                                body,
         216  +
                            )
         217  +
                        }) {
         218  +
                        ::std::result::Result::Ok(val) => val,
         219  +
                        ::std::result::Result::Err(e) => {
         220  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         221  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         222  +
                            ))
         223  +
                        }
         224  +
                    };
         225  +
                    tmp.meta = generic;
         226  +
                    if tmp.message.is_none() {
         227  +
                        tmp.message = _error_message;
         228  +
                    }
         229  +
                    tmp
         230  +
                }),
         231  +
                "ServiceUnavailableException" => crate::operation::get_delivery::GetDeliveryError::ServiceUnavailableException({
         232  +
                    let mut tmp = match protocol
         233  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         234  +
                        .and_then(|mut deser| {
         235  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         236  +
                                &mut *deser,
         237  +
                                response.headers(),
         238  +
                                response.status().into(),
         239  +
                                body,
         240  +
                            )
         241  +
                        }) {
         242  +
                        ::std::result::Result::Ok(val) => val,
         243  +
                        ::std::result::Result::Err(e) => {
         244  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         245  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         246  +
                            ))
         247  +
                        }
         248  +
                    };
         249  +
                    tmp.meta = generic;
         250  +
                    if tmp.message.is_none() {
         251  +
                        tmp.message = _error_message;
         252  +
                    }
         253  +
                    tmp
         254  +
                }),
         255  +
                "ThrottlingException" => crate::operation::get_delivery::GetDeliveryError::ThrottlingException({
         256  +
                    let mut tmp = match protocol
         257  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         258  +
                        .and_then(|mut deser| {
         259  +
                            crate::types::error::ThrottlingException::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  +
                "ValidationException" => crate::operation::get_delivery::GetDeliveryError::ValidationException({
         280  +
                    let mut tmp = match protocol
         281  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         282  +
                        .and_then(|mut deser| {
         283  +
                            crate::types::error::ValidationException::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  +
                _ => crate::operation::get_delivery::GetDeliveryError::generic(generic),
         304  +
            };
         305  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         306  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         307  +
            ))
         308  +
        } else {
         309  +
            let protocol = _cfg
         310  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         311  +
                .expect("a SharedClientProtocol is required");
         312  +
            let mut deser = protocol.deserialize_response(response, GetDelivery::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         313  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         314  +
            })?;
         315  +
            let body = response.body().bytes().expect("body loaded");
         316  +
            let output = crate::operation::get_delivery::GetDeliveryOutput::deserialize_with_response(
         317  +
                &mut *deser,
         318  +
                response.headers(),
         319  +
                response.status().into(),
         320  +
                body,
         321  +
            )
         322  +
            .map_err(|e| {
         323  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         324  +
            })?;
         325  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         326  +
        }
  164    327   
    }
  165    328   
}
  166    329   
#[derive(Debug)]
  167    330   
struct GetDeliveryRequestSerializer;
  168    331   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetDeliveryRequestSerializer {
  169    332   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    333   
    fn serialize_input(
  171    334   
        &self,
  172    335   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    336   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    337   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    338   
        let input = input
  176    339   
            .downcast::<crate::operation::get_delivery::GetDeliveryInput>()
  177    340   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::get_delivery::GetDeliveryInput,
  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::get_delivery::GetDeliveryInput,
  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.GetDelivery",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_get_delivery::ser_get_delivery_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())
         341  +
        let protocol = _cfg
         342  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         343  +
            .expect("a SharedClientProtocol is required");
         344  +
        let mut request = protocol
         345  +
            .serialize_request(&input, GetDelivery::INPUT_SCHEMA, "", _cfg)
         346  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         347  +
         348  +
        return ::std::result::Result::Ok(request);
  216    349   
    }
  217    350   
}
  218    351   
#[derive(Debug)]
  219    352   
struct GetDeliveryEndpointParamsInterceptor;
  220    353   
  221    354   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetDeliveryEndpointParamsInterceptor {
  222    355   
    fn name(&self) -> &'static str {
  223    356   
        "GetDeliveryEndpointParamsInterceptor"
  224    357   
    }
  225    358   

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/get_delivery/_get_delivery_input.rs

@@ -23,23 +108,120 @@
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        if let Some(ref val) = self.id {
   46     46   
            ser.write_string(&GETDELIVERYINPUT_MEMBER_ID, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl GetDeliveryInput {
   52     52   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   53         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   54         -
        deserializer: &mut D,
          53  +
    pub fn deserialize(
          54  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   55     55   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   56     56   
        #[allow(unused_variables, unused_mut)]
   57     57   
        let mut builder = Self::builder();
   58     58   
        #[allow(
   59     59   
            unused_variables,
   60     60   
            unreachable_code,
   61     61   
            clippy::single_match,
   62     62   
            clippy::match_single_binding,
   63     63   
            clippy::diverging_sub_expression
   64     64   
        )]
   65         -
        deserializer.read_struct(&GETDELIVERYINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&GETDELIVERYINPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.id = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
          74  +
        builder.id = builder.id.or(Some(String::new()));
   74     75   
        builder
   75     76   
            .build()
   76     77   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   77     78   
    }
   78     79   
}
          80  +
impl GetDeliveryInput {
          81  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          82  +
    pub fn deserialize_with_response(
          83  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          84  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          85  +
        _status: u16,
          86  +
        _body: &[u8],
          87  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          88  +
        Self::deserialize(deserializer)
          89  +
    }
          90  +
}
   79     91   
impl GetDeliveryInput {
   80     92   
    /// Creates a new builder-style object to manufacture [`GetDeliveryInput`](crate::operation::get_delivery::GetDeliveryInput).
   81     93   
    pub fn builder() -> crate::operation::get_delivery::builders::GetDeliveryInputBuilder {
   82     94   
        crate::operation::get_delivery::builders::GetDeliveryInputBuilder::default()
   83     95   
    }
   84     96   
}
   85     97   
   86     98   
/// A builder for [`GetDeliveryInput`](crate::operation::get_delivery::GetDeliveryInput).
   87     99   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   88    100   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/get_delivery/_get_delivery_output.rs

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

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