AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

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

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

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

@@ -7,7 +173,173 @@
   27     27   
    "com.amazonaws.cloudwatchlogs.synthetic",
   28     28   
    "TestTransformerInput",
   29     29   
);
   30     30   
static TESTTRANSFORMERINPUT_MEMBER_TRANSFORMER_CONFIG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   31     31   
    ::aws_smithy_schema::ShapeId::from_static(
   32     32   
        "com.amazonaws.cloudwatchlogs.synthetic#TestTransformerInput$transformerConfig",
   33     33   
        "com.amazonaws.cloudwatchlogs.synthetic",
   34     34   
        "TestTransformerInput",
   35     35   
    ),
   36     36   
    ::aws_smithy_schema::ShapeType::List,
   37         -
    "transformer_config",
          37  +
    "transformerConfig",
   38     38   
    0,
   39     39   
);
   40     40   
static TESTTRANSFORMERINPUT_MEMBER_LOG_EVENT_MESSAGES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   41     41   
    ::aws_smithy_schema::ShapeId::from_static(
   42     42   
        "com.amazonaws.cloudwatchlogs.synthetic#TestTransformerInput$logEventMessages",
   43     43   
        "com.amazonaws.cloudwatchlogs.synthetic",
   44     44   
        "TestTransformerInput",
   45     45   
    ),
   46     46   
    ::aws_smithy_schema::ShapeType::List,
   47         -
    "log_event_messages",
          47  +
    "logEventMessages",
   48     48   
    1,
   49     49   
);
   50     50   
static TESTTRANSFORMERINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   51     51   
    TESTTRANSFORMERINPUT_SCHEMA_ID,
   52     52   
    ::aws_smithy_schema::ShapeType::Structure,
   53     53   
    &[
   54     54   
        &TESTTRANSFORMERINPUT_MEMBER_TRANSFORMER_CONFIG,
   55     55   
        &TESTTRANSFORMERINPUT_MEMBER_LOG_EVENT_MESSAGES,
   56     56   
    ],
   57     57   
);
   58     58   
impl TestTransformerInput {
   59     59   
    /// The schema for this shape.
   60     60   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TESTTRANSFORMERINPUT_SCHEMA;
   61     61   
}
   62     62   
impl ::aws_smithy_schema::serde::SerializableStruct for TestTransformerInput {
   63     63   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   64     64   
    fn serialize_members(
   65     65   
        &self,
   66     66   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   67     67   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   68     68   
        if let Some(ref val) = self.transformer_config {
   69     69   
            ser.write_list(
   70     70   
                &TESTTRANSFORMERINPUT_MEMBER_TRANSFORMER_CONFIG,
   71     71   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   72     72   
                    for item in val {
   73     73   
                        ser.write_struct(crate::types::Processor::SCHEMA, item)?;
   74     74   
                    }
   75     75   
                    Ok(())
   76     76   
                },
   77     77   
            )?;
   78     78   
        }
   79     79   
        if let Some(ref val) = self.log_event_messages {
   80     80   
            ser.write_list(
   81     81   
                &TESTTRANSFORMERINPUT_MEMBER_LOG_EVENT_MESSAGES,
   82     82   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   83     83   
                    for item in val {
   84     84   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
   85     85   
                    }
   86     86   
                    Ok(())
   87     87   
                },
   88     88   
            )?;
   89     89   
        }
   90     90   
        Ok(())
   91     91   
    }
   92     92   
}
   93     93   
impl TestTransformerInput {
   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(&TESTTRANSFORMERINPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&TESTTRANSFORMERINPUT_SCHEMA, &mut |member, deser| {
  108    108   
            match member.member_index() {
  109    109   
                Some(0) => {
  110    110   
                    builder.transformer_config = Some({
  111         -
                        let container = if let Some(cap) = deser.container_size() {
  112         -
                            Vec::with_capacity(cap)
  113         -
                        } else {
  114         -
                            Vec::new()
  115         -
                        };
  116         -
                        deser.read_list(member, container, |mut list, deser| {
  117         -
                            list.push(crate::types::Processor::deserialize(deser)?);
  118         -
                            Ok(list)
  119         -
                        })?
         111  +
                        let mut container = Vec::new();
         112  +
                        deser.read_list(member, &mut |deser| {
         113  +
                            container.push(crate::types::Processor::deserialize(deser)?);
         114  +
                            Ok(())
         115  +
                        })?;
         116  +
                        container
  120    117   
                    });
  121    118   
                }
  122    119   
                Some(1) => {
  123         -
                    builder.log_event_messages = Some({
  124         -
                        let container = if let Some(cap) = deser.container_size() {
  125         -
                            Vec::with_capacity(cap)
  126         -
                        } else {
  127         -
                            Vec::new()
  128         -
                        };
  129         -
                        deser.read_list(member, container, |mut list, deser| {
  130         -
                            list.push(deser.read_string(member)?);
  131         -
                            Ok(list)
  132         -
                        })?
  133         -
                    });
         120  +
                    builder.log_event_messages = Some(deser.read_string_list(member)?);
  134    121   
                }
  135    122   
                _ => {}
  136    123   
            }
  137    124   
            Ok(())
  138    125   
        })?;
         126  +
        builder.transformer_config = builder.transformer_config.or(Some(Vec::new()));
         127  +
        builder.log_event_messages = builder.log_event_messages.or(Some(Vec::new()));
  139    128   
        builder
  140    129   
            .build()
  141    130   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  142    131   
    }
  143    132   
}
         133  +
impl TestTransformerInput {
         134  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         135  +
    pub fn deserialize_with_response(
         136  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         137  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         138  +
        _status: u16,
         139  +
        _body: &[u8],
         140  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         141  +
        Self::deserialize(deserializer)
         142  +
    }
         143  +
}
  144    144   
impl TestTransformerInput {
  145    145   
    /// Creates a new builder-style object to manufacture [`TestTransformerInput`](crate::operation::test_transformer::TestTransformerInput).
  146    146   
    pub fn builder() -> crate::operation::test_transformer::builders::TestTransformerInputBuilder {
  147    147   
        crate::operation::test_transformer::builders::TestTransformerInputBuilder::default()
  148    148   
    }
  149    149   
}
  150    150   
  151    151   
/// A builder for [`TestTransformerInput`](crate::operation::test_transformer::TestTransformerInput).
  152    152   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  153    153   
#[non_exhaustive]

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

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

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

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

@@ -6,6 +151,154 @@
   26     26   
    "com.amazonaws.cloudwatchlogs.synthetic",
   27     27   
    "UntagLogGroupInput",
   28     28   
);
   29     29   
static UNTAGLOGGROUPINPUT_MEMBER_LOG_GROUP_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   30     30   
    ::aws_smithy_schema::ShapeId::from_static(
   31     31   
        "com.amazonaws.cloudwatchlogs.synthetic#UntagLogGroupInput$logGroupName",
   32     32   
        "com.amazonaws.cloudwatchlogs.synthetic",
   33     33   
        "UntagLogGroupInput",
   34     34   
    ),
   35     35   
    ::aws_smithy_schema::ShapeType::String,
   36         -
    "log_group_name",
          36  +
    "logGroupName",
   37     37   
    0,
   38     38   
);
   39     39   
static UNTAGLOGGROUPINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   40     40   
    ::aws_smithy_schema::ShapeId::from_static(
   41     41   
        "com.amazonaws.cloudwatchlogs.synthetic#UntagLogGroupInput$tags",
   42     42   
        "com.amazonaws.cloudwatchlogs.synthetic",
   43     43   
        "UntagLogGroupInput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::List,
   46     46   
    "tags",
   47     47   
    1,
   48     48   
);
   49     49   
static UNTAGLOGGROUPINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   50     50   
    UNTAGLOGGROUPINPUT_SCHEMA_ID,
   51     51   
    ::aws_smithy_schema::ShapeType::Structure,
   52     52   
    &[&UNTAGLOGGROUPINPUT_MEMBER_LOG_GROUP_NAME, &UNTAGLOGGROUPINPUT_MEMBER_TAGS],
   53     53   
);
   54     54   
impl UntagLogGroupInput {
   55     55   
    /// The schema for this shape.
   56     56   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UNTAGLOGGROUPINPUT_SCHEMA;
   57     57   
}
   58     58   
impl ::aws_smithy_schema::serde::SerializableStruct for UntagLogGroupInput {
   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(&UNTAGLOGGROUPINPUT_MEMBER_LOG_GROUP_NAME, val)?;
   66     66   
        }
   67     67   
        if let Some(ref val) = self.tags {
   68     68   
            ser.write_list(
   69     69   
                &UNTAGLOGGROUPINPUT_MEMBER_TAGS,
   70     70   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   71     71   
                    for item in val {
   72     72   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
   73     73   
                    }
   74     74   
                    Ok(())
   75     75   
                },
   76     76   
            )?;
   77     77   
        }
   78     78   
        Ok(())
   79     79   
    }
   80     80   
}
   81     81   
impl UntagLogGroupInput {
   82     82   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   83         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   84         -
        deserializer: &mut D,
          83  +
    pub fn deserialize(
          84  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   85     85   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   86     86   
        #[allow(unused_variables, unused_mut)]
   87     87   
        let mut builder = Self::builder();
   88     88   
        #[allow(
   89     89   
            unused_variables,
   90     90   
            unreachable_code,
   91     91   
            clippy::single_match,
   92     92   
            clippy::match_single_binding,
   93     93   
            clippy::diverging_sub_expression
   94     94   
        )]
   95         -
        deserializer.read_struct(&UNTAGLOGGROUPINPUT_SCHEMA, (), |_, member, deser| {
          95  +
        deserializer.read_struct(&UNTAGLOGGROUPINPUT_SCHEMA, &mut |member, deser| {
   96     96   
            match member.member_index() {
   97     97   
                Some(0) => {
   98     98   
                    builder.log_group_name = Some(deser.read_string(member)?);
   99     99   
                }
  100    100   
                Some(1) => {
  101         -
                    builder.tags = Some({
  102         -
                        let container = if let Some(cap) = deser.container_size() {
  103         -
                            Vec::with_capacity(cap)
  104         -
                        } else {
  105         -
                            Vec::new()
  106         -
                        };
  107         -
                        deser.read_list(member, container, |mut list, deser| {
  108         -
                            list.push(deser.read_string(member)?);
  109         -
                            Ok(list)
  110         -
                        })?
  111         -
                    });
         101  +
                    builder.tags = Some(deser.read_string_list(member)?);
  112    102   
                }
  113    103   
                _ => {}
  114    104   
            }
  115    105   
            Ok(())
  116    106   
        })?;
         107  +
        builder.log_group_name = builder.log_group_name.or(Some(String::new()));
         108  +
        builder.tags = builder.tags.or(Some(Vec::new()));
  117    109   
        builder
  118    110   
            .build()
  119    111   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  120    112   
    }
  121    113   
}
         114  +
impl UntagLogGroupInput {
         115  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         116  +
    pub fn deserialize_with_response(
         117  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         118  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         119  +
        _status: u16,
         120  +
        _body: &[u8],
         121  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         122  +
        Self::deserialize(deserializer)
         123  +
    }
         124  +
}
  122    125   
impl UntagLogGroupInput {
  123    126   
    /// Creates a new builder-style object to manufacture [`UntagLogGroupInput`](crate::operation::untag_log_group::UntagLogGroupInput).
  124    127   
    pub fn builder() -> crate::operation::untag_log_group::builders::UntagLogGroupInputBuilder {
  125    128   
        crate::operation::untag_log_group::builders::UntagLogGroupInputBuilder::default()
  126    129   
    }
  127    130   
}
  128    131   
  129    132   
/// A builder for [`UntagLogGroupInput`](crate::operation::untag_log_group::UntagLogGroupInput).
  130    133   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  131    134   
#[non_exhaustive]

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

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

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

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

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

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

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

@@ -29,29 +227,239 @@
   49     49   
    "com.amazonaws.cloudwatchlogs.synthetic",
   50     50   
    "UpdateAnomalyInput",
   51     51   
);
   52     52   
static UPDATEANOMALYINPUT_MEMBER_ANOMALY_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#UpdateAnomalyInput$anomalyId",
   55     55   
        "com.amazonaws.cloudwatchlogs.synthetic",
   56     56   
        "UpdateAnomalyInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::String,
   59         -
    "anomaly_id",
          59  +
    "anomalyId",
   60     60   
    0,
   61     61   
);
   62     62   
static UPDATEANOMALYINPUT_MEMBER_PATTERN_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   63     63   
    ::aws_smithy_schema::ShapeId::from_static(
   64     64   
        "com.amazonaws.cloudwatchlogs.synthetic#UpdateAnomalyInput$patternId",
   65     65   
        "com.amazonaws.cloudwatchlogs.synthetic",
   66     66   
        "UpdateAnomalyInput",
   67     67   
    ),
   68     68   
    ::aws_smithy_schema::ShapeType::String,
   69         -
    "pattern_id",
          69  +
    "patternId",
   70     70   
    1,
   71     71   
);
   72     72   
static UPDATEANOMALYINPUT_MEMBER_ANOMALY_DETECTOR_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.cloudwatchlogs.synthetic#UpdateAnomalyInput$anomalyDetectorArn",
   75     75   
        "com.amazonaws.cloudwatchlogs.synthetic",
   76     76   
        "UpdateAnomalyInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::String,
   79         -
    "anomaly_detector_arn",
          79  +
    "anomalyDetectorArn",
   80     80   
    2,
   81     81   
);
   82     82   
static UPDATEANOMALYINPUT_MEMBER_SUPPRESSION_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   83     83   
    ::aws_smithy_schema::ShapeId::from_static(
   84     84   
        "com.amazonaws.cloudwatchlogs.synthetic#UpdateAnomalyInput$suppressionType",
   85     85   
        "com.amazonaws.cloudwatchlogs.synthetic",
   86     86   
        "UpdateAnomalyInput",
   87     87   
    ),
   88     88   
    ::aws_smithy_schema::ShapeType::String,
   89         -
    "suppression_type",
          89  +
    "suppressionType",
   90     90   
    3,
   91     91   
);
   92     92   
static UPDATEANOMALYINPUT_MEMBER_SUPPRESSION_PERIOD: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   93     93   
    ::aws_smithy_schema::ShapeId::from_static(
   94     94   
        "com.amazonaws.cloudwatchlogs.synthetic#UpdateAnomalyInput$suppressionPeriod",
   95     95   
        "com.amazonaws.cloudwatchlogs.synthetic",
   96     96   
        "UpdateAnomalyInput",
   97     97   
    ),
   98     98   
    ::aws_smithy_schema::ShapeType::Structure,
   99         -
    "suppression_period",
          99  +
    "suppressionPeriod",
  100    100   
    4,
  101    101   
);
  102    102   
static UPDATEANOMALYINPUT_MEMBER_BASELINE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  103    103   
    ::aws_smithy_schema::ShapeId::from_static(
  104    104   
        "com.amazonaws.cloudwatchlogs.synthetic#UpdateAnomalyInput$baseline",
  105    105   
        "com.amazonaws.cloudwatchlogs.synthetic",
  106    106   
        "UpdateAnomalyInput",
  107    107   
    ),
  108    108   
    ::aws_smithy_schema::ShapeType::Boolean,
  109    109   
    "baseline",
  110    110   
    5,
  111    111   
);
  112    112   
static UPDATEANOMALYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  113    113   
    UPDATEANOMALYINPUT_SCHEMA_ID,
  114    114   
    ::aws_smithy_schema::ShapeType::Structure,
  115    115   
    &[
  116    116   
        &UPDATEANOMALYINPUT_MEMBER_ANOMALY_ID,
  117    117   
        &UPDATEANOMALYINPUT_MEMBER_PATTERN_ID,
  118    118   
        &UPDATEANOMALYINPUT_MEMBER_ANOMALY_DETECTOR_ARN,
  119    119   
        &UPDATEANOMALYINPUT_MEMBER_SUPPRESSION_TYPE,
  120    120   
        &UPDATEANOMALYINPUT_MEMBER_SUPPRESSION_PERIOD,
  121    121   
        &UPDATEANOMALYINPUT_MEMBER_BASELINE,
  122    122   
    ],
  123    123   
);
  124    124   
impl UpdateAnomalyInput {
  125    125   
    /// The schema for this shape.
  126    126   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATEANOMALYINPUT_SCHEMA;
  127    127   
}
  128    128   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateAnomalyInput {
  129    129   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  130    130   
    fn serialize_members(
  131    131   
        &self,
  132    132   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  133    133   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  134    134   
        if let Some(ref val) = self.anomaly_id {
  135    135   
            ser.write_string(&UPDATEANOMALYINPUT_MEMBER_ANOMALY_ID, val)?;
  136    136   
        }
  137    137   
        if let Some(ref val) = self.pattern_id {
  138    138   
            ser.write_string(&UPDATEANOMALYINPUT_MEMBER_PATTERN_ID, val)?;
  139    139   
        }
  140    140   
        if let Some(ref val) = self.anomaly_detector_arn {
  141    141   
            ser.write_string(&UPDATEANOMALYINPUT_MEMBER_ANOMALY_DETECTOR_ARN, val)?;
  142    142   
        }
  143    143   
        if let Some(ref val) = self.suppression_type {
  144    144   
            ser.write_string(&UPDATEANOMALYINPUT_MEMBER_SUPPRESSION_TYPE, val.as_str())?;
  145    145   
        }
  146    146   
        if let Some(ref val) = self.suppression_period {
  147    147   
            ser.write_struct(&UPDATEANOMALYINPUT_MEMBER_SUPPRESSION_PERIOD, val)?;
  148    148   
        }
  149    149   
        if let Some(ref val) = self.baseline {
  150    150   
            ser.write_boolean(&UPDATEANOMALYINPUT_MEMBER_BASELINE, *val)?;
  151    151   
        }
  152    152   
        Ok(())
  153    153   
    }
  154    154   
}
  155    155   
impl UpdateAnomalyInput {
  156    156   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  157         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  158         -
        deserializer: &mut D,
         157  +
    pub fn deserialize(
         158  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  159    159   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  160    160   
        #[allow(unused_variables, unused_mut)]
  161    161   
        let mut builder = Self::builder();
  162    162   
        #[allow(
  163    163   
            unused_variables,
  164    164   
            unreachable_code,
  165    165   
            clippy::single_match,
  166    166   
            clippy::match_single_binding,
  167    167   
            clippy::diverging_sub_expression
  168    168   
        )]
  169         -
        deserializer.read_struct(&UPDATEANOMALYINPUT_SCHEMA, (), |_, member, deser| {
         169  +
        deserializer.read_struct(&UPDATEANOMALYINPUT_SCHEMA, &mut |member, deser| {
  170    170   
            match member.member_index() {
  171    171   
                Some(0) => {
  172    172   
                    builder.anomaly_id = Some(deser.read_string(member)?);
  173    173   
                }
  174    174   
                Some(1) => {
  175    175   
                    builder.pattern_id = Some(deser.read_string(member)?);
  176    176   
                }
  177    177   
                Some(2) => {
  178    178   
                    builder.anomaly_detector_arn = Some(deser.read_string(member)?);
  179    179   
                }
  180    180   
                Some(3) => {
  181    181   
                    builder.suppression_type = Some(crate::types::SuppressionType::from(deser.read_string(member)?.as_str()));
  182    182   
                }
  183    183   
                Some(4) => {
  184    184   
                    builder.suppression_period = Some(crate::types::SuppressionPeriod::deserialize(deser)?);
  185    185   
                }
  186    186   
                Some(5) => {
  187    187   
                    builder.baseline = Some(deser.read_boolean(member)?);
  188    188   
                }
  189    189   
                _ => {}
  190    190   
            }
  191    191   
            Ok(())
  192    192   
        })?;
         193  +
        builder.anomaly_detector_arn = builder.anomaly_detector_arn.or(Some(String::new()));
  193    194   
        builder
  194    195   
            .build()
  195    196   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  196    197   
    }
  197    198   
}
         199  +
impl UpdateAnomalyInput {
         200  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         201  +
    pub fn deserialize_with_response(
         202  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         203  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         204  +
        _status: u16,
         205  +
        _body: &[u8],
         206  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         207  +
        Self::deserialize(deserializer)
         208  +
    }
         209  +
}
  198    210   
impl UpdateAnomalyInput {
  199    211   
    /// Creates a new builder-style object to manufacture [`UpdateAnomalyInput`](crate::operation::update_anomaly::UpdateAnomalyInput).
  200    212   
    pub fn builder() -> crate::operation::update_anomaly::builders::UpdateAnomalyInputBuilder {
  201    213   
        crate::operation::update_anomaly::builders::UpdateAnomalyInputBuilder::default()
  202    214   
    }
  203    215   
}
  204    216   
  205    217   
/// A builder for [`UpdateAnomalyInput`](crate::operation::update_anomaly::UpdateAnomalyInput).
  206    218   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  207    219   
#[non_exhaustive]

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