AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/list_integrations.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 `ListIntegrations`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListIntegrations;
    6      6   
impl ListIntegrations {
    7      7   
    /// Creates a new `ListIntegrations`
    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_integrations::ListIntegrationsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_integrations::ListIntegrationsOutput::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_integrations::ListIntegrationsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_integrations::ListIntegrationsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_integrations::ListIntegrationsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,310 @@
  138    142   
                crate::operation::list_integrations::ListIntegrationsError,
  139    143   
            >::new());
  140    144   
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct ListIntegrationsResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListIntegrationsResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_list_integrations::de_list_integrations_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_list_integrations::de_list_integrations_http_response(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::list_integrations::ListIntegrationsError::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::list_integrations::ListIntegrationsError::InvalidParameterException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         190  +
                                &mut *deser,
         191  +
                                response.headers(),
         192  +
                                response.status().into(),
         193  +
                                body,
         194  +
                            )
         195  +
                        }) {
         196  +
                        ::std::result::Result::Ok(val) => val,
         197  +
                        ::std::result::Result::Err(e) => {
         198  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         199  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         200  +
                            ))
         201  +
                        }
  162    202   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         203  +
                    tmp.meta = generic;
         204  +
                    if tmp.message.is_none() {
         205  +
                        tmp.message = _error_message;
         206  +
                    }
         207  +
                    tmp
         208  +
                }),
         209  +
                "ServiceUnavailableException" => crate::operation::list_integrations::ListIntegrationsError::ServiceUnavailableException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         214  +
                                &mut *deser,
         215  +
                                response.headers(),
         216  +
                                response.status().into(),
         217  +
                                body,
         218  +
                            )
         219  +
                        }) {
         220  +
                        ::std::result::Result::Ok(val) => val,
         221  +
                        ::std::result::Result::Err(e) => {
         222  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         223  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         224  +
                            ))
         225  +
                        }
         226  +
                    };
         227  +
                    tmp.meta = generic;
         228  +
                    if tmp.message.is_none() {
         229  +
                        tmp.message = _error_message;
         230  +
                    }
         231  +
                    tmp
         232  +
                }),
         233  +
                _ => crate::operation::list_integrations::ListIntegrationsError::generic(generic),
         234  +
            };
         235  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         236  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         237  +
            ))
         238  +
        } else {
         239  +
            let protocol = _cfg
         240  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         241  +
                .expect("a SharedClientProtocol is required");
         242  +
            let mut deser = protocol
         243  +
                .deserialize_response(response, ListIntegrations::OUTPUT_SCHEMA, _cfg)
         244  +
                .map_err(|e| {
         245  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         246  +
                })?;
         247  +
            let body = response.body().bytes().expect("body loaded");
         248  +
            let output = crate::operation::list_integrations::ListIntegrationsOutput::deserialize_with_response(
         249  +
                &mut *deser,
         250  +
                response.headers(),
         251  +
                response.status().into(),
         252  +
                body,
         253  +
            )
         254  +
            .map_err(|e| {
         255  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         256  +
            })?;
         257  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         258  +
        }
  164    259   
    }
  165    260   
}
  166    261   
#[derive(Debug)]
  167    262   
struct ListIntegrationsRequestSerializer;
  168    263   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListIntegrationsRequestSerializer {
  169    264   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    265   
    fn serialize_input(
  171    266   
        &self,
  172    267   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    268   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    269   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    270   
        let input = input
  176    271   
            .downcast::<crate::operation::list_integrations::ListIntegrationsInput>()
  177    272   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::list_integrations::ListIntegrationsInput,
  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_integrations::ListIntegrationsInput,
  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.ListIntegrations",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_list_integrations::ser_list_integrations_input(&input)?);
  211         -
        if let Some(content_length) = body.content_length() {
  212         -
            let content_length = content_length.to_string();
  213         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  214         -
        }
  215         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         273  +
        let protocol = _cfg
         274  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         275  +
            .expect("a SharedClientProtocol is required");
         276  +
        let mut request = protocol
         277  +
            .serialize_request(&input, ListIntegrations::INPUT_SCHEMA, "", _cfg)
         278  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         279  +
         280  +
        return ::std::result::Result::Ok(request);
  216    281   
    }
  217    282   
}
  218    283   
#[derive(Debug)]
  219    284   
struct ListIntegrationsEndpointParamsInterceptor;
  220    285   
  221    286   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListIntegrationsEndpointParamsInterceptor {
  222    287   
    fn name(&self) -> &'static str {
  223    288   
        "ListIntegrationsEndpointParamsInterceptor"
  224    289   
    }
  225    290   

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

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

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

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

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

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

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

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

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

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

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

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

@@ -51,51 +151,151 @@
   71     71   
    "com.amazonaws.cloudwatchlogs.synthetic",
   72     72   
    "ListLogGroupsInput",
   73     73   
);
   74     74   
static LISTLOGGROUPSINPUT_MEMBER_LOG_GROUP_NAME_PATTERN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   75     75   
    ::aws_smithy_schema::ShapeId::from_static(
   76     76   
        "com.amazonaws.cloudwatchlogs.synthetic#ListLogGroupsInput$logGroupNamePattern",
   77     77   
        "com.amazonaws.cloudwatchlogs.synthetic",
   78     78   
        "ListLogGroupsInput",
   79     79   
    ),
   80     80   
    ::aws_smithy_schema::ShapeType::String,
   81         -
    "log_group_name_pattern",
          81  +
    "logGroupNamePattern",
   82     82   
    0,
   83     83   
);
   84     84   
static LISTLOGGROUPSINPUT_MEMBER_LOG_GROUP_CLASS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   85     85   
    ::aws_smithy_schema::ShapeId::from_static(
   86     86   
        "com.amazonaws.cloudwatchlogs.synthetic#ListLogGroupsInput$logGroupClass",
   87     87   
        "com.amazonaws.cloudwatchlogs.synthetic",
   88     88   
        "ListLogGroupsInput",
   89     89   
    ),
   90     90   
    ::aws_smithy_schema::ShapeType::String,
   91         -
    "log_group_class",
          91  +
    "logGroupClass",
   92     92   
    1,
   93     93   
);
   94     94   
static LISTLOGGROUPSINPUT_MEMBER_INCLUDE_LINKED_ACCOUNTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   95     95   
    ::aws_smithy_schema::ShapeId::from_static(
   96     96   
        "com.amazonaws.cloudwatchlogs.synthetic#ListLogGroupsInput$includeLinkedAccounts",
   97     97   
        "com.amazonaws.cloudwatchlogs.synthetic",
   98     98   
        "ListLogGroupsInput",
   99     99   
    ),
  100    100   
    ::aws_smithy_schema::ShapeType::Boolean,
  101         -
    "include_linked_accounts",
         101  +
    "includeLinkedAccounts",
  102    102   
    2,
  103    103   
);
  104    104   
static LISTLOGGROUPSINPUT_MEMBER_ACCOUNT_IDENTIFIERS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  105    105   
    ::aws_smithy_schema::ShapeId::from_static(
  106    106   
        "com.amazonaws.cloudwatchlogs.synthetic#ListLogGroupsInput$accountIdentifiers",
  107    107   
        "com.amazonaws.cloudwatchlogs.synthetic",
  108    108   
        "ListLogGroupsInput",
  109    109   
    ),
  110    110   
    ::aws_smithy_schema::ShapeType::List,
  111         -
    "account_identifiers",
         111  +
    "accountIdentifiers",
  112    112   
    3,
  113    113   
);
  114    114   
static LISTLOGGROUPSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  115    115   
    ::aws_smithy_schema::ShapeId::from_static(
  116    116   
        "com.amazonaws.cloudwatchlogs.synthetic#ListLogGroupsInput$nextToken",
  117    117   
        "com.amazonaws.cloudwatchlogs.synthetic",
  118    118   
        "ListLogGroupsInput",
  119    119   
    ),
  120    120   
    ::aws_smithy_schema::ShapeType::String,
  121         -
    "next_token",
         121  +
    "nextToken",
  122    122   
    4,
  123    123   
);
  124    124   
static LISTLOGGROUPSINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  125    125   
    ::aws_smithy_schema::ShapeId::from_static(
  126    126   
        "com.amazonaws.cloudwatchlogs.synthetic#ListLogGroupsInput$limit",
  127    127   
        "com.amazonaws.cloudwatchlogs.synthetic",
  128    128   
        "ListLogGroupsInput",
  129    129   
    ),
  130    130   
    ::aws_smithy_schema::ShapeType::Integer,
  131    131   
    "limit",
@@ -157,157 +267,268 @@
  177    177   
            ser.write_string(&LISTLOGGROUPSINPUT_MEMBER_NEXT_TOKEN, val)?;
  178    178   
        }
  179    179   
        if let Some(ref val) = self.limit {
  180    180   
            ser.write_integer(&LISTLOGGROUPSINPUT_MEMBER_LIMIT, *val)?;
  181    181   
        }
  182    182   
        Ok(())
  183    183   
    }
  184    184   
}
  185    185   
impl ListLogGroupsInput {
  186    186   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  187         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  188         -
        deserializer: &mut D,
         187  +
    pub fn deserialize(
         188  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  189    189   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  190    190   
        #[allow(unused_variables, unused_mut)]
  191    191   
        let mut builder = Self::builder();
  192    192   
        #[allow(
  193    193   
            unused_variables,
  194    194   
            unreachable_code,
  195    195   
            clippy::single_match,
  196    196   
            clippy::match_single_binding,
  197    197   
            clippy::diverging_sub_expression
  198    198   
        )]
  199         -
        deserializer.read_struct(&LISTLOGGROUPSINPUT_SCHEMA, (), |_, member, deser| {
         199  +
        deserializer.read_struct(&LISTLOGGROUPSINPUT_SCHEMA, &mut |member, deser| {
  200    200   
            match member.member_index() {
  201    201   
                Some(0) => {
  202    202   
                    builder.log_group_name_pattern = Some(deser.read_string(member)?);
  203    203   
                }
  204    204   
                Some(1) => {
  205    205   
                    builder.log_group_class = Some(crate::types::LogGroupClass::from(deser.read_string(member)?.as_str()));
  206    206   
                }
  207    207   
                Some(2) => {
  208    208   
                    builder.include_linked_accounts = Some(deser.read_boolean(member)?);
  209    209   
                }
  210    210   
                Some(3) => {
  211         -
                    builder.account_identifiers = Some({
  212         -
                        let container = if let Some(cap) = deser.container_size() {
  213         -
                            Vec::with_capacity(cap)
  214         -
                        } else {
  215         -
                            Vec::new()
  216         -
                        };
  217         -
                        deser.read_list(member, container, |mut list, deser| {
  218         -
                            list.push(deser.read_string(member)?);
  219         -
                            Ok(list)
  220         -
                        })?
  221         -
                    });
         211  +
                    builder.account_identifiers = Some(deser.read_string_list(member)?);
  222    212   
                }
  223    213   
                Some(4) => {
  224    214   
                    builder.next_token = Some(deser.read_string(member)?);
  225    215   
                }
  226    216   
                Some(5) => {
  227    217   
                    builder.limit = Some(deser.read_integer(member)?);
  228    218   
                }
  229    219   
                _ => {}
  230    220   
            }
  231    221   
            Ok(())
  232    222   
        })?;
  233    223   
        builder
  234    224   
            .build()
  235    225   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  236    226   
    }
  237    227   
}
         228  +
impl ListLogGroupsInput {
         229  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         230  +
    pub fn deserialize_with_response(
         231  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         232  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         233  +
        _status: u16,
         234  +
        _body: &[u8],
         235  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         236  +
        Self::deserialize(deserializer)
         237  +
    }
         238  +
}
  238    239   
impl ListLogGroupsInput {
  239    240   
    /// Creates a new builder-style object to manufacture [`ListLogGroupsInput`](crate::operation::list_log_groups::ListLogGroupsInput).
  240    241   
    pub fn builder() -> crate::operation::list_log_groups::builders::ListLogGroupsInputBuilder {
  241    242   
        crate::operation::list_log_groups::builders::ListLogGroupsInputBuilder::default()
  242    243   
    }
  243    244   
}
  244    245   
  245    246   
/// A builder for [`ListLogGroupsInput`](crate::operation::list_log_groups::ListLogGroupsInput).
  246    247   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  247    248   
#[non_exhaustive]

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

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

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

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