AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

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

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

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

@@ -1,1 +80,111 @@
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct DeleteLogStreamOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static DELETELOGSTREAMOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.cloudwatchlogs.synthetic#DeleteLogStreamOutput",
   10     10   
    "com.amazonaws.cloudwatchlogs.synthetic",
   11     11   
    "DeleteLogStreamOutput",
   12     12   
);
   13         -
static DELETELOGSTREAMOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(DELETELOGSTREAMOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static DELETELOGSTREAMOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          14  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          15  +
    ::aws_smithy_schema::ShapeType::String,
          16  +
    "request_id",
          17  +
    0,
          18  +
)
          19  +
.with_http_header("x-amzn-requestid");
          20  +
static DELETELOGSTREAMOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    DELETELOGSTREAMOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&DELETELOGSTREAMOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl DeleteLogStreamOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETELOGSTREAMOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for DeleteLogStreamOutput {
   20     30   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   21     31   
    fn serialize_members(
   22     32   
        &self,
   23     33   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   24     34   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   25     35   
        Ok(())
   26     36   
    }
   27     37   
}
   28     38   
impl DeleteLogStreamOutput {
   29     39   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   30         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   31         -
        deserializer: &mut D,
          40  +
    pub fn deserialize(
          41  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   32     42   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   33     43   
        #[allow(unused_variables, unused_mut)]
   34     44   
        let mut builder = Self::builder();
   35     45   
        #[allow(
   36     46   
            unused_variables,
   37     47   
            unreachable_code,
   38     48   
            clippy::single_match,
   39     49   
            clippy::match_single_binding,
   40     50   
            clippy::diverging_sub_expression
   41     51   
        )]
   42         -
        deserializer.read_struct(&DELETELOGSTREAMOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&DELETELOGSTREAMOUTPUT_SCHEMA, &mut |member, deser| {
   43     53   
            match member.member_index() {
          54  +
                Some(0) => {
          55  +
                    builder._request_id = Some(deser.read_string(member)?);
          56  +
                }
   44     57   
                _ => {}
   45     58   
            }
   46     59   
            Ok(())
   47     60   
        })?;
   48     61   
        Ok(builder.build())
   49     62   
    }
   50     63   
}
          64  +
impl DeleteLogStreamOutput {
          65  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          66  +
    /// Header-bound members are read directly from headers, avoiding runtime
          67  +
    /// member iteration overhead. Body members are read via the deserializer.
          68  +
    pub fn deserialize_with_response(
          69  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        if let Some(val) = headers.get("x-amzn-requestid") {
          77  +
            builder._request_id = Some(val.to_string());
          78  +
        }
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
   51     82   
impl ::aws_types::request_id::RequestId for DeleteLogStreamOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl DeleteLogStreamOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`DeleteLogStreamOutput`](crate::operation::delete_log_stream::DeleteLogStreamOutput).
   58     89   
    pub fn builder() -> crate::operation::delete_log_stream::builders::DeleteLogStreamOutputBuilder {
   59     90   
        crate::operation::delete_log_stream::builders::DeleteLogStreamOutputBuilder::default()
   60     91   
    }

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

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `DeleteMetricFilter`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DeleteMetricFilter;
    6      6   
impl DeleteMetricFilter {
    7      7   
    /// Creates a new `DeleteMetricFilter`
    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::delete_metric_filter::DeleteMetricFilterInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::delete_metric_filter::DeleteMetricFilterOutput::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::delete_metric_filter::DeleteMetricFilterInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::delete_metric_filter::DeleteMetricFilterOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::delete_metric_filter::DeleteMetricFilterError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -124,128 +252,364 @@
  144    148   
                crate::operation::delete_metric_filter::DeleteMetricFilterError,
  145    149   
            >::new());
  146    150   
  147    151   
        ::std::borrow::Cow::Owned(rcb)
  148    152   
    }
  149    153   
}
  150    154   
  151    155   
#[derive(Debug)]
  152    156   
struct DeleteMetricFilterResponseDeserializer;
  153    157   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteMetricFilterResponseDeserializer {
  154         -
    fn deserialize_nonstreaming(
         158  +
    fn deserialize_nonstreaming_with_config(
  155    159   
        &self,
  156    160   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         161  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    162   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    163   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  159         -
        let headers = response.headers();
  160         -
        let body = response.body().bytes().expect("body loaded");
  161    164   
        #[allow(unused_mut)]
  162    165   
        let mut force_error = false;
  163    166   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_delete_metric_filter::de_delete_metric_filter_http_error(status, headers, body)
  166         -
        } else {
  167         -
            crate::protocol_serde::shape_delete_metric_filter::de_delete_metric_filter_http_response(status, headers, body)
         167  +
        if !success && status != 200 || force_error {
         168  +
            let headers = response.headers();
         169  +
            let body = response.body().bytes().expect("body loaded");
         170  +
            #[allow(unused_mut)]
         171  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         172  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         173  +
            })?;
         174  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         175  +
            let generic = generic_builder.build();
         176  +
            let error_code = match generic.code() {
         177  +
                ::std::option::Option::Some(code) => code,
         178  +
                ::std::option::Option::None => {
         179  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         180  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         181  +
                            crate::operation::delete_metric_filter::DeleteMetricFilterError::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::delete_metric_filter::DeleteMetricFilterError::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::delete_metric_filter::DeleteMetricFilterError::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  +
                        }
  168    232   
                    };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         233  +
                    tmp.meta = generic;
         234  +
                    if tmp.message.is_none() {
         235  +
                        tmp.message = _error_message;
         236  +
                    }
         237  +
                    tmp
         238  +
                }),
         239  +
                "ResourceNotFoundException" => crate::operation::delete_metric_filter::DeleteMetricFilterError::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::delete_metric_filter::DeleteMetricFilterError::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::delete_metric_filter::DeleteMetricFilterError::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  +
            ))
         292  +
        } else {
         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, DeleteMetricFilter::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::delete_metric_filter::DeleteMetricFilterOutput::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 DeleteMetricFilterRequestSerializer;
  174    317   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteMetricFilterRequestSerializer {
  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::delete_metric_filter::DeleteMetricFilterInput>()
  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::delete_metric_filter::DeleteMetricFilterInput,
  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::delete_metric_filter::DeleteMetricFilterInput,
  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.DeleteMetricFilter",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body =
  217         -
            ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_delete_metric_filter::ser_delete_metric_filter_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, DeleteMetricFilter::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 DeleteMetricFilterEndpointParamsInterceptor;
  227    339   
  228    340   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteMetricFilterEndpointParamsInterceptor {
  229    341   
    fn name(&self) -> &'static str {
  230    342   
        "DeleteMetricFilterEndpointParamsInterceptor"
  231    343   
    }
  232    344   

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

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

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

@@ -1,1 +80,111 @@
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct DeleteMetricFilterOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static DELETEMETRICFILTEROUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.cloudwatchlogs.synthetic#DeleteMetricFilterOutput",
   10     10   
    "com.amazonaws.cloudwatchlogs.synthetic",
   11     11   
    "DeleteMetricFilterOutput",
   12     12   
);
   13         -
static DELETEMETRICFILTEROUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(DELETEMETRICFILTEROUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static DELETEMETRICFILTEROUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          14  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          15  +
    ::aws_smithy_schema::ShapeType::String,
          16  +
    "request_id",
          17  +
    0,
          18  +
)
          19  +
.with_http_header("x-amzn-requestid");
          20  +
static DELETEMETRICFILTEROUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    DELETEMETRICFILTEROUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&DELETEMETRICFILTEROUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl DeleteMetricFilterOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETEMETRICFILTEROUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for DeleteMetricFilterOutput {
   20     30   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   21     31   
    fn serialize_members(
   22     32   
        &self,
   23     33   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   24     34   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   25     35   
        Ok(())
   26     36   
    }
   27     37   
}
   28     38   
impl DeleteMetricFilterOutput {
   29     39   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   30         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   31         -
        deserializer: &mut D,
          40  +
    pub fn deserialize(
          41  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   32     42   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   33     43   
        #[allow(unused_variables, unused_mut)]
   34     44   
        let mut builder = Self::builder();
   35     45   
        #[allow(
   36     46   
            unused_variables,
   37     47   
            unreachable_code,
   38     48   
            clippy::single_match,
   39     49   
            clippy::match_single_binding,
   40     50   
            clippy::diverging_sub_expression
   41     51   
        )]
   42         -
        deserializer.read_struct(&DELETEMETRICFILTEROUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&DELETEMETRICFILTEROUTPUT_SCHEMA, &mut |member, deser| {
   43     53   
            match member.member_index() {
          54  +
                Some(0) => {
          55  +
                    builder._request_id = Some(deser.read_string(member)?);
          56  +
                }
   44     57   
                _ => {}
   45     58   
            }
   46     59   
            Ok(())
   47     60   
        })?;
   48     61   
        Ok(builder.build())
   49     62   
    }
   50     63   
}
          64  +
impl DeleteMetricFilterOutput {
          65  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          66  +
    /// Header-bound members are read directly from headers, avoiding runtime
          67  +
    /// member iteration overhead. Body members are read via the deserializer.
          68  +
    pub fn deserialize_with_response(
          69  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        if let Some(val) = headers.get("x-amzn-requestid") {
          77  +
            builder._request_id = Some(val.to_string());
          78  +
        }
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
   51     82   
impl ::aws_types::request_id::RequestId for DeleteMetricFilterOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl DeleteMetricFilterOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`DeleteMetricFilterOutput`](crate::operation::delete_metric_filter::DeleteMetricFilterOutput).
   58     89   
    pub fn builder() -> crate::operation::delete_metric_filter::builders::DeleteMetricFilterOutputBuilder {
   59     90   
        crate::operation::delete_metric_filter::builders::DeleteMetricFilterOutputBuilder::default()
   60     91   
    }

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

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `DeleteQueryDefinition`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DeleteQueryDefinition;
    6      6   
impl DeleteQueryDefinition {
    7      7   
    /// Creates a new `DeleteQueryDefinition`
    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::delete_query_definition::DeleteQueryDefinitionInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::delete_query_definition::DeleteQueryDefinitionOutput::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::delete_query_definition::DeleteQueryDefinitionInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::delete_query_definition::DeleteQueryDefinitionOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::delete_query_definition::DeleteQueryDefinitionError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -124,128 +253,342 @@
  144    148   
                crate::operation::delete_query_definition::DeleteQueryDefinitionError,
  145    149   
            >::new());
  146    150   
  147    151   
        ::std::borrow::Cow::Owned(rcb)
  148    152   
    }
  149    153   
}
  150    154   
  151    155   
#[derive(Debug)]
  152    156   
struct DeleteQueryDefinitionResponseDeserializer;
  153    157   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteQueryDefinitionResponseDeserializer {
  154         -
    fn deserialize_nonstreaming(
         158  +
    fn deserialize_nonstreaming_with_config(
  155    159   
        &self,
  156    160   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         161  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    162   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    163   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  159         -
        let headers = response.headers();
  160         -
        let body = response.body().bytes().expect("body loaded");
  161    164   
        #[allow(unused_mut)]
  162    165   
        let mut force_error = false;
  163    166   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_delete_query_definition::de_delete_query_definition_http_error(status, headers, body)
  166         -
        } else {
  167         -
            crate::protocol_serde::shape_delete_query_definition::de_delete_query_definition_http_response(status, headers, body)
         167  +
        if !success && status != 200 || force_error {
         168  +
            let headers = response.headers();
         169  +
            let body = response.body().bytes().expect("body loaded");
         170  +
            #[allow(unused_mut)]
         171  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         172  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         173  +
            })?;
         174  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         175  +
            let generic = generic_builder.build();
         176  +
            let error_code = match generic.code() {
         177  +
                ::std::option::Option::Some(code) => code,
         178  +
                ::std::option::Option::None => {
         179  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         180  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         181  +
                            crate::operation::delete_query_definition::DeleteQueryDefinitionError::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::delete_query_definition::DeleteQueryDefinitionError::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  +
                "ResourceNotFoundException" => crate::operation::delete_query_definition::DeleteQueryDefinitionError::ResourceNotFoundException({
         216  +
                    let mut tmp = match protocol
         217  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         218  +
                        .and_then(|mut deser| {
         219  +
                            crate::types::error::ResourceNotFoundException::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  +
                "ServiceUnavailableException" => {
         240  +
                    crate::operation::delete_query_definition::DeleteQueryDefinitionError::ServiceUnavailableException({
         241  +
                        let mut tmp = match protocol
         242  +
                            .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         243  +
                            .and_then(|mut deser| {
         244  +
                                crate::types::error::ServiceUnavailableException::deserialize_with_response(
         245  +
                                    &mut *deser,
         246  +
                                    response.headers(),
         247  +
                                    response.status().into(),
         248  +
                                    body,
         249  +
                                )
         250  +
                            }) {
         251  +
                            ::std::result::Result::Ok(val) => val,
         252  +
                            ::std::result::Result::Err(e) => {
         253  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         254  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         255  +
                                ))
         256  +
                            }
  168    257   
                        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         258  +
                        tmp.meta = generic;
         259  +
                        if tmp.message.is_none() {
         260  +
                            tmp.message = _error_message;
         261  +
                        }
         262  +
                        tmp
         263  +
                    })
         264  +
                }
         265  +
                _ => crate::operation::delete_query_definition::DeleteQueryDefinitionError::generic(generic),
         266  +
            };
         267  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         268  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         269  +
            ))
         270  +
        } else {
         271  +
            let protocol = _cfg
         272  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         273  +
                .expect("a SharedClientProtocol is required");
         274  +
            let mut deser = protocol
         275  +
                .deserialize_response(response, DeleteQueryDefinition::OUTPUT_SCHEMA, _cfg)
         276  +
                .map_err(|e| {
         277  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         278  +
                })?;
         279  +
            let body = response.body().bytes().expect("body loaded");
         280  +
            let output = crate::operation::delete_query_definition::DeleteQueryDefinitionOutput::deserialize_with_response(
         281  +
                &mut *deser,
         282  +
                response.headers(),
         283  +
                response.status().into(),
         284  +
                body,
         285  +
            )
         286  +
            .map_err(|e| {
         287  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         288  +
            })?;
         289  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         290  +
        }
  170    291   
    }
  171    292   
}
  172    293   
#[derive(Debug)]
  173    294   
struct DeleteQueryDefinitionRequestSerializer;
  174    295   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteQueryDefinitionRequestSerializer {
  175    296   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    297   
    fn serialize_input(
  177    298   
        &self,
  178    299   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    300   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    301   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    302   
        let input = input
  182    303   
            .downcast::<crate::operation::delete_query_definition::DeleteQueryDefinitionInput>()
  183    304   
            .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::delete_query_definition::DeleteQueryDefinitionInput,
  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::delete_query_definition::DeleteQueryDefinitionInput,
  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.DeleteQueryDefinition",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_delete_query_definition::ser_delete_query_definition_input(
  217         -
            &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())
         305  +
        let protocol = _cfg
         306  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         307  +
            .expect("a SharedClientProtocol is required");
         308  +
        let mut request = protocol
         309  +
            .serialize_request(&input, DeleteQueryDefinition::INPUT_SCHEMA, "", _cfg)
         310  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         311  +
         312  +
        return ::std::result::Result::Ok(request);
  224    313   
    }
  225    314   
}
  226    315   
#[derive(Debug)]
  227    316   
struct DeleteQueryDefinitionEndpointParamsInterceptor;
  228    317   
  229    318   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteQueryDefinitionEndpointParamsInterceptor {
  230    319   
    fn name(&self) -> &'static str {
  231    320   
        "DeleteQueryDefinitionEndpointParamsInterceptor"
  232    321   
    }
  233    322   

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/delete_resource_policy.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 `DeleteResourcePolicy`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DeleteResourcePolicy;
    6      6   
impl DeleteResourcePolicy {
    7      7   
    /// Creates a new `DeleteResourcePolicy`
    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::delete_resource_policy::DeleteResourcePolicyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::delete_resource_policy::DeleteResourcePolicyOutput::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::delete_resource_policy::DeleteResourcePolicyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::delete_resource_policy::DeleteResourcePolicyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::delete_resource_policy::DeleteResourcePolicyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -124,128 +253,364 @@
  144    148   
                crate::operation::delete_resource_policy::DeleteResourcePolicyError,
  145    149   
            >::new());
  146    150   
  147    151   
        ::std::borrow::Cow::Owned(rcb)
  148    152   
    }
  149    153   
}
  150    154   
  151    155   
#[derive(Debug)]
  152    156   
struct DeleteResourcePolicyResponseDeserializer;
  153    157   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteResourcePolicyResponseDeserializer {
  154         -
    fn deserialize_nonstreaming(
         158  +
    fn deserialize_nonstreaming_with_config(
  155    159   
        &self,
  156    160   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         161  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    162   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    163   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  159         -
        let headers = response.headers();
  160         -
        let body = response.body().bytes().expect("body loaded");
  161    164   
        #[allow(unused_mut)]
  162    165   
        let mut force_error = false;
  163    166   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_delete_resource_policy::de_delete_resource_policy_http_error(status, headers, body)
  166         -
        } else {
  167         -
            crate::protocol_serde::shape_delete_resource_policy::de_delete_resource_policy_http_response(status, headers, body)
         167  +
        if !success && status != 200 || force_error {
         168  +
            let headers = response.headers();
         169  +
            let body = response.body().bytes().expect("body loaded");
         170  +
            #[allow(unused_mut)]
         171  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         172  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         173  +
            })?;
         174  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         175  +
            let generic = generic_builder.build();
         176  +
            let error_code = match generic.code() {
         177  +
                ::std::option::Option::Some(code) => code,
         178  +
                ::std::option::Option::None => {
         179  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         180  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         181  +
                            crate::operation::delete_resource_policy::DeleteResourcePolicyError::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::delete_resource_policy::DeleteResourcePolicyError::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::delete_resource_policy::DeleteResourcePolicyError::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::delete_resource_policy::DeleteResourcePolicyError::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::delete_resource_policy::DeleteResourcePolicyError::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  +
                        }
  168    280   
                    };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         281  +
                    tmp.meta = generic;
         282  +
                    if tmp.message.is_none() {
         283  +
                        tmp.message = _error_message;
         284  +
                    }
         285  +
                    tmp
         286  +
                }),
         287  +
                _ => crate::operation::delete_resource_policy::DeleteResourcePolicyError::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  +
            ))
         292  +
        } else {
         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, DeleteResourcePolicy::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::delete_resource_policy::DeleteResourcePolicyOutput::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 DeleteResourcePolicyRequestSerializer;
  174    317   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteResourcePolicyRequestSerializer {
  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::delete_resource_policy::DeleteResourcePolicyInput>()
  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::delete_resource_policy::DeleteResourcePolicyInput,
  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::delete_resource_policy::DeleteResourcePolicyInput,
  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.DeleteResourcePolicy",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_delete_resource_policy::ser_delete_resource_policy_input(
  217         -
            &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())
         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, DeleteResourcePolicy::INPUT_SCHEMA, "", _cfg)
         332  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         333  +
         334  +
        return ::std::result::Result::Ok(request);
  224    335   
    }
  225    336   
}
  226    337   
#[derive(Debug)]
  227    338   
struct DeleteResourcePolicyEndpointParamsInterceptor;
  228    339   
  229    340   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteResourcePolicyEndpointParamsInterceptor {
  230    341   
    fn name(&self) -> &'static str {
  231    342   
        "DeleteResourcePolicyEndpointParamsInterceptor"
  232    343   
    }
  233    344   

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

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

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

@@ -1,1 +80,111 @@
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct DeleteResourcePolicyOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static DELETERESOURCEPOLICYOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.cloudwatchlogs.synthetic#DeleteResourcePolicyOutput",
   10     10   
    "com.amazonaws.cloudwatchlogs.synthetic",
   11     11   
    "DeleteResourcePolicyOutput",
   12     12   
);
   13         -
static DELETERESOURCEPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(DELETERESOURCEPOLICYOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static DELETERESOURCEPOLICYOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          14  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          15  +
    ::aws_smithy_schema::ShapeType::String,
          16  +
    "request_id",
          17  +
    0,
          18  +
)
          19  +
.with_http_header("x-amzn-requestid");
          20  +
static DELETERESOURCEPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    DELETERESOURCEPOLICYOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&DELETERESOURCEPOLICYOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl DeleteResourcePolicyOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETERESOURCEPOLICYOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for DeleteResourcePolicyOutput {
   20     30   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   21     31   
    fn serialize_members(
   22     32   
        &self,
   23     33   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   24     34   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   25     35   
        Ok(())
   26     36   
    }
   27     37   
}
   28     38   
impl DeleteResourcePolicyOutput {
   29     39   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   30         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   31         -
        deserializer: &mut D,
          40  +
    pub fn deserialize(
          41  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   32     42   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   33     43   
        #[allow(unused_variables, unused_mut)]
   34     44   
        let mut builder = Self::builder();
   35     45   
        #[allow(
   36     46   
            unused_variables,
   37     47   
            unreachable_code,
   38     48   
            clippy::single_match,
   39     49   
            clippy::match_single_binding,
   40     50   
            clippy::diverging_sub_expression
   41     51   
        )]
   42         -
        deserializer.read_struct(&DELETERESOURCEPOLICYOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&DELETERESOURCEPOLICYOUTPUT_SCHEMA, &mut |member, deser| {
   43     53   
            match member.member_index() {
          54  +
                Some(0) => {
          55  +
                    builder._request_id = Some(deser.read_string(member)?);
          56  +
                }
   44     57   
                _ => {}
   45     58   
            }
   46     59   
            Ok(())
   47     60   
        })?;
   48     61   
        Ok(builder.build())
   49     62   
    }
   50     63   
}
          64  +
impl DeleteResourcePolicyOutput {
          65  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          66  +
    /// Header-bound members are read directly from headers, avoiding runtime
          67  +
    /// member iteration overhead. Body members are read via the deserializer.
          68  +
    pub fn deserialize_with_response(
          69  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        if let Some(val) = headers.get("x-amzn-requestid") {
          77  +
            builder._request_id = Some(val.to_string());
          78  +
        }
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
   51     82   
impl ::aws_types::request_id::RequestId for DeleteResourcePolicyOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl DeleteResourcePolicyOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`DeleteResourcePolicyOutput`](crate::operation::delete_resource_policy::DeleteResourcePolicyOutput).
   58     89   
    pub fn builder() -> crate::operation::delete_resource_policy::builders::DeleteResourcePolicyOutputBuilder {
   59     90   
        crate::operation::delete_resource_policy::builders::DeleteResourcePolicyOutputBuilder::default()
   60     91   
    }

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/delete_retention_policy.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 `DeleteRetentionPolicy`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DeleteRetentionPolicy;
    6      6   
impl DeleteRetentionPolicy {
    7      7   
    /// Creates a new `DeleteRetentionPolicy`
    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::delete_retention_policy::DeleteRetentionPolicyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::delete_retention_policy::DeleteRetentionPolicyOutput::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::delete_retention_policy::DeleteRetentionPolicyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::delete_retention_policy::DeleteRetentionPolicyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::delete_retention_policy::DeleteRetentionPolicyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -124,128 +253,366 @@
  144    148   
                crate::operation::delete_retention_policy::DeleteRetentionPolicyError,
  145    149   
            >::new());
  146    150   
  147    151   
        ::std::borrow::Cow::Owned(rcb)
  148    152   
    }
  149    153   
}
  150    154   
  151    155   
#[derive(Debug)]
  152    156   
struct DeleteRetentionPolicyResponseDeserializer;
  153    157   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteRetentionPolicyResponseDeserializer {
  154         -
    fn deserialize_nonstreaming(
         158  +
    fn deserialize_nonstreaming_with_config(
  155    159   
        &self,
  156    160   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         161  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    162   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    163   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  159         -
        let headers = response.headers();
  160         -
        let body = response.body().bytes().expect("body loaded");
  161    164   
        #[allow(unused_mut)]
  162    165   
        let mut force_error = false;
  163    166   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_delete_retention_policy::de_delete_retention_policy_http_error(status, headers, body)
  166         -
        } else {
  167         -
            crate::protocol_serde::shape_delete_retention_policy::de_delete_retention_policy_http_response(status, headers, body)
         167  +
        if !success && status != 200 || force_error {
         168  +
            let headers = response.headers();
         169  +
            let body = response.body().bytes().expect("body loaded");
         170  +
            #[allow(unused_mut)]
         171  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         172  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         173  +
            })?;
         174  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         175  +
            let generic = generic_builder.build();
         176  +
            let error_code = match generic.code() {
         177  +
                ::std::option::Option::Some(code) => code,
         178  +
                ::std::option::Option::None => {
         179  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         180  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         181  +
                            crate::operation::delete_retention_policy::DeleteRetentionPolicyError::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::delete_retention_policy::DeleteRetentionPolicyError::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::delete_retention_policy::DeleteRetentionPolicyError::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::delete_retention_policy::DeleteRetentionPolicyError::ResourceNotFoundException({
         240  +
                    let mut tmp = match protocol
         241  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         242  +
                        .and_then(|mut deser| {
         243  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         244  +
                                &mut *deser,
         245  +
                                response.headers(),
         246  +
                                response.status().into(),
         247  +
                                body,
         248  +
                            )
         249  +
                        }) {
         250  +
                        ::std::result::Result::Ok(val) => val,
         251  +
                        ::std::result::Result::Err(e) => {
         252  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         253  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         254  +
                            ))
         255  +
                        }
         256  +
                    };
         257  +
                    tmp.meta = generic;
         258  +
                    if tmp.message.is_none() {
         259  +
                        tmp.message = _error_message;
         260  +
                    }
         261  +
                    tmp
         262  +
                }),
         263  +
                "ServiceUnavailableException" => {
         264  +
                    crate::operation::delete_retention_policy::DeleteRetentionPolicyError::ServiceUnavailableException({
         265  +
                        let mut tmp = match protocol
         266  +
                            .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         267  +
                            .and_then(|mut deser| {
         268  +
                                crate::types::error::ServiceUnavailableException::deserialize_with_response(
         269  +
                                    &mut *deser,
         270  +
                                    response.headers(),
         271  +
                                    response.status().into(),
         272  +
                                    body,
         273  +
                                )
         274  +
                            }) {
         275  +
                            ::std::result::Result::Ok(val) => val,
         276  +
                            ::std::result::Result::Err(e) => {
         277  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         278  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         279  +
                                ))
         280  +
                            }
  168    281   
                        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         282  +
                        tmp.meta = generic;
         283  +
                        if tmp.message.is_none() {
         284  +
                            tmp.message = _error_message;
         285  +
                        }
         286  +
                        tmp
         287  +
                    })
         288  +
                }
         289  +
                _ => crate::operation::delete_retention_policy::DeleteRetentionPolicyError::generic(generic),
         290  +
            };
         291  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         292  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         293  +
            ))
         294  +
        } else {
         295  +
            let protocol = _cfg
         296  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         297  +
                .expect("a SharedClientProtocol is required");
         298  +
            let mut deser = protocol
         299  +
                .deserialize_response(response, DeleteRetentionPolicy::OUTPUT_SCHEMA, _cfg)
         300  +
                .map_err(|e| {
         301  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         302  +
                })?;
         303  +
            let body = response.body().bytes().expect("body loaded");
         304  +
            let output = crate::operation::delete_retention_policy::DeleteRetentionPolicyOutput::deserialize_with_response(
         305  +
                &mut *deser,
         306  +
                response.headers(),
         307  +
                response.status().into(),
         308  +
                body,
         309  +
            )
         310  +
            .map_err(|e| {
         311  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         312  +
            })?;
         313  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         314  +
        }
  170    315   
    }
  171    316   
}
  172    317   
#[derive(Debug)]
  173    318   
struct DeleteRetentionPolicyRequestSerializer;
  174    319   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteRetentionPolicyRequestSerializer {
  175    320   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    321   
    fn serialize_input(
  177    322   
        &self,
  178    323   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    324   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    325   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    326   
        let input = input
  182    327   
            .downcast::<crate::operation::delete_retention_policy::DeleteRetentionPolicyInput>()
  183    328   
            .expect("correct type");
  184         -
        let _header_serialization_settings = _cfg
  185         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  186         -
            .cloned()
  187         -
            .unwrap_or_default();
  188         -
        let mut request_builder = {
  189         -
            #[allow(clippy::uninlined_format_args)]
  190         -
            fn uri_base(
  191         -
                _input: &crate::operation::delete_retention_policy::DeleteRetentionPolicyInput,
  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::delete_retention_policy::DeleteRetentionPolicyInput,
  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.DeleteRetentionPolicy",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_delete_retention_policy::ser_delete_retention_policy_input(
  217         -
            &input,
  218         -
        )?);
  219         -
        if let Some(content_length) = body.content_length() {
  220         -
            let content_length = content_length.to_string();
  221         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  222         -
        }
  223         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         329  +
        let protocol = _cfg
         330  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         331  +
            .expect("a SharedClientProtocol is required");
         332  +
        let mut request = protocol
         333  +
            .serialize_request(&input, DeleteRetentionPolicy::INPUT_SCHEMA, "", _cfg)
         334  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         335  +
         336  +
        return ::std::result::Result::Ok(request);
  224    337   
    }
  225    338   
}
  226    339   
#[derive(Debug)]
  227    340   
struct DeleteRetentionPolicyEndpointParamsInterceptor;
  228    341   
  229    342   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteRetentionPolicyEndpointParamsInterceptor {
  230    343   
    fn name(&self) -> &'static str {
  231    344   
        "DeleteRetentionPolicyEndpointParamsInterceptor"
  232    345   
    }
  233    346