AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

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

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

@@ -17,17 +199,208 @@
   37     37   
    "com.amazonaws.configservice.synthetic",
   38     38   
    "DescribeRemediationExecutionStatusInput",
   39     39   
);
   40     40   
static DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_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#DescribeRemediationExecutionStatusInput$ConfigRuleName",
   43     43   
        "com.amazonaws.configservice.synthetic",
   44     44   
        "DescribeRemediationExecutionStatusInput",
   45     45   
    ),
   46     46   
    ::aws_smithy_schema::ShapeType::String,
   47         -
    "config_rule_name",
          47  +
    "ConfigRuleName",
   48     48   
    0,
   49     49   
);
   50     50   
static DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_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#DescribeRemediationExecutionStatusInput$ResourceKeys",
   53     53   
        "com.amazonaws.configservice.synthetic",
   54     54   
        "DescribeRemediationExecutionStatusInput",
   55     55   
    ),
   56     56   
    ::aws_smithy_schema::ShapeType::List,
   57         -
    "resource_keys",
          57  +
    "ResourceKeys",
   58     58   
    1,
   59     59   
);
   60     60   
static DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   61     61   
    ::aws_smithy_schema::ShapeId::from_static(
   62     62   
        "com.amazonaws.configservice.synthetic#DescribeRemediationExecutionStatusInput$Limit",
   63     63   
        "com.amazonaws.configservice.synthetic",
   64     64   
        "DescribeRemediationExecutionStatusInput",
   65     65   
    ),
   66     66   
    ::aws_smithy_schema::ShapeType::Integer,
   67         -
    "limit",
          67  +
    "Limit",
   68     68   
    2,
   69     69   
);
   70     70   
static DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "com.amazonaws.configservice.synthetic#DescribeRemediationExecutionStatusInput$NextToken",
   73     73   
        "com.amazonaws.configservice.synthetic",
   74     74   
        "DescribeRemediationExecutionStatusInput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::String,
   77         -
    "next_token",
          77  +
    "NextToken",
   78     78   
    3,
   79     79   
);
   80     80   
static DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   81     81   
    DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_SCHEMA_ID,
   82     82   
    ::aws_smithy_schema::ShapeType::Structure,
   83     83   
    &[
   84     84   
        &DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_MEMBER_CONFIG_RULE_NAME,
   85     85   
        &DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_MEMBER_RESOURCE_KEYS,
   86     86   
        &DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_MEMBER_LIMIT,
   87     87   
        &DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_MEMBER_NEXT_TOKEN,
   88     88   
    ],
   89     89   
);
   90     90   
impl DescribeRemediationExecutionStatusInput {
   91     91   
    /// The schema for this shape.
   92     92   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_SCHEMA;
   93     93   
}
   94     94   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeRemediationExecutionStatusInput {
   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(&DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_MEMBER_CONFIG_RULE_NAME, val)?;
  102    102   
        }
  103    103   
        if let Some(ref val) = self.resource_keys {
  104    104   
            ser.write_list(
  105    105   
                &DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_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::ResourceKey::SCHEMA, item)?;
  109    109   
                    }
  110    110   
                    Ok(())
  111    111   
                },
  112    112   
            )?;
  113    113   
        }
  114    114   
        if let Some(ref val) = self.limit {
  115    115   
            ser.write_integer(&DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_MEMBER_LIMIT, *val)?;
  116    116   
        }
  117    117   
        if let Some(ref val) = self.next_token {
  118    118   
            ser.write_string(&DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_MEMBER_NEXT_TOKEN, val)?;
  119    119   
        }
  120    120   
        Ok(())
  121    121   
    }
  122    122   
}
  123    123   
impl DescribeRemediationExecutionStatusInput {
  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(&DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_SCHEMA, (), |_, member, deser| {
         137  +
        deserializer.read_struct(&DESCRIBEREMEDIATIONEXECUTIONSTATUSINPUT_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::ResourceKey::deserialize(deser)?);
  151         -
                            Ok(list)
  152         -
                        })?
         144  +
                        let mut container = Vec::new();
         145  +
                        deser.read_list(member, &mut |deser| {
         146  +
                            container.push(crate::types::ResourceKey::deserialize(deser)?);
         147  +
                            Ok(())
         148  +
                        })?;
         149  +
                        container
  153    150   
                    });
  154    151   
                }
  155    152   
                Some(2) => {
  156    153   
                    builder.limit = Some(deser.read_integer(member)?);
  157    154   
                }
  158    155   
                Some(3) => {
  159    156   
                    builder.next_token = Some(deser.read_string(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()));
  165    163   
        builder
  166    164   
            .build()
  167    165   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  168    166   
    }
  169    167   
}
         168  +
impl DescribeRemediationExecutionStatusInput {
         169  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         170  +
    pub fn deserialize_with_response(
         171  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         172  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         173  +
        _status: u16,
         174  +
        _body: &[u8],
         175  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         176  +
        Self::deserialize(deserializer)
         177  +
    }
         178  +
}
  170    179   
impl DescribeRemediationExecutionStatusInput {
  171    180   
    /// Creates a new builder-style object to manufacture [`DescribeRemediationExecutionStatusInput`](crate::operation::describe_remediation_execution_status::DescribeRemediationExecutionStatusInput).
  172    181   
    pub fn builder() -> crate::operation::describe_remediation_execution_status::builders::DescribeRemediationExecutionStatusInputBuilder {
  173    182   
        crate::operation::describe_remediation_execution_status::builders::DescribeRemediationExecutionStatusInputBuilder::default()
  174    183   
    }
  175    184   
}
  176    185   
  177    186   
/// A builder for [`DescribeRemediationExecutionStatusInput`](crate::operation::describe_remediation_execution_status::DescribeRemediationExecutionStatusInput).
  178    187   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  179    188   
#[non_exhaustive]

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

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

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/describe_retention_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 `DescribeRetentionConfigurations`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeRetentionConfigurations;
    6      6   
impl DescribeRetentionConfigurations {
    7      7   
    /// Creates a new `DescribeRetentionConfigurations`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::describe_retention_configurations::DescribeRetentionConfigurationsInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_retention_configurations::DescribeRetentionConfigurationsOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::describe_retention_configurations::DescribeRetentionConfigurationsInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_retention_configurations::DescribeRetentionConfigurationsOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_retention_configurations::DescribeRetentionConfigurationsError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -124,130 +253,350 @@
  144    150   
                crate::operation::describe_retention_configurations::DescribeRetentionConfigurationsError,
  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 DescribeRetentionConfigurationsResponseDeserializer;
  153    159   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeRetentionConfigurationsResponseDeserializer {
  154         -
    fn deserialize_nonstreaming(
         160  +
    fn deserialize_nonstreaming_with_config(
  155    161   
        &self,
  156    162   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         163  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    164   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    165   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  159         -
        let headers = response.headers();
  160         -
        let body = response.body().bytes().expect("body loaded");
  161    166   
        #[allow(unused_mut)]
  162    167   
        let mut force_error = false;
  163    168   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_describe_retention_configurations::de_describe_retention_configurations_http_error(status, headers, body)
         169  +
        if !success && status != 200 || force_error {
         170  +
            let headers = response.headers();
         171  +
            let body = response.body().bytes().expect("body loaded");
         172  +
            #[allow(unused_mut)]
         173  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         174  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         175  +
            })?;
         176  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         177  +
            let generic = generic_builder.build();
         178  +
            let error_code = match generic.code() {
         179  +
                ::std::option::Option::Some(code) => code,
         180  +
                ::std::option::Option::None => {
         181  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         182  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         183  +
                            crate::operation::describe_retention_configurations::DescribeRetentionConfigurationsError::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  +
                "InvalidNextTokenException" => {
         194  +
                    crate::operation::describe_retention_configurations::DescribeRetentionConfigurationsError::InvalidNextTokenException({
         195  +
                        let mut tmp = match protocol
         196  +
                            .deserialize_response(response, crate::types::error::InvalidNextTokenException::SCHEMA, _cfg)
         197  +
                            .and_then(|mut deser| {
         198  +
                                crate::types::error::InvalidNextTokenException::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::describe_retention_configurations::DescribeRetentionConfigurationsError::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  +
                "NoSuchRetentionConfigurationException" => {
         246  +
                    crate::operation::describe_retention_configurations::DescribeRetentionConfigurationsError::NoSuchRetentionConfigurationException(
         247  +
                        {
         248  +
                            let mut tmp = match protocol
         249  +
                                .deserialize_response(response, crate::types::error::NoSuchRetentionConfigurationException::SCHEMA, _cfg)
         250  +
                                .and_then(|mut deser| {
         251  +
                                    crate::types::error::NoSuchRetentionConfigurationException::deserialize_with_response(
         252  +
                                        &mut *deser,
         253  +
                                        response.headers(),
         254  +
                                        response.status().into(),
         255  +
                                        body,
         256  +
                                    )
         257  +
                                }) {
         258  +
                                ::std::result::Result::Ok(val) => val,
         259  +
                                ::std::result::Result::Err(e) => {
         260  +
                                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         261  +
                                        ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         262  +
                                    ))
         263  +
                                }
         264  +
                            };
         265  +
                            tmp.meta = generic;
         266  +
                            if tmp.message.is_none() {
         267  +
                                tmp.message = _error_message;
         268  +
                            }
         269  +
                            tmp
         270  +
                        },
         271  +
                    )
         272  +
                }
         273  +
                _ => crate::operation::describe_retention_configurations::DescribeRetentionConfigurationsError::generic(generic),
         274  +
            };
         275  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         276  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         277  +
            ))
  166    278   
        } else {
  167         -
            crate::protocol_serde::shape_describe_retention_configurations::de_describe_retention_configurations_http_response(status, headers, body)
  168         -
        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         279  +
            let protocol = _cfg
         280  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         281  +
                .expect("a SharedClientProtocol is required");
         282  +
            let mut deser = protocol
         283  +
                .deserialize_response(response, DescribeRetentionConfigurations::OUTPUT_SCHEMA, _cfg)
         284  +
                .map_err(|e| {
         285  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         286  +
                })?;
         287  +
            let body = response.body().bytes().expect("body loaded");
         288  +
            let output = crate::operation::describe_retention_configurations::DescribeRetentionConfigurationsOutput::deserialize_with_response(
         289  +
                &mut *deser,
         290  +
                response.headers(),
         291  +
                response.status().into(),
         292  +
                body,
         293  +
            )
         294  +
            .map_err(|e| {
         295  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         296  +
            })?;
         297  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         298  +
        }
  170    299   
    }
  171    300   
}
  172    301   
#[derive(Debug)]
  173    302   
struct DescribeRetentionConfigurationsRequestSerializer;
  174    303   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeRetentionConfigurationsRequestSerializer {
  175    304   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    305   
    fn serialize_input(
  177    306   
        &self,
  178    307   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    308   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    309   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    310   
        let input = input
  182    311   
            .downcast::<crate::operation::describe_retention_configurations::DescribeRetentionConfigurationsInput>()
  183    312   
            .expect("correct type");
  184         -
        let _header_serialization_settings = _cfg
  185         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  186         -
            .cloned()
  187         -
            .unwrap_or_default();
  188         -
        let mut request_builder = {
  189         -
            #[allow(clippy::uninlined_format_args)]
  190         -
            fn uri_base(
  191         -
                _input: &crate::operation::describe_retention_configurations::DescribeRetentionConfigurationsInput,
  192         -
                output: &mut ::std::string::String,
  193         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  194         -
                use ::std::fmt::Write as _;
  195         -
                ::std::write!(output, "/").expect("formatting should succeed");
  196         -
                ::std::result::Result::Ok(())
  197         -
            }
  198         -
            #[allow(clippy::unnecessary_wraps)]
  199         -
            fn update_http_builder(
  200         -
                input: &crate::operation::describe_retention_configurations::DescribeRetentionConfigurationsInput,
  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.DescribeRetentionConfigurations",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  217         -
            crate::protocol_serde::shape_describe_retention_configurations::ser_describe_retention_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())
         313  +
        let protocol = _cfg
         314  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         315  +
            .expect("a SharedClientProtocol is required");
         316  +
        let mut request = protocol
         317  +
            .serialize_request(&input, DescribeRetentionConfigurations::INPUT_SCHEMA, "", _cfg)
         318  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         319  +
         320  +
        return ::std::result::Result::Ok(request);
  224    321   
    }
  225    322   
}
  226    323   
#[derive(Debug)]
  227    324   
struct DescribeRetentionConfigurationsEndpointParamsInterceptor;
  228    325   
  229    326   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeRetentionConfigurationsEndpointParamsInterceptor {
  230    327   
    fn name(&self) -> &'static str {
  231    328   
        "DescribeRetentionConfigurationsEndpointParamsInterceptor"
  232    329   
    }
  233    330   

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/disassociate_resource_types.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 `DisassociateResourceTypes`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DisassociateResourceTypes;
    6      6   
impl DisassociateResourceTypes {
    7      7   
    /// Creates a new `DisassociateResourceTypes`
    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::disassociate_resource_types::DisassociateResourceTypesInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::disassociate_resource_types::DisassociateResourceTypesOutput::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::disassociate_resource_types::DisassociateResourceTypesInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::disassociate_resource_types::DisassociateResourceTypesOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::disassociate_resource_types::DisassociateResourceTypesError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -124,130 +253,344 @@
  144    150   
                crate::operation::disassociate_resource_types::DisassociateResourceTypesError,
  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 DisassociateResourceTypesResponseDeserializer;
  153    159   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DisassociateResourceTypesResponseDeserializer {
  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_disassociate_resource_types::de_disassociate_resource_types_http_error(status, headers, body)
         169  +
        if !success && status != 200 || force_error {
         170  +
            let headers = response.headers();
         171  +
            let body = response.body().bytes().expect("body loaded");
         172  +
            #[allow(unused_mut)]
         173  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         174  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         175  +
            })?;
         176  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         177  +
            let generic = generic_builder.build();
         178  +
            let error_code = match generic.code() {
         179  +
                ::std::option::Option::Some(code) => code,
         180  +
                ::std::option::Option::None => {
         181  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         182  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         183  +
                            crate::operation::disassociate_resource_types::DisassociateResourceTypesError::unhandled(generic),
         184  +
                        ),
         185  +
                    ))
         186  +
                }
         187  +
            };
         188  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         189  +
            let protocol = _cfg
         190  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         191  +
                .expect("a SharedClientProtocol is required");
         192  +
            let err = match error_code {
         193  +
                "ConflictException" => crate::operation::disassociate_resource_types::DisassociateResourceTypesError::ConflictException({
         194  +
                    let mut tmp = match protocol
         195  +
                        .deserialize_response(response, crate::types::error::ConflictException::SCHEMA, _cfg)
         196  +
                        .and_then(|mut deser| {
         197  +
                            crate::types::error::ConflictException::deserialize_with_response(
         198  +
                                &mut *deser,
         199  +
                                response.headers(),
         200  +
                                response.status().into(),
         201  +
                                body,
         202  +
                            )
         203  +
                        }) {
         204  +
                        ::std::result::Result::Ok(val) => val,
         205  +
                        ::std::result::Result::Err(e) => {
         206  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         207  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         208  +
                            ))
         209  +
                        }
         210  +
                    };
         211  +
                    tmp.meta = generic;
         212  +
                    if tmp.message.is_none() {
         213  +
                        tmp.message = _error_message;
         214  +
                    }
         215  +
                    tmp
         216  +
                }),
         217  +
                "NoSuchConfigurationRecorderException" => {
         218  +
                    crate::operation::disassociate_resource_types::DisassociateResourceTypesError::NoSuchConfigurationRecorderException({
         219  +
                        let mut tmp = match protocol
         220  +
                            .deserialize_response(response, crate::types::error::NoSuchConfigurationRecorderException::SCHEMA, _cfg)
         221  +
                            .and_then(|mut deser| {
         222  +
                                crate::types::error::NoSuchConfigurationRecorderException::deserialize_with_response(
         223  +
                                    &mut *deser,
         224  +
                                    response.headers(),
         225  +
                                    response.status().into(),
         226  +
                                    body,
         227  +
                                )
         228  +
                            }) {
         229  +
                            ::std::result::Result::Ok(val) => val,
         230  +
                            ::std::result::Result::Err(e) => {
         231  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         232  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         233  +
                                ))
         234  +
                            }
         235  +
                        };
         236  +
                        tmp.meta = generic;
         237  +
                        if tmp.message.is_none() {
         238  +
                            tmp.message = _error_message;
         239  +
                        }
         240  +
                        tmp
         241  +
                    })
         242  +
                }
         243  +
                "ValidationException" => crate::operation::disassociate_resource_types::DisassociateResourceTypesError::ValidationException({
         244  +
                    let mut tmp = match protocol
         245  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         246  +
                        .and_then(|mut deser| {
         247  +
                            crate::types::error::ValidationException::deserialize_with_response(
         248  +
                                &mut *deser,
         249  +
                                response.headers(),
         250  +
                                response.status().into(),
         251  +
                                body,
         252  +
                            )
         253  +
                        }) {
         254  +
                        ::std::result::Result::Ok(val) => val,
         255  +
                        ::std::result::Result::Err(e) => {
         256  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         257  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         258  +
                            ))
         259  +
                        }
         260  +
                    };
         261  +
                    tmp.meta = generic;
         262  +
                    if tmp.message.is_none() {
         263  +
                        tmp.message = _error_message;
         264  +
                    }
         265  +
                    tmp
         266  +
                }),
         267  +
                _ => crate::operation::disassociate_resource_types::DisassociateResourceTypesError::generic(generic),
         268  +
            };
         269  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         270  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         271  +
            ))
  166    272   
        } else {
  167         -
            crate::protocol_serde::shape_disassociate_resource_types::de_disassociate_resource_types_http_response(status, headers, body)
  168         -
        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         273  +
            let protocol = _cfg
         274  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         275  +
                .expect("a SharedClientProtocol is required");
         276  +
            let mut deser = protocol
         277  +
                .deserialize_response(response, DisassociateResourceTypes::OUTPUT_SCHEMA, _cfg)
         278  +
                .map_err(|e| {
         279  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         280  +
                })?;
         281  +
            let body = response.body().bytes().expect("body loaded");
         282  +
            let output = crate::operation::disassociate_resource_types::DisassociateResourceTypesOutput::deserialize_with_response(
         283  +
                &mut *deser,
         284  +
                response.headers(),
         285  +
                response.status().into(),
         286  +
                body,
         287  +
            )
         288  +
            .map_err(|e| {
         289  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         290  +
            })?;
         291  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         292  +
        }
  170    293   
    }
  171    294   
}
  172    295   
#[derive(Debug)]
  173    296   
struct DisassociateResourceTypesRequestSerializer;
  174    297   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DisassociateResourceTypesRequestSerializer {
  175    298   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    299   
    fn serialize_input(
  177    300   
        &self,
  178    301   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    302   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    303   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    304   
        let input = input
  182    305   
            .downcast::<crate::operation::disassociate_resource_types::DisassociateResourceTypesInput>()
  183    306   
            .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::disassociate_resource_types::DisassociateResourceTypesInput,
  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::disassociate_resource_types::DisassociateResourceTypesInput,
  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.DisassociateResourceTypes",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  217         -
            crate::protocol_serde::shape_disassociate_resource_types::ser_disassociate_resource_types_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())
         307  +
        let protocol = _cfg
         308  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         309  +
            .expect("a SharedClientProtocol is required");
         310  +
        let mut request = protocol
         311  +
            .serialize_request(&input, DisassociateResourceTypes::INPUT_SCHEMA, "", _cfg)
         312  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         313  +
         314  +
        return ::std::result::Result::Ok(request);
  224    315   
    }
  225    316   
}
  226    317   
#[derive(Debug)]
  227    318   
struct DisassociateResourceTypesEndpointParamsInterceptor;
  228    319   
  229    320   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DisassociateResourceTypesEndpointParamsInterceptor {
  230    321   
    fn name(&self) -> &'static str {
  231    322   
        "DisassociateResourceTypesEndpointParamsInterceptor"
  232    323   
    }
  233    324   

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

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

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

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

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