AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/put_organization_conformance_pack/_put_organization_conformance_pack_input.rs

@@ -50,50 +171,171 @@
   70     70   
    "PutOrganizationConformancePackInput",
   71     71   
);
   72     72   
static PUTORGANIZATIONCONFORMANCEPACKINPUT_MEMBER_ORGANIZATION_CONFORMANCE_PACK_NAME: ::aws_smithy_schema::Schema =
   73     73   
    ::aws_smithy_schema::Schema::new_member(
   74     74   
        ::aws_smithy_schema::ShapeId::from_static(
   75     75   
            "com.amazonaws.configservice.synthetic#PutOrganizationConformancePackInput$OrganizationConformancePackName",
   76     76   
            "com.amazonaws.configservice.synthetic",
   77     77   
            "PutOrganizationConformancePackInput",
   78     78   
        ),
   79     79   
        ::aws_smithy_schema::ShapeType::String,
   80         -
        "organization_conformance_pack_name",
          80  +
        "OrganizationConformancePackName",
   81     81   
        0,
   82     82   
    );
   83     83   
static PUTORGANIZATIONCONFORMANCEPACKINPUT_MEMBER_TEMPLATE_S3_URI: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   84     84   
    ::aws_smithy_schema::ShapeId::from_static(
   85     85   
        "com.amazonaws.configservice.synthetic#PutOrganizationConformancePackInput$TemplateS3Uri",
   86     86   
        "com.amazonaws.configservice.synthetic",
   87     87   
        "PutOrganizationConformancePackInput",
   88     88   
    ),
   89     89   
    ::aws_smithy_schema::ShapeType::String,
   90         -
    "template_s3_uri",
          90  +
    "TemplateS3Uri",
   91     91   
    1,
   92     92   
);
   93     93   
static PUTORGANIZATIONCONFORMANCEPACKINPUT_MEMBER_TEMPLATE_BODY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   94     94   
    ::aws_smithy_schema::ShapeId::from_static(
   95     95   
        "com.amazonaws.configservice.synthetic#PutOrganizationConformancePackInput$TemplateBody",
   96     96   
        "com.amazonaws.configservice.synthetic",
   97     97   
        "PutOrganizationConformancePackInput",
   98     98   
    ),
   99     99   
    ::aws_smithy_schema::ShapeType::String,
  100         -
    "template_body",
         100  +
    "TemplateBody",
  101    101   
    2,
  102    102   
);
  103    103   
static PUTORGANIZATIONCONFORMANCEPACKINPUT_MEMBER_DELIVERY_S3_BUCKET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  104    104   
    ::aws_smithy_schema::ShapeId::from_static(
  105    105   
        "com.amazonaws.configservice.synthetic#PutOrganizationConformancePackInput$DeliveryS3Bucket",
  106    106   
        "com.amazonaws.configservice.synthetic",
  107    107   
        "PutOrganizationConformancePackInput",
  108    108   
    ),
  109    109   
    ::aws_smithy_schema::ShapeType::String,
  110         -
    "delivery_s3_bucket",
         110  +
    "DeliveryS3Bucket",
  111    111   
    3,
  112    112   
);
  113    113   
static PUTORGANIZATIONCONFORMANCEPACKINPUT_MEMBER_DELIVERY_S3_KEY_PREFIX: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  114    114   
    ::aws_smithy_schema::ShapeId::from_static(
  115    115   
        "com.amazonaws.configservice.synthetic#PutOrganizationConformancePackInput$DeliveryS3KeyPrefix",
  116    116   
        "com.amazonaws.configservice.synthetic",
  117    117   
        "PutOrganizationConformancePackInput",
  118    118   
    ),
  119    119   
    ::aws_smithy_schema::ShapeType::String,
  120         -
    "delivery_s3_key_prefix",
         120  +
    "DeliveryS3KeyPrefix",
  121    121   
    4,
  122    122   
);
  123    123   
static PUTORGANIZATIONCONFORMANCEPACKINPUT_MEMBER_CONFORMANCE_PACK_INPUT_PARAMETERS: ::aws_smithy_schema::Schema =
  124    124   
    ::aws_smithy_schema::Schema::new_member(
  125    125   
        ::aws_smithy_schema::ShapeId::from_static(
  126    126   
            "com.amazonaws.configservice.synthetic#PutOrganizationConformancePackInput$ConformancePackInputParameters",
  127    127   
            "com.amazonaws.configservice.synthetic",
  128    128   
            "PutOrganizationConformancePackInput",
  129    129   
        ),
  130    130   
        ::aws_smithy_schema::ShapeType::List,
  131         -
        "conformance_pack_input_parameters",
         131  +
        "ConformancePackInputParameters",
  132    132   
        5,
  133    133   
    );
  134    134   
static PUTORGANIZATIONCONFORMANCEPACKINPUT_MEMBER_EXCLUDED_ACCOUNTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  135    135   
    ::aws_smithy_schema::ShapeId::from_static(
  136    136   
        "com.amazonaws.configservice.synthetic#PutOrganizationConformancePackInput$ExcludedAccounts",
  137    137   
        "com.amazonaws.configservice.synthetic",
  138    138   
        "PutOrganizationConformancePackInput",
  139    139   
    ),
  140    140   
    ::aws_smithy_schema::ShapeType::List,
  141         -
    "excluded_accounts",
         141  +
    "ExcludedAccounts",
  142    142   
    6,
  143    143   
);
  144    144   
static PUTORGANIZATIONCONFORMANCEPACKINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  145    145   
    PUTORGANIZATIONCONFORMANCEPACKINPUT_SCHEMA_ID,
  146    146   
    ::aws_smithy_schema::ShapeType::Structure,
  147    147   
    &[
  148    148   
        &PUTORGANIZATIONCONFORMANCEPACKINPUT_MEMBER_ORGANIZATION_CONFORMANCE_PACK_NAME,
  149    149   
        &PUTORGANIZATIONCONFORMANCEPACKINPUT_MEMBER_TEMPLATE_S3_URI,
  150    150   
        &PUTORGANIZATIONCONFORMANCEPACKINPUT_MEMBER_TEMPLATE_BODY,
  151    151   
        &PUTORGANIZATIONCONFORMANCEPACKINPUT_MEMBER_DELIVERY_S3_BUCKET,
@@ -179,179 +302,301 @@
  199    199   
                    }
  200    200   
                    Ok(())
  201    201   
                },
  202    202   
            )?;
  203    203   
        }
  204    204   
        Ok(())
  205    205   
    }
  206    206   
}
  207    207   
impl PutOrganizationConformancePackInput {
  208    208   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  209         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  210         -
        deserializer: &mut D,
         209  +
    pub fn deserialize(
         210  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  211    211   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  212    212   
        #[allow(unused_variables, unused_mut)]
  213    213   
        let mut builder = Self::builder();
  214    214   
        #[allow(
  215    215   
            unused_variables,
  216    216   
            unreachable_code,
  217    217   
            clippy::single_match,
  218    218   
            clippy::match_single_binding,
  219    219   
            clippy::diverging_sub_expression
  220    220   
        )]
  221         -
        deserializer.read_struct(&PUTORGANIZATIONCONFORMANCEPACKINPUT_SCHEMA, (), |_, member, deser| {
         221  +
        deserializer.read_struct(&PUTORGANIZATIONCONFORMANCEPACKINPUT_SCHEMA, &mut |member, deser| {
  222    222   
            match member.member_index() {
  223    223   
                Some(0) => {
  224    224   
                    builder.organization_conformance_pack_name = Some(deser.read_string(member)?);
  225    225   
                }
  226    226   
                Some(1) => {
  227    227   
                    builder.template_s3_uri = Some(deser.read_string(member)?);
  228    228   
                }
  229    229   
                Some(2) => {
  230    230   
                    builder.template_body = Some(deser.read_string(member)?);
  231    231   
                }
  232    232   
                Some(3) => {
  233    233   
                    builder.delivery_s3_bucket = Some(deser.read_string(member)?);
  234    234   
                }
  235    235   
                Some(4) => {
  236    236   
                    builder.delivery_s3_key_prefix = Some(deser.read_string(member)?);
  237    237   
                }
  238    238   
                Some(5) => {
  239    239   
                    builder.conformance_pack_input_parameters = Some({
  240         -
                        let container = if let Some(cap) = deser.container_size() {
  241         -
                            Vec::with_capacity(cap)
  242         -
                        } else {
  243         -
                            Vec::new()
  244         -
                        };
  245         -
                        deser.read_list(member, container, |mut list, deser| {
  246         -
                            list.push(crate::types::ConformancePackInputParameter::deserialize(deser)?);
  247         -
                            Ok(list)
  248         -
                        })?
         240  +
                        let mut container = Vec::new();
         241  +
                        deser.read_list(member, &mut |deser| {
         242  +
                            container.push(crate::types::ConformancePackInputParameter::deserialize(deser)?);
         243  +
                            Ok(())
         244  +
                        })?;
         245  +
                        container
  249    246   
                    });
  250    247   
                }
  251    248   
                Some(6) => {
  252         -
                    builder.excluded_accounts = Some({
  253         -
                        let container = if let Some(cap) = deser.container_size() {
  254         -
                            Vec::with_capacity(cap)
  255         -
                        } else {
  256         -
                            Vec::new()
  257         -
                        };
  258         -
                        deser.read_list(member, container, |mut list, deser| {
  259         -
                            list.push(deser.read_string(member)?);
  260         -
                            Ok(list)
  261         -
                        })?
  262         -
                    });
         249  +
                    builder.excluded_accounts = Some(deser.read_string_list(member)?);
  263    250   
                }
  264    251   
                _ => {}
  265    252   
            }
  266    253   
            Ok(())
  267    254   
        })?;
         255  +
        builder.organization_conformance_pack_name = builder.organization_conformance_pack_name.or(Some(String::new()));
  268    256   
        builder
  269    257   
            .build()
  270    258   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  271    259   
    }
  272    260   
}
         261  +
impl PutOrganizationConformancePackInput {
         262  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         263  +
    pub fn deserialize_with_response(
         264  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         265  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         266  +
        _status: u16,
         267  +
        _body: &[u8],
         268  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         269  +
        Self::deserialize(deserializer)
         270  +
    }
         271  +
}
  273    272   
impl PutOrganizationConformancePackInput {
  274    273   
    /// Creates a new builder-style object to manufacture [`PutOrganizationConformancePackInput`](crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackInput).
  275    274   
    pub fn builder() -> crate::operation::put_organization_conformance_pack::builders::PutOrganizationConformancePackInputBuilder {
  276    275   
        crate::operation::put_organization_conformance_pack::builders::PutOrganizationConformancePackInputBuilder::default()
  277    276   
    }
  278    277   
}
  279    278   
  280    279   
/// A builder for [`PutOrganizationConformancePackInput`](crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackInput).
  281    280   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  282    281   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/put_organization_conformance_pack/_put_organization_conformance_pack_output.rs

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

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

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

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/put_remediation_configurations/_put_remediation_configurations_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/put_remediation_configurations/_put_remediation_configurations_output.rs

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

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

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

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/put_remediation_exceptions/_put_remediation_exceptions_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/put_remediation_exceptions/_put_remediation_exceptions_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/put_resource_config.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 `PutResourceConfig`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutResourceConfig;
    6      6   
impl PutResourceConfig {
    7      7   
    /// Creates a new `PutResourceConfig`
    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_resource_config::PutResourceConfigInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_resource_config::PutResourceConfigOutput::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_resource_config::PutResourceConfigInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::put_resource_config::PutResourceConfigOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::put_resource_config::PutResourceConfigError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,364 @@
  138    142   
                crate::operation::put_resource_config::PutResourceConfigError,
  139    143   
            >::new());
  140    144   
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct PutResourceConfigResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutResourceConfigResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_put_resource_config::de_put_resource_config_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_put_resource_config::de_put_resource_config_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_resource_config::PutResourceConfigError::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  +
                "InsufficientPermissionsException" => {
         186  +
                    crate::operation::put_resource_config::PutResourceConfigError::InsufficientPermissionsException({
         187  +
                        let mut tmp = match protocol
         188  +
                            .deserialize_response(response, crate::types::error::InsufficientPermissionsException::SCHEMA, _cfg)
         189  +
                            .and_then(|mut deser| {
         190  +
                                crate::types::error::InsufficientPermissionsException::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  +
                "MaxActiveResourcesExceededException" => {
         212  +
                    crate::operation::put_resource_config::PutResourceConfigError::MaxActiveResourcesExceededException({
         213  +
                        let mut tmp = match protocol
         214  +
                            .deserialize_response(response, crate::types::error::MaxActiveResourcesExceededException::SCHEMA, _cfg)
         215  +
                            .and_then(|mut deser| {
         216  +
                                crate::types::error::MaxActiveResourcesExceededException::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  +
                "NoRunningConfigurationRecorderException" => {
         238  +
                    crate::operation::put_resource_config::PutResourceConfigError::NoRunningConfigurationRecorderException({
         239  +
                        let mut tmp = match protocol
         240  +
                            .deserialize_response(response, crate::types::error::NoRunningConfigurationRecorderException::SCHEMA, _cfg)
         241  +
                            .and_then(|mut deser| {
         242  +
                                crate::types::error::NoRunningConfigurationRecorderException::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  +
                            }
         255  +
                        };
         256  +
                        tmp.meta = generic;
         257  +
                        if tmp.message.is_none() {
         258  +
                            tmp.message = _error_message;
         259  +
                        }
         260  +
                        tmp
         261  +
                    })
         262  +
                }
         263  +
                "ValidationException" => crate::operation::put_resource_config::PutResourceConfigError::ValidationException({
         264  +
                    let mut tmp = match protocol
         265  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         266  +
                        .and_then(|mut deser| {
         267  +
                            crate::types::error::ValidationException::deserialize_with_response(
         268  +
                                &mut *deser,
         269  +
                                response.headers(),
         270  +
                                response.status().into(),
         271  +
                                body,
         272  +
                            )
         273  +
                        }) {
         274  +
                        ::std::result::Result::Ok(val) => val,
         275  +
                        ::std::result::Result::Err(e) => {
         276  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         277  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         278  +
                            ))
         279  +
                        }
         280  +
                    };
         281  +
                    tmp.meta = generic;
         282  +
                    if tmp.message.is_none() {
         283  +
                        tmp.message = _error_message;
         284  +
                    }
         285  +
                    tmp
         286  +
                }),
         287  +
                _ => crate::operation::put_resource_config::PutResourceConfigError::generic(generic),
  162    288   
            };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         289  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         290  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         291  +
            ))
         292  +
        } else {
         293  +
            let protocol = _cfg
         294  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         295  +
                .expect("a SharedClientProtocol is required");
         296  +
            let mut deser = protocol
         297  +
                .deserialize_response(response, PutResourceConfig::OUTPUT_SCHEMA, _cfg)
         298  +
                .map_err(|e| {
         299  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         300  +
                })?;
         301  +
            let body = response.body().bytes().expect("body loaded");
         302  +
            let output = crate::operation::put_resource_config::PutResourceConfigOutput::deserialize_with_response(
         303  +
                &mut *deser,
         304  +
                response.headers(),
         305  +
                response.status().into(),
         306  +
                body,
         307  +
            )
         308  +
            .map_err(|e| {
         309  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         310  +
            })?;
         311  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         312  +
        }
  164    313   
    }
  165    314   
}
  166    315   
#[derive(Debug)]
  167    316   
struct PutResourceConfigRequestSerializer;
  168    317   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutResourceConfigRequestSerializer {
  169    318   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    319   
    fn serialize_input(
  171    320   
        &self,
  172    321   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    322   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    323   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    324   
        let input = input
  176    325   
            .downcast::<crate::operation::put_resource_config::PutResourceConfigInput>()
  177    326   
            .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_resource_config::PutResourceConfigInput,
  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_resource_config::PutResourceConfigInput,
  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.PutResourceConfig",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_put_resource_config::ser_put_resource_config_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())
         327  +
        let protocol = _cfg
         328  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         329  +
            .expect("a SharedClientProtocol is required");
         330  +
        let mut request = protocol
         331  +
            .serialize_request(&input, PutResourceConfig::INPUT_SCHEMA, "", _cfg)
         332  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         333  +
         334  +
        return ::std::result::Result::Ok(request);
  216    335   
    }
  217    336   
}
  218    337   
#[derive(Debug)]
  219    338   
struct PutResourceConfigEndpointParamsInterceptor;
  220    339   
  221    340   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutResourceConfigEndpointParamsInterceptor {
  222    341   
    fn name(&self) -> &'static str {
  223    342   
        "PutResourceConfigEndpointParamsInterceptor"
  224    343   
    }
  225    344   

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/put_resource_config/_put_resource_config_input.rs

@@ -39,39 +256,261 @@
   59     59   
    "com.amazonaws.configservice.synthetic",
   60     60   
    "PutResourceConfigInput",
   61     61   
);
   62     62   
static PUTRESOURCECONFIGINPUT_MEMBER_RESOURCE_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   63     63   
    ::aws_smithy_schema::ShapeId::from_static(
   64     64   
        "com.amazonaws.configservice.synthetic#PutResourceConfigInput$ResourceType",
   65     65   
        "com.amazonaws.configservice.synthetic",
   66     66   
        "PutResourceConfigInput",
   67     67   
    ),
   68     68   
    ::aws_smithy_schema::ShapeType::String,
   69         -
    "resource_type",
          69  +
    "ResourceType",
   70     70   
    0,
   71     71   
);
   72     72   
static PUTRESOURCECONFIGINPUT_MEMBER_SCHEMA_VERSION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.configservice.synthetic#PutResourceConfigInput$SchemaVersionId",
   75     75   
        "com.amazonaws.configservice.synthetic",
   76     76   
        "PutResourceConfigInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::String,
   79         -
    "schema_version_id",
          79  +
    "SchemaVersionId",
   80     80   
    1,
   81     81   
);
   82     82   
static PUTRESOURCECONFIGINPUT_MEMBER_RESOURCE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   83     83   
    ::aws_smithy_schema::ShapeId::from_static(
   84     84   
        "com.amazonaws.configservice.synthetic#PutResourceConfigInput$ResourceId",
   85     85   
        "com.amazonaws.configservice.synthetic",
   86     86   
        "PutResourceConfigInput",
   87     87   
    ),
   88     88   
    ::aws_smithy_schema::ShapeType::String,
   89         -
    "resource_id",
          89  +
    "ResourceId",
   90     90   
    2,
   91     91   
);
   92     92   
static PUTRESOURCECONFIGINPUT_MEMBER_RESOURCE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   93     93   
    ::aws_smithy_schema::ShapeId::from_static(
   94     94   
        "com.amazonaws.configservice.synthetic#PutResourceConfigInput$ResourceName",
   95     95   
        "com.amazonaws.configservice.synthetic",
   96     96   
        "PutResourceConfigInput",
   97     97   
    ),
   98     98   
    ::aws_smithy_schema::ShapeType::String,
   99         -
    "resource_name",
          99  +
    "ResourceName",
  100    100   
    3,
  101    101   
);
  102    102   
static PUTRESOURCECONFIGINPUT_MEMBER_CONFIGURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  103    103   
    ::aws_smithy_schema::ShapeId::from_static(
  104    104   
        "com.amazonaws.configservice.synthetic#PutResourceConfigInput$Configuration",
  105    105   
        "com.amazonaws.configservice.synthetic",
  106    106   
        "PutResourceConfigInput",
  107    107   
    ),
  108    108   
    ::aws_smithy_schema::ShapeType::String,
  109         -
    "configuration",
         109  +
    "Configuration",
  110    110   
    4,
  111    111   
);
  112    112   
static PUTRESOURCECONFIGINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  113    113   
    ::aws_smithy_schema::ShapeId::from_static(
  114    114   
        "com.amazonaws.configservice.synthetic#PutResourceConfigInput$Tags",
  115    115   
        "com.amazonaws.configservice.synthetic",
  116    116   
        "PutResourceConfigInput",
  117    117   
    ),
  118    118   
    ::aws_smithy_schema::ShapeType::Map,
  119         -
    "tags",
         119  +
    "Tags",
  120    120   
    5,
  121    121   
);
  122    122   
static PUTRESOURCECONFIGINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  123    123   
    PUTRESOURCECONFIGINPUT_SCHEMA_ID,
  124    124   
    ::aws_smithy_schema::ShapeType::Structure,
  125    125   
    &[
  126    126   
        &PUTRESOURCECONFIGINPUT_MEMBER_RESOURCE_TYPE,
  127    127   
        &PUTRESOURCECONFIGINPUT_MEMBER_SCHEMA_VERSION_ID,
  128    128   
        &PUTRESOURCECONFIGINPUT_MEMBER_RESOURCE_ID,
  129    129   
        &PUTRESOURCECONFIGINPUT_MEMBER_RESOURCE_NAME,
  130    130   
        &PUTRESOURCECONFIGINPUT_MEMBER_CONFIGURATION,
  131    131   
        &PUTRESOURCECONFIGINPUT_MEMBER_TAGS,
  132    132   
    ],
  133    133   
);
  134    134   
impl PutResourceConfigInput {
  135    135   
    /// The schema for this shape.
  136    136   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTRESOURCECONFIGINPUT_SCHEMA;
  137    137   
}
  138    138   
impl ::aws_smithy_schema::serde::SerializableStruct for PutResourceConfigInput {
  139    139   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  140    140   
    fn serialize_members(
  141    141   
        &self,
  142    142   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  143    143   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  144    144   
        if let Some(ref val) = self.resource_type {
  145    145   
            ser.write_string(&PUTRESOURCECONFIGINPUT_MEMBER_RESOURCE_TYPE, val)?;
  146    146   
        }
  147    147   
        if let Some(ref val) = self.schema_version_id {
  148    148   
            ser.write_string(&PUTRESOURCECONFIGINPUT_MEMBER_SCHEMA_VERSION_ID, val)?;
  149    149   
        }
  150    150   
        if let Some(ref val) = self.resource_id {
  151    151   
            ser.write_string(&PUTRESOURCECONFIGINPUT_MEMBER_RESOURCE_ID, val)?;
  152    152   
        }
  153    153   
        if let Some(ref val) = self.resource_name {
  154    154   
            ser.write_string(&PUTRESOURCECONFIGINPUT_MEMBER_RESOURCE_NAME, val)?;
  155    155   
        }
  156    156   
        if let Some(ref val) = self.configuration {
  157    157   
            ser.write_string(&PUTRESOURCECONFIGINPUT_MEMBER_CONFIGURATION, val)?;
  158    158   
        }
  159    159   
        if let Some(ref val) = self.tags {
  160    160   
            ser.write_map(
  161    161   
                &PUTRESOURCECONFIGINPUT_MEMBER_TAGS,
  162    162   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  163    163   
                    for (key, value) in val {
  164    164   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  165    165   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
  166    166   
                    }
  167    167   
                    Ok(())
  168    168   
                },
  169    169   
            )?;
  170    170   
        }
  171    171   
        Ok(())
  172    172   
    }
  173    173   
}
  174    174   
impl PutResourceConfigInput {
  175    175   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  176         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  177         -
        deserializer: &mut D,
         176  +
    pub fn deserialize(
         177  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  178    178   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  179    179   
        #[allow(unused_variables, unused_mut)]
  180    180   
        let mut builder = Self::builder();
  181    181   
        #[allow(
  182    182   
            unused_variables,
  183    183   
            unreachable_code,
  184    184   
            clippy::single_match,
  185    185   
            clippy::match_single_binding,
  186    186   
            clippy::diverging_sub_expression
  187    187   
        )]
  188         -
        deserializer.read_struct(&PUTRESOURCECONFIGINPUT_SCHEMA, (), |_, member, deser| {
         188  +
        deserializer.read_struct(&PUTRESOURCECONFIGINPUT_SCHEMA, &mut |member, deser| {
  189    189   
            match member.member_index() {
  190    190   
                Some(0) => {
  191    191   
                    builder.resource_type = Some(deser.read_string(member)?);
  192    192   
                }
  193    193   
                Some(1) => {
  194    194   
                    builder.schema_version_id = Some(deser.read_string(member)?);
  195    195   
                }
  196    196   
                Some(2) => {
  197    197   
                    builder.resource_id = Some(deser.read_string(member)?);
  198    198   
                }
  199    199   
                Some(3) => {
  200    200   
                    builder.resource_name = Some(deser.read_string(member)?);
  201    201   
                }
  202    202   
                Some(4) => {
  203    203   
                    builder.configuration = Some(deser.read_string(member)?);
  204    204   
                }
  205    205   
                Some(5) => {
  206         -
                    builder.tags = Some({
  207         -
                        let container = if let Some(cap) = deser.container_size() {
  208         -
                            std::collections::HashMap::with_capacity(cap)
  209         -
                        } else {
  210         -
                            std::collections::HashMap::new()
  211         -
                        };
  212         -
                        deser.read_map(member, container, |mut map, key, deser| {
  213         -
                            map.insert(key, deser.read_string(member)?);
  214         -
                            Ok(map)
  215         -
                        })?
  216         -
                    });
         206  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
  217    207   
                }
  218    208   
                _ => {}
  219    209   
            }
  220    210   
            Ok(())
  221    211   
        })?;
         212  +
        builder.resource_type = builder.resource_type.or(Some(String::new()));
         213  +
        builder.schema_version_id = builder.schema_version_id.or(Some(String::new()));
         214  +
        builder.resource_id = builder.resource_id.or(Some(String::new()));
         215  +
        builder.configuration = builder.configuration.or(Some(String::new()));
  222    216   
        builder
  223    217   
            .build()
  224    218   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  225    219   
    }
  226    220   
}
         221  +
impl PutResourceConfigInput {
         222  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         223  +
    pub fn deserialize_with_response(
         224  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         225  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         226  +
        _status: u16,
         227  +
        _body: &[u8],
         228  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         229  +
        Self::deserialize(deserializer)
         230  +
    }
         231  +
}
  227    232   
impl PutResourceConfigInput {
  228    233   
    /// Creates a new builder-style object to manufacture [`PutResourceConfigInput`](crate::operation::put_resource_config::PutResourceConfigInput).
  229    234   
    pub fn builder() -> crate::operation::put_resource_config::builders::PutResourceConfigInputBuilder {
  230    235   
        crate::operation::put_resource_config::builders::PutResourceConfigInputBuilder::default()
  231    236   
    }
  232    237   
}
  233    238   
  234    239   
/// A builder for [`PutResourceConfigInput`](crate::operation::put_resource_config::PutResourceConfigInput).
  235    240   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  236    241   
#[non_exhaustive]

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

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

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