AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

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

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

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

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

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

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

@@ -59,59 +139,139 @@
   79     79   
    "name",
   80     80   
    0,
   81     81   
);
   82     82   
static PUTDELIVERYDESTINATIONINPUT_MEMBER_OUTPUT_FORMAT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   83     83   
    ::aws_smithy_schema::ShapeId::from_static(
   84     84   
        "com.amazonaws.cloudwatchlogs.synthetic#PutDeliveryDestinationInput$outputFormat",
   85     85   
        "com.amazonaws.cloudwatchlogs.synthetic",
   86     86   
        "PutDeliveryDestinationInput",
   87     87   
    ),
   88     88   
    ::aws_smithy_schema::ShapeType::String,
   89         -
    "output_format",
          89  +
    "outputFormat",
   90     90   
    1,
   91     91   
);
   92     92   
static PUTDELIVERYDESTINATIONINPUT_MEMBER_DELIVERY_DESTINATION_CONFIGURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   93     93   
    ::aws_smithy_schema::ShapeId::from_static(
   94     94   
        "com.amazonaws.cloudwatchlogs.synthetic#PutDeliveryDestinationInput$deliveryDestinationConfiguration",
   95     95   
        "com.amazonaws.cloudwatchlogs.synthetic",
   96     96   
        "PutDeliveryDestinationInput",
   97     97   
    ),
   98     98   
    ::aws_smithy_schema::ShapeType::Structure,
   99         -
    "delivery_destination_configuration",
          99  +
    "deliveryDestinationConfiguration",
  100    100   
    2,
  101    101   
);
  102    102   
static PUTDELIVERYDESTINATIONINPUT_MEMBER_DELIVERY_DESTINATION_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  103    103   
    ::aws_smithy_schema::ShapeId::from_static(
  104    104   
        "com.amazonaws.cloudwatchlogs.synthetic#PutDeliveryDestinationInput$deliveryDestinationType",
  105    105   
        "com.amazonaws.cloudwatchlogs.synthetic",
  106    106   
        "PutDeliveryDestinationInput",
  107    107   
    ),
  108    108   
    ::aws_smithy_schema::ShapeType::String,
  109         -
    "delivery_destination_type",
         109  +
    "deliveryDestinationType",
  110    110   
    3,
  111    111   
);
  112    112   
static PUTDELIVERYDESTINATIONINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  113    113   
    ::aws_smithy_schema::ShapeId::from_static(
  114    114   
        "com.amazonaws.cloudwatchlogs.synthetic#PutDeliveryDestinationInput$tags",
  115    115   
        "com.amazonaws.cloudwatchlogs.synthetic",
  116    116   
        "PutDeliveryDestinationInput",
  117    117   
    ),
  118    118   
    ::aws_smithy_schema::ShapeType::Map,
  119    119   
    "tags",
@@ -142,142 +249,251 @@
  162    162   
                    }
  163    163   
                    Ok(())
  164    164   
                },
  165    165   
            )?;
  166    166   
        }
  167    167   
        Ok(())
  168    168   
    }
  169    169   
}
  170    170   
impl PutDeliveryDestinationInput {
  171    171   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  172         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  173         -
        deserializer: &mut D,
         172  +
    pub fn deserialize(
         173  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  174    174   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  175    175   
        #[allow(unused_variables, unused_mut)]
  176    176   
        let mut builder = Self::builder();
  177    177   
        #[allow(
  178    178   
            unused_variables,
  179    179   
            unreachable_code,
  180    180   
            clippy::single_match,
  181    181   
            clippy::match_single_binding,
  182    182   
            clippy::diverging_sub_expression
  183    183   
        )]
  184         -
        deserializer.read_struct(&PUTDELIVERYDESTINATIONINPUT_SCHEMA, (), |_, member, deser| {
         184  +
        deserializer.read_struct(&PUTDELIVERYDESTINATIONINPUT_SCHEMA, &mut |member, deser| {
  185    185   
            match member.member_index() {
  186    186   
                Some(0) => {
  187    187   
                    builder.name = Some(deser.read_string(member)?);
  188    188   
                }
  189    189   
                Some(1) => {
  190    190   
                    builder.output_format = Some(crate::types::OutputFormat::from(deser.read_string(member)?.as_str()));
  191    191   
                }
  192    192   
                Some(2) => {
  193    193   
                    builder.delivery_destination_configuration = Some(crate::types::DeliveryDestinationConfiguration::deserialize(deser)?);
  194    194   
                }
  195    195   
                Some(3) => {
  196    196   
                    builder.delivery_destination_type = Some(crate::types::DeliveryDestinationType::from(deser.read_string(member)?.as_str()));
  197    197   
                }
  198    198   
                Some(4) => {
  199         -
                    builder.tags = Some({
  200         -
                        let container = if let Some(cap) = deser.container_size() {
  201         -
                            std::collections::HashMap::with_capacity(cap)
  202         -
                        } else {
  203         -
                            std::collections::HashMap::new()
  204         -
                        };
  205         -
                        deser.read_map(member, container, |mut map, key, deser| {
  206         -
                            map.insert(key, deser.read_string(member)?);
  207         -
                            Ok(map)
  208         -
                        })?
  209         -
                    });
         199  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
  210    200   
                }
  211    201   
                _ => {}
  212    202   
            }
  213    203   
            Ok(())
  214    204   
        })?;
         205  +
        builder.name = builder.name.or(Some(String::new()));
  215    206   
        builder
  216    207   
            .build()
  217    208   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  218    209   
    }
  219    210   
}
         211  +
impl PutDeliveryDestinationInput {
         212  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         213  +
    pub fn deserialize_with_response(
         214  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         215  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         216  +
        _status: u16,
         217  +
        _body: &[u8],
         218  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         219  +
        Self::deserialize(deserializer)
         220  +
    }
         221  +
}
  220    222   
impl PutDeliveryDestinationInput {
  221    223   
    /// Creates a new builder-style object to manufacture [`PutDeliveryDestinationInput`](crate::operation::put_delivery_destination::PutDeliveryDestinationInput).
  222    224   
    pub fn builder() -> crate::operation::put_delivery_destination::builders::PutDeliveryDestinationInputBuilder {
  223    225   
        crate::operation::put_delivery_destination::builders::PutDeliveryDestinationInputBuilder::default()
  224    226   
    }
  225    227   
}
  226    228   
  227    229   
/// A builder for [`PutDeliveryDestinationInput`](crate::operation::put_delivery_destination::PutDeliveryDestinationInput).
  228    230   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  229    231   
#[non_exhaustive]

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

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

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

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

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_delivery_source.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 `PutDeliverySource`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutDeliverySource;
    6      6   
impl PutDeliverySource {
    7      7   
    /// Creates a new `PutDeliverySource`
    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::put_delivery_source::PutDeliverySourceInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_delivery_source::PutDeliverySourceOutput::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::put_delivery_source::PutDeliverySourceInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::put_delivery_source::PutDeliverySourceOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::put_delivery_source::PutDeliverySourceError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +245,406 @@
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct PutDeliverySourceResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutDeliverySourceResponseDeserializer {
  148    152   
    fn deserialize_nonstreaming(
  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_put_delivery_source::de_put_delivery_source_http_error(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         175  +
                            crate::operation::put_delivery_source::PutDeliverySourceError::unhandled(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  +
                "ConflictException" => crate::operation::put_delivery_source::PutDeliverySourceError::ConflictException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::ConflictException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::ConflictException::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  +
                "ResourceNotFoundException" => crate::operation::put_delivery_source::PutDeliverySourceError::ResourceNotFoundException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::ResourceNotFoundException::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  +
                "ServiceQuotaExceededException" => crate::operation::put_delivery_source::PutDeliverySourceError::ServiceQuotaExceededException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::ServiceQuotaExceededException::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::put_delivery_source::PutDeliverySourceError::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  +
                "ThrottlingException" => crate::operation::put_delivery_source::PutDeliverySourceError::ThrottlingException({
         282  +
                    let mut tmp = match protocol
         283  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         284  +
                        .and_then(|mut deser| {
         285  +
                            crate::types::error::ThrottlingException::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  +
                "ValidationException" => crate::operation::put_delivery_source::PutDeliverySourceError::ValidationException({
         306  +
                    let mut tmp = match protocol
         307  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         308  +
                        .and_then(|mut deser| {
         309  +
                            crate::types::error::ValidationException::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::put_delivery_source::PutDeliverySourceError::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  +
            ))
  160    334   
        } else {
  161         -
            crate::protocol_serde::shape_put_delivery_source::de_put_delivery_source_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         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, PutDeliverySource::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::put_delivery_source::PutDeliverySourceOutput::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 PutDeliverySourceRequestSerializer;
  168    359   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutDeliverySourceRequestSerializer {
  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::put_delivery_source::PutDeliverySourceInput>()
  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::put_delivery_source::PutDeliverySourceInput,
  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::put_delivery_source::PutDeliverySourceInput,
  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.PutDeliverySource",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_put_delivery_source::ser_put_delivery_source_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, PutDeliverySource::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 PutDeliverySourceEndpointParamsInterceptor;
  220    381   
  221    382   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutDeliverySourceEndpointParamsInterceptor {
  222    383   
    fn name(&self) -> &'static str {
  223    384   
        "PutDeliverySourceEndpointParamsInterceptor"
  224    385   
    }
  225    386   

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

@@ -79,79 +252,256 @@
   99     99   
    "name",
  100    100   
    0,
  101    101   
);
  102    102   
static PUTDELIVERYSOURCEINPUT_MEMBER_RESOURCE_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  103    103   
    ::aws_smithy_schema::ShapeId::from_static(
  104    104   
        "com.amazonaws.cloudwatchlogs.synthetic#PutDeliverySourceInput$resourceArn",
  105    105   
        "com.amazonaws.cloudwatchlogs.synthetic",
  106    106   
        "PutDeliverySourceInput",
  107    107   
    ),
  108    108   
    ::aws_smithy_schema::ShapeType::String,
  109         -
    "resource_arn",
         109  +
    "resourceArn",
  110    110   
    1,
  111    111   
);
  112    112   
static PUTDELIVERYSOURCEINPUT_MEMBER_LOG_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  113    113   
    ::aws_smithy_schema::ShapeId::from_static(
  114    114   
        "com.amazonaws.cloudwatchlogs.synthetic#PutDeliverySourceInput$logType",
  115    115   
        "com.amazonaws.cloudwatchlogs.synthetic",
  116    116   
        "PutDeliverySourceInput",
  117    117   
    ),
  118    118   
    ::aws_smithy_schema::ShapeType::String,
  119         -
    "log_type",
         119  +
    "logType",
  120    120   
    2,
  121    121   
);
  122    122   
static PUTDELIVERYSOURCEINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  123    123   
    ::aws_smithy_schema::ShapeId::from_static(
  124    124   
        "com.amazonaws.cloudwatchlogs.synthetic#PutDeliverySourceInput$tags",
  125    125   
        "com.amazonaws.cloudwatchlogs.synthetic",
  126    126   
        "PutDeliverySourceInput",
  127    127   
    ),
  128    128   
    ::aws_smithy_schema::ShapeType::Map,
  129    129   
    "tags",
  130    130   
    3,
  131    131   
);
  132    132   
static PUTDELIVERYSOURCEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  133    133   
    PUTDELIVERYSOURCEINPUT_SCHEMA_ID,
  134    134   
    ::aws_smithy_schema::ShapeType::Structure,
  135    135   
    &[
  136    136   
        &PUTDELIVERYSOURCEINPUT_MEMBER_NAME,
  137    137   
        &PUTDELIVERYSOURCEINPUT_MEMBER_RESOURCE_ARN,
  138    138   
        &PUTDELIVERYSOURCEINPUT_MEMBER_LOG_TYPE,
  139    139   
        &PUTDELIVERYSOURCEINPUT_MEMBER_TAGS,
  140    140   
    ],
  141    141   
);
  142    142   
impl PutDeliverySourceInput {
  143    143   
    /// The schema for this shape.
  144    144   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTDELIVERYSOURCEINPUT_SCHEMA;
  145    145   
}
  146    146   
impl ::aws_smithy_schema::serde::SerializableStruct for PutDeliverySourceInput {
  147    147   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  148    148   
    fn serialize_members(
  149    149   
        &self,
  150    150   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  151    151   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  152    152   
        if let Some(ref val) = self.name {
  153    153   
            ser.write_string(&PUTDELIVERYSOURCEINPUT_MEMBER_NAME, val)?;
  154    154   
        }
  155    155   
        if let Some(ref val) = self.resource_arn {
  156    156   
            ser.write_string(&PUTDELIVERYSOURCEINPUT_MEMBER_RESOURCE_ARN, val)?;
  157    157   
        }
  158    158   
        if let Some(ref val) = self.log_type {
  159    159   
            ser.write_string(&PUTDELIVERYSOURCEINPUT_MEMBER_LOG_TYPE, val)?;
  160    160   
        }
  161    161   
        if let Some(ref val) = self.tags {
  162    162   
            ser.write_map(
  163    163   
                &PUTDELIVERYSOURCEINPUT_MEMBER_TAGS,
  164    164   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  165    165   
                    for (key, value) in val {
  166    166   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  167    167   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
  168    168   
                    }
  169    169   
                    Ok(())
  170    170   
                },
  171    171   
            )?;
  172    172   
        }
  173    173   
        Ok(())
  174    174   
    }
  175    175   
}
  176    176   
impl PutDeliverySourceInput {
  177    177   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  178         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  179         -
        deserializer: &mut D,
         178  +
    pub fn deserialize(
         179  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  180    180   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  181    181   
        #[allow(unused_variables, unused_mut)]
  182    182   
        let mut builder = Self::builder();
  183    183   
        #[allow(
  184    184   
            unused_variables,
  185    185   
            unreachable_code,
  186    186   
            clippy::single_match,
  187    187   
            clippy::match_single_binding,
  188    188   
            clippy::diverging_sub_expression
  189    189   
        )]
  190         -
        deserializer.read_struct(&PUTDELIVERYSOURCEINPUT_SCHEMA, (), |_, member, deser| {
         190  +
        deserializer.read_struct(&PUTDELIVERYSOURCEINPUT_SCHEMA, &mut |member, deser| {
  191    191   
            match member.member_index() {
  192    192   
                Some(0) => {
  193    193   
                    builder.name = Some(deser.read_string(member)?);
  194    194   
                }
  195    195   
                Some(1) => {
  196    196   
                    builder.resource_arn = Some(deser.read_string(member)?);
  197    197   
                }
  198    198   
                Some(2) => {
  199    199   
                    builder.log_type = Some(deser.read_string(member)?);
  200    200   
                }
  201    201   
                Some(3) => {
  202         -
                    builder.tags = Some({
  203         -
                        let container = if let Some(cap) = deser.container_size() {
  204         -
                            std::collections::HashMap::with_capacity(cap)
  205         -
                        } else {
  206         -
                            std::collections::HashMap::new()
  207         -
                        };
  208         -
                        deser.read_map(member, container, |mut map, key, deser| {
  209         -
                            map.insert(key, deser.read_string(member)?);
  210         -
                            Ok(map)
  211         -
                        })?
  212         -
                    });
         202  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
  213    203   
                }
  214    204   
                _ => {}
  215    205   
            }
  216    206   
            Ok(())
  217    207   
        })?;
         208  +
        builder.name = builder.name.or(Some(String::new()));
         209  +
        builder.resource_arn = builder.resource_arn.or(Some(String::new()));
         210  +
        builder.log_type = builder.log_type.or(Some(String::new()));
  218    211   
        builder
  219    212   
            .build()
  220    213   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  221    214   
    }
  222    215   
}
         216  +
impl PutDeliverySourceInput {
         217  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         218  +
    pub fn deserialize_with_response(
         219  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         220  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         221  +
        _status: u16,
         222  +
        _body: &[u8],
         223  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         224  +
        Self::deserialize(deserializer)
         225  +
    }
         226  +
}
  223    227   
impl PutDeliverySourceInput {
  224    228   
    /// Creates a new builder-style object to manufacture [`PutDeliverySourceInput`](crate::operation::put_delivery_source::PutDeliverySourceInput).
  225    229   
    pub fn builder() -> crate::operation::put_delivery_source::builders::PutDeliverySourceInputBuilder {
  226    230   
        crate::operation::put_delivery_source::builders::PutDeliverySourceInputBuilder::default()
  227    231   
    }
  228    232   
}
  229    233   
  230    234   
/// A builder for [`PutDeliverySourceInput`](crate::operation::put_delivery_source::PutDeliverySourceInput).
  231    235   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  232    236   
#[non_exhaustive]