AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

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

@@ -43,43 +133,133 @@
   63     63   
    "service",
   64     64   
    0,
   65     65   
);
   66     66   
static DESCRIBECONFIGURATIONTEMPLATESINPUT_MEMBER_LOG_TYPES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   67     67   
    ::aws_smithy_schema::ShapeId::from_static(
   68     68   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeConfigurationTemplatesInput$logTypes",
   69     69   
        "com.amazonaws.cloudwatchlogs.synthetic",
   70     70   
        "DescribeConfigurationTemplatesInput",
   71     71   
    ),
   72     72   
    ::aws_smithy_schema::ShapeType::List,
   73         -
    "log_types",
          73  +
    "logTypes",
   74     74   
    1,
   75     75   
);
   76     76   
static DESCRIBECONFIGURATIONTEMPLATESINPUT_MEMBER_RESOURCE_TYPES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   77     77   
    ::aws_smithy_schema::ShapeId::from_static(
   78     78   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeConfigurationTemplatesInput$resourceTypes",
   79     79   
        "com.amazonaws.cloudwatchlogs.synthetic",
   80     80   
        "DescribeConfigurationTemplatesInput",
   81     81   
    ),
   82     82   
    ::aws_smithy_schema::ShapeType::List,
   83         -
    "resource_types",
          83  +
    "resourceTypes",
   84     84   
    2,
   85     85   
);
   86     86   
static DESCRIBECONFIGURATIONTEMPLATESINPUT_MEMBER_DELIVERY_DESTINATION_TYPES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   87     87   
    ::aws_smithy_schema::ShapeId::from_static(
   88     88   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeConfigurationTemplatesInput$deliveryDestinationTypes",
   89     89   
        "com.amazonaws.cloudwatchlogs.synthetic",
   90     90   
        "DescribeConfigurationTemplatesInput",
   91     91   
    ),
   92     92   
    ::aws_smithy_schema::ShapeType::List,
   93         -
    "delivery_destination_types",
          93  +
    "deliveryDestinationTypes",
   94     94   
    3,
   95     95   
);
   96     96   
static DESCRIBECONFIGURATIONTEMPLATESINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   97     97   
    ::aws_smithy_schema::ShapeId::from_static(
   98     98   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeConfigurationTemplatesInput$nextToken",
   99     99   
        "com.amazonaws.cloudwatchlogs.synthetic",
  100    100   
        "DescribeConfigurationTemplatesInput",
  101    101   
    ),
  102    102   
    ::aws_smithy_schema::ShapeType::String,
  103         -
    "next_token",
         103  +
    "nextToken",
  104    104   
    4,
  105    105   
);
  106    106   
static DESCRIBECONFIGURATIONTEMPLATESINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  107    107   
    ::aws_smithy_schema::ShapeId::from_static(
  108    108   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeConfigurationTemplatesInput$limit",
  109    109   
        "com.amazonaws.cloudwatchlogs.synthetic",
  110    110   
        "DescribeConfigurationTemplatesInput",
  111    111   
    ),
  112    112   
    ::aws_smithy_schema::ShapeType::Integer,
  113    113   
    "limit",
@@ -155,155 +285,273 @@
  175    175   
            ser.write_string(&DESCRIBECONFIGURATIONTEMPLATESINPUT_MEMBER_NEXT_TOKEN, val)?;
  176    176   
        }
  177    177   
        if let Some(ref val) = self.limit {
  178    178   
            ser.write_integer(&DESCRIBECONFIGURATIONTEMPLATESINPUT_MEMBER_LIMIT, *val)?;
  179    179   
        }
  180    180   
        Ok(())
  181    181   
    }
  182    182   
}
  183    183   
impl DescribeConfigurationTemplatesInput {
  184    184   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  185         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  186         -
        deserializer: &mut D,
         185  +
    pub fn deserialize(
         186  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  187    187   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  188    188   
        #[allow(unused_variables, unused_mut)]
  189    189   
        let mut builder = Self::builder();
  190    190   
        #[allow(
  191    191   
            unused_variables,
  192    192   
            unreachable_code,
  193    193   
            clippy::single_match,
  194    194   
            clippy::match_single_binding,
  195    195   
            clippy::diverging_sub_expression
  196    196   
        )]
  197         -
        deserializer.read_struct(&DESCRIBECONFIGURATIONTEMPLATESINPUT_SCHEMA, (), |_, member, deser| {
         197  +
        deserializer.read_struct(&DESCRIBECONFIGURATIONTEMPLATESINPUT_SCHEMA, &mut |member, deser| {
  198    198   
            match member.member_index() {
  199    199   
                Some(0) => {
  200    200   
                    builder.service = Some(deser.read_string(member)?);
  201    201   
                }
  202    202   
                Some(1) => {
  203         -
                    builder.log_types = Some({
  204         -
                        let container = if let Some(cap) = deser.container_size() {
  205         -
                            Vec::with_capacity(cap)
  206         -
                        } else {
  207         -
                            Vec::new()
  208         -
                        };
  209         -
                        deser.read_list(member, container, |mut list, deser| {
  210         -
                            list.push(deser.read_string(member)?);
  211         -
                            Ok(list)
  212         -
                        })?
  213         -
                    });
         203  +
                    builder.log_types = Some(deser.read_string_list(member)?);
  214    204   
                }
  215    205   
                Some(2) => {
  216         -
                    builder.resource_types = Some({
  217         -
                        let container = if let Some(cap) = deser.container_size() {
  218         -
                            Vec::with_capacity(cap)
  219         -
                        } else {
  220         -
                            Vec::new()
  221         -
                        };
  222         -
                        deser.read_list(member, container, |mut list, deser| {
  223         -
                            list.push(deser.read_string(member)?);
  224         -
                            Ok(list)
  225         -
                        })?
  226         -
                    });
         206  +
                    builder.resource_types = Some(deser.read_string_list(member)?);
  227    207   
                }
  228    208   
                Some(3) => {
  229    209   
                    builder.delivery_destination_types = Some({
  230         -
                        let container = if let Some(cap) = deser.container_size() {
  231         -
                            Vec::with_capacity(cap)
  232         -
                        } else {
  233         -
                            Vec::new()
  234         -
                        };
  235         -
                        deser.read_list(member, container, |mut list, deser| {
  236         -
                            list.push(crate::types::DeliveryDestinationType::from(deser.read_string(member)?.as_str()));
  237         -
                            Ok(list)
  238         -
                        })?
         210  +
                        let mut container = Vec::new();
         211  +
                        deser.read_list(member, &mut |deser| {
         212  +
                            container.push(crate::types::DeliveryDestinationType::from(deser.read_string(member)?.as_str()));
         213  +
                            Ok(())
         214  +
                        })?;
         215  +
                        container
  239    216   
                    });
  240    217   
                }
  241    218   
                Some(4) => {
  242    219   
                    builder.next_token = Some(deser.read_string(member)?);
  243    220   
                }
  244    221   
                Some(5) => {
  245    222   
                    builder.limit = Some(deser.read_integer(member)?);
  246    223   
                }
  247    224   
                _ => {}
  248    225   
            }
  249    226   
            Ok(())
  250    227   
        })?;
  251    228   
        builder
  252    229   
            .build()
  253    230   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  254    231   
    }
  255    232   
}
         233  +
impl DescribeConfigurationTemplatesInput {
         234  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         235  +
    pub fn deserialize_with_response(
         236  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         237  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         238  +
        _status: u16,
         239  +
        _body: &[u8],
         240  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         241  +
        Self::deserialize(deserializer)
         242  +
    }
         243  +
}
  256    244   
impl DescribeConfigurationTemplatesInput {
  257    245   
    /// Creates a new builder-style object to manufacture [`DescribeConfigurationTemplatesInput`](crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesInput).
  258    246   
    pub fn builder() -> crate::operation::describe_configuration_templates::builders::DescribeConfigurationTemplatesInputBuilder {
  259    247   
        crate::operation::describe_configuration_templates::builders::DescribeConfigurationTemplatesInputBuilder::default()
  260    248   
    }
  261    249   
}
  262    250   
  263    251   
/// A builder for [`DescribeConfigurationTemplatesInput`](crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesInput).
  264    252   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  265    253   
#[non_exhaustive]

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

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

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

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/describe_delivery_destinations.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 `DescribeDeliveryDestinations`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeDeliveryDestinations;
    6      6   
impl DescribeDeliveryDestinations {
    7      7   
    /// Creates a new `DescribeDeliveryDestinations`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -124,130 +253,370 @@
  144    150   
                crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError,
  145    151   
            >::new());
  146    152   
  147    153   
        ::std::borrow::Cow::Owned(rcb)
  148    154   
    }
  149    155   
}
  150    156   
  151    157   
#[derive(Debug)]
  152    158   
struct DescribeDeliveryDestinationsResponseDeserializer;
  153    159   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeDeliveryDestinationsResponseDeserializer {
  154         -
    fn deserialize_nonstreaming(
         160  +
    fn deserialize_nonstreaming_with_config(
  155    161   
        &self,
  156    162   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         163  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    164   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    165   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  159         -
        let headers = response.headers();
  160         -
        let body = response.body().bytes().expect("body loaded");
  161    166   
        #[allow(unused_mut)]
  162    167   
        let mut force_error = false;
  163    168   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_describe_delivery_destinations::de_describe_delivery_destinations_http_error(status, headers, body)
         169  +
        if !success && status != 200 || force_error {
         170  +
            let headers = response.headers();
         171  +
            let body = response.body().bytes().expect("body loaded");
         172  +
            #[allow(unused_mut)]
         173  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         174  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         175  +
            })?;
         176  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         177  +
            let generic = generic_builder.build();
         178  +
            let error_code = match generic.code() {
         179  +
                ::std::option::Option::Some(code) => code,
         180  +
                ::std::option::Option::None => {
         181  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         182  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         183  +
                            crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::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  +
                "ServiceQuotaExceededException" => {
         194  +
                    crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::ServiceQuotaExceededException({
         195  +
                        let mut tmp = match protocol
         196  +
                            .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         197  +
                            .and_then(|mut deser| {
         198  +
                                crate::types::error::ServiceQuotaExceededException::deserialize_with_response(
         199  +
                                    &mut *deser,
         200  +
                                    response.headers(),
         201  +
                                    response.status().into(),
         202  +
                                    body,
         203  +
                                )
         204  +
                            }) {
         205  +
                            ::std::result::Result::Ok(val) => val,
         206  +
                            ::std::result::Result::Err(e) => {
         207  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         208  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         209  +
                                ))
         210  +
                            }
         211  +
                        };
         212  +
                        tmp.meta = generic;
         213  +
                        if tmp.message.is_none() {
         214  +
                            tmp.message = _error_message;
         215  +
                        }
         216  +
                        tmp
         217  +
                    })
         218  +
                }
         219  +
                "ServiceUnavailableException" => {
         220  +
                    crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::ServiceUnavailableException({
         221  +
                        let mut tmp = match protocol
         222  +
                            .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         223  +
                            .and_then(|mut deser| {
         224  +
                                crate::types::error::ServiceUnavailableException::deserialize_with_response(
         225  +
                                    &mut *deser,
         226  +
                                    response.headers(),
         227  +
                                    response.status().into(),
         228  +
                                    body,
         229  +
                                )
         230  +
                            }) {
         231  +
                            ::std::result::Result::Ok(val) => val,
         232  +
                            ::std::result::Result::Err(e) => {
         233  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         234  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         235  +
                                ))
         236  +
                            }
         237  +
                        };
         238  +
                        tmp.meta = generic;
         239  +
                        if tmp.message.is_none() {
         240  +
                            tmp.message = _error_message;
         241  +
                        }
         242  +
                        tmp
         243  +
                    })
         244  +
                }
         245  +
                "ThrottlingException" => crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::ThrottlingException({
         246  +
                    let mut tmp = match protocol
         247  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         248  +
                        .and_then(|mut deser| {
         249  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         250  +
                                &mut *deser,
         251  +
                                response.headers(),
         252  +
                                response.status().into(),
         253  +
                                body,
         254  +
                            )
         255  +
                        }) {
         256  +
                        ::std::result::Result::Ok(val) => val,
         257  +
                        ::std::result::Result::Err(e) => {
         258  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         259  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         260  +
                            ))
         261  +
                        }
         262  +
                    };
         263  +
                    tmp.meta = generic;
         264  +
                    if tmp.message.is_none() {
         265  +
                        tmp.message = _error_message;
         266  +
                    }
         267  +
                    tmp
         268  +
                }),
         269  +
                "ValidationException" => crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsError::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::describe_delivery_destinations::DescribeDeliveryDestinationsError::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_describe_delivery_destinations::de_describe_delivery_destinations_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, DescribeDeliveryDestinations::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::describe_delivery_destinations::DescribeDeliveryDestinationsOutput::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 DescribeDeliveryDestinationsRequestSerializer;
  174    323   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeDeliveryDestinationsRequestSerializer {
  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::describe_delivery_destinations::DescribeDeliveryDestinationsInput>()
  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::describe_delivery_destinations::DescribeDeliveryDestinationsInput,
  192         -
                output: &mut ::std::string::String,
  193         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  194         -
                use ::std::fmt::Write as _;
  195         -
                ::std::write!(output, "/").expect("formatting should succeed");
  196         -
                ::std::result::Result::Ok(())
  197         -
            }
  198         -
            #[allow(clippy::unnecessary_wraps)]
  199         -
            fn update_http_builder(
  200         -
                input: &crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsInput,
  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.DescribeDeliveryDestinations",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  217         -
            crate::protocol_serde::shape_describe_delivery_destinations::ser_describe_delivery_destinations_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, DescribeDeliveryDestinations::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 DescribeDeliveryDestinationsEndpointParamsInterceptor;
  228    345   
  229    346   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeDeliveryDestinationsEndpointParamsInterceptor {
  230    347   
    fn name(&self) -> &'static str {
  231    348   
        "DescribeDeliveryDestinationsEndpointParamsInterceptor"
  232    349   
    }
  233    350   

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

@@ -3,3 +133,144 @@
   23     23   
    "com.amazonaws.cloudwatchlogs.synthetic",
   24     24   
    "DescribeDeliveryDestinationsInput",
   25     25   
);
   26     26   
static DESCRIBEDELIVERYDESTINATIONSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   27     27   
    ::aws_smithy_schema::ShapeId::from_static(
   28     28   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeDeliveryDestinationsInput$nextToken",
   29     29   
        "com.amazonaws.cloudwatchlogs.synthetic",
   30     30   
        "DescribeDeliveryDestinationsInput",
   31     31   
    ),
   32     32   
    ::aws_smithy_schema::ShapeType::String,
   33         -
    "next_token",
          33  +
    "nextToken",
   34     34   
    0,
   35     35   
);
   36     36   
static DESCRIBEDELIVERYDESTINATIONSINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   37     37   
    ::aws_smithy_schema::ShapeId::from_static(
   38     38   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeDeliveryDestinationsInput$limit",
   39     39   
        "com.amazonaws.cloudwatchlogs.synthetic",
   40     40   
        "DescribeDeliveryDestinationsInput",
   41     41   
    ),
   42     42   
    ::aws_smithy_schema::ShapeType::Integer,
   43     43   
    "limit",
   44     44   
    1,
   45     45   
);
   46     46   
static DESCRIBEDELIVERYDESTINATIONSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   47     47   
    DESCRIBEDELIVERYDESTINATIONSINPUT_SCHEMA_ID,
   48     48   
    ::aws_smithy_schema::ShapeType::Structure,
   49     49   
    &[
   50     50   
        &DESCRIBEDELIVERYDESTINATIONSINPUT_MEMBER_NEXT_TOKEN,
   51     51   
        &DESCRIBEDELIVERYDESTINATIONSINPUT_MEMBER_LIMIT,
   52     52   
    ],
   53     53   
);
   54     54   
impl DescribeDeliveryDestinationsInput {
   55     55   
    /// The schema for this shape.
   56     56   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEDELIVERYDESTINATIONSINPUT_SCHEMA;
   57     57   
}
   58     58   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeDeliveryDestinationsInput {
   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.next_token {
   65     65   
            ser.write_string(&DESCRIBEDELIVERYDESTINATIONSINPUT_MEMBER_NEXT_TOKEN, val)?;
   66     66   
        }
   67     67   
        if let Some(ref val) = self.limit {
   68     68   
            ser.write_integer(&DESCRIBEDELIVERYDESTINATIONSINPUT_MEMBER_LIMIT, *val)?;
   69     69   
        }
   70     70   
        Ok(())
   71     71   
    }
   72     72   
}
   73     73   
impl DescribeDeliveryDestinationsInput {
   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(&DESCRIBEDELIVERYDESTINATIONSINPUT_SCHEMA, (), |_, member, deser| {
          87  +
        deserializer.read_struct(&DESCRIBEDELIVERYDESTINATIONSINPUT_SCHEMA, &mut |member, deser| {
   88     88   
            match member.member_index() {
   89     89   
                Some(0) => {
   90     90   
                    builder.next_token = Some(deser.read_string(member)?);
   91     91   
                }
   92     92   
                Some(1) => {
   93     93   
                    builder.limit = Some(deser.read_integer(member)?);
   94     94   
                }
   95     95   
                _ => {}
   96     96   
            }
   97     97   
            Ok(())
   98     98   
        })?;
   99     99   
        builder
  100    100   
            .build()
  101    101   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  102    102   
    }
  103    103   
}
         104  +
impl DescribeDeliveryDestinationsInput {
         105  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         106  +
    pub fn deserialize_with_response(
         107  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         108  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         109  +
        _status: u16,
         110  +
        _body: &[u8],
         111  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         112  +
        Self::deserialize(deserializer)
         113  +
    }
         114  +
}
  104    115   
impl DescribeDeliveryDestinationsInput {
  105    116   
    /// Creates a new builder-style object to manufacture [`DescribeDeliveryDestinationsInput`](crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsInput).
  106    117   
    pub fn builder() -> crate::operation::describe_delivery_destinations::builders::DescribeDeliveryDestinationsInputBuilder {
  107    118   
        crate::operation::describe_delivery_destinations::builders::DescribeDeliveryDestinationsInputBuilder::default()
  108    119   
    }
  109    120   
}
  110    121   
  111    122   
/// A builder for [`DescribeDeliveryDestinationsInput`](crate::operation::describe_delivery_destinations::DescribeDeliveryDestinationsInput).
  112    123   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  113    124   
#[non_exhaustive]

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

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

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

@@ -1,1 +40,45 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `DescribeDeliverySources`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeDeliverySources;
    6      6   
impl DescribeDeliverySources {
    7      7   
    /// Creates a new `DescribeDeliverySources`
    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::describe_delivery_sources::DescribeDeliverySourcesInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          15  +
        crate::operation::describe_delivery_sources::DescribeDeliverySourcesOutput::SCHEMA;
   11     16   
    pub(crate) async fn orchestrate(
   12     17   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     18   
        input: crate::operation::describe_delivery_sources::DescribeDeliverySourcesInput,
   14     19   
    ) -> ::std::result::Result<
   15     20   
        crate::operation::describe_delivery_sources::DescribeDeliverySourcesOutput,
   16     21   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     22   
            crate::operation::describe_delivery_sources::DescribeDeliverySourcesError,
   18     23   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     24   
        >,
   20     25   
    > {
@@ -124,129 +253,369 @@
  144    149   
                crate::operation::describe_delivery_sources::DescribeDeliverySourcesError,
  145    150   
            >::new());
  146    151   
  147    152   
        ::std::borrow::Cow::Owned(rcb)
  148    153   
    }
  149    154   
}
  150    155   
  151    156   
#[derive(Debug)]
  152    157   
struct DescribeDeliverySourcesResponseDeserializer;
  153    158   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeDeliverySourcesResponseDeserializer {
  154         -
    fn deserialize_nonstreaming(
         159  +
    fn deserialize_nonstreaming_with_config(
  155    160   
        &self,
  156    161   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         162  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    163   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    164   
        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    165   
        #[allow(unused_mut)]
  162    166   
        let mut force_error = false;
  163    167   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_describe_delivery_sources::de_describe_delivery_sources_http_error(status, headers, body)
         168  +
        if !success && status != 200 || force_error {
         169  +
            let headers = response.headers();
         170  +
            let body = response.body().bytes().expect("body loaded");
         171  +
            #[allow(unused_mut)]
         172  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         173  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         174  +
            })?;
         175  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         176  +
            let generic = generic_builder.build();
         177  +
            let error_code = match generic.code() {
         178  +
                ::std::option::Option::Some(code) => code,
         179  +
                ::std::option::Option::None => {
         180  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         181  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         182  +
                            crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::unhandled(generic),
         183  +
                        ),
         184  +
                    ))
         185  +
                }
         186  +
            };
         187  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         188  +
            let protocol = _cfg
         189  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         190  +
                .expect("a SharedClientProtocol is required");
         191  +
            let err = match error_code {
         192  +
                "ServiceQuotaExceededException" => {
         193  +
                    crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::ServiceQuotaExceededException({
         194  +
                        let mut tmp = match protocol
         195  +
                            .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         196  +
                            .and_then(|mut deser| {
         197  +
                                crate::types::error::ServiceQuotaExceededException::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  +
                }
         218  +
                "ServiceUnavailableException" => {
         219  +
                    crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::ServiceUnavailableException({
         220  +
                        let mut tmp = match protocol
         221  +
                            .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         222  +
                            .and_then(|mut deser| {
         223  +
                                crate::types::error::ServiceUnavailableException::deserialize_with_response(
         224  +
                                    &mut *deser,
         225  +
                                    response.headers(),
         226  +
                                    response.status().into(),
         227  +
                                    body,
         228  +
                                )
         229  +
                            }) {
         230  +
                            ::std::result::Result::Ok(val) => val,
         231  +
                            ::std::result::Result::Err(e) => {
         232  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         233  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         234  +
                                ))
         235  +
                            }
         236  +
                        };
         237  +
                        tmp.meta = generic;
         238  +
                        if tmp.message.is_none() {
         239  +
                            tmp.message = _error_message;
         240  +
                        }
         241  +
                        tmp
         242  +
                    })
         243  +
                }
         244  +
                "ThrottlingException" => crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::ThrottlingException({
         245  +
                    let mut tmp = match protocol
         246  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         247  +
                        .and_then(|mut deser| {
         248  +
                            crate::types::error::ThrottlingException::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  +
                "ValidationException" => crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::ValidationException({
         269  +
                    let mut tmp = match protocol
         270  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         271  +
                        .and_then(|mut deser| {
         272  +
                            crate::types::error::ValidationException::deserialize_with_response(
         273  +
                                &mut *deser,
         274  +
                                response.headers(),
         275  +
                                response.status().into(),
         276  +
                                body,
         277  +
                            )
         278  +
                        }) {
         279  +
                        ::std::result::Result::Ok(val) => val,
         280  +
                        ::std::result::Result::Err(e) => {
         281  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         282  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         283  +
                            ))
         284  +
                        }
         285  +
                    };
         286  +
                    tmp.meta = generic;
         287  +
                    if tmp.message.is_none() {
         288  +
                        tmp.message = _error_message;
         289  +
                    }
         290  +
                    tmp
         291  +
                }),
         292  +
                _ => crate::operation::describe_delivery_sources::DescribeDeliverySourcesError::generic(generic),
         293  +
            };
         294  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         295  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         296  +
            ))
  166    297   
        } else {
  167         -
            crate::protocol_serde::shape_describe_delivery_sources::de_describe_delivery_sources_http_response(status, headers, body)
  168         -
        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         298  +
            let protocol = _cfg
         299  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         300  +
                .expect("a SharedClientProtocol is required");
         301  +
            let mut deser = protocol
         302  +
                .deserialize_response(response, DescribeDeliverySources::OUTPUT_SCHEMA, _cfg)
         303  +
                .map_err(|e| {
         304  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         305  +
                })?;
         306  +
            let body = response.body().bytes().expect("body loaded");
         307  +
            let output = crate::operation::describe_delivery_sources::DescribeDeliverySourcesOutput::deserialize_with_response(
         308  +
                &mut *deser,
         309  +
                response.headers(),
         310  +
                response.status().into(),
         311  +
                body,
         312  +
            )
         313  +
            .map_err(|e| {
         314  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         315  +
            })?;
         316  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         317  +
        }
  170    318   
    }
  171    319   
}
  172    320   
#[derive(Debug)]
  173    321   
struct DescribeDeliverySourcesRequestSerializer;
  174    322   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeDeliverySourcesRequestSerializer {
  175    323   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    324   
    fn serialize_input(
  177    325   
        &self,
  178    326   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    327   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    328   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    329   
        let input = input
  182    330   
            .downcast::<crate::operation::describe_delivery_sources::DescribeDeliverySourcesInput>()
  183    331   
            .expect("correct type");
  184         -
        let _header_serialization_settings = _cfg
  185         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  186         -
            .cloned()
  187         -
            .unwrap_or_default();
  188         -
        let mut request_builder = {
  189         -
            #[allow(clippy::uninlined_format_args)]
  190         -
            fn uri_base(
  191         -
                _input: &crate::operation::describe_delivery_sources::DescribeDeliverySourcesInput,
  192         -
                output: &mut ::std::string::String,
  193         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  194         -
                use ::std::fmt::Write as _;
  195         -
                ::std::write!(output, "/").expect("formatting should succeed");
  196         -
                ::std::result::Result::Ok(())
  197         -
            }
  198         -
            #[allow(clippy::unnecessary_wraps)]
  199         -
            fn update_http_builder(
  200         -
                input: &crate::operation::describe_delivery_sources::DescribeDeliverySourcesInput,
  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.DescribeDeliverySources",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  217         -
            crate::protocol_serde::shape_describe_delivery_sources::ser_describe_delivery_sources_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())
         332  +
        let protocol = _cfg
         333  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         334  +
            .expect("a SharedClientProtocol is required");
         335  +
        let mut request = protocol
         336  +
            .serialize_request(&input, DescribeDeliverySources::INPUT_SCHEMA, "", _cfg)
         337  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         338  +
         339  +
        return ::std::result::Result::Ok(request);
  224    340   
    }
  225    341   
}
  226    342   
#[derive(Debug)]
  227    343   
struct DescribeDeliverySourcesEndpointParamsInterceptor;
  228    344   
  229    345   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeDeliverySourcesEndpointParamsInterceptor {
  230    346   
    fn name(&self) -> &'static str {
  231    347   
        "DescribeDeliverySourcesEndpointParamsInterceptor"
  232    348   
    }
  233    349   

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

@@ -3,3 +133,144 @@
   23     23   
    "com.amazonaws.cloudwatchlogs.synthetic",
   24     24   
    "DescribeDeliverySourcesInput",
   25     25   
);
   26     26   
static DESCRIBEDELIVERYSOURCESINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   27     27   
    ::aws_smithy_schema::ShapeId::from_static(
   28     28   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeDeliverySourcesInput$nextToken",
   29     29   
        "com.amazonaws.cloudwatchlogs.synthetic",
   30     30   
        "DescribeDeliverySourcesInput",
   31     31   
    ),
   32     32   
    ::aws_smithy_schema::ShapeType::String,
   33         -
    "next_token",
          33  +
    "nextToken",
   34     34   
    0,
   35     35   
);
   36     36   
static DESCRIBEDELIVERYSOURCESINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   37     37   
    ::aws_smithy_schema::ShapeId::from_static(
   38     38   
        "com.amazonaws.cloudwatchlogs.synthetic#DescribeDeliverySourcesInput$limit",
   39     39   
        "com.amazonaws.cloudwatchlogs.synthetic",
   40     40   
        "DescribeDeliverySourcesInput",
   41     41   
    ),
   42     42   
    ::aws_smithy_schema::ShapeType::Integer,
   43     43   
    "limit",
   44     44   
    1,
   45     45   
);
   46     46   
static DESCRIBEDELIVERYSOURCESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   47     47   
    DESCRIBEDELIVERYSOURCESINPUT_SCHEMA_ID,
   48     48   
    ::aws_smithy_schema::ShapeType::Structure,
   49     49   
    &[
   50     50   
        &DESCRIBEDELIVERYSOURCESINPUT_MEMBER_NEXT_TOKEN,
   51     51   
        &DESCRIBEDELIVERYSOURCESINPUT_MEMBER_LIMIT,
   52     52   
    ],
   53     53   
);
   54     54   
impl DescribeDeliverySourcesInput {
   55     55   
    /// The schema for this shape.
   56     56   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEDELIVERYSOURCESINPUT_SCHEMA;
   57     57   
}
   58     58   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeDeliverySourcesInput {
   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.next_token {
   65     65   
            ser.write_string(&DESCRIBEDELIVERYSOURCESINPUT_MEMBER_NEXT_TOKEN, val)?;
   66     66   
        }
   67     67   
        if let Some(ref val) = self.limit {
   68     68   
            ser.write_integer(&DESCRIBEDELIVERYSOURCESINPUT_MEMBER_LIMIT, *val)?;
   69     69   
        }
   70     70   
        Ok(())
   71     71   
    }
   72     72   
}
   73     73   
impl DescribeDeliverySourcesInput {
   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(&DESCRIBEDELIVERYSOURCESINPUT_SCHEMA, (), |_, member, deser| {
          87  +
        deserializer.read_struct(&DESCRIBEDELIVERYSOURCESINPUT_SCHEMA, &mut |member, deser| {
   88     88   
            match member.member_index() {
   89     89   
                Some(0) => {
   90     90   
                    builder.next_token = Some(deser.read_string(member)?);
   91     91   
                }
   92     92   
                Some(1) => {
   93     93   
                    builder.limit = Some(deser.read_integer(member)?);
   94     94   
                }
   95     95   
                _ => {}
   96     96   
            }
   97     97   
            Ok(())
   98     98   
        })?;
   99     99   
        builder
  100    100   
            .build()
  101    101   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  102    102   
    }
  103    103   
}
         104  +
impl DescribeDeliverySourcesInput {
         105  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         106  +
    pub fn deserialize_with_response(
         107  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         108  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         109  +
        _status: u16,
         110  +
        _body: &[u8],
         111  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         112  +
        Self::deserialize(deserializer)
         113  +
    }
         114  +
}
  104    115   
impl DescribeDeliverySourcesInput {
  105    116   
    /// Creates a new builder-style object to manufacture [`DescribeDeliverySourcesInput`](crate::operation::describe_delivery_sources::DescribeDeliverySourcesInput).
  106    117   
    pub fn builder() -> crate::operation::describe_delivery_sources::builders::DescribeDeliverySourcesInputBuilder {
  107    118   
        crate::operation::describe_delivery_sources::builders::DescribeDeliverySourcesInputBuilder::default()
  108    119   
    }
  109    120   
}
  110    121   
  111    122   
/// A builder for [`DescribeDeliverySourcesInput`](crate::operation::describe_delivery_sources::DescribeDeliverySourcesInput).
  112    123   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  113    124   
#[non_exhaustive]

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

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