AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

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

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/get_query_results.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 `GetQueryResults`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct GetQueryResults;
    6      6   
impl GetQueryResults {
    7      7   
    /// Creates a new `GetQueryResults`
    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_query_results::GetQueryResultsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::get_query_results::GetQueryResultsOutput::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_query_results::GetQueryResultsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::get_query_results::GetQueryResultsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::get_query_results::GetQueryResultsError,
   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 GetQueryResultsResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetQueryResultsResponseDeserializer {
  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_query_results::de_get_query_results_http_error(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::get_query_results::GetQueryResultsError::unhandled(
         175  +
                            generic,
         176  +
                        )),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "InvalidParameterException" => crate::operation::get_query_results::GetQueryResultsError::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::get_query_results::GetQueryResultsError::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::get_query_results::GetQueryResultsError::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::get_query_results::GetQueryResultsError::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  +
            ))
  160    262   
        } else {
  161         -
            crate::protocol_serde::shape_get_query_results::de_get_query_results_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         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, GetQueryResults::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::get_query_results::GetQueryResultsOutput::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 GetQueryResultsRequestSerializer;
  168    287   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetQueryResultsRequestSerializer {
  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::get_query_results::GetQueryResultsInput>()
  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::get_query_results::GetQueryResultsInput,
  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_query_results::GetQueryResultsInput,
  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.GetQueryResults",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_get_query_results::ser_get_query_results_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, GetQueryResults::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 GetQueryResultsEndpointParamsInterceptor;
  220    309   
  221    310   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetQueryResultsEndpointParamsInterceptor {
  222    311   
    fn name(&self) -> &'static str {
  223    312   
        "GetQueryResultsEndpointParamsInterceptor"
  224    313   
    }
  225    314   

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

@@ -1,1 +108,120 @@
   17     17   
    "com.amazonaws.cloudwatchlogs.synthetic",
   18     18   
    "GetQueryResultsInput",
   19     19   
);
   20     20   
static GETQUERYRESULTSINPUT_MEMBER_QUERY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "com.amazonaws.cloudwatchlogs.synthetic#GetQueryResultsInput$queryId",
   23     23   
        "com.amazonaws.cloudwatchlogs.synthetic",
   24     24   
        "GetQueryResultsInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "query_id",
          27  +
    "queryId",
   28     28   
    0,
   29     29   
);
   30     30   
static GETQUERYRESULTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    GETQUERYRESULTSINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&GETQUERYRESULTSINPUT_MEMBER_QUERY_ID],
   34     34   
);
   35     35   
impl GetQueryResultsInput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETQUERYRESULTSINPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for GetQueryResultsInput {
   40     40   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     41   
    fn serialize_members(
   42     42   
        &self,
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        if let Some(ref val) = self.query_id {
   46     46   
            ser.write_string(&GETQUERYRESULTSINPUT_MEMBER_QUERY_ID, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl GetQueryResultsInput {
   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(&GETQUERYRESULTSINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&GETQUERYRESULTSINPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.query_id = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
          74  +
        builder.query_id = builder.query_id.or(Some(String::new()));
   74     75   
        builder
   75     76   
            .build()
   76     77   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   77     78   
    }
   78     79   
}
          80  +
impl GetQueryResultsInput {
          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 GetQueryResultsInput {
   80     92   
    /// Creates a new builder-style object to manufacture [`GetQueryResultsInput`](crate::operation::get_query_results::GetQueryResultsInput).
   81     93   
    pub fn builder() -> crate::operation::get_query_results::builders::GetQueryResultsInputBuilder {
   82     94   
        crate::operation::get_query_results::builders::GetQueryResultsInputBuilder::default()
   83     95   
    }
   84     96   
}
   85     97   
   86     98   
/// A builder for [`GetQueryResultsInput`](crate::operation::get_query_results::GetQueryResultsInput).
   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_query_results/_get_query_results_output.rs

@@ -28,28 +207,290 @@
   48     48   
    "com.amazonaws.cloudwatchlogs.synthetic",
   49     49   
    "GetQueryResultsOutput",
   50     50   
);
   51     51   
static GETQUERYRESULTSOUTPUT_MEMBER_QUERY_LANGUAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   52     52   
    ::aws_smithy_schema::ShapeId::from_static(
   53     53   
        "com.amazonaws.cloudwatchlogs.synthetic#GetQueryResultsOutput$queryLanguage",
   54     54   
        "com.amazonaws.cloudwatchlogs.synthetic",
   55     55   
        "GetQueryResultsOutput",
   56     56   
    ),
   57     57   
    ::aws_smithy_schema::ShapeType::String,
   58         -
    "query_language",
          58  +
    "queryLanguage",
   59     59   
    0,
   60     60   
);
   61     61   
static GETQUERYRESULTSOUTPUT_MEMBER_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   62     62   
    ::aws_smithy_schema::ShapeId::from_static(
   63     63   
        "com.amazonaws.cloudwatchlogs.synthetic#GetQueryResultsOutput$results",
   64     64   
        "com.amazonaws.cloudwatchlogs.synthetic",
   65     65   
        "GetQueryResultsOutput",
   66     66   
    ),
   67     67   
    ::aws_smithy_schema::ShapeType::List,
   68     68   
    "results",
   69     69   
    1,
   70     70   
);
   71     71   
static GETQUERYRESULTSOUTPUT_MEMBER_STATISTICS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   72     72   
    ::aws_smithy_schema::ShapeId::from_static(
   73     73   
        "com.amazonaws.cloudwatchlogs.synthetic#GetQueryResultsOutput$statistics",
   74     74   
        "com.amazonaws.cloudwatchlogs.synthetic",
   75     75   
        "GetQueryResultsOutput",
   76     76   
    ),
   77     77   
    ::aws_smithy_schema::ShapeType::Structure,
   78     78   
    "statistics",
   79     79   
    2,
   80     80   
);
   81     81   
static GETQUERYRESULTSOUTPUT_MEMBER_STATUS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   82     82   
    ::aws_smithy_schema::ShapeId::from_static(
   83     83   
        "com.amazonaws.cloudwatchlogs.synthetic#GetQueryResultsOutput$status",
   84     84   
        "com.amazonaws.cloudwatchlogs.synthetic",
   85     85   
        "GetQueryResultsOutput",
   86     86   
    ),
   87     87   
    ::aws_smithy_schema::ShapeType::String,
   88     88   
    "status",
   89     89   
    3,
   90     90   
);
   91     91   
static GETQUERYRESULTSOUTPUT_MEMBER_ENCRYPTION_KEY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   92     92   
    ::aws_smithy_schema::ShapeId::from_static(
   93     93   
        "com.amazonaws.cloudwatchlogs.synthetic#GetQueryResultsOutput$encryptionKey",
   94     94   
        "com.amazonaws.cloudwatchlogs.synthetic",
   95     95   
        "GetQueryResultsOutput",
   96     96   
    ),
   97     97   
    ::aws_smithy_schema::ShapeType::String,
   98         -
    "encryption_key",
          98  +
    "encryptionKey",
   99     99   
    4,
  100    100   
);
         101  +
static GETQUERYRESULTSOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         102  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         103  +
    ::aws_smithy_schema::ShapeType::String,
         104  +
    "request_id",
         105  +
    5,
         106  +
)
         107  +
.with_http_header("x-amzn-requestid");
  101    108   
static GETQUERYRESULTSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  102    109   
    GETQUERYRESULTSOUTPUT_SCHEMA_ID,
  103    110   
    ::aws_smithy_schema::ShapeType::Structure,
  104    111   
    &[
  105    112   
        &GETQUERYRESULTSOUTPUT_MEMBER_QUERY_LANGUAGE,
  106    113   
        &GETQUERYRESULTSOUTPUT_MEMBER_RESULTS,
  107    114   
        &GETQUERYRESULTSOUTPUT_MEMBER_STATISTICS,
  108    115   
        &GETQUERYRESULTSOUTPUT_MEMBER_STATUS,
  109    116   
        &GETQUERYRESULTSOUTPUT_MEMBER_ENCRYPTION_KEY,
         117  +
        &GETQUERYRESULTSOUTPUT_MEMBER__REQUEST_ID,
  110    118   
    ],
  111    119   
);
  112    120   
impl GetQueryResultsOutput {
  113    121   
    /// The schema for this shape.
  114    122   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETQUERYRESULTSOUTPUT_SCHEMA;
  115    123   
}
  116    124   
impl ::aws_smithy_schema::serde::SerializableStruct for GetQueryResultsOutput {
  117    125   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  118    126   
    fn serialize_members(
  119    127   
        &self,
  120    128   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  121    129   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  122    130   
        if let Some(ref val) = self.query_language {
  123    131   
            ser.write_string(&GETQUERYRESULTSOUTPUT_MEMBER_QUERY_LANGUAGE, val.as_str())?;
  124    132   
        }
  125    133   
        if let Some(ref val) = self.results {
  126    134   
            ser.write_list(
  127    135   
                &GETQUERYRESULTSOUTPUT_MEMBER_RESULTS,
  128    136   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  129    137   
                    for item in val {
  130         -
                        todo!("schema: unsupported list element type");
         138  +
                        ser.write_list(
         139  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         140  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         141  +
                                for item in item {
         142  +
                                    ser.write_struct(crate::types::ResultField::SCHEMA, item)?;
         143  +
                                }
         144  +
                                Ok(())
         145  +
                            },
         146  +
                        )?;
  131    147   
                    }
  132    148   
                    Ok(())
  133    149   
                },
  134    150   
            )?;
  135    151   
        }
  136    152   
        if let Some(ref val) = self.statistics {
  137    153   
            ser.write_struct(&GETQUERYRESULTSOUTPUT_MEMBER_STATISTICS, val)?;
  138    154   
        }
  139    155   
        if let Some(ref val) = self.status {
  140    156   
            ser.write_string(&GETQUERYRESULTSOUTPUT_MEMBER_STATUS, val.as_str())?;
  141    157   
        }
  142    158   
        if let Some(ref val) = self.encryption_key {
  143    159   
            ser.write_string(&GETQUERYRESULTSOUTPUT_MEMBER_ENCRYPTION_KEY, val)?;
  144    160   
        }
  145    161   
        Ok(())
  146    162   
    }
  147    163   
}
  148    164   
impl GetQueryResultsOutput {
  149    165   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  150         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  151         -
        deserializer: &mut D,
         166  +
    pub fn deserialize(
         167  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         168  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         169  +
        #[allow(unused_variables, unused_mut)]
         170  +
        let mut builder = Self::builder();
         171  +
        #[allow(
         172  +
            unused_variables,
         173  +
            unreachable_code,
         174  +
            clippy::single_match,
         175  +
            clippy::match_single_binding,
         176  +
            clippy::diverging_sub_expression
         177  +
        )]
         178  +
        deserializer.read_struct(&GETQUERYRESULTSOUTPUT_SCHEMA, &mut |member, deser| {
         179  +
            match member.member_index() {
         180  +
                Some(0) => {
         181  +
                    builder.query_language = Some(crate::types::QueryLanguage::from(deser.read_string(member)?.as_str()));
         182  +
                }
         183  +
                Some(1) => {
         184  +
                    builder.results = Some({
         185  +
                        let mut container = Vec::new();
         186  +
                        deser.read_list(member, &mut |deser| {
         187  +
                            container.push({
         188  +
                                let mut list = Vec::new();
         189  +
                                deser.read_list(member, &mut |deser| {
         190  +
                                    list.push(crate::types::ResultField::deserialize(deser)?);
         191  +
                                    Ok(())
         192  +
                                })?;
         193  +
                                list
         194  +
                            });
         195  +
                            Ok(())
         196  +
                        })?;
         197  +
                        container
         198  +
                    });
         199  +
                }
         200  +
                Some(2) => {
         201  +
                    builder.statistics = Some(crate::types::QueryStatistics::deserialize(deser)?);
         202  +
                }
         203  +
                Some(3) => {
         204  +
                    builder.status = Some(crate::types::QueryStatus::from(deser.read_string(member)?.as_str()));
         205  +
                }
         206  +
                Some(4) => {
         207  +
                    builder.encryption_key = Some(deser.read_string(member)?);
         208  +
                }
         209  +
                Some(5) => {
         210  +
                    builder._request_id = Some(deser.read_string(member)?);
         211  +
                }
         212  +
                _ => {}
         213  +
            }
         214  +
            Ok(())
         215  +
        })?;
         216  +
        Ok(builder.build())
         217  +
    }
         218  +
}
         219  +
impl GetQueryResultsOutput {
         220  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         221  +
    /// Header-bound members are read directly from headers, avoiding runtime
         222  +
    /// member iteration overhead. Body members are read via the deserializer.
         223  +
    pub fn deserialize_with_response(
         224  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         225  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         226  +
        _status: u16,
         227  +
        _body: &[u8],
  152    228   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  153    229   
        #[allow(unused_variables, unused_mut)]
  154    230   
        let mut builder = Self::builder();
         231  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         232  +
            builder._request_id = Some(val.to_string());
         233  +
        }
  155    234   
        #[allow(
  156    235   
            unused_variables,
  157    236   
            unreachable_code,
  158    237   
            clippy::single_match,
  159    238   
            clippy::match_single_binding,
  160    239   
            clippy::diverging_sub_expression
  161    240   
        )]
  162         -
        deserializer.read_struct(&GETQUERYRESULTSOUTPUT_SCHEMA, (), |_, member, deser| {
         241  +
        deserializer.read_struct(&GETQUERYRESULTSOUTPUT_SCHEMA, &mut |member, deser| {
  163    242   
            match member.member_index() {
  164    243   
                Some(0) => {
  165    244   
                    builder.query_language = Some(crate::types::QueryLanguage::from(deser.read_string(member)?.as_str()));
  166    245   
                }
  167    246   
                Some(1) => {
  168    247   
                    builder.results = Some({
  169         -
                        let container = if let Some(cap) = deser.container_size() {
  170         -
                            Vec::with_capacity(cap)
  171         -
                        } else {
  172         -
                            Vec::new()
  173         -
                        };
  174         -
                        deser.read_list(member, container, |mut list, deser| {
  175         -
                            list.push(todo!("deserialize nested aggregate"));
  176         -
                            Ok(list)
  177         -
                        })?
         248  +
                        let mut container = Vec::new();
         249  +
                        deser.read_list(member, &mut |deser| {
         250  +
                            container.push({
         251  +
                                let mut list = Vec::new();
         252  +
                                deser.read_list(member, &mut |deser| {
         253  +
                                    list.push(crate::types::ResultField::deserialize(deser)?);
         254  +
                                    Ok(())
         255  +
                                })?;
         256  +
                                list
         257  +
                            });
         258  +
                            Ok(())
         259  +
                        })?;
         260  +
                        container
  178    261   
                    });
  179    262   
                }
  180    263   
                Some(2) => {
  181    264   
                    builder.statistics = Some(crate::types::QueryStatistics::deserialize(deser)?);
  182    265   
                }
  183    266   
                Some(3) => {
  184    267   
                    builder.status = Some(crate::types::QueryStatus::from(deser.read_string(member)?.as_str()));
  185    268   
                }
  186    269   
                Some(4) => {
  187    270   
                    builder.encryption_key = Some(deser.read_string(member)?);

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

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

@@ -1,1 +108,120 @@
   17     17   
    "com.amazonaws.cloudwatchlogs.synthetic",
   18     18   
    "GetTransformerInput",
   19     19   
);
   20     20   
static GETTRANSFORMERINPUT_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#GetTransformerInput$logGroupIdentifier",
   23     23   
        "com.amazonaws.cloudwatchlogs.synthetic",
   24     24   
        "GetTransformerInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "log_group_identifier",
          27  +
    "logGroupIdentifier",
   28     28   
    0,
   29     29   
);
   30     30   
static GETTRANSFORMERINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    GETTRANSFORMERINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&GETTRANSFORMERINPUT_MEMBER_LOG_GROUP_IDENTIFIER],
   34     34   
);
   35     35   
impl GetTransformerInput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETTRANSFORMERINPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for GetTransformerInput {
   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(&GETTRANSFORMERINPUT_MEMBER_LOG_GROUP_IDENTIFIER, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl GetTransformerInput {
   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(&GETTRANSFORMERINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&GETTRANSFORMERINPUT_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 GetTransformerInput {
          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 GetTransformerInput {
   80     92   
    /// Creates a new builder-style object to manufacture [`GetTransformerInput`](crate::operation::get_transformer::GetTransformerInput).
   81     93   
    pub fn builder() -> crate::operation::get_transformer::builders::GetTransformerInputBuilder {
   82     94   
        crate::operation::get_transformer::builders::GetTransformerInputBuilder::default()
   83     95   
    }
   84     96   
}
   85     97   
   86     98   
/// A builder for [`GetTransformerInput`](crate::operation::get_transformer::GetTransformerInput).
   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_transformer/_get_transformer_output.rs

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

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