AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/put_configuration_recorder/_put_configuration_recorder_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/put_configuration_recorder/_put_configuration_recorder_output.rs

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

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

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/put_conformance_pack/_put_conformance_pack_input.rs

@@ -51,51 +284,293 @@
   71     71   
    "com.amazonaws.configservice.synthetic",
   72     72   
    "PutConformancePackInput",
   73     73   
);
   74     74   
static PUTCONFORMANCEPACKINPUT_MEMBER_CONFORMANCE_PACK_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   75     75   
    ::aws_smithy_schema::ShapeId::from_static(
   76     76   
        "com.amazonaws.configservice.synthetic#PutConformancePackInput$ConformancePackName",
   77     77   
        "com.amazonaws.configservice.synthetic",
   78     78   
        "PutConformancePackInput",
   79     79   
    ),
   80     80   
    ::aws_smithy_schema::ShapeType::String,
   81         -
    "conformance_pack_name",
          81  +
    "ConformancePackName",
   82     82   
    0,
   83     83   
);
   84     84   
static PUTCONFORMANCEPACKINPUT_MEMBER_TEMPLATE_S3_URI: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   85     85   
    ::aws_smithy_schema::ShapeId::from_static(
   86     86   
        "com.amazonaws.configservice.synthetic#PutConformancePackInput$TemplateS3Uri",
   87     87   
        "com.amazonaws.configservice.synthetic",
   88     88   
        "PutConformancePackInput",
   89     89   
    ),
   90     90   
    ::aws_smithy_schema::ShapeType::String,
   91         -
    "template_s3_uri",
          91  +
    "TemplateS3Uri",
   92     92   
    1,
   93     93   
);
   94     94   
static PUTCONFORMANCEPACKINPUT_MEMBER_TEMPLATE_BODY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   95     95   
    ::aws_smithy_schema::ShapeId::from_static(
   96     96   
        "com.amazonaws.configservice.synthetic#PutConformancePackInput$TemplateBody",
   97     97   
        "com.amazonaws.configservice.synthetic",
   98     98   
        "PutConformancePackInput",
   99     99   
    ),
  100    100   
    ::aws_smithy_schema::ShapeType::String,
  101         -
    "template_body",
         101  +
    "TemplateBody",
  102    102   
    2,
  103    103   
);
  104    104   
static PUTCONFORMANCEPACKINPUT_MEMBER_DELIVERY_S3_BUCKET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  105    105   
    ::aws_smithy_schema::ShapeId::from_static(
  106    106   
        "com.amazonaws.configservice.synthetic#PutConformancePackInput$DeliveryS3Bucket",
  107    107   
        "com.amazonaws.configservice.synthetic",
  108    108   
        "PutConformancePackInput",
  109    109   
    ),
  110    110   
    ::aws_smithy_schema::ShapeType::String,
  111         -
    "delivery_s3_bucket",
         111  +
    "DeliveryS3Bucket",
  112    112   
    3,
  113    113   
);
  114    114   
static PUTCONFORMANCEPACKINPUT_MEMBER_DELIVERY_S3_KEY_PREFIX: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  115    115   
    ::aws_smithy_schema::ShapeId::from_static(
  116    116   
        "com.amazonaws.configservice.synthetic#PutConformancePackInput$DeliveryS3KeyPrefix",
  117    117   
        "com.amazonaws.configservice.synthetic",
  118    118   
        "PutConformancePackInput",
  119    119   
    ),
  120    120   
    ::aws_smithy_schema::ShapeType::String,
  121         -
    "delivery_s3_key_prefix",
         121  +
    "DeliveryS3KeyPrefix",
  122    122   
    4,
  123    123   
);
  124    124   
static PUTCONFORMANCEPACKINPUT_MEMBER_CONFORMANCE_PACK_INPUT_PARAMETERS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  125    125   
    ::aws_smithy_schema::ShapeId::from_static(
  126    126   
        "com.amazonaws.configservice.synthetic#PutConformancePackInput$ConformancePackInputParameters",
  127    127   
        "com.amazonaws.configservice.synthetic",
  128    128   
        "PutConformancePackInput",
  129    129   
    ),
  130    130   
    ::aws_smithy_schema::ShapeType::List,
  131         -
    "conformance_pack_input_parameters",
         131  +
    "ConformancePackInputParameters",
  132    132   
    5,
  133    133   
);
  134    134   
static PUTCONFORMANCEPACKINPUT_MEMBER_TEMPLATE_SSM_DOCUMENT_DETAILS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  135    135   
    ::aws_smithy_schema::ShapeId::from_static(
  136    136   
        "com.amazonaws.configservice.synthetic#PutConformancePackInput$TemplateSSMDocumentDetails",
  137    137   
        "com.amazonaws.configservice.synthetic",
  138    138   
        "PutConformancePackInput",
  139    139   
    ),
  140    140   
    ::aws_smithy_schema::ShapeType::Structure,
  141         -
    "template_ssm_document_details",
         141  +
    "TemplateSSMDocumentDetails",
  142    142   
    6,
  143    143   
);
  144    144   
static PUTCONFORMANCEPACKINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  145    145   
    PUTCONFORMANCEPACKINPUT_SCHEMA_ID,
  146    146   
    ::aws_smithy_schema::ShapeType::Structure,
  147    147   
    &[
  148    148   
        &PUTCONFORMANCEPACKINPUT_MEMBER_CONFORMANCE_PACK_NAME,
  149    149   
        &PUTCONFORMANCEPACKINPUT_MEMBER_TEMPLATE_S3_URI,
  150    150   
        &PUTCONFORMANCEPACKINPUT_MEMBER_TEMPLATE_BODY,
  151    151   
        &PUTCONFORMANCEPACKINPUT_MEMBER_DELIVERY_S3_BUCKET,
  152    152   
        &PUTCONFORMANCEPACKINPUT_MEMBER_DELIVERY_S3_KEY_PREFIX,
  153    153   
        &PUTCONFORMANCEPACKINPUT_MEMBER_CONFORMANCE_PACK_INPUT_PARAMETERS,
  154    154   
        &PUTCONFORMANCEPACKINPUT_MEMBER_TEMPLATE_SSM_DOCUMENT_DETAILS,
  155    155   
    ],
  156    156   
);
  157    157   
impl PutConformancePackInput {
  158    158   
    /// The schema for this shape.
  159    159   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTCONFORMANCEPACKINPUT_SCHEMA;
  160    160   
}
  161    161   
impl ::aws_smithy_schema::serde::SerializableStruct for PutConformancePackInput {
  162    162   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  163    163   
    fn serialize_members(
  164    164   
        &self,
  165    165   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  166    166   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  167    167   
        if let Some(ref val) = self.conformance_pack_name {
  168    168   
            ser.write_string(&PUTCONFORMANCEPACKINPUT_MEMBER_CONFORMANCE_PACK_NAME, val)?;
  169    169   
        }
  170    170   
        if let Some(ref val) = self.template_s3_uri {
  171    171   
            ser.write_string(&PUTCONFORMANCEPACKINPUT_MEMBER_TEMPLATE_S3_URI, val)?;
  172    172   
        }
  173    173   
        if let Some(ref val) = self.template_body {
  174    174   
            ser.write_string(&PUTCONFORMANCEPACKINPUT_MEMBER_TEMPLATE_BODY, val)?;
  175    175   
        }
  176    176   
        if let Some(ref val) = self.delivery_s3_bucket {
  177    177   
            ser.write_string(&PUTCONFORMANCEPACKINPUT_MEMBER_DELIVERY_S3_BUCKET, val)?;
  178    178   
        }
  179    179   
        if let Some(ref val) = self.delivery_s3_key_prefix {
  180    180   
            ser.write_string(&PUTCONFORMANCEPACKINPUT_MEMBER_DELIVERY_S3_KEY_PREFIX, val)?;
  181    181   
        }
  182    182   
        if let Some(ref val) = self.conformance_pack_input_parameters {
  183    183   
            ser.write_list(
  184    184   
                &PUTCONFORMANCEPACKINPUT_MEMBER_CONFORMANCE_PACK_INPUT_PARAMETERS,
  185    185   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  186    186   
                    for item in val {
  187    187   
                        ser.write_struct(crate::types::ConformancePackInputParameter::SCHEMA, item)?;
  188    188   
                    }
  189    189   
                    Ok(())
  190    190   
                },
  191    191   
            )?;
  192    192   
        }
  193    193   
        if let Some(ref val) = self.template_ssm_document_details {
  194    194   
            ser.write_struct(&PUTCONFORMANCEPACKINPUT_MEMBER_TEMPLATE_SSM_DOCUMENT_DETAILS, val)?;
  195    195   
        }
  196    196   
        Ok(())
  197    197   
    }
  198    198   
}
  199    199   
impl PutConformancePackInput {
  200    200   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  201         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  202         -
        deserializer: &mut D,
         201  +
    pub fn deserialize(
         202  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  203    203   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  204    204   
        #[allow(unused_variables, unused_mut)]
  205    205   
        let mut builder = Self::builder();
  206    206   
        #[allow(
  207    207   
            unused_variables,
  208    208   
            unreachable_code,
  209    209   
            clippy::single_match,
  210    210   
            clippy::match_single_binding,
  211    211   
            clippy::diverging_sub_expression
  212    212   
        )]
  213         -
        deserializer.read_struct(&PUTCONFORMANCEPACKINPUT_SCHEMA, (), |_, member, deser| {
         213  +
        deserializer.read_struct(&PUTCONFORMANCEPACKINPUT_SCHEMA, &mut |member, deser| {
  214    214   
            match member.member_index() {
  215    215   
                Some(0) => {
  216    216   
                    builder.conformance_pack_name = Some(deser.read_string(member)?);
  217    217   
                }
  218    218   
                Some(1) => {
  219    219   
                    builder.template_s3_uri = Some(deser.read_string(member)?);
  220    220   
                }
  221    221   
                Some(2) => {
  222    222   
                    builder.template_body = Some(deser.read_string(member)?);
  223    223   
                }
  224    224   
                Some(3) => {
  225    225   
                    builder.delivery_s3_bucket = Some(deser.read_string(member)?);
  226    226   
                }
  227    227   
                Some(4) => {
  228    228   
                    builder.delivery_s3_key_prefix = Some(deser.read_string(member)?);
  229    229   
                }
  230    230   
                Some(5) => {
  231    231   
                    builder.conformance_pack_input_parameters = Some({
  232         -
                        let container = if let Some(cap) = deser.container_size() {
  233         -
                            Vec::with_capacity(cap)
  234         -
                        } else {
  235         -
                            Vec::new()
  236         -
                        };
  237         -
                        deser.read_list(member, container, |mut list, deser| {
  238         -
                            list.push(crate::types::ConformancePackInputParameter::deserialize(deser)?);
  239         -
                            Ok(list)
  240         -
                        })?
         232  +
                        let mut container = Vec::new();
         233  +
                        deser.read_list(member, &mut |deser| {
         234  +
                            container.push(crate::types::ConformancePackInputParameter::deserialize(deser)?);
         235  +
                            Ok(())
         236  +
                        })?;
         237  +
                        container
  241    238   
                    });
  242    239   
                }
  243    240   
                Some(6) => {
  244    241   
                    builder.template_ssm_document_details = Some(crate::types::TemplateSsmDocumentDetails::deserialize(deser)?);
  245    242   
                }
  246    243   
                _ => {}
  247    244   
            }
  248    245   
            Ok(())
  249    246   
        })?;
         247  +
        builder.conformance_pack_name = builder.conformance_pack_name.or(Some(String::new()));
  250    248   
        builder
  251    249   
            .build()
  252    250   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  253    251   
    }
  254    252   
}
         253  +
impl PutConformancePackInput {
         254  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         255  +
    pub fn deserialize_with_response(
         256  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         257  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         258  +
        _status: u16,
         259  +
        _body: &[u8],
         260  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         261  +
        Self::deserialize(deserializer)
         262  +
    }
         263  +
}
  255    264   
impl PutConformancePackInput {
  256    265   
    /// Creates a new builder-style object to manufacture [`PutConformancePackInput`](crate::operation::put_conformance_pack::PutConformancePackInput).
  257    266   
    pub fn builder() -> crate::operation::put_conformance_pack::builders::PutConformancePackInputBuilder {
  258    267   
        crate::operation::put_conformance_pack::builders::PutConformancePackInputBuilder::default()
  259    268   
    }
  260    269   
}
  261    270   
  262    271   
/// A builder for [`PutConformancePackInput`](crate::operation::put_conformance_pack::PutConformancePackInput).
  263    272   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  264    273   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/put_conformance_pack/_put_conformance_pack_output.rs

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

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

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/put_delivery_channel/_put_delivery_channel_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/put_delivery_channel/_put_delivery_channel_output.rs

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

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

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/put_evaluations/_put_evaluations_input.rs

@@ -16,16 +181,190 @@
   36     36   
    "com.amazonaws.configservice.synthetic",
   37     37   
    "PutEvaluationsInput",
   38     38   
);
   39     39   
static PUTEVALUATIONSINPUT_MEMBER_EVALUATIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   40     40   
    ::aws_smithy_schema::ShapeId::from_static(
   41     41   
        "com.amazonaws.configservice.synthetic#PutEvaluationsInput$Evaluations",
   42     42   
        "com.amazonaws.configservice.synthetic",
   43     43   
        "PutEvaluationsInput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::List,
   46         -
    "evaluations",
          46  +
    "Evaluations",
   47     47   
    0,
   48     48   
);
   49     49   
static PUTEVALUATIONSINPUT_MEMBER_RESULT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   50     50   
    ::aws_smithy_schema::ShapeId::from_static(
   51     51   
        "com.amazonaws.configservice.synthetic#PutEvaluationsInput$ResultToken",
   52     52   
        "com.amazonaws.configservice.synthetic",
   53     53   
        "PutEvaluationsInput",
   54     54   
    ),
   55     55   
    ::aws_smithy_schema::ShapeType::String,
   56         -
    "result_token",
          56  +
    "ResultToken",
   57     57   
    1,
   58     58   
);
   59     59   
static PUTEVALUATIONSINPUT_MEMBER_TEST_MODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   60     60   
    ::aws_smithy_schema::ShapeId::from_static(
   61     61   
        "com.amazonaws.configservice.synthetic#PutEvaluationsInput$TestMode",
   62     62   
        "com.amazonaws.configservice.synthetic",
   63     63   
        "PutEvaluationsInput",
   64     64   
    ),
   65     65   
    ::aws_smithy_schema::ShapeType::Boolean,
   66         -
    "test_mode",
          66  +
    "TestMode",
   67     67   
    2,
   68     68   
);
   69     69   
static PUTEVALUATIONSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   70     70   
    PUTEVALUATIONSINPUT_SCHEMA_ID,
   71     71   
    ::aws_smithy_schema::ShapeType::Structure,
   72     72   
    &[
   73     73   
        &PUTEVALUATIONSINPUT_MEMBER_EVALUATIONS,
   74     74   
        &PUTEVALUATIONSINPUT_MEMBER_RESULT_TOKEN,
   75     75   
        &PUTEVALUATIONSINPUT_MEMBER_TEST_MODE,
   76     76   
    ],
   77     77   
);
   78     78   
impl PutEvaluationsInput {
   79     79   
    /// The schema for this shape.
   80     80   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTEVALUATIONSINPUT_SCHEMA;
   81     81   
}
   82     82   
impl ::aws_smithy_schema::serde::SerializableStruct for PutEvaluationsInput {
   83     83   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   84     84   
    fn serialize_members(
   85     85   
        &self,
   86     86   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   87     87   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   88     88   
        if let Some(ref val) = self.evaluations {
   89     89   
            ser.write_list(
   90     90   
                &PUTEVALUATIONSINPUT_MEMBER_EVALUATIONS,
   91     91   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   92     92   
                    for item in val {
   93     93   
                        ser.write_struct(crate::types::Evaluation::SCHEMA, item)?;
   94     94   
                    }
   95     95   
                    Ok(())
   96     96   
                },
   97     97   
            )?;
   98     98   
        }
   99     99   
        if let Some(ref val) = self.result_token {
  100    100   
            ser.write_string(&PUTEVALUATIONSINPUT_MEMBER_RESULT_TOKEN, val)?;
  101    101   
        }
  102    102   
        if let Some(ref val) = self.test_mode {
  103    103   
            ser.write_boolean(&PUTEVALUATIONSINPUT_MEMBER_TEST_MODE, *val)?;
  104    104   
        }
  105    105   
        Ok(())
  106    106   
    }
  107    107   
}
  108    108   
impl PutEvaluationsInput {
  109    109   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  110         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  111         -
        deserializer: &mut D,
         110  +
    pub fn deserialize(
         111  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  112    112   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  113    113   
        #[allow(unused_variables, unused_mut)]
  114    114   
        let mut builder = Self::builder();
  115    115   
        #[allow(
  116    116   
            unused_variables,
  117    117   
            unreachable_code,
  118    118   
            clippy::single_match,
  119    119   
            clippy::match_single_binding,
  120    120   
            clippy::diverging_sub_expression
  121    121   
        )]
  122         -
        deserializer.read_struct(&PUTEVALUATIONSINPUT_SCHEMA, (), |_, member, deser| {
         122  +
        deserializer.read_struct(&PUTEVALUATIONSINPUT_SCHEMA, &mut |member, deser| {
  123    123   
            match member.member_index() {
  124    124   
                Some(0) => {
  125    125   
                    builder.evaluations = Some({
  126         -
                        let container = if let Some(cap) = deser.container_size() {
  127         -
                            Vec::with_capacity(cap)
  128         -
                        } else {
  129         -
                            Vec::new()
  130         -
                        };
  131         -
                        deser.read_list(member, container, |mut list, deser| {
  132         -
                            list.push(crate::types::Evaluation::deserialize(deser)?);
  133         -
                            Ok(list)
  134         -
                        })?
         126  +
                        let mut container = Vec::new();
         127  +
                        deser.read_list(member, &mut |deser| {
         128  +
                            container.push(crate::types::Evaluation::deserialize(deser)?);
         129  +
                            Ok(())
         130  +
                        })?;
         131  +
                        container
  135    132   
                    });
  136    133   
                }
  137    134   
                Some(1) => {
  138    135   
                    builder.result_token = Some(deser.read_string(member)?);
  139    136   
                }
  140    137   
                Some(2) => {
  141    138   
                    builder.test_mode = Some(deser.read_boolean(member)?);
  142    139   
                }
  143    140   
                _ => {}
  144    141   
            }
  145    142   
            Ok(())
  146    143   
        })?;
         144  +
        builder.result_token = builder.result_token.or(Some(String::new()));
  147    145   
        builder
  148    146   
            .build()
  149    147   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  150    148   
    }
  151    149   
}
         150  +
impl PutEvaluationsInput {
         151  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         152  +
    pub fn deserialize_with_response(
         153  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         154  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         155  +
        _status: u16,
         156  +
        _body: &[u8],
         157  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         158  +
        Self::deserialize(deserializer)
         159  +
    }
         160  +
}
  152    161   
impl PutEvaluationsInput {
  153    162   
    /// Creates a new builder-style object to manufacture [`PutEvaluationsInput`](crate::operation::put_evaluations::PutEvaluationsInput).
  154    163   
    pub fn builder() -> crate::operation::put_evaluations::builders::PutEvaluationsInputBuilder {
  155    164   
        crate::operation::put_evaluations::builders::PutEvaluationsInputBuilder::default()
  156    165   
    }
  157    166   
}
  158    167   
  159    168   
/// A builder for [`PutEvaluationsInput`](crate::operation::put_evaluations::PutEvaluationsInput).
  160    169   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  161    170   
#[non_exhaustive]