AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/error/_validation_exception.rs

@@ -19,19 +102,113 @@
   39     39   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   40     40   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   41     41   
        if let Some(ref val) = self.message {
   42     42   
            ser.write_string(&VALIDATIONEXCEPTION_MEMBER_MESSAGE, val)?;
   43     43   
        }
   44     44   
        Ok(())
   45     45   
    }
   46     46   
}
   47     47   
impl ValidationException {
   48     48   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   49         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   50         -
        deserializer: &mut D,
          49  +
    pub fn deserialize(
          50  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   51     51   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   52     52   
        #[allow(unused_variables, unused_mut)]
   53     53   
        let mut builder = Self::builder();
   54     54   
        #[allow(
   55     55   
            unused_variables,
   56     56   
            unreachable_code,
   57     57   
            clippy::single_match,
   58     58   
            clippy::match_single_binding,
   59     59   
            clippy::diverging_sub_expression
   60     60   
        )]
   61         -
        deserializer.read_struct(&VALIDATIONEXCEPTION_SCHEMA, (), |_, member, deser| {
          61  +
        deserializer.read_struct(&VALIDATIONEXCEPTION_SCHEMA, &mut |member, deser| {
   62     62   
            match member.member_index() {
   63     63   
                Some(0) => {
   64     64   
                    builder.message = Some(deser.read_string(member)?);
   65     65   
                }
   66     66   
                _ => {}
   67     67   
            }
   68     68   
            Ok(())
   69     69   
        })?;
   70     70   
        Ok(builder.build())
   71     71   
    }
   72     72   
}
          73  +
impl ValidationException {
          74  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          75  +
    pub fn deserialize_with_response(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          77  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          78  +
        _status: u16,
          79  +
        _body: &[u8],
          80  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          81  +
        Self::deserialize(deserializer)
          82  +
    }
          83  +
}
   73     84   
impl ValidationException {
   74     85   
    /// Returns the error message.
   75     86   
    pub fn message(&self) -> ::std::option::Option<&str> {
   76     87   
        self.message.as_deref()
   77     88   
    }
   78     89   
}
   79     90   
impl ::std::fmt::Display for ValidationException {
   80     91   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   81     92   
        ::std::write!(f, "ValidationException")?;
   82     93   
        if let ::std::option::Option::Some(inner_1) = &self.message {

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/Cargo.toml

@@ -21,21 +86,86 @@
   41     41   
path = "../aws-smithy-json"
   42     42   
version = "0.62.6"
   43     43   
   44     44   
[dependencies.aws-smithy-observability]
   45     45   
path = "../aws-smithy-observability"
   46     46   
version = "0.2.6"
   47     47   
   48     48   
[dependencies.aws-smithy-runtime]
   49     49   
path = "../aws-smithy-runtime"
   50     50   
features = ["client"]
   51         -
version = "1.10.3"
          51  +
version = "1.10.4"
   52     52   
   53     53   
[dependencies.aws-smithy-runtime-api]
   54     54   
path = "../aws-smithy-runtime-api"
   55     55   
features = ["client", "http-1x"]
   56         -
version = "1.11.6"
          56  +
version = "1.11.7"
   57     57   
   58     58   
[dependencies.aws-smithy-schema]
   59     59   
path = "../aws-smithy-schema"
   60     60   
version = "1.0.0"
   61     61   
   62     62   
[dependencies.aws-smithy-types]
   63     63   
path = "../aws-smithy-types"
   64     64   
features = ["http-body-1-x"]
   65     65   
version = "1.4.7"
   66     66   
@@ -95,95 +160,160 @@
  115    115   
features = ["test-util", "wire-mock"]
  116    116   
version = "1.1.12"
  117    117   
  118    118   
[dev-dependencies.aws-smithy-protocol-test]
  119    119   
path = "../aws-smithy-protocol-test"
  120    120   
version = "0.63.14"
  121    121   
  122    122   
[dev-dependencies.aws-smithy-runtime]
  123    123   
path = "../aws-smithy-runtime"
  124    124   
features = ["test-util"]
  125         -
version = "1.10.3"
         125  +
version = "1.10.4"
  126    126   
  127    127   
[dev-dependencies.aws-smithy-runtime-api]
  128    128   
path = "../aws-smithy-runtime-api"
  129    129   
features = ["test-util"]
  130         -
version = "1.11.6"
         130  +
version = "1.11.7"
  131    131   
  132    132   
[dev-dependencies.aws-smithy-types]
  133    133   
path = "../aws-smithy-types"
  134    134   
features = ["http-body-1-x", "test-util"]
  135    135   
version = "1.4.7"
  136    136   
  137    137   
[dev-dependencies.futures-util]
  138    138   
version = "0.3.25"
  139    139   
features = ["alloc"]
  140    140   
default-features = false

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/config.rs

@@ -23,23 +82,86 @@
   43     43   
            config: self.cloneable.clone(),
   44     44   
            runtime_components: self.runtime_components.clone(),
   45     45   
            runtime_plugins: self.runtime_plugins.clone(),
   46     46   
            behavior_version: self.behavior_version,
   47     47   
        }
   48     48   
    }
   49     49   
    /// Return a reference to the stalled stream protection configuration contained in this config, if any.
   50     50   
    pub fn stalled_stream_protection(&self) -> ::std::option::Option<&crate::config::StalledStreamProtectionConfig> {
   51     51   
        self.config.load::<crate::config::StalledStreamProtectionConfig>()
   52     52   
    }
          53  +
    /// Returns the client protocol used for serialization and deserialization.
          54  +
    pub fn protocol(&self) -> ::std::option::Option<&::aws_smithy_schema::protocol::SharedClientProtocol> {
          55  +
        self.config.load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
          56  +
    }
   53     57   
    /// Return the [`SharedHttpClient`](crate::config::SharedHttpClient) to use when making requests, if any.
   54     58   
    pub fn http_client(&self) -> Option<crate::config::SharedHttpClient> {
   55     59   
        self.runtime_components.http_client()
   56     60   
    }
   57     61   
    /// Return the auth schemes configured on this service config
   58     62   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   59     63   
        self.runtime_components.auth_schemes()
   60     64   
    }
   61     65   
   62     66   
    /// Return the auth scheme resolver configured on this service config
@@ -153,157 +254,277 @@
  173    177   
    ///
  174    178   
    pub fn new() -> Self {
  175    179   
        Self::default()
  176    180   
    }
  177    181   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  178    182   
    /// but not those in runtime components.
  179    183   
    #[allow(unused)]
  180    184   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  181    185   
        let mut builder = Self::new();
  182    186   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         187  +
        if let ::std::option::Option::Some(protocol) = config_bag.load::<::aws_smithy_schema::protocol::SharedClientProtocol>().cloned() {
         188  +
            builder.set_protocol(::std::option::Option::Some(protocol));
         189  +
        }
  183    190   
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  184    191   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  185    192   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  186    193   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  187    194   
        builder.set_app_name(config_bag.load::<::aws_types::app_name::AppName>().cloned());
  188    195   
        builder.set_endpoint_url(config_bag.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()));
  189    196   
        builder.set_use_dual_stack(config_bag.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0));
  190    197   
        builder.set_use_fips(config_bag.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0));
  191    198   
        builder.set_region(config_bag.load::<crate::config::Region>().cloned());
  192    199   
        builder
  193    200   
    }
  194    201   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  195    202   
    /// to configure protection for stalled streams.
  196    203   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  197    204   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  198    205   
        self
  199    206   
    }
  200    207   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  201    208   
    /// to configure protection for stalled streams.
  202    209   
    pub fn set_stalled_stream_protection(
  203    210   
        &mut self,
  204    211   
        stalled_stream_protection_config: ::std::option::Option<crate::config::StalledStreamProtectionConfig>,
  205    212   
    ) -> &mut Self {
  206    213   
        self.config.store_or_unset(stalled_stream_protection_config);
  207    214   
        self
  208    215   
    }
  209    216   
    /// Sets the idempotency token provider to use for service calls that require tokens.
  210    217   
    pub fn idempotency_token_provider(
  211    218   
        mut self,
  212    219   
        idempotency_token_provider: impl ::std::convert::Into<crate::idempotency_token::IdempotencyTokenProvider>,
  213    220   
    ) -> Self {
  214    221   
        self.set_idempotency_token_provider(::std::option::Option::Some(idempotency_token_provider.into()));
  215    222   
        self
  216    223   
    }
  217    224   
    /// Sets the idempotency token provider to use for service calls that require tokens.
  218    225   
    pub fn set_idempotency_token_provider(
  219    226   
        &mut self,
  220    227   
        idempotency_token_provider: ::std::option::Option<crate::idempotency_token::IdempotencyTokenProvider>,
  221    228   
    ) -> &mut Self {
  222    229   
        self.config.store_or_unset(idempotency_token_provider);
  223    230   
        self
  224    231   
    }
         232  +
    /// Sets the client protocol to use for serialization and deserialization.
         233  +
    ///
         234  +
    /// This overrides the default protocol determined by the service model,
         235  +
    /// enabling runtime protocol selection.
         236  +
    pub fn protocol(mut self, protocol: impl ::aws_smithy_schema::protocol::ClientProtocol + 'static) -> Self {
         237  +
        self.set_protocol(::std::option::Option::Some(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         238  +
            protocol,
         239  +
        )));
         240  +
        self
         241  +
    }
         242  +
         243  +
    /// Sets the client protocol to use for serialization and deserialization.
         244  +
    pub fn set_protocol(&mut self, protocol: ::std::option::Option<::aws_smithy_schema::protocol::SharedClientProtocol>) -> &mut Self {
         245  +
        self.config.store_or_unset(protocol);
         246  +
        self
         247  +
    }
  225    248   
    /// Sets the HTTP client to use when making requests.
  226    249   
    ///
  227    250   
    /// # Examples
  228    251   
    /// ```no_run
  229    252   
    /// # #[cfg(test)]
  230    253   
    /// # mod tests {
  231    254   
    /// # #[test]
  232    255   
    /// # fn example() {
  233    256   
    /// use std::time::Duration;
  234    257   
    /// use aws_sdk_cloudwatchlogs::config::Config;
@@ -1290,1313 +1349,1377 @@
 1310   1333   
pub(crate) struct ServiceRuntimePlugin {
 1311   1334   
    config: ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer>,
 1312   1335   
    runtime_components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1313   1336   
}
 1314   1337   
 1315   1338   
impl ServiceRuntimePlugin {
 1316   1339   
    pub fn new(_service_config: crate::config::Config) -> Self {
 1317   1340   
        let config = {
 1318   1341   
            let mut cfg = ::aws_smithy_types::config_bag::Layer::new("Logs_20140328");
 1319   1342   
            cfg.store_put(crate::idempotency_token::default_provider());
        1343  +
            if _service_config.protocol().is_none() {
        1344  +
                cfg.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
        1345  +
                    ::aws_smithy_json::protocol::aws_json_rpc::AwsJsonRpcProtocol::aws_json_1_1("Logs_20140328"),
        1346  +
                ));
        1347  +
            }
 1320   1348   
            cfg.store_put(::aws_smithy_runtime::client::orchestrator::AuthSchemeAndEndpointOrchestrationV2);
 1321   1349   
            ::std::option::Option::Some(cfg.freeze())
 1322   1350   
        };
 1323   1351   
        let mut runtime_components = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ServiceRuntimePlugin");
 1324   1352   
        runtime_components.set_auth_scheme_option_resolver(::std::option::Option::Some({
 1325   1353   
            use crate::config::auth::ResolveAuthScheme;
 1326   1354   
            crate::config::auth::DefaultAuthSchemeResolver::default().into_shared_resolver()
 1327   1355   
        }));
 1328   1356   
        runtime_components.set_endpoint_resolver(::std::option::Option::Some({
 1329   1357   
            use crate::config::endpoint::ResolveEndpoint;
@@ -1425,1453 +1484,1515 @@
 1445   1473   
        }
 1446   1474   
        // resiliency
 1447   1475   
        builder.set_retry_config(input.retry_config().cloned());
 1448   1476   
        builder.set_timeout_config(input.timeout_config().cloned());
 1449   1477   
        builder.set_sleep_impl(input.sleep_impl());
 1450   1478   
 1451   1479   
        builder.set_http_client(input.http_client());
 1452   1480   
        builder.set_time_source(input.time_source());
 1453   1481   
        builder.set_behavior_version(input.behavior_version());
 1454   1482   
        builder.set_auth_scheme_preference(input.auth_scheme_preference().cloned());
        1483  +
        if let Some(protocol) = input.protocol() {
        1484  +
            builder.set_protocol(Some(protocol.clone()));
        1485  +
        }
 1455   1486   
        // setting `None` here removes the default
 1456   1487   
        if let Some(config) = input.stalled_stream_protection() {
 1457   1488   
            builder.set_stalled_stream_protection(Some(config));
 1458   1489   
        }
 1459   1490   
 1460   1491   
        if let Some(cache) = input.identity_cache() {
 1461   1492   
            builder.set_identity_cache(cache);
 1462   1493   
        }
 1463   1494   
        builder.set_app_name(input.app_name().cloned());
 1464   1495   

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/lib.rs

@@ -179,179 +222,218 @@
  199    199   
mod event_receiver;
  200    200   
  201    201   
mod idempotency_token;
  202    202   
  203    203   
mod observability_feature;
  204    204   
  205    205   
pub(crate) mod protocol_serde;
  206    206   
  207    207   
mod sdk_feature_tracker;
  208    208   
  209         -
mod serialization_settings;
  210         -
  211    209   
mod endpoint_lib;
  212    210   
         211  +
mod json_errors;
         212  +
  213    213   
mod lens;
  214    214   
  215    215   
mod event_stream_serde;
  216    216   
  217         -
mod json_errors;
  218         -
  219         -
mod serde_util;
  220         -
  221    217   
#[doc(inline)]
  222    218   
pub use client::Client;

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

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

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

@@ -29,29 +176,188 @@
   49     49   
    "com.amazonaws.cloudwatchlogs.synthetic",
   50     50   
    "AssociateKmsKeyInput",
   51     51   
);
   52     52   
static ASSOCIATEKMSKEYINPUT_MEMBER_LOG_GROUP_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.cloudwatchlogs.synthetic#AssociateKmsKeyInput$logGroupName",
   55     55   
        "com.amazonaws.cloudwatchlogs.synthetic",
   56     56   
        "AssociateKmsKeyInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::String,
   59         -
    "log_group_name",
          59  +
    "logGroupName",
   60     60   
    0,
   61     61   
);
   62     62   
static ASSOCIATEKMSKEYINPUT_MEMBER_KMS_KEY_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#AssociateKmsKeyInput$kmsKeyId",
   65     65   
        "com.amazonaws.cloudwatchlogs.synthetic",
   66     66   
        "AssociateKmsKeyInput",
   67     67   
    ),
   68     68   
    ::aws_smithy_schema::ShapeType::String,
   69         -
    "kms_key_id",
          69  +
    "kmsKeyId",
   70     70   
    1,
   71     71   
);
   72     72   
static ASSOCIATEKMSKEYINPUT_MEMBER_RESOURCE_IDENTIFIER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.cloudwatchlogs.synthetic#AssociateKmsKeyInput$resourceIdentifier",
   75     75   
        "com.amazonaws.cloudwatchlogs.synthetic",
   76     76   
        "AssociateKmsKeyInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::String,
   79         -
    "resource_identifier",
          79  +
    "resourceIdentifier",
   80     80   
    2,
   81     81   
);
   82     82   
static ASSOCIATEKMSKEYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   83     83   
    ASSOCIATEKMSKEYINPUT_SCHEMA_ID,
   84     84   
    ::aws_smithy_schema::ShapeType::Structure,
   85     85   
    &[
   86     86   
        &ASSOCIATEKMSKEYINPUT_MEMBER_LOG_GROUP_NAME,
   87     87   
        &ASSOCIATEKMSKEYINPUT_MEMBER_KMS_KEY_ID,
   88     88   
        &ASSOCIATEKMSKEYINPUT_MEMBER_RESOURCE_IDENTIFIER,
   89     89   
    ],
   90     90   
);
   91     91   
impl AssociateKmsKeyInput {
   92     92   
    /// The schema for this shape.
   93     93   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ASSOCIATEKMSKEYINPUT_SCHEMA;
   94     94   
}
   95     95   
impl ::aws_smithy_schema::serde::SerializableStruct for AssociateKmsKeyInput {
   96     96   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   97     97   
    fn serialize_members(
   98     98   
        &self,
   99     99   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  100    100   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  101    101   
        if let Some(ref val) = self.log_group_name {
  102    102   
            ser.write_string(&ASSOCIATEKMSKEYINPUT_MEMBER_LOG_GROUP_NAME, val)?;
  103    103   
        }
  104    104   
        if let Some(ref val) = self.kms_key_id {
  105    105   
            ser.write_string(&ASSOCIATEKMSKEYINPUT_MEMBER_KMS_KEY_ID, val)?;
  106    106   
        }
  107    107   
        if let Some(ref val) = self.resource_identifier {
  108    108   
            ser.write_string(&ASSOCIATEKMSKEYINPUT_MEMBER_RESOURCE_IDENTIFIER, val)?;
  109    109   
        }
  110    110   
        Ok(())
  111    111   
    }
  112    112   
}
  113    113   
impl AssociateKmsKeyInput {
  114    114   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  115         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  116         -
        deserializer: &mut D,
         115  +
    pub fn deserialize(
         116  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  117    117   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  118    118   
        #[allow(unused_variables, unused_mut)]
  119    119   
        let mut builder = Self::builder();
  120    120   
        #[allow(
  121    121   
            unused_variables,
  122    122   
            unreachable_code,
  123    123   
            clippy::single_match,
  124    124   
            clippy::match_single_binding,
  125    125   
            clippy::diverging_sub_expression
  126    126   
        )]
  127         -
        deserializer.read_struct(&ASSOCIATEKMSKEYINPUT_SCHEMA, (), |_, member, deser| {
         127  +
        deserializer.read_struct(&ASSOCIATEKMSKEYINPUT_SCHEMA, &mut |member, deser| {
  128    128   
            match member.member_index() {
  129    129   
                Some(0) => {
  130    130   
                    builder.log_group_name = Some(deser.read_string(member)?);
  131    131   
                }
  132    132   
                Some(1) => {
  133    133   
                    builder.kms_key_id = Some(deser.read_string(member)?);
  134    134   
                }
  135    135   
                Some(2) => {
  136    136   
                    builder.resource_identifier = Some(deser.read_string(member)?);
  137    137   
                }
  138    138   
                _ => {}
  139    139   
            }
  140    140   
            Ok(())
  141    141   
        })?;
         142  +
        builder.kms_key_id = builder.kms_key_id.or(Some(String::new()));
  142    143   
        builder
  143    144   
            .build()
  144    145   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  145    146   
    }
  146    147   
}
         148  +
impl AssociateKmsKeyInput {
         149  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         150  +
    pub fn deserialize_with_response(
         151  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         152  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         153  +
        _status: u16,
         154  +
        _body: &[u8],
         155  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         156  +
        Self::deserialize(deserializer)
         157  +
    }
         158  +
}
  147    159   
impl AssociateKmsKeyInput {
  148    160   
    /// Creates a new builder-style object to manufacture [`AssociateKmsKeyInput`](crate::operation::associate_kms_key::AssociateKmsKeyInput).
  149    161   
    pub fn builder() -> crate::operation::associate_kms_key::builders::AssociateKmsKeyInputBuilder {
  150    162   
        crate::operation::associate_kms_key::builders::AssociateKmsKeyInputBuilder::default()
  151    163   
    }
  152    164   
}
  153    165   
  154    166   
/// A builder for [`AssociateKmsKeyInput`](crate::operation::associate_kms_key::AssociateKmsKeyInput).
  155    167   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  156    168   
#[non_exhaustive]

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

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/create_delivery.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 `CreateDelivery`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateDelivery;
    6      6   
impl CreateDelivery {
    7      7   
    /// Creates a new `CreateDelivery`
    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::create_delivery::CreateDeliveryInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_delivery::CreateDeliveryOutput::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::create_delivery::CreateDeliveryInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_delivery::CreateDeliveryOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_delivery::CreateDeliveryError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,430 @@
  138    142   
                crate::operation::create_delivery::CreateDeliveryError,
  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 CreateDeliveryResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateDeliveryResponseDeserializer {
  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_create_delivery::de_create_delivery_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_create_delivery::de_create_delivery_http_response(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::create_delivery::CreateDeliveryError::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  +
                "AccessDeniedException" => crate::operation::create_delivery::CreateDeliveryError::AccessDeniedException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         190  +
                                &mut *deser,
         191  +
                                response.headers(),
         192  +
                                response.status().into(),
         193  +
                                body,
         194  +
                            )
         195  +
                        }) {
         196  +
                        ::std::result::Result::Ok(val) => val,
         197  +
                        ::std::result::Result::Err(e) => {
         198  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         199  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         200  +
                            ))
         201  +
                        }
  162    202   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         203  +
                    tmp.meta = generic;
         204  +
                    if tmp.message.is_none() {
         205  +
                        tmp.message = _error_message;
         206  +
                    }
         207  +
                    tmp
         208  +
                }),
         209  +
                "ConflictException" => crate::operation::create_delivery::CreateDeliveryError::ConflictException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::ConflictException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::ConflictException::deserialize_with_response(
         214  +
                                &mut *deser,
         215  +
                                response.headers(),
         216  +
                                response.status().into(),
         217  +
                                body,
         218  +
                            )
         219  +
                        }) {
         220  +
                        ::std::result::Result::Ok(val) => val,
         221  +
                        ::std::result::Result::Err(e) => {
         222  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         223  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         224  +
                            ))
         225  +
                        }
         226  +
                    };
         227  +
                    tmp.meta = generic;
         228  +
                    if tmp.message.is_none() {
         229  +
                        tmp.message = _error_message;
         230  +
                    }
         231  +
                    tmp
         232  +
                }),
         233  +
                "ResourceNotFoundException" => crate::operation::create_delivery::CreateDeliveryError::ResourceNotFoundException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         238  +
                                &mut *deser,
         239  +
                                response.headers(),
         240  +
                                response.status().into(),
         241  +
                                body,
         242  +
                            )
         243  +
                        }) {
         244  +
                        ::std::result::Result::Ok(val) => val,
         245  +
                        ::std::result::Result::Err(e) => {
         246  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         247  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         248  +
                            ))
         249  +
                        }
         250  +
                    };
         251  +
                    tmp.meta = generic;
         252  +
                    if tmp.message.is_none() {
         253  +
                        tmp.message = _error_message;
         254  +
                    }
         255  +
                    tmp
         256  +
                }),
         257  +
                "ServiceQuotaExceededException" => crate::operation::create_delivery::CreateDeliveryError::ServiceQuotaExceededException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::ServiceQuotaExceededException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    if tmp.message.is_none() {
         277  +
                        tmp.message = _error_message;
         278  +
                    }
         279  +
                    tmp
         280  +
                }),
         281  +
                "ServiceUnavailableException" => crate::operation::create_delivery::CreateDeliveryError::ServiceUnavailableException({
         282  +
                    let mut tmp = match protocol
         283  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         284  +
                        .and_then(|mut deser| {
         285  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         286  +
                                &mut *deser,
         287  +
                                response.headers(),
         288  +
                                response.status().into(),
         289  +
                                body,
         290  +
                            )
         291  +
                        }) {
         292  +
                        ::std::result::Result::Ok(val) => val,
         293  +
                        ::std::result::Result::Err(e) => {
         294  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         295  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         296  +
                            ))
         297  +
                        }
         298  +
                    };
         299  +
                    tmp.meta = generic;
         300  +
                    if tmp.message.is_none() {
         301  +
                        tmp.message = _error_message;
         302  +
                    }
         303  +
                    tmp
         304  +
                }),
         305  +
                "ThrottlingException" => crate::operation::create_delivery::CreateDeliveryError::ThrottlingException({
         306  +
                    let mut tmp = match protocol
         307  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         308  +
                        .and_then(|mut deser| {
         309  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         310  +
                                &mut *deser,
         311  +
                                response.headers(),
         312  +
                                response.status().into(),
         313  +
                                body,
         314  +
                            )
         315  +
                        }) {
         316  +
                        ::std::result::Result::Ok(val) => val,
         317  +
                        ::std::result::Result::Err(e) => {
         318  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         319  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         320  +
                            ))
         321  +
                        }
         322  +
                    };
         323  +
                    tmp.meta = generic;
         324  +
                    if tmp.message.is_none() {
         325  +
                        tmp.message = _error_message;
         326  +
                    }
         327  +
                    tmp
         328  +
                }),
         329  +
                "ValidationException" => crate::operation::create_delivery::CreateDeliveryError::ValidationException({
         330  +
                    let mut tmp = match protocol
         331  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         332  +
                        .and_then(|mut deser| {
         333  +
                            crate::types::error::ValidationException::deserialize_with_response(
         334  +
                                &mut *deser,
         335  +
                                response.headers(),
         336  +
                                response.status().into(),
         337  +
                                body,
         338  +
                            )
         339  +
                        }) {
         340  +
                        ::std::result::Result::Ok(val) => val,
         341  +
                        ::std::result::Result::Err(e) => {
         342  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         343  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         344  +
                            ))
         345  +
                        }
         346  +
                    };
         347  +
                    tmp.meta = generic;
         348  +
                    if tmp.message.is_none() {
         349  +
                        tmp.message = _error_message;
         350  +
                    }
         351  +
                    tmp
         352  +
                }),
         353  +
                _ => crate::operation::create_delivery::CreateDeliveryError::generic(generic),
         354  +
            };
         355  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         356  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         357  +
            ))
         358  +
        } else {
         359  +
            let protocol = _cfg
         360  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         361  +
                .expect("a SharedClientProtocol is required");
         362  +
            let mut deser = protocol
         363  +
                .deserialize_response(response, CreateDelivery::OUTPUT_SCHEMA, _cfg)
         364  +
                .map_err(|e| {
         365  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         366  +
                })?;
         367  +
            let body = response.body().bytes().expect("body loaded");
         368  +
            let output = crate::operation::create_delivery::CreateDeliveryOutput::deserialize_with_response(
         369  +
                &mut *deser,
         370  +
                response.headers(),
         371  +
                response.status().into(),
         372  +
                body,
         373  +
            )
         374  +
            .map_err(|e| {
         375  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         376  +
            })?;
         377  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         378  +
        }
  164    379   
    }
  165    380   
}
  166    381   
#[derive(Debug)]
  167    382   
struct CreateDeliveryRequestSerializer;
  168    383   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateDeliveryRequestSerializer {
  169    384   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    385   
    fn serialize_input(
  171    386   
        &self,
  172    387   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    388   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    389   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    390   
        let input = input
  176    391   
            .downcast::<crate::operation::create_delivery::CreateDeliveryInput>()
  177    392   
            .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::create_delivery::CreateDeliveryInput,
  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::create_delivery::CreateDeliveryInput,
  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.CreateDelivery",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_delivery::ser_create_delivery_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())
         393  +
        let protocol = _cfg
         394  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         395  +
            .expect("a SharedClientProtocol is required");
         396  +
        let mut request = protocol
         397  +
            .serialize_request(&input, CreateDelivery::INPUT_SCHEMA, "", _cfg)
         398  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         399  +
         400  +
        return ::std::result::Result::Ok(request);
  216    401   
    }
  217    402   
}
  218    403   
#[derive(Debug)]
  219    404   
struct CreateDeliveryEndpointParamsInterceptor;
  220    405   
  221    406   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateDeliveryEndpointParamsInterceptor {
  222    407   
    fn name(&self) -> &'static str {
  223    408   
        "CreateDeliveryEndpointParamsInterceptor"
  224    409   
    }
  225    410   

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

@@ -31,31 +131,131 @@
   51     51   
    "com.amazonaws.cloudwatchlogs.synthetic",
   52     52   
    "CreateDeliveryInput",
   53     53   
);
   54     54   
static CREATEDELIVERYINPUT_MEMBER_DELIVERY_SOURCE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   55     55   
    ::aws_smithy_schema::ShapeId::from_static(
   56     56   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateDeliveryInput$deliverySourceName",
   57     57   
        "com.amazonaws.cloudwatchlogs.synthetic",
   58     58   
        "CreateDeliveryInput",
   59     59   
    ),
   60     60   
    ::aws_smithy_schema::ShapeType::String,
   61         -
    "delivery_source_name",
          61  +
    "deliverySourceName",
   62     62   
    0,
   63     63   
);
   64     64   
static CREATEDELIVERYINPUT_MEMBER_DELIVERY_DESTINATION_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   65     65   
    ::aws_smithy_schema::ShapeId::from_static(
   66     66   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateDeliveryInput$deliveryDestinationArn",
   67     67   
        "com.amazonaws.cloudwatchlogs.synthetic",
   68     68   
        "CreateDeliveryInput",
   69     69   
    ),
   70     70   
    ::aws_smithy_schema::ShapeType::String,
   71         -
    "delivery_destination_arn",
          71  +
    "deliveryDestinationArn",
   72     72   
    1,
   73     73   
);
   74     74   
static CREATEDELIVERYINPUT_MEMBER_RECORD_FIELDS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   75     75   
    ::aws_smithy_schema::ShapeId::from_static(
   76     76   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateDeliveryInput$recordFields",
   77     77   
        "com.amazonaws.cloudwatchlogs.synthetic",
   78     78   
        "CreateDeliveryInput",
   79     79   
    ),
   80     80   
    ::aws_smithy_schema::ShapeType::List,
   81         -
    "record_fields",
          81  +
    "recordFields",
   82     82   
    2,
   83     83   
);
   84     84   
static CREATEDELIVERYINPUT_MEMBER_FIELD_DELIMITER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   85     85   
    ::aws_smithy_schema::ShapeId::from_static(
   86     86   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateDeliveryInput$fieldDelimiter",
   87     87   
        "com.amazonaws.cloudwatchlogs.synthetic",
   88     88   
        "CreateDeliveryInput",
   89     89   
    ),
   90     90   
    ::aws_smithy_schema::ShapeType::String,
   91         -
    "field_delimiter",
          91  +
    "fieldDelimiter",
   92     92   
    3,
   93     93   
);
   94     94   
static CREATEDELIVERYINPUT_MEMBER_S3_DELIVERY_CONFIGURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   95     95   
    ::aws_smithy_schema::ShapeId::from_static(
   96     96   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateDeliveryInput$s3DeliveryConfiguration",
   97     97   
        "com.amazonaws.cloudwatchlogs.synthetic",
   98     98   
        "CreateDeliveryInput",
   99     99   
    ),
  100    100   
    ::aws_smithy_schema::ShapeType::Structure,
  101         -
    "s3_delivery_configuration",
         101  +
    "s3DeliveryConfiguration",
  102    102   
    4,
  103    103   
);
  104    104   
static CREATEDELIVERYINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  105    105   
    ::aws_smithy_schema::ShapeId::from_static(
  106    106   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateDeliveryInput$tags",
  107    107   
        "com.amazonaws.cloudwatchlogs.synthetic",
  108    108   
        "CreateDeliveryInput",
  109    109   
    ),
  110    110   
    ::aws_smithy_schema::ShapeType::Map,
  111    111   
    "tags",
@@ -146,146 +266,259 @@
  166    166   
                    }
  167    167   
                    Ok(())
  168    168   
                },
  169    169   
            )?;
  170    170   
        }
  171    171   
        Ok(())
  172    172   
    }
  173    173   
}
  174    174   
impl CreateDeliveryInput {
  175    175   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  176         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  177         -
        deserializer: &mut D,
         176  +
    pub fn deserialize(
         177  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  178    178   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  179    179   
        #[allow(unused_variables, unused_mut)]
  180    180   
        let mut builder = Self::builder();
  181    181   
        #[allow(
  182    182   
            unused_variables,
  183    183   
            unreachable_code,
  184    184   
            clippy::single_match,
  185    185   
            clippy::match_single_binding,
  186    186   
            clippy::diverging_sub_expression
  187    187   
        )]
  188         -
        deserializer.read_struct(&CREATEDELIVERYINPUT_SCHEMA, (), |_, member, deser| {
         188  +
        deserializer.read_struct(&CREATEDELIVERYINPUT_SCHEMA, &mut |member, deser| {
  189    189   
            match member.member_index() {
  190    190   
                Some(0) => {
  191    191   
                    builder.delivery_source_name = Some(deser.read_string(member)?);
  192    192   
                }
  193    193   
                Some(1) => {
  194    194   
                    builder.delivery_destination_arn = Some(deser.read_string(member)?);
  195    195   
                }
  196    196   
                Some(2) => {
  197         -
                    builder.record_fields = Some({
  198         -
                        let container = if let Some(cap) = deser.container_size() {
  199         -
                            Vec::with_capacity(cap)
  200         -
                        } else {
  201         -
                            Vec::new()
  202         -
                        };
  203         -
                        deser.read_list(member, container, |mut list, deser| {
  204         -
                            list.push(deser.read_string(member)?);
  205         -
                            Ok(list)
  206         -
                        })?
  207         -
                    });
         197  +
                    builder.record_fields = Some(deser.read_string_list(member)?);
  208    198   
                }
  209    199   
                Some(3) => {
  210    200   
                    builder.field_delimiter = Some(deser.read_string(member)?);
  211    201   
                }
  212    202   
                Some(4) => {
  213    203   
                    builder.s3_delivery_configuration = Some(crate::types::S3DeliveryConfiguration::deserialize(deser)?);
  214    204   
                }
  215    205   
                Some(5) => {
  216         -
                    builder.tags = Some({
  217         -
                        let container = if let Some(cap) = deser.container_size() {
  218         -
                            std::collections::HashMap::with_capacity(cap)
  219         -
                        } else {
  220         -
                            std::collections::HashMap::new()
  221         -
                        };
  222         -
                        deser.read_map(member, container, |mut map, key, deser| {
  223         -
                            map.insert(key, deser.read_string(member)?);
  224         -
                            Ok(map)
  225         -
                        })?
  226         -
                    });
         206  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
  227    207   
                }
  228    208   
                _ => {}
  229    209   
            }
  230    210   
            Ok(())
  231    211   
        })?;
         212  +
        builder.delivery_source_name = builder.delivery_source_name.or(Some(String::new()));
         213  +
        builder.delivery_destination_arn = builder.delivery_destination_arn.or(Some(String::new()));
  232    214   
        builder
  233    215   
            .build()
  234    216   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  235    217   
    }
  236    218   
}
         219  +
impl CreateDeliveryInput {
         220  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         221  +
    pub fn deserialize_with_response(
         222  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         223  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         224  +
        _status: u16,
         225  +
        _body: &[u8],
         226  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         227  +
        Self::deserialize(deserializer)
         228  +
    }
         229  +
}
  237    230   
impl CreateDeliveryInput {
  238    231   
    /// Creates a new builder-style object to manufacture [`CreateDeliveryInput`](crate::operation::create_delivery::CreateDeliveryInput).
  239    232   
    pub fn builder() -> crate::operation::create_delivery::builders::CreateDeliveryInputBuilder {
  240    233   
        crate::operation::create_delivery::builders::CreateDeliveryInputBuilder::default()
  241    234   
    }
  242    235   
}
  243    236   
  244    237   
/// A builder for [`CreateDeliveryInput`](crate::operation::create_delivery::CreateDeliveryInput).
  245    238   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  246    239   
#[non_exhaustive]

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

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/create_export_task.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 `CreateExportTask`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateExportTask;
    6      6   
impl CreateExportTask {
    7      7   
    /// Creates a new `CreateExportTask`
    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::create_export_task::CreateExportTaskInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_export_task::CreateExportTaskOutput::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::create_export_task::CreateExportTaskInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_export_task::CreateExportTaskOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_export_task::CreateExportTaskError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,406 @@
  138    142   
                crate::operation::create_export_task::CreateExportTaskError,
  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 CreateExportTaskResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateExportTaskResponseDeserializer {
  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_create_export_task::de_create_export_task_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_create_export_task::de_create_export_task_http_response(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::create_export_task::CreateExportTaskError::unhandled(
         175  +
                            generic,
         176  +
                        )),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "InvalidParameterException" => crate::operation::create_export_task::CreateExportTaskError::InvalidParameterException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         190  +
                                &mut *deser,
         191  +
                                response.headers(),
         192  +
                                response.status().into(),
         193  +
                                body,
         194  +
                            )
         195  +
                        }) {
         196  +
                        ::std::result::Result::Ok(val) => val,
         197  +
                        ::std::result::Result::Err(e) => {
         198  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         199  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         200  +
                            ))
         201  +
                        }
         202  +
                    };
         203  +
                    tmp.meta = generic;
         204  +
                    if tmp.message.is_none() {
         205  +
                        tmp.message = _error_message;
         206  +
                    }
         207  +
                    tmp
         208  +
                }),
         209  +
                "LimitExceededException" => crate::operation::create_export_task::CreateExportTaskError::LimitExceededException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::LimitExceededException::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  +
                "OperationAbortedException" => crate::operation::create_export_task::CreateExportTaskError::OperationAbortedException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::OperationAbortedException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::OperationAbortedException::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  +
                        }
  162    250   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         251  +
                    tmp.meta = generic;
         252  +
                    if tmp.message.is_none() {
         253  +
                        tmp.message = _error_message;
         254  +
                    }
         255  +
                    tmp
         256  +
                }),
         257  +
                "ResourceAlreadyExistsException" => crate::operation::create_export_task::CreateExportTaskError::ResourceAlreadyExistsException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::ResourceAlreadyExistsException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::ResourceAlreadyExistsException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    if tmp.message.is_none() {
         277  +
                        tmp.message = _error_message;
         278  +
                    }
         279  +
                    tmp
         280  +
                }),
         281  +
                "ResourceNotFoundException" => crate::operation::create_export_task::CreateExportTaskError::ResourceNotFoundException({
         282  +
                    let mut tmp = match protocol
         283  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         284  +
                        .and_then(|mut deser| {
         285  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         286  +
                                &mut *deser,
         287  +
                                response.headers(),
         288  +
                                response.status().into(),
         289  +
                                body,
         290  +
                            )
         291  +
                        }) {
         292  +
                        ::std::result::Result::Ok(val) => val,
         293  +
                        ::std::result::Result::Err(e) => {
         294  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         295  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         296  +
                            ))
         297  +
                        }
         298  +
                    };
         299  +
                    tmp.meta = generic;
         300  +
                    if tmp.message.is_none() {
         301  +
                        tmp.message = _error_message;
         302  +
                    }
         303  +
                    tmp
         304  +
                }),
         305  +
                "ServiceUnavailableException" => crate::operation::create_export_task::CreateExportTaskError::ServiceUnavailableException({
         306  +
                    let mut tmp = match protocol
         307  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         308  +
                        .and_then(|mut deser| {
         309  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         310  +
                                &mut *deser,
         311  +
                                response.headers(),
         312  +
                                response.status().into(),
         313  +
                                body,
         314  +
                            )
         315  +
                        }) {
         316  +
                        ::std::result::Result::Ok(val) => val,
         317  +
                        ::std::result::Result::Err(e) => {
         318  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         319  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         320  +
                            ))
         321  +
                        }
         322  +
                    };
         323  +
                    tmp.meta = generic;
         324  +
                    if tmp.message.is_none() {
         325  +
                        tmp.message = _error_message;
         326  +
                    }
         327  +
                    tmp
         328  +
                }),
         329  +
                _ => crate::operation::create_export_task::CreateExportTaskError::generic(generic),
         330  +
            };
         331  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         332  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         333  +
            ))
         334  +
        } else {
         335  +
            let protocol = _cfg
         336  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         337  +
                .expect("a SharedClientProtocol is required");
         338  +
            let mut deser = protocol
         339  +
                .deserialize_response(response, CreateExportTask::OUTPUT_SCHEMA, _cfg)
         340  +
                .map_err(|e| {
         341  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         342  +
                })?;
         343  +
            let body = response.body().bytes().expect("body loaded");
         344  +
            let output = crate::operation::create_export_task::CreateExportTaskOutput::deserialize_with_response(
         345  +
                &mut *deser,
         346  +
                response.headers(),
         347  +
                response.status().into(),
         348  +
                body,
         349  +
            )
         350  +
            .map_err(|e| {
         351  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         352  +
            })?;
         353  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         354  +
        }
  164    355   
    }
  165    356   
}
  166    357   
#[derive(Debug)]
  167    358   
struct CreateExportTaskRequestSerializer;
  168    359   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateExportTaskRequestSerializer {
  169    360   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    361   
    fn serialize_input(
  171    362   
        &self,
  172    363   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    364   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    365   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    366   
        let input = input
  176    367   
            .downcast::<crate::operation::create_export_task::CreateExportTaskInput>()
  177    368   
            .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::create_export_task::CreateExportTaskInput,
  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::create_export_task::CreateExportTaskInput,
  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.CreateExportTask",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_export_task::ser_create_export_task_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())
         369  +
        let protocol = _cfg
         370  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         371  +
            .expect("a SharedClientProtocol is required");
         372  +
        let mut request = protocol
         373  +
            .serialize_request(&input, CreateExportTask::INPUT_SCHEMA, "", _cfg)
         374  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         375  +
         376  +
        return ::std::result::Result::Ok(request);
  216    377   
    }
  217    378   
}
  218    379   
#[derive(Debug)]
  219    380   
struct CreateExportTaskEndpointParamsInterceptor;
  220    381   
  221    382   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateExportTaskEndpointParamsInterceptor {
  222    383   
    fn name(&self) -> &'static str {
  223    384   
        "CreateExportTaskEndpointParamsInterceptor"
  224    385   
    }
  225    386