AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

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

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

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

@@ -16,16 +137,192 @@
   36     36   
    "queries",
   37     37   
    0,
   38     38   
);
   39     39   
static DESCRIBEQUERIESOUTPUT_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#DescribeQueriesOutput$nextToken",
   42     42   
        "com.amazonaws.cloudwatchlogs.synthetic",
   43     43   
        "DescribeQueriesOutput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::String,
   46         -
    "next_token",
          46  +
    "nextToken",
   47     47   
    1,
   48     48   
);
          49  +
static DESCRIBEQUERIESOUTPUT_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 DESCRIBEQUERIESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   50     57   
    DESCRIBEQUERIESOUTPUT_SCHEMA_ID,
   51     58   
    ::aws_smithy_schema::ShapeType::Structure,
   52         -
    &[&DESCRIBEQUERIESOUTPUT_MEMBER_QUERIES, &DESCRIBEQUERIESOUTPUT_MEMBER_NEXT_TOKEN],
          59  +
    &[
          60  +
        &DESCRIBEQUERIESOUTPUT_MEMBER_QUERIES,
          61  +
        &DESCRIBEQUERIESOUTPUT_MEMBER_NEXT_TOKEN,
          62  +
        &DESCRIBEQUERIESOUTPUT_MEMBER__REQUEST_ID,
          63  +
    ],
   53     64   
);
   54     65   
impl DescribeQueriesOutput {
   55     66   
    /// The schema for this shape.
   56     67   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEQUERIESOUTPUT_SCHEMA;
   57     68   
}
   58     69   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeQueriesOutput {
   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.queries {
   65     76   
            ser.write_list(
   66     77   
                &DESCRIBEQUERIESOUTPUT_MEMBER_QUERIES,
   67     78   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   68     79   
                    for item in val {
   69     80   
                        ser.write_struct(crate::types::QueryInfo::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(&DESCRIBEQUERIESOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   77     88   
        }
   78     89   
        Ok(())
   79     90   
    }
   80     91   
}
   81     92   
impl DescribeQueriesOutput {
   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,
   85     96   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   86     97   
        #[allow(unused_variables, unused_mut)]
   87     98   
        let mut builder = Self::builder();
   88     99   
        #[allow(
   89    100   
            unused_variables,
   90    101   
            unreachable_code,
   91    102   
            clippy::single_match,
   92    103   
            clippy::match_single_binding,
   93    104   
            clippy::diverging_sub_expression
   94    105   
        )]
   95         -
        deserializer.read_struct(&DESCRIBEQUERIESOUTPUT_SCHEMA, (), |_, member, deser| {
         106  +
        deserializer.read_struct(&DESCRIBEQUERIESOUTPUT_SCHEMA, &mut |member, deser| {
         107  +
            match member.member_index() {
         108  +
                Some(0) => {
         109  +
                    builder.queries = Some({
         110  +
                        let mut container = Vec::new();
         111  +
                        deser.read_list(member, &mut |deser| {
         112  +
                            container.push(crate::types::QueryInfo::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 DescribeQueriesOutput {
         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(&DESCRIBEQUERIESOUTPUT_SCHEMA, &mut |member, deser| {
   96    154   
            match member.member_index() {
   97    155   
                Some(0) => {
   98    156   
                    builder.queries = 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::QueryInfo::deserialize(deser)?);
  106         -
                            Ok(list)
  107         -
                        })?
         157  +
                        let mut container = Vec::new();
         158  +
                        deser.read_list(member, &mut |deser| {
         159  +
                            container.push(crate::types::QueryInfo::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/describe_query_definitions.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `DescribeQueryDefinitions`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeQueryDefinitions;
    6      6   
impl DescribeQueryDefinitions {
    7      7   
    /// Creates a new `DescribeQueryDefinitions`
    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 =
          13  +
        crate::operation::describe_query_definitions::DescribeQueryDefinitionsInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_query_definitions::DescribeQueryDefinitionsOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::describe_query_definitions::DescribeQueryDefinitionsInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_query_definitions::DescribeQueryDefinitionsOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_query_definitions::DescribeQueryDefinitionsError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -127,133 +253,322 @@
  147    153   
        ::std::borrow::Cow::Owned(rcb)
  148    154   
    }
  149    155   
}
  150    156   
  151    157   
#[derive(Debug)]
  152    158   
struct DescribeQueryDefinitionsResponseDeserializer;
  153    159   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeQueryDefinitionsResponseDeserializer {
  154    160   
    fn deserialize_nonstreaming(
  155    161   
        &self,
  156    162   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         163  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    164   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    165   
        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    166   
        #[allow(unused_mut)]
  162    167   
        let mut force_error = false;
  163    168   
        ::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_describe_query_definitions::de_describe_query_definitions_http_error(status, headers, body)
         169  +
        if !success && status != 200 || force_error {
         170  +
            let headers = response.headers();
         171  +
            let body = response.body().bytes().expect("body loaded");
         172  +
            #[allow(unused_mut)]
         173  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         174  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         175  +
            })?;
         176  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         177  +
            let generic = generic_builder.build();
         178  +
            let error_code = match generic.code() {
         179  +
                ::std::option::Option::Some(code) => code,
         180  +
                ::std::option::Option::None => {
         181  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         182  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         183  +
                            crate::operation::describe_query_definitions::DescribeQueryDefinitionsError::unhandled(generic),
         184  +
                        ),
         185  +
                    ))
         186  +
                }
         187  +
            };
         188  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         189  +
            let protocol = _cfg
         190  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         191  +
                .expect("a SharedClientProtocol is required");
         192  +
            let err = match error_code {
         193  +
                "InvalidParameterException" => {
         194  +
                    crate::operation::describe_query_definitions::DescribeQueryDefinitionsError::InvalidParameterException({
         195  +
                        let mut tmp = match protocol
         196  +
                            .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         197  +
                            .and_then(|mut deser| {
         198  +
                                crate::types::error::InvalidParameterException::deserialize_with_response(
         199  +
                                    &mut *deser,
         200  +
                                    response.headers(),
         201  +
                                    response.status().into(),
         202  +
                                    body,
         203  +
                                )
         204  +
                            }) {
         205  +
                            ::std::result::Result::Ok(val) => val,
         206  +
                            ::std::result::Result::Err(e) => {
         207  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         208  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         209  +
                                ))
         210  +
                            }
         211  +
                        };
         212  +
                        tmp.meta = generic;
         213  +
                        if tmp.message.is_none() {
         214  +
                            tmp.message = _error_message;
         215  +
                        }
         216  +
                        tmp
         217  +
                    })
         218  +
                }
         219  +
                "ServiceUnavailableException" => {
         220  +
                    crate::operation::describe_query_definitions::DescribeQueryDefinitionsError::ServiceUnavailableException({
         221  +
                        let mut tmp = match protocol
         222  +
                            .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         223  +
                            .and_then(|mut deser| {
         224  +
                                crate::types::error::ServiceUnavailableException::deserialize_with_response(
         225  +
                                    &mut *deser,
         226  +
                                    response.headers(),
         227  +
                                    response.status().into(),
         228  +
                                    body,
         229  +
                                )
         230  +
                            }) {
         231  +
                            ::std::result::Result::Ok(val) => val,
         232  +
                            ::std::result::Result::Err(e) => {
         233  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         234  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         235  +
                                ))
         236  +
                            }
         237  +
                        };
         238  +
                        tmp.meta = generic;
         239  +
                        if tmp.message.is_none() {
         240  +
                            tmp.message = _error_message;
         241  +
                        }
         242  +
                        tmp
         243  +
                    })
         244  +
                }
         245  +
                _ => crate::operation::describe_query_definitions::DescribeQueryDefinitionsError::generic(generic),
         246  +
            };
         247  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         248  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         249  +
            ))
  166    250   
        } else {
  167         -
            crate::protocol_serde::shape_describe_query_definitions::de_describe_query_definitions_http_response(status, headers, body)
  168         -
        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         251  +
            let protocol = _cfg
         252  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         253  +
                .expect("a SharedClientProtocol is required");
         254  +
            let mut deser = protocol
         255  +
                .deserialize_response(response, DescribeQueryDefinitions::OUTPUT_SCHEMA, _cfg)
         256  +
                .map_err(|e| {
         257  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         258  +
                })?;
         259  +
            let body = response.body().bytes().expect("body loaded");
         260  +
            let output = crate::operation::describe_query_definitions::DescribeQueryDefinitionsOutput::deserialize_with_response(
         261  +
                &mut *deser,
         262  +
                response.headers(),
         263  +
                response.status().into(),
         264  +
                body,
         265  +
            )
         266  +
            .map_err(|e| {
         267  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         268  +
            })?;
         269  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         270  +
        }
  170    271   
    }
  171    272   
}
  172    273   
#[derive(Debug)]
  173    274   
struct DescribeQueryDefinitionsRequestSerializer;
  174    275   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeQueryDefinitionsRequestSerializer {
  175    276   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    277   
    fn serialize_input(
  177    278   
        &self,
  178    279   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    280   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    281   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    282   
        let input = input
  182    283   
            .downcast::<crate::operation::describe_query_definitions::DescribeQueryDefinitionsInput>()
  183    284   
            .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::describe_query_definitions::DescribeQueryDefinitionsInput,
  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::describe_query_definitions::DescribeQueryDefinitionsInput,
  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.DescribeQueryDefinitions",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  217         -
            crate::protocol_serde::shape_describe_query_definitions::ser_describe_query_definitions_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())
         285  +
        let protocol = _cfg
         286  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         287  +
            .expect("a SharedClientProtocol is required");
         288  +
        let mut request = protocol
         289  +
            .serialize_request(&input, DescribeQueryDefinitions::INPUT_SCHEMA, "", _cfg)
         290  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         291  +
         292  +
        return ::std::result::Result::Ok(request);
  224    293   
    }
  225    294   
}
  226    295   
#[derive(Debug)]
  227    296   
struct DescribeQueryDefinitionsEndpointParamsInterceptor;
  228    297   
  229    298   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeQueryDefinitionsEndpointParamsInterceptor {
  230    299   
    fn name(&self) -> &'static str {
  231    300   
        "DescribeQueryDefinitionsEndpointParamsInterceptor"
  232    301   
    }
  233    302   

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

@@ -15,15 +179,190 @@
   35     35   
    "com.amazonaws.cloudwatchlogs.synthetic",
   36     36   
    "DescribeQueryDefinitionsInput",
   37     37   
);
   38     38   
static DESCRIBEQUERYDEFINITIONSINPUT_MEMBER_QUERY_LANGUAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeQueryDefinitionsInput$queryLanguage",
   41     41   
        "com.amazonaws.cloudwatchlogs.synthetic",
   42     42   
        "DescribeQueryDefinitionsInput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::String,
   45         -
    "query_language",
          45  +
    "queryLanguage",
   46     46   
    0,
   47     47   
);
   48     48   
static DESCRIBEQUERYDEFINITIONSINPUT_MEMBER_QUERY_DEFINITION_NAME_PREFIX: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   49     49   
    ::aws_smithy_schema::ShapeId::from_static(
   50     50   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeQueryDefinitionsInput$queryDefinitionNamePrefix",
   51     51   
        "com.amazonaws.cloudwatchlogs.synthetic",
   52     52   
        "DescribeQueryDefinitionsInput",
   53     53   
    ),
   54     54   
    ::aws_smithy_schema::ShapeType::String,
   55         -
    "query_definition_name_prefix",
          55  +
    "queryDefinitionNamePrefix",
   56     56   
    1,
   57     57   
);
   58     58   
static DESCRIBEQUERYDEFINITIONSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   59     59   
    ::aws_smithy_schema::ShapeId::from_static(
   60     60   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeQueryDefinitionsInput$maxResults",
   61     61   
        "com.amazonaws.cloudwatchlogs.synthetic",
   62     62   
        "DescribeQueryDefinitionsInput",
   63     63   
    ),
   64     64   
    ::aws_smithy_schema::ShapeType::Integer,
   65         -
    "max_results",
          65  +
    "maxResults",
   66     66   
    2,
   67     67   
);
   68     68   
static DESCRIBEQUERYDEFINITIONSINPUT_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#DescribeQueryDefinitionsInput$nextToken",
   71     71   
        "com.amazonaws.cloudwatchlogs.synthetic",
   72     72   
        "DescribeQueryDefinitionsInput",
   73     73   
    ),
   74     74   
    ::aws_smithy_schema::ShapeType::String,
   75         -
    "next_token",
          75  +
    "nextToken",
   76     76   
    3,
   77     77   
);
   78     78   
static DESCRIBEQUERYDEFINITIONSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   79     79   
    DESCRIBEQUERYDEFINITIONSINPUT_SCHEMA_ID,
   80     80   
    ::aws_smithy_schema::ShapeType::Structure,
   81     81   
    &[
   82     82   
        &DESCRIBEQUERYDEFINITIONSINPUT_MEMBER_QUERY_LANGUAGE,
   83     83   
        &DESCRIBEQUERYDEFINITIONSINPUT_MEMBER_QUERY_DEFINITION_NAME_PREFIX,
   84     84   
        &DESCRIBEQUERYDEFINITIONSINPUT_MEMBER_MAX_RESULTS,
   85     85   
        &DESCRIBEQUERYDEFINITIONSINPUT_MEMBER_NEXT_TOKEN,
   86     86   
    ],
   87     87   
);
   88     88   
impl DescribeQueryDefinitionsInput {
   89     89   
    /// The schema for this shape.
   90     90   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEQUERYDEFINITIONSINPUT_SCHEMA;
   91     91   
}
   92     92   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeQueryDefinitionsInput {
   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.query_language {
   99     99   
            ser.write_string(&DESCRIBEQUERYDEFINITIONSINPUT_MEMBER_QUERY_LANGUAGE, val.as_str())?;
  100    100   
        }
  101    101   
        if let Some(ref val) = self.query_definition_name_prefix {
  102    102   
            ser.write_string(&DESCRIBEQUERYDEFINITIONSINPUT_MEMBER_QUERY_DEFINITION_NAME_PREFIX, val)?;
  103    103   
        }
  104    104   
        if let Some(ref val) = self.max_results {
  105    105   
            ser.write_integer(&DESCRIBEQUERYDEFINITIONSINPUT_MEMBER_MAX_RESULTS, *val)?;
  106    106   
        }
  107    107   
        if let Some(ref val) = self.next_token {
  108    108   
            ser.write_string(&DESCRIBEQUERYDEFINITIONSINPUT_MEMBER_NEXT_TOKEN, val)?;
  109    109   
        }
  110    110   
        Ok(())
  111    111   
    }
  112    112   
}
  113    113   
impl DescribeQueryDefinitionsInput {
  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(&DESCRIBEQUERYDEFINITIONSINPUT_SCHEMA, (), |_, member, deser| {
         127  +
        deserializer.read_struct(&DESCRIBEQUERYDEFINITIONSINPUT_SCHEMA, &mut |member, deser| {
  128    128   
            match member.member_index() {
  129    129   
                Some(0) => {
  130    130   
                    builder.query_language = Some(crate::types::QueryLanguage::from(deser.read_string(member)?.as_str()));
  131    131   
                }
  132    132   
                Some(1) => {
  133    133   
                    builder.query_definition_name_prefix = Some(deser.read_string(member)?);
  134    134   
                }
  135    135   
                Some(2) => {
  136    136   
                    builder.max_results = 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 DescribeQueryDefinitionsInput {
         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 DescribeQueryDefinitionsInput {
  151    162   
    /// Creates a new builder-style object to manufacture [`DescribeQueryDefinitionsInput`](crate::operation::describe_query_definitions::DescribeQueryDefinitionsInput).
  152    163   
    pub fn builder() -> crate::operation::describe_query_definitions::builders::DescribeQueryDefinitionsInputBuilder {
  153    164   
        crate::operation::describe_query_definitions::builders::DescribeQueryDefinitionsInputBuilder::default()
  154    165   
    }
  155    166   
}
  156    167   
  157    168   
/// A builder for [`DescribeQueryDefinitionsInput`](crate::operation::describe_query_definitions::DescribeQueryDefinitionsInput).
  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/describe_query_definitions/_describe_query_definitions_output.rs

@@ -6,6 +140,192 @@
   26     26   
    "com.amazonaws.cloudwatchlogs.synthetic",
   27     27   
    "DescribeQueryDefinitionsOutput",
   28     28   
);
   29     29   
static DESCRIBEQUERYDEFINITIONSOUTPUT_MEMBER_QUERY_DEFINITIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   30     30   
    ::aws_smithy_schema::ShapeId::from_static(
   31     31   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeQueryDefinitionsOutput$queryDefinitions",
   32     32   
        "com.amazonaws.cloudwatchlogs.synthetic",
   33     33   
        "DescribeQueryDefinitionsOutput",
   34     34   
    ),
   35     35   
    ::aws_smithy_schema::ShapeType::List,
   36         -
    "query_definitions",
          36  +
    "queryDefinitions",
   37     37   
    0,
   38     38   
);
   39     39   
static DESCRIBEQUERYDEFINITIONSOUTPUT_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#DescribeQueryDefinitionsOutput$nextToken",
   42     42   
        "com.amazonaws.cloudwatchlogs.synthetic",
   43     43   
        "DescribeQueryDefinitionsOutput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::String,
   46         -
    "next_token",
          46  +
    "nextToken",
   47     47   
    1,
   48     48   
);
          49  +
static DESCRIBEQUERYDEFINITIONSOUTPUT_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 DESCRIBEQUERYDEFINITIONSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   50     57   
    DESCRIBEQUERYDEFINITIONSOUTPUT_SCHEMA_ID,
   51     58   
    ::aws_smithy_schema::ShapeType::Structure,
   52     59   
    &[
   53     60   
        &DESCRIBEQUERYDEFINITIONSOUTPUT_MEMBER_QUERY_DEFINITIONS,
   54     61   
        &DESCRIBEQUERYDEFINITIONSOUTPUT_MEMBER_NEXT_TOKEN,
          62  +
        &DESCRIBEQUERYDEFINITIONSOUTPUT_MEMBER__REQUEST_ID,
   55     63   
    ],
   56     64   
);
   57     65   
impl DescribeQueryDefinitionsOutput {
   58     66   
    /// The schema for this shape.
   59     67   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEQUERYDEFINITIONSOUTPUT_SCHEMA;
   60     68   
}
   61     69   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeQueryDefinitionsOutput {
   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.query_definitions {
   68     76   
            ser.write_list(
   69     77   
                &DESCRIBEQUERYDEFINITIONSOUTPUT_MEMBER_QUERY_DEFINITIONS,
   70     78   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   71     79   
                    for item in val {
   72     80   
                        ser.write_struct(crate::types::QueryDefinition::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(&DESCRIBEQUERYDEFINITIONSOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   80     88   
        }
   81     89   
        Ok(())
   82     90   
    }
   83     91   
}
   84     92   
impl DescribeQueryDefinitionsOutput {
   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(&DESCRIBEQUERYDEFINITIONSOUTPUT_SCHEMA, (), |_, member, deser| {
         106  +
        deserializer.read_struct(&DESCRIBEQUERYDEFINITIONSOUTPUT_SCHEMA, &mut |member, deser| {
         107  +
            match member.member_index() {
         108  +
                Some(0) => {
         109  +
                    builder.query_definitions = Some({
         110  +
                        let mut container = Vec::new();
         111  +
                        deser.read_list(member, &mut |deser| {
         112  +
                            container.push(crate::types::QueryDefinition::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 DescribeQueryDefinitionsOutput {
         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(&DESCRIBEQUERYDEFINITIONSOUTPUT_SCHEMA, &mut |member, deser| {
   99    154   
            match member.member_index() {
  100    155   
                Some(0) => {
  101    156   
                    builder.query_definitions = 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::QueryDefinition::deserialize(deser)?);
  109         -
                            Ok(list)
  110         -
                        })?
         157  +
                        let mut container = Vec::new();
         158  +
                        deser.read_list(member, &mut |deser| {
         159  +
                            container.push(crate::types::QueryDefinition::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/describe_resource_policies.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `DescribeResourcePolicies`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeResourcePolicies;
    6      6   
impl DescribeResourcePolicies {
    7      7   
    /// Creates a new `DescribeResourcePolicies`
    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 =
          13  +
        crate::operation::describe_resource_policies::DescribeResourcePoliciesInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_resource_policies::DescribeResourcePoliciesOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::describe_resource_policies::DescribeResourcePoliciesInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_resource_policies::DescribeResourcePoliciesOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_resource_policies::DescribeResourcePoliciesError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -127,133 +253,322 @@
  147    153   
        ::std::borrow::Cow::Owned(rcb)
  148    154   
    }
  149    155   
}
  150    156   
  151    157   
#[derive(Debug)]
  152    158   
struct DescribeResourcePoliciesResponseDeserializer;
  153    159   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeResourcePoliciesResponseDeserializer {
  154    160   
    fn deserialize_nonstreaming(
  155    161   
        &self,
  156    162   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         163  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    164   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    165   
        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    166   
        #[allow(unused_mut)]
  162    167   
        let mut force_error = false;
  163    168   
        ::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_describe_resource_policies::de_describe_resource_policies_http_error(status, headers, body)
         169  +
        if !success && status != 200 || force_error {
         170  +
            let headers = response.headers();
         171  +
            let body = response.body().bytes().expect("body loaded");
         172  +
            #[allow(unused_mut)]
         173  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         174  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         175  +
            })?;
         176  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         177  +
            let generic = generic_builder.build();
         178  +
            let error_code = match generic.code() {
         179  +
                ::std::option::Option::Some(code) => code,
         180  +
                ::std::option::Option::None => {
         181  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         182  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         183  +
                            crate::operation::describe_resource_policies::DescribeResourcePoliciesError::unhandled(generic),
         184  +
                        ),
         185  +
                    ))
         186  +
                }
         187  +
            };
         188  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         189  +
            let protocol = _cfg
         190  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         191  +
                .expect("a SharedClientProtocol is required");
         192  +
            let err = match error_code {
         193  +
                "InvalidParameterException" => {
         194  +
                    crate::operation::describe_resource_policies::DescribeResourcePoliciesError::InvalidParameterException({
         195  +
                        let mut tmp = match protocol
         196  +
                            .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         197  +
                            .and_then(|mut deser| {
         198  +
                                crate::types::error::InvalidParameterException::deserialize_with_response(
         199  +
                                    &mut *deser,
         200  +
                                    response.headers(),
         201  +
                                    response.status().into(),
         202  +
                                    body,
         203  +
                                )
         204  +
                            }) {
         205  +
                            ::std::result::Result::Ok(val) => val,
         206  +
                            ::std::result::Result::Err(e) => {
         207  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         208  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         209  +
                                ))
         210  +
                            }
         211  +
                        };
         212  +
                        tmp.meta = generic;
         213  +
                        if tmp.message.is_none() {
         214  +
                            tmp.message = _error_message;
         215  +
                        }
         216  +
                        tmp
         217  +
                    })
         218  +
                }
         219  +
                "ServiceUnavailableException" => {
         220  +
                    crate::operation::describe_resource_policies::DescribeResourcePoliciesError::ServiceUnavailableException({
         221  +
                        let mut tmp = match protocol
         222  +
                            .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         223  +
                            .and_then(|mut deser| {
         224  +
                                crate::types::error::ServiceUnavailableException::deserialize_with_response(
         225  +
                                    &mut *deser,
         226  +
                                    response.headers(),
         227  +
                                    response.status().into(),
         228  +
                                    body,
         229  +
                                )
         230  +
                            }) {
         231  +
                            ::std::result::Result::Ok(val) => val,
         232  +
                            ::std::result::Result::Err(e) => {
         233  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         234  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         235  +
                                ))
         236  +
                            }
         237  +
                        };
         238  +
                        tmp.meta = generic;
         239  +
                        if tmp.message.is_none() {
         240  +
                            tmp.message = _error_message;
         241  +
                        }
         242  +
                        tmp
         243  +
                    })
         244  +
                }
         245  +
                _ => crate::operation::describe_resource_policies::DescribeResourcePoliciesError::generic(generic),
         246  +
            };
         247  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         248  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         249  +
            ))
  166    250   
        } else {
  167         -
            crate::protocol_serde::shape_describe_resource_policies::de_describe_resource_policies_http_response(status, headers, body)
  168         -
        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         251  +
            let protocol = _cfg
         252  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         253  +
                .expect("a SharedClientProtocol is required");
         254  +
            let mut deser = protocol
         255  +
                .deserialize_response(response, DescribeResourcePolicies::OUTPUT_SCHEMA, _cfg)
         256  +
                .map_err(|e| {
         257  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         258  +
                })?;
         259  +
            let body = response.body().bytes().expect("body loaded");
         260  +
            let output = crate::operation::describe_resource_policies::DescribeResourcePoliciesOutput::deserialize_with_response(
         261  +
                &mut *deser,
         262  +
                response.headers(),
         263  +
                response.status().into(),
         264  +
                body,
         265  +
            )
         266  +
            .map_err(|e| {
         267  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         268  +
            })?;
         269  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         270  +
        }
  170    271   
    }
  171    272   
}
  172    273   
#[derive(Debug)]
  173    274   
struct DescribeResourcePoliciesRequestSerializer;
  174    275   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeResourcePoliciesRequestSerializer {
  175    276   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    277   
    fn serialize_input(
  177    278   
        &self,
  178    279   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    280   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    281   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    282   
        let input = input
  182    283   
            .downcast::<crate::operation::describe_resource_policies::DescribeResourcePoliciesInput>()
  183    284   
            .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::describe_resource_policies::DescribeResourcePoliciesInput,
  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::describe_resource_policies::DescribeResourcePoliciesInput,
  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.DescribeResourcePolicies",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  217         -
            crate::protocol_serde::shape_describe_resource_policies::ser_describe_resource_policies_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())
         285  +
        let protocol = _cfg
         286  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         287  +
            .expect("a SharedClientProtocol is required");
         288  +
        let mut request = protocol
         289  +
            .serialize_request(&input, DescribeResourcePolicies::INPUT_SCHEMA, "", _cfg)
         290  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         291  +
         292  +
        return ::std::result::Result::Ok(request);
  224    293   
    }
  225    294   
}
  226    295   
#[derive(Debug)]
  227    296   
struct DescribeResourcePoliciesEndpointParamsInterceptor;
  228    297   
  229    298   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeResourcePoliciesEndpointParamsInterceptor {
  230    299   
    fn name(&self) -> &'static str {
  231    300   
        "DescribeResourcePoliciesEndpointParamsInterceptor"
  232    301   
    }
  233    302   

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

@@ -15,15 +179,190 @@
   35     35   
    "com.amazonaws.cloudwatchlogs.synthetic",
   36     36   
    "DescribeResourcePoliciesInput",
   37     37   
);
   38     38   
static DESCRIBERESOURCEPOLICIESINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeResourcePoliciesInput$nextToken",
   41     41   
        "com.amazonaws.cloudwatchlogs.synthetic",
   42     42   
        "DescribeResourcePoliciesInput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::String,
   45         -
    "next_token",
          45  +
    "nextToken",
   46     46   
    0,
   47     47   
);
   48     48   
static DESCRIBERESOURCEPOLICIESINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   49     49   
    ::aws_smithy_schema::ShapeId::from_static(
   50     50   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeResourcePoliciesInput$limit",
   51     51   
        "com.amazonaws.cloudwatchlogs.synthetic",
   52     52   
        "DescribeResourcePoliciesInput",
   53     53   
    ),
   54     54   
    ::aws_smithy_schema::ShapeType::Integer,
   55     55   
    "limit",
   56     56   
    1,
   57     57   
);
   58     58   
static DESCRIBERESOURCEPOLICIESINPUT_MEMBER_RESOURCE_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   59     59   
    ::aws_smithy_schema::ShapeId::from_static(
   60     60   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeResourcePoliciesInput$resourceArn",
   61     61   
        "com.amazonaws.cloudwatchlogs.synthetic",
   62     62   
        "DescribeResourcePoliciesInput",
   63     63   
    ),
   64     64   
    ::aws_smithy_schema::ShapeType::String,
   65         -
    "resource_arn",
          65  +
    "resourceArn",
   66     66   
    2,
   67     67   
);
   68     68   
static DESCRIBERESOURCEPOLICIESINPUT_MEMBER_POLICY_SCOPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   69     69   
    ::aws_smithy_schema::ShapeId::from_static(
   70     70   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeResourcePoliciesInput$policyScope",
   71     71   
        "com.amazonaws.cloudwatchlogs.synthetic",
   72     72   
        "DescribeResourcePoliciesInput",
   73     73   
    ),
   74     74   
    ::aws_smithy_schema::ShapeType::String,
   75         -
    "policy_scope",
          75  +
    "policyScope",
   76     76   
    3,
   77     77   
);
   78     78   
static DESCRIBERESOURCEPOLICIESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   79     79   
    DESCRIBERESOURCEPOLICIESINPUT_SCHEMA_ID,
   80     80   
    ::aws_smithy_schema::ShapeType::Structure,
   81     81   
    &[
   82     82   
        &DESCRIBERESOURCEPOLICIESINPUT_MEMBER_NEXT_TOKEN,
   83     83   
        &DESCRIBERESOURCEPOLICIESINPUT_MEMBER_LIMIT,
   84     84   
        &DESCRIBERESOURCEPOLICIESINPUT_MEMBER_RESOURCE_ARN,
   85     85   
        &DESCRIBERESOURCEPOLICIESINPUT_MEMBER_POLICY_SCOPE,
   86     86   
    ],
   87     87   
);
   88     88   
impl DescribeResourcePoliciesInput {
   89     89   
    /// The schema for this shape.
   90     90   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBERESOURCEPOLICIESINPUT_SCHEMA;
   91     91   
}
   92     92   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeResourcePoliciesInput {
   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.next_token {
   99     99   
            ser.write_string(&DESCRIBERESOURCEPOLICIESINPUT_MEMBER_NEXT_TOKEN, val)?;
  100    100   
        }
  101    101   
        if let Some(ref val) = self.limit {
  102    102   
            ser.write_integer(&DESCRIBERESOURCEPOLICIESINPUT_MEMBER_LIMIT, *val)?;
  103    103   
        }
  104    104   
        if let Some(ref val) = self.resource_arn {
  105    105   
            ser.write_string(&DESCRIBERESOURCEPOLICIESINPUT_MEMBER_RESOURCE_ARN, val)?;
  106    106   
        }
  107    107   
        if let Some(ref val) = self.policy_scope {
  108    108   
            ser.write_string(&DESCRIBERESOURCEPOLICIESINPUT_MEMBER_POLICY_SCOPE, val.as_str())?;
  109    109   
        }
  110    110   
        Ok(())
  111    111   
    }
  112    112   
}
  113    113   
impl DescribeResourcePoliciesInput {
  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(&DESCRIBERESOURCEPOLICIESINPUT_SCHEMA, (), |_, member, deser| {
         127  +
        deserializer.read_struct(&DESCRIBERESOURCEPOLICIESINPUT_SCHEMA, &mut |member, deser| {
  128    128   
            match member.member_index() {
  129    129   
                Some(0) => {
  130    130   
                    builder.next_token = Some(deser.read_string(member)?);
  131    131   
                }
  132    132   
                Some(1) => {
  133    133   
                    builder.limit = Some(deser.read_integer(member)?);
  134    134   
                }
  135    135   
                Some(2) => {
  136    136   
                    builder.resource_arn = Some(deser.read_string(member)?);
  137    137   
                }
  138    138   
                Some(3) => {
  139    139   
                    builder.policy_scope = Some(crate::types::PolicyScope::from(deser.read_string(member)?.as_str()));
  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 DescribeResourcePoliciesInput {
         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 DescribeResourcePoliciesInput {
  151    162   
    /// Creates a new builder-style object to manufacture [`DescribeResourcePoliciesInput`](crate::operation::describe_resource_policies::DescribeResourcePoliciesInput).
  152    163   
    pub fn builder() -> crate::operation::describe_resource_policies::builders::DescribeResourcePoliciesInputBuilder {
  153    164   
        crate::operation::describe_resource_policies::builders::DescribeResourcePoliciesInputBuilder::default()
  154    165   
    }
  155    166   
}
  156    167   
  157    168   
/// A builder for [`DescribeResourcePoliciesInput`](crate::operation::describe_resource_policies::DescribeResourcePoliciesInput).
  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/describe_resource_policies/_describe_resource_policies_output.rs

@@ -6,6 +140,192 @@
   26     26   
    "com.amazonaws.cloudwatchlogs.synthetic",
   27     27   
    "DescribeResourcePoliciesOutput",
   28     28   
);
   29     29   
static DESCRIBERESOURCEPOLICIESOUTPUT_MEMBER_RESOURCE_POLICIES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   30     30   
    ::aws_smithy_schema::ShapeId::from_static(
   31     31   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeResourcePoliciesOutput$resourcePolicies",
   32     32   
        "com.amazonaws.cloudwatchlogs.synthetic",
   33     33   
        "DescribeResourcePoliciesOutput",
   34     34   
    ),
   35     35   
    ::aws_smithy_schema::ShapeType::List,
   36         -
    "resource_policies",
          36  +
    "resourcePolicies",
   37     37   
    0,
   38     38   
);
   39     39   
static DESCRIBERESOURCEPOLICIESOUTPUT_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#DescribeResourcePoliciesOutput$nextToken",
   42     42   
        "com.amazonaws.cloudwatchlogs.synthetic",
   43     43   
        "DescribeResourcePoliciesOutput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::String,
   46         -
    "next_token",
          46  +
    "nextToken",
   47     47   
    1,
   48     48   
);
          49  +
static DESCRIBERESOURCEPOLICIESOUTPUT_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 DESCRIBERESOURCEPOLICIESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   50     57   
    DESCRIBERESOURCEPOLICIESOUTPUT_SCHEMA_ID,
   51     58   
    ::aws_smithy_schema::ShapeType::Structure,
   52     59   
    &[
   53     60   
        &DESCRIBERESOURCEPOLICIESOUTPUT_MEMBER_RESOURCE_POLICIES,
   54     61   
        &DESCRIBERESOURCEPOLICIESOUTPUT_MEMBER_NEXT_TOKEN,
          62  +
        &DESCRIBERESOURCEPOLICIESOUTPUT_MEMBER__REQUEST_ID,
   55     63   
    ],
   56     64   
);
   57     65   
impl DescribeResourcePoliciesOutput {
   58     66   
    /// The schema for this shape.
   59     67   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBERESOURCEPOLICIESOUTPUT_SCHEMA;
   60     68   
}
   61     69   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeResourcePoliciesOutput {
   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.resource_policies {
   68     76   
            ser.write_list(
   69     77   
                &DESCRIBERESOURCEPOLICIESOUTPUT_MEMBER_RESOURCE_POLICIES,
   70     78   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   71     79   
                    for item in val {
   72     80   
                        ser.write_struct(crate::types::ResourcePolicy::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(&DESCRIBERESOURCEPOLICIESOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   80     88   
        }
   81     89   
        Ok(())
   82     90   
    }
   83     91   
}
   84     92   
impl DescribeResourcePoliciesOutput {
   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(&DESCRIBERESOURCEPOLICIESOUTPUT_SCHEMA, (), |_, member, deser| {
         106  +
        deserializer.read_struct(&DESCRIBERESOURCEPOLICIESOUTPUT_SCHEMA, &mut |member, deser| {
         107  +
            match member.member_index() {
         108  +
                Some(0) => {
         109  +
                    builder.resource_policies = Some({
         110  +
                        let mut container = Vec::new();
         111  +
                        deser.read_list(member, &mut |deser| {
         112  +
                            container.push(crate::types::ResourcePolicy::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 DescribeResourcePoliciesOutput {
         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(&DESCRIBERESOURCEPOLICIESOUTPUT_SCHEMA, &mut |member, deser| {
   99    154   
            match member.member_index() {
  100    155   
                Some(0) => {
  101    156   
                    builder.resource_policies = 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::ResourcePolicy::deserialize(deser)?);
  109         -
                            Ok(list)
  110         -
                        })?
         157  +
                        let mut container = Vec::new();
         158  +
                        deser.read_list(member, &mut |deser| {
         159  +
                            container.push(crate::types::ResourcePolicy::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/describe_subscription_filters.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `DescribeSubscriptionFilters`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeSubscriptionFilters;
    6      6   
impl DescribeSubscriptionFilters {
    7      7   
    /// Creates a new `DescribeSubscriptionFilters`
    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 =
          13  +
        crate::operation::describe_subscription_filters::DescribeSubscriptionFiltersInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_subscription_filters::DescribeSubscriptionFiltersOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::describe_subscription_filters::DescribeSubscriptionFiltersInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_subscription_filters::DescribeSubscriptionFiltersOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_subscription_filters::DescribeSubscriptionFiltersError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -127,133 +253,348 @@
  147    153   
        ::std::borrow::Cow::Owned(rcb)
  148    154   
    }
  149    155   
}
  150    156   
  151    157   
#[derive(Debug)]
  152    158   
struct DescribeSubscriptionFiltersResponseDeserializer;
  153    159   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeSubscriptionFiltersResponseDeserializer {
  154    160   
    fn deserialize_nonstreaming(
  155    161   
        &self,
  156    162   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         163  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    164   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    165   
        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    166   
        #[allow(unused_mut)]
  162    167   
        let mut force_error = false;
  163    168   
        ::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_describe_subscription_filters::de_describe_subscription_filters_http_error(status, headers, body)
         169  +
        if !success && status != 200 || force_error {
         170  +
            let headers = response.headers();
         171  +
            let body = response.body().bytes().expect("body loaded");
         172  +
            #[allow(unused_mut)]
         173  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         174  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         175  +
            })?;
         176  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         177  +
            let generic = generic_builder.build();
         178  +
            let error_code = match generic.code() {
         179  +
                ::std::option::Option::Some(code) => code,
         180  +
                ::std::option::Option::None => {
         181  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         182  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         183  +
                            crate::operation::describe_subscription_filters::DescribeSubscriptionFiltersError::unhandled(generic),
         184  +
                        ),
         185  +
                    ))
         186  +
                }
         187  +
            };
         188  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         189  +
            let protocol = _cfg
         190  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         191  +
                .expect("a SharedClientProtocol is required");
         192  +
            let err = match error_code {
         193  +
                "InvalidParameterException" => {
         194  +
                    crate::operation::describe_subscription_filters::DescribeSubscriptionFiltersError::InvalidParameterException({
         195  +
                        let mut tmp = match protocol
         196  +
                            .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         197  +
                            .and_then(|mut deser| {
         198  +
                                crate::types::error::InvalidParameterException::deserialize_with_response(
         199  +
                                    &mut *deser,
         200  +
                                    response.headers(),
         201  +
                                    response.status().into(),
         202  +
                                    body,
         203  +
                                )
         204  +
                            }) {
         205  +
                            ::std::result::Result::Ok(val) => val,
         206  +
                            ::std::result::Result::Err(e) => {
         207  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         208  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         209  +
                                ))
         210  +
                            }
         211  +
                        };
         212  +
                        tmp.meta = generic;
         213  +
                        if tmp.message.is_none() {
         214  +
                            tmp.message = _error_message;
         215  +
                        }
         216  +
                        tmp
         217  +
                    })
         218  +
                }
         219  +
                "ResourceNotFoundException" => {
         220  +
                    crate::operation::describe_subscription_filters::DescribeSubscriptionFiltersError::ResourceNotFoundException({
         221  +
                        let mut tmp = match protocol
         222  +
                            .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         223  +
                            .and_then(|mut deser| {
         224  +
                                crate::types::error::ResourceNotFoundException::deserialize_with_response(
         225  +
                                    &mut *deser,
         226  +
                                    response.headers(),
         227  +
                                    response.status().into(),
         228  +
                                    body,
         229  +
                                )
         230  +
                            }) {
         231  +
                            ::std::result::Result::Ok(val) => val,
         232  +
                            ::std::result::Result::Err(e) => {
         233  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         234  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         235  +
                                ))
         236  +
                            }
         237  +
                        };
         238  +
                        tmp.meta = generic;
         239  +
                        if tmp.message.is_none() {
         240  +
                            tmp.message = _error_message;
         241  +
                        }
         242  +
                        tmp
         243  +
                    })
         244  +
                }
         245  +
                "ServiceUnavailableException" => {
         246  +
                    crate::operation::describe_subscription_filters::DescribeSubscriptionFiltersError::ServiceUnavailableException({
         247  +
                        let mut tmp = match protocol
         248  +
                            .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         249  +
                            .and_then(|mut deser| {
         250  +
                                crate::types::error::ServiceUnavailableException::deserialize_with_response(
         251  +
                                    &mut *deser,
         252  +
                                    response.headers(),
         253  +
                                    response.status().into(),
         254  +
                                    body,
         255  +
                                )
         256  +
                            }) {
         257  +
                            ::std::result::Result::Ok(val) => val,
         258  +
                            ::std::result::Result::Err(e) => {
         259  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         260  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         261  +
                                ))
         262  +
                            }
         263  +
                        };
         264  +
                        tmp.meta = generic;
         265  +
                        if tmp.message.is_none() {
         266  +
                            tmp.message = _error_message;
         267  +
                        }
         268  +
                        tmp
         269  +
                    })
         270  +
                }
         271  +
                _ => crate::operation::describe_subscription_filters::DescribeSubscriptionFiltersError::generic(generic),
         272  +
            };
         273  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         274  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         275  +
            ))
  166    276   
        } else {
  167         -
            crate::protocol_serde::shape_describe_subscription_filters::de_describe_subscription_filters_http_response(status, headers, body)
  168         -
        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         277  +
            let protocol = _cfg
         278  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         279  +
                .expect("a SharedClientProtocol is required");
         280  +
            let mut deser = protocol
         281  +
                .deserialize_response(response, DescribeSubscriptionFilters::OUTPUT_SCHEMA, _cfg)
         282  +
                .map_err(|e| {
         283  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         284  +
                })?;
         285  +
            let body = response.body().bytes().expect("body loaded");
         286  +
            let output = crate::operation::describe_subscription_filters::DescribeSubscriptionFiltersOutput::deserialize_with_response(
         287  +
                &mut *deser,
         288  +
                response.headers(),
         289  +
                response.status().into(),
         290  +
                body,
         291  +
            )
         292  +
            .map_err(|e| {
         293  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         294  +
            })?;
         295  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         296  +
        }
  170    297   
    }
  171    298   
}
  172    299   
#[derive(Debug)]
  173    300   
struct DescribeSubscriptionFiltersRequestSerializer;
  174    301   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeSubscriptionFiltersRequestSerializer {
  175    302   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    303   
    fn serialize_input(
  177    304   
        &self,
  178    305   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    306   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    307   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    308   
        let input = input
  182    309   
            .downcast::<crate::operation::describe_subscription_filters::DescribeSubscriptionFiltersInput>()
  183    310   
            .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::describe_subscription_filters::DescribeSubscriptionFiltersInput,
  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::describe_subscription_filters::DescribeSubscriptionFiltersInput,
  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.DescribeSubscriptionFilters",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  217         -
            crate::protocol_serde::shape_describe_subscription_filters::ser_describe_subscription_filters_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())
         311  +
        let protocol = _cfg
         312  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         313  +
            .expect("a SharedClientProtocol is required");
         314  +
        let mut request = protocol
         315  +
            .serialize_request(&input, DescribeSubscriptionFilters::INPUT_SCHEMA, "", _cfg)
         316  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         317  +
         318  +
        return ::std::result::Result::Ok(request);
  224    319   
    }
  225    320   
}
  226    321   
#[derive(Debug)]
  227    322   
struct DescribeSubscriptionFiltersEndpointParamsInterceptor;
  228    323   
  229    324   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeSubscriptionFiltersEndpointParamsInterceptor {
  230    325   
    fn name(&self) -> &'static str {
  231    326   
        "DescribeSubscriptionFiltersEndpointParamsInterceptor"
  232    327   
    }
  233    328   

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

@@ -15,15 +179,191 @@
   35     35   
    "com.amazonaws.cloudwatchlogs.synthetic",
   36     36   
    "DescribeSubscriptionFiltersInput",
   37     37   
);
   38     38   
static DESCRIBESUBSCRIPTIONFILTERSINPUT_MEMBER_LOG_GROUP_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeSubscriptionFiltersInput$logGroupName",
   41     41   
        "com.amazonaws.cloudwatchlogs.synthetic",
   42     42   
        "DescribeSubscriptionFiltersInput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::String,
   45         -
    "log_group_name",
          45  +
    "logGroupName",
   46     46   
    0,
   47     47   
);
   48     48   
static DESCRIBESUBSCRIPTIONFILTERSINPUT_MEMBER_FILTER_NAME_PREFIX: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   49     49   
    ::aws_smithy_schema::ShapeId::from_static(
   50     50   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeSubscriptionFiltersInput$filterNamePrefix",
   51     51   
        "com.amazonaws.cloudwatchlogs.synthetic",
   52     52   
        "DescribeSubscriptionFiltersInput",
   53     53   
    ),
   54     54   
    ::aws_smithy_schema::ShapeType::String,
   55         -
    "filter_name_prefix",
          55  +
    "filterNamePrefix",
   56     56   
    1,
   57     57   
);
   58     58   
static DESCRIBESUBSCRIPTIONFILTERSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   59     59   
    ::aws_smithy_schema::ShapeId::from_static(
   60     60   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeSubscriptionFiltersInput$nextToken",
   61     61   
        "com.amazonaws.cloudwatchlogs.synthetic",
   62     62   
        "DescribeSubscriptionFiltersInput",
   63     63   
    ),
   64     64   
    ::aws_smithy_schema::ShapeType::String,
   65         -
    "next_token",
          65  +
    "nextToken",
   66     66   
    2,
   67     67   
);
   68     68   
static DESCRIBESUBSCRIPTIONFILTERSINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   69     69   
    ::aws_smithy_schema::ShapeId::from_static(
   70     70   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeSubscriptionFiltersInput$limit",
   71     71   
        "com.amazonaws.cloudwatchlogs.synthetic",
   72     72   
        "DescribeSubscriptionFiltersInput",
   73     73   
    ),
   74     74   
    ::aws_smithy_schema::ShapeType::Integer,
   75     75   
    "limit",
   76     76   
    3,
   77     77   
);
   78     78   
static DESCRIBESUBSCRIPTIONFILTERSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   79     79   
    DESCRIBESUBSCRIPTIONFILTERSINPUT_SCHEMA_ID,
   80     80   
    ::aws_smithy_schema::ShapeType::Structure,
   81     81   
    &[
   82     82   
        &DESCRIBESUBSCRIPTIONFILTERSINPUT_MEMBER_LOG_GROUP_NAME,
   83     83   
        &DESCRIBESUBSCRIPTIONFILTERSINPUT_MEMBER_FILTER_NAME_PREFIX,
   84     84   
        &DESCRIBESUBSCRIPTIONFILTERSINPUT_MEMBER_NEXT_TOKEN,
   85     85   
        &DESCRIBESUBSCRIPTIONFILTERSINPUT_MEMBER_LIMIT,
   86     86   
    ],
   87     87   
);
   88     88   
impl DescribeSubscriptionFiltersInput {
   89     89   
    /// The schema for this shape.
   90     90   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBESUBSCRIPTIONFILTERSINPUT_SCHEMA;
   91     91   
}
   92     92   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeSubscriptionFiltersInput {
   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.log_group_name {
   99     99   
            ser.write_string(&DESCRIBESUBSCRIPTIONFILTERSINPUT_MEMBER_LOG_GROUP_NAME, val)?;
  100    100   
        }
  101    101   
        if let Some(ref val) = self.filter_name_prefix {
  102    102   
            ser.write_string(&DESCRIBESUBSCRIPTIONFILTERSINPUT_MEMBER_FILTER_NAME_PREFIX, val)?;
  103    103   
        }
  104    104   
        if let Some(ref val) = self.next_token {
  105    105   
            ser.write_string(&DESCRIBESUBSCRIPTIONFILTERSINPUT_MEMBER_NEXT_TOKEN, val)?;
  106    106   
        }
  107    107   
        if let Some(ref val) = self.limit {
  108    108   
            ser.write_integer(&DESCRIBESUBSCRIPTIONFILTERSINPUT_MEMBER_LIMIT, *val)?;
  109    109   
        }
  110    110   
        Ok(())
  111    111   
    }
  112    112   
}
  113    113   
impl DescribeSubscriptionFiltersInput {
  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(&DESCRIBESUBSCRIPTIONFILTERSINPUT_SCHEMA, (), |_, member, deser| {
         127  +
        deserializer.read_struct(&DESCRIBESUBSCRIPTIONFILTERSINPUT_SCHEMA, &mut |member, deser| {
  128    128   
            match member.member_index() {
  129    129   
                Some(0) => {
  130    130   
                    builder.log_group_name = Some(deser.read_string(member)?);
  131    131   
                }
  132    132   
                Some(1) => {
  133    133   
                    builder.filter_name_prefix = Some(deser.read_string(member)?);
  134    134   
                }
  135    135   
                Some(2) => {
  136    136   
                    builder.next_token = Some(deser.read_string(member)?);
  137    137   
                }
  138    138   
                Some(3) => {
  139    139   
                    builder.limit = Some(deser.read_integer(member)?);
  140    140   
                }
  141    141   
                _ => {}
  142    142   
            }
  143    143   
            Ok(())
  144    144   
        })?;
         145  +
        builder.log_group_name = builder.log_group_name.or(Some(String::new()));
  145    146   
        builder
  146    147   
            .build()
  147    148   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  148    149   
    }
  149    150   
}
         151  +
impl DescribeSubscriptionFiltersInput {
         152  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         153  +
    pub fn deserialize_with_response(
         154  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         155  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         156  +
        _status: u16,
         157  +
        _body: &[u8],
         158  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         159  +
        Self::deserialize(deserializer)
         160  +
    }
         161  +
}
  150    162   
impl DescribeSubscriptionFiltersInput {
  151    163   
    /// Creates a new builder-style object to manufacture [`DescribeSubscriptionFiltersInput`](crate::operation::describe_subscription_filters::DescribeSubscriptionFiltersInput).
  152    164   
    pub fn builder() -> crate::operation::describe_subscription_filters::builders::DescribeSubscriptionFiltersInputBuilder {
  153    165   
        crate::operation::describe_subscription_filters::builders::DescribeSubscriptionFiltersInputBuilder::default()
  154    166   
    }
  155    167   
}
  156    168   
  157    169   
/// A builder for [`DescribeSubscriptionFiltersInput`](crate::operation::describe_subscription_filters::DescribeSubscriptionFiltersInput).
  158    170   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  159    171   
#[non_exhaustive]

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

@@ -6,6 +140,192 @@
   26     26   
    "com.amazonaws.cloudwatchlogs.synthetic",
   27     27   
    "DescribeSubscriptionFiltersOutput",
   28     28   
);
   29     29   
static DESCRIBESUBSCRIPTIONFILTERSOUTPUT_MEMBER_SUBSCRIPTION_FILTERS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   30     30   
    ::aws_smithy_schema::ShapeId::from_static(
   31     31   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeSubscriptionFiltersOutput$subscriptionFilters",
   32     32   
        "com.amazonaws.cloudwatchlogs.synthetic",
   33     33   
        "DescribeSubscriptionFiltersOutput",
   34     34   
    ),
   35     35   
    ::aws_smithy_schema::ShapeType::List,
   36         -
    "subscription_filters",
          36  +
    "subscriptionFilters",
   37     37   
    0,
   38     38   
);
   39     39   
static DESCRIBESUBSCRIPTIONFILTERSOUTPUT_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#DescribeSubscriptionFiltersOutput$nextToken",
   42     42   
        "com.amazonaws.cloudwatchlogs.synthetic",
   43     43   
        "DescribeSubscriptionFiltersOutput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::String,
   46         -
    "next_token",
          46  +
    "nextToken",
   47     47   
    1,
   48     48   
);
          49  +
static DESCRIBESUBSCRIPTIONFILTERSOUTPUT_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 DESCRIBESUBSCRIPTIONFILTERSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   50     57   
    DESCRIBESUBSCRIPTIONFILTERSOUTPUT_SCHEMA_ID,
   51     58   
    ::aws_smithy_schema::ShapeType::Structure,
   52     59   
    &[
   53     60   
        &DESCRIBESUBSCRIPTIONFILTERSOUTPUT_MEMBER_SUBSCRIPTION_FILTERS,
   54     61   
        &DESCRIBESUBSCRIPTIONFILTERSOUTPUT_MEMBER_NEXT_TOKEN,
          62  +
        &DESCRIBESUBSCRIPTIONFILTERSOUTPUT_MEMBER__REQUEST_ID,
   55     63   
    ],
   56     64   
);
   57     65   
impl DescribeSubscriptionFiltersOutput {
   58     66   
    /// The schema for this shape.
   59     67   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBESUBSCRIPTIONFILTERSOUTPUT_SCHEMA;
   60     68   
}
   61     69   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeSubscriptionFiltersOutput {
   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.subscription_filters {
   68     76   
            ser.write_list(
   69     77   
                &DESCRIBESUBSCRIPTIONFILTERSOUTPUT_MEMBER_SUBSCRIPTION_FILTERS,
   70     78   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   71     79   
                    for item in val {
   72     80   
                        ser.write_struct(crate::types::SubscriptionFilter::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(&DESCRIBESUBSCRIPTIONFILTERSOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   80     88   
        }
   81     89   
        Ok(())
   82     90   
    }
   83     91   
}
   84     92   
impl DescribeSubscriptionFiltersOutput {
   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(&DESCRIBESUBSCRIPTIONFILTERSOUTPUT_SCHEMA, (), |_, member, deser| {
         106  +
        deserializer.read_struct(&DESCRIBESUBSCRIPTIONFILTERSOUTPUT_SCHEMA, &mut |member, deser| {
         107  +
            match member.member_index() {
         108  +
                Some(0) => {
         109  +
                    builder.subscription_filters = Some({
         110  +
                        let mut container = Vec::new();
         111  +
                        deser.read_list(member, &mut |deser| {
         112  +
                            container.push(crate::types::SubscriptionFilter::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 DescribeSubscriptionFiltersOutput {
         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(&DESCRIBESUBSCRIPTIONFILTERSOUTPUT_SCHEMA, &mut |member, deser| {
   99    154   
            match member.member_index() {
  100    155   
                Some(0) => {
  101    156   
                    builder.subscription_filters = 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::SubscriptionFilter::deserialize(deser)?);
  109         -
                            Ok(list)
  110         -
                        })?
         157  +
                        let mut container = Vec::new();
         158  +
                        deser.read_list(member, &mut |deser| {
         159  +
                            container.push(crate::types::SubscriptionFilter::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/disassociate_kms_key.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 `DisassociateKmsKey`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DisassociateKmsKey;
    6      6   
impl DisassociateKmsKey {
    7      7   
    /// Creates a new `DisassociateKmsKey`
    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::disassociate_kms_key::DisassociateKmsKeyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::disassociate_kms_key::DisassociateKmsKeyOutput::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::disassociate_kms_key::DisassociateKmsKeyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::disassociate_kms_key::DisassociateKmsKeyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::disassociate_kms_key::DisassociateKmsKeyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -127,131 +252,364 @@
  147    151   
        ::std::borrow::Cow::Owned(rcb)
  148    152   
    }
  149    153   
}
  150    154   
  151    155   
#[derive(Debug)]
  152    156   
struct DisassociateKmsKeyResponseDeserializer;
  153    157   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DisassociateKmsKeyResponseDeserializer {
  154    158   
    fn deserialize_nonstreaming(
  155    159   
        &self,
  156    160   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         161  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    162   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    163   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  159         -
        let headers = response.headers();
  160         -
        let body = response.body().bytes().expect("body loaded");
  161    164   
        #[allow(unused_mut)]
  162    165   
        let mut force_error = false;
  163    166   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_disassociate_kms_key::de_disassociate_kms_key_http_error(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::disassociate_kms_key::DisassociateKmsKeyError::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  +
                "InvalidParameterException" => crate::operation::disassociate_kms_key::DisassociateKmsKeyError::InvalidParameterException({
         192  +
                    let mut tmp = match protocol
         193  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         194  +
                        .and_then(|mut deser| {
         195  +
                            crate::types::error::InvalidParameterException::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  +
                "OperationAbortedException" => crate::operation::disassociate_kms_key::DisassociateKmsKeyError::OperationAbortedException({
         216  +
                    let mut tmp = match protocol
         217  +
                        .deserialize_response(response, crate::types::error::OperationAbortedException::SCHEMA, _cfg)
         218  +
                        .and_then(|mut deser| {
         219  +
                            crate::types::error::OperationAbortedException::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::disassociate_kms_key::DisassociateKmsKeyError::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" => crate::operation::disassociate_kms_key::DisassociateKmsKeyError::ServiceUnavailableException({
         264  +
                    let mut tmp = match protocol
         265  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         266  +
                        .and_then(|mut deser| {
         267  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         268  +
                                &mut *deser,
         269  +
                                response.headers(),
         270  +
                                response.status().into(),
         271  +
                                body,
         272  +
                            )
         273  +
                        }) {
         274  +
                        ::std::result::Result::Ok(val) => val,
         275  +
                        ::std::result::Result::Err(e) => {
         276  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         277  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         278  +
                            ))
         279  +
                        }
         280  +
                    };
         281  +
                    tmp.meta = generic;
         282  +
                    if tmp.message.is_none() {
         283  +
                        tmp.message = _error_message;
         284  +
                    }
         285  +
                    tmp
         286  +
                }),
         287  +
                _ => crate::operation::disassociate_kms_key::DisassociateKmsKeyError::generic(generic),
         288  +
            };
         289  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         290  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         291  +
            ))
  166    292   
        } else {
  167         -
            crate::protocol_serde::shape_disassociate_kms_key::de_disassociate_kms_key_http_response(status, headers, body)
  168         -
        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         293  +
            let protocol = _cfg
         294  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         295  +
                .expect("a SharedClientProtocol is required");
         296  +
            let mut deser = protocol
         297  +
                .deserialize_response(response, DisassociateKmsKey::OUTPUT_SCHEMA, _cfg)
         298  +
                .map_err(|e| {
         299  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         300  +
                })?;
         301  +
            let body = response.body().bytes().expect("body loaded");
         302  +
            let output = crate::operation::disassociate_kms_key::DisassociateKmsKeyOutput::deserialize_with_response(
         303  +
                &mut *deser,
         304  +
                response.headers(),
         305  +
                response.status().into(),
         306  +
                body,
         307  +
            )
         308  +
            .map_err(|e| {
         309  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         310  +
            })?;
         311  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         312  +
        }
  170    313   
    }
  171    314   
}
  172    315   
#[derive(Debug)]
  173    316   
struct DisassociateKmsKeyRequestSerializer;
  174    317   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DisassociateKmsKeyRequestSerializer {
  175    318   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    319   
    fn serialize_input(
  177    320   
        &self,
  178    321   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    322   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    323   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    324   
        let input = input
  182    325   
            .downcast::<crate::operation::disassociate_kms_key::DisassociateKmsKeyInput>()
  183    326   
            .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::disassociate_kms_key::DisassociateKmsKeyInput,
  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::disassociate_kms_key::DisassociateKmsKeyInput,
  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.DisassociateKmsKey",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body =
  217         -
            ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_disassociate_kms_key::ser_disassociate_kms_key_input(&input)?);
  218         -
        if let Some(content_length) = body.content_length() {
  219         -
            let content_length = content_length.to_string();
  220         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  221         -
        }
  222         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         327  +
        let protocol = _cfg
         328  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         329  +
            .expect("a SharedClientProtocol is required");
         330  +
        let mut request = protocol
         331  +
            .serialize_request(&input, DisassociateKmsKey::INPUT_SCHEMA, "", _cfg)
         332  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         333  +
         334  +
        return ::std::result::Result::Ok(request);
  223    335   
    }
  224    336   
}
  225    337   
#[derive(Debug)]
  226    338   
struct DisassociateKmsKeyEndpointParamsInterceptor;
  227    339   
  228    340   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DisassociateKmsKeyEndpointParamsInterceptor {
  229    341   
    fn name(&self) -> &'static str {
  230    342   
        "DisassociateKmsKeyEndpointParamsInterceptor"
  231    343   
    }
  232    344