AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

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

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

@@ -16,16 +183,195 @@
   36     36   
    "DescribeAggregateComplianceByConformancePacksInput",
   37     37   
);
   38     38   
static DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_MEMBER_CONFIGURATION_AGGREGATOR_NAME: ::aws_smithy_schema::Schema =
   39     39   
    ::aws_smithy_schema::Schema::new_member(
   40     40   
        ::aws_smithy_schema::ShapeId::from_static(
   41     41   
            "com.amazonaws.configservice.synthetic#DescribeAggregateComplianceByConformancePacksInput$ConfigurationAggregatorName",
   42     42   
            "com.amazonaws.configservice.synthetic",
   43     43   
            "DescribeAggregateComplianceByConformancePacksInput",
   44     44   
        ),
   45     45   
        ::aws_smithy_schema::ShapeType::String,
   46         -
        "configuration_aggregator_name",
          46  +
        "ConfigurationAggregatorName",
   47     47   
        0,
   48     48   
    );
   49     49   
static DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_MEMBER_FILTERS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   50     50   
    ::aws_smithy_schema::ShapeId::from_static(
   51     51   
        "com.amazonaws.configservice.synthetic#DescribeAggregateComplianceByConformancePacksInput$Filters",
   52     52   
        "com.amazonaws.configservice.synthetic",
   53     53   
        "DescribeAggregateComplianceByConformancePacksInput",
   54     54   
    ),
   55     55   
    ::aws_smithy_schema::ShapeType::Structure,
   56         -
    "filters",
          56  +
    "Filters",
   57     57   
    1,
   58     58   
);
   59     59   
static DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   60     60   
    ::aws_smithy_schema::ShapeId::from_static(
   61     61   
        "com.amazonaws.configservice.synthetic#DescribeAggregateComplianceByConformancePacksInput$Limit",
   62     62   
        "com.amazonaws.configservice.synthetic",
   63     63   
        "DescribeAggregateComplianceByConformancePacksInput",
   64     64   
    ),
   65     65   
    ::aws_smithy_schema::ShapeType::Integer,
   66         -
    "limit",
          66  +
    "Limit",
   67     67   
    2,
   68     68   
);
   69     69   
static DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   70     70   
    ::aws_smithy_schema::ShapeId::from_static(
   71     71   
        "com.amazonaws.configservice.synthetic#DescribeAggregateComplianceByConformancePacksInput$NextToken",
   72     72   
        "com.amazonaws.configservice.synthetic",
   73     73   
        "DescribeAggregateComplianceByConformancePacksInput",
   74     74   
    ),
   75     75   
    ::aws_smithy_schema::ShapeType::String,
   76         -
    "next_token",
          76  +
    "NextToken",
   77     77   
    3,
   78     78   
);
   79     79   
static DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   80     80   
    DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_SCHEMA_ID,
   81     81   
    ::aws_smithy_schema::ShapeType::Structure,
   82     82   
    &[
   83     83   
        &DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_MEMBER_CONFIGURATION_AGGREGATOR_NAME,
   84     84   
        &DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_MEMBER_FILTERS,
   85     85   
        &DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_MEMBER_LIMIT,
   86     86   
        &DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_MEMBER_NEXT_TOKEN,
   87     87   
    ],
   88     88   
);
   89     89   
impl DescribeAggregateComplianceByConformancePacksInput {
   90     90   
    /// The schema for this shape.
   91     91   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_SCHEMA;
   92     92   
}
   93     93   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeAggregateComplianceByConformancePacksInput {
   94     94   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   95     95   
    fn serialize_members(
   96     96   
        &self,
   97     97   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   98     98   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   99     99   
        if let Some(ref val) = self.configuration_aggregator_name {
  100    100   
            ser.write_string(
  101    101   
                &DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_MEMBER_CONFIGURATION_AGGREGATOR_NAME,
  102    102   
                val,
  103    103   
            )?;
  104    104   
        }
  105    105   
        if let Some(ref val) = self.filters {
  106    106   
            ser.write_struct(&DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_MEMBER_FILTERS, val)?;
  107    107   
        }
  108    108   
        if let Some(ref val) = self.limit {
  109    109   
            ser.write_integer(&DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_MEMBER_LIMIT, *val)?;
  110    110   
        }
  111    111   
        if let Some(ref val) = self.next_token {
  112    112   
            ser.write_string(&DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_MEMBER_NEXT_TOKEN, val)?;
  113    113   
        }
  114    114   
        Ok(())
  115    115   
    }
  116    116   
}
  117    117   
impl DescribeAggregateComplianceByConformancePacksInput {
  118    118   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  119         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  120         -
        deserializer: &mut D,
         119  +
    pub fn deserialize(
         120  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  121    121   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  122    122   
        #[allow(unused_variables, unused_mut)]
  123    123   
        let mut builder = Self::builder();
  124    124   
        #[allow(
  125    125   
            unused_variables,
  126    126   
            unreachable_code,
  127    127   
            clippy::single_match,
  128    128   
            clippy::match_single_binding,
  129    129   
            clippy::diverging_sub_expression
  130    130   
        )]
  131         -
        deserializer.read_struct(&DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_SCHEMA, (), |_, member, deser| {
         131  +
        deserializer.read_struct(&DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSINPUT_SCHEMA, &mut |member, deser| {
  132    132   
            match member.member_index() {
  133    133   
                Some(0) => {
  134    134   
                    builder.configuration_aggregator_name = Some(deser.read_string(member)?);
  135    135   
                }
  136    136   
                Some(1) => {
  137    137   
                    builder.filters = Some(crate::types::AggregateConformancePackComplianceFilters::deserialize(deser)?);
  138    138   
                }
  139    139   
                Some(2) => {
  140    140   
                    builder.limit = Some(deser.read_integer(member)?);
  141    141   
                }
  142    142   
                Some(3) => {
  143    143   
                    builder.next_token = Some(deser.read_string(member)?);
  144    144   
                }
  145    145   
                _ => {}
  146    146   
            }
  147    147   
            Ok(())
  148    148   
        })?;
         149  +
        builder.configuration_aggregator_name = builder.configuration_aggregator_name.or(Some(String::new()));
  149    150   
        builder
  150    151   
            .build()
  151    152   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  152    153   
    }
  153    154   
}
         155  +
impl DescribeAggregateComplianceByConformancePacksInput {
         156  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         157  +
    pub fn deserialize_with_response(
         158  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         159  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         160  +
        _status: u16,
         161  +
        _body: &[u8],
         162  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         163  +
        Self::deserialize(deserializer)
         164  +
    }
         165  +
}
  154    166   
impl DescribeAggregateComplianceByConformancePacksInput {
  155    167   
    /// Creates a new builder-style object to manufacture [`DescribeAggregateComplianceByConformancePacksInput`](crate::operation::describe_aggregate_compliance_by_conformance_packs::DescribeAggregateComplianceByConformancePacksInput).
  156    168   
    pub fn builder(
  157    169   
    ) -> crate::operation::describe_aggregate_compliance_by_conformance_packs::builders::DescribeAggregateComplianceByConformancePacksInputBuilder
  158    170   
    {
  159    171   
        crate::operation::describe_aggregate_compliance_by_conformance_packs::builders::DescribeAggregateComplianceByConformancePacksInputBuilder::default()
  160    172   
    }
  161    173   
}
  162    174   
  163    175   
/// A builder for [`DescribeAggregateComplianceByConformancePacksInput`](crate::operation::describe_aggregate_compliance_by_conformance_packs::DescribeAggregateComplianceByConformancePacksInput).

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

@@ -7,7 +141,193 @@
   27     27   
    "DescribeAggregateComplianceByConformancePacksOutput",
   28     28   
);
   29     29   
static DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSOUTPUT_MEMBER_AGGREGATE_COMPLIANCE_BY_CONFORMANCE_PACKS: ::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#DescribeAggregateComplianceByConformancePacksOutput$AggregateComplianceByConformancePacks",
   33     33   
            "com.amazonaws.configservice.synthetic",
   34     34   
            "DescribeAggregateComplianceByConformancePacksOutput",
   35     35   
        ),
   36     36   
        ::aws_smithy_schema::ShapeType::List,
   37         -
        "aggregate_compliance_by_conformance_packs",
          37  +
        "AggregateComplianceByConformancePacks",
   38     38   
        0,
   39     39   
    );
   40     40   
static DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSOUTPUT_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#DescribeAggregateComplianceByConformancePacksOutput$NextToken",
   43     43   
        "com.amazonaws.configservice.synthetic",
   44     44   
        "DescribeAggregateComplianceByConformancePacksOutput",
   45     45   
    ),
   46     46   
    ::aws_smithy_schema::ShapeType::String,
   47         -
    "next_token",
          47  +
    "NextToken",
   48     48   
    1,
   49     49   
);
          50  +
static DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSOUTPUT_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 DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   51     58   
    DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSOUTPUT_SCHEMA_ID,
   52     59   
    ::aws_smithy_schema::ShapeType::Structure,
   53     60   
    &[
   54     61   
        &DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSOUTPUT_MEMBER_AGGREGATE_COMPLIANCE_BY_CONFORMANCE_PACKS,
   55     62   
        &DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSOUTPUT_MEMBER_NEXT_TOKEN,
          63  +
        &DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSOUTPUT_MEMBER__REQUEST_ID,
   56     64   
    ],
   57     65   
);
   58     66   
impl DescribeAggregateComplianceByConformancePacksOutput {
   59     67   
    /// The schema for this shape.
   60     68   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSOUTPUT_SCHEMA;
   61     69   
}
   62     70   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeAggregateComplianceByConformancePacksOutput {
   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.aggregate_compliance_by_conformance_packs {
   69     77   
            ser.write_list(
   70     78   
                &DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSOUTPUT_MEMBER_AGGREGATE_COMPLIANCE_BY_CONFORMANCE_PACKS,
   71     79   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   72     80   
                    for item in val {
   73     81   
                        ser.write_struct(crate::types::AggregateComplianceByConformancePack::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(&DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   81     89   
        }
   82     90   
        Ok(())
   83     91   
    }
   84     92   
}
   85     93   
impl DescribeAggregateComplianceByConformancePacksOutput {
   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(&DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSOUTPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSOUTPUT_SCHEMA, &mut |member, deser| {
         108  +
            match member.member_index() {
         109  +
                Some(0) => {
         110  +
                    builder.aggregate_compliance_by_conformance_packs = Some({
         111  +
                        let mut container = Vec::new();
         112  +
                        deser.read_list(member, &mut |deser| {
         113  +
                            container.push(crate::types::AggregateComplianceByConformancePack::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 DescribeAggregateComplianceByConformancePacksOutput {
         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(&DESCRIBEAGGREGATECOMPLIANCEBYCONFORMANCEPACKSOUTPUT_SCHEMA, &mut |member, deser| {
  100    155   
            match member.member_index() {
  101    156   
                Some(0) => {
  102    157   
                    builder.aggregate_compliance_by_conformance_packs = 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::AggregateComplianceByConformancePack::deserialize(deser)?);
  110         -
                            Ok(list)
  111         -
                        })?
         158  +
                        let mut container = Vec::new();
         159  +
                        deser.read_list(member, &mut |deser| {
         160  +
                            container.push(crate::types::AggregateComplianceByConformancePack::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_aggregation_authorizations.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 `DescribeAggregationAuthorizations`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeAggregationAuthorizations;
    6      6   
impl DescribeAggregationAuthorizations {
    7      7   
    /// Creates a new `DescribeAggregationAuthorizations`
    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_aggregation_authorizations::DescribeAggregationAuthorizationsInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_aggregation_authorizations::DescribeAggregationAuthorizationsOutput::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_aggregation_authorizations::DescribeAggregationAuthorizationsInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_aggregation_authorizations::DescribeAggregationAuthorizationsOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_aggregation_authorizations::DescribeAggregationAuthorizationsError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -124,130 +255,348 @@
  144    150   
                crate::operation::describe_aggregation_authorizations::DescribeAggregationAuthorizationsError,
  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 DescribeAggregationAuthorizationsResponseDeserializer;
  153    159   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeAggregationAuthorizationsResponseDeserializer {
  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_aggregation_authorizations::de_describe_aggregation_authorizations_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_aggregation_authorizations::DescribeAggregationAuthorizationsError::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  +
                "InvalidLimitException" => {
         194  +
                    crate::operation::describe_aggregation_authorizations::DescribeAggregationAuthorizationsError::InvalidLimitException({
         195  +
                        let mut tmp = match protocol
         196  +
                            .deserialize_response(response, crate::types::error::InvalidLimitException::SCHEMA, _cfg)
         197  +
                            .and_then(|mut deser| {
         198  +
                                crate::types::error::InvalidLimitException::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  +
                "InvalidNextTokenException" => {
         220  +
                    crate::operation::describe_aggregation_authorizations::DescribeAggregationAuthorizationsError::InvalidNextTokenException({
         221  +
                        let mut tmp = match protocol
         222  +
                            .deserialize_response(response, crate::types::error::InvalidNextTokenException::SCHEMA, _cfg)
         223  +
                            .and_then(|mut deser| {
         224  +
                                crate::types::error::InvalidNextTokenException::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  +
                "InvalidParameterValueException" => {
         246  +
                    crate::operation::describe_aggregation_authorizations::DescribeAggregationAuthorizationsError::InvalidParameterValueException({
         247  +
                        let mut tmp = match protocol
         248  +
                            .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         249  +
                            .and_then(|mut deser| {
         250  +
                                crate::types::error::InvalidParameterValueException::deserialize_with_response(
         251  +
                                    &mut *deser,
         252  +
                                    response.headers(),
         253  +
                                    response.status().into(),
         254  +
                                    body,
         255  +
                                )
         256  +
                            }) {
         257  +
                            ::std::result::Result::Ok(val) => val,
         258  +
                            ::std::result::Result::Err(e) => {
         259  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         260  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         261  +
                                ))
         262  +
                            }
         263  +
                        };
         264  +
                        tmp.meta = generic;
         265  +
                        if tmp.message.is_none() {
         266  +
                            tmp.message = _error_message;
         267  +
                        }
         268  +
                        tmp
         269  +
                    })
         270  +
                }
         271  +
                _ => crate::operation::describe_aggregation_authorizations::DescribeAggregationAuthorizationsError::generic(generic),
         272  +
            };
         273  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         274  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         275  +
            ))
  166    276   
        } else {
  167         -
            crate::protocol_serde::shape_describe_aggregation_authorizations::de_describe_aggregation_authorizations_http_response(
  168         -
                status, headers, body,
         277  +
            let protocol = _cfg
         278  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         279  +
                .expect("a SharedClientProtocol is required");
         280  +
            let mut deser = protocol
         281  +
                .deserialize_response(response, DescribeAggregationAuthorizations::OUTPUT_SCHEMA, _cfg)
         282  +
                .map_err(|e| {
         283  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         284  +
                })?;
         285  +
            let body = response.body().bytes().expect("body loaded");
         286  +
            let output = crate::operation::describe_aggregation_authorizations::DescribeAggregationAuthorizationsOutput::deserialize_with_response(
         287  +
                &mut *deser,
         288  +
                response.headers(),
         289  +
                response.status().into(),
         290  +
                body,
  169    291   
            )
  170         -
        };
  171         -
        crate::protocol_serde::type_erase_result(parse_result)
         292  +
            .map_err(|e| {
         293  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         294  +
            })?;
         295  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         296  +
        }
  172    297   
    }
  173    298   
}
  174    299   
#[derive(Debug)]
  175    300   
struct DescribeAggregationAuthorizationsRequestSerializer;
  176    301   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeAggregationAuthorizationsRequestSerializer {
  177    302   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  178    303   
    fn serialize_input(
  179    304   
        &self,
  180    305   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  181    306   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  182    307   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  183    308   
        let input = input
  184    309   
            .downcast::<crate::operation::describe_aggregation_authorizations::DescribeAggregationAuthorizationsInput>()
  185    310   
            .expect("correct type");
  186         -
        let _header_serialization_settings = _cfg
  187         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  188         -
            .cloned()
  189         -
            .unwrap_or_default();
  190         -
        let mut request_builder = {
  191         -
            #[allow(clippy::uninlined_format_args)]
  192         -
            fn uri_base(
  193         -
                _input: &crate::operation::describe_aggregation_authorizations::DescribeAggregationAuthorizationsInput,
  194         -
                output: &mut ::std::string::String,
  195         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  196         -
                use ::std::fmt::Write as _;
  197         -
                ::std::write!(output, "/").expect("formatting should succeed");
  198         -
                ::std::result::Result::Ok(())
  199         -
            }
  200         -
            #[allow(clippy::unnecessary_wraps)]
  201         -
            fn update_http_builder(
  202         -
                input: &crate::operation::describe_aggregation_authorizations::DescribeAggregationAuthorizationsInput,
  203         -
                builder: ::http_1x::request::Builder,
  204         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  205         -
                let mut uri = ::std::string::String::new();
  206         -
                uri_base(input, &mut uri)?;
  207         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  208         -
            }
  209         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  210         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  211         -
            builder = _header_serialization_settings.set_default_header(
  212         -
                builder,
  213         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  214         -
                "StarlingDoveService.DescribeAggregationAuthorizations",
  215         -
            );
  216         -
            builder
  217         -
        };
  218         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  219         -
            crate::protocol_serde::shape_describe_aggregation_authorizations::ser_describe_aggregation_authorizations_input(&input)?,
  220         -
        );
  221         -
        if let Some(content_length) = body.content_length() {
  222         -
            let content_length = content_length.to_string();
  223         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  224         -
        }
  225         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         311  +
        let protocol = _cfg
         312  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         313  +
            .expect("a SharedClientProtocol is required");
         314  +
        let mut request = protocol
         315  +
            .serialize_request(&input, DescribeAggregationAuthorizations::INPUT_SCHEMA, "", _cfg)
         316  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         317  +
         318  +
        return ::std::result::Result::Ok(request);
  226    319   
    }
  227    320   
}
  228    321   
#[derive(Debug)]
  229    322   
struct DescribeAggregationAuthorizationsEndpointParamsInterceptor;
  230    323   
  231    324   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeAggregationAuthorizationsEndpointParamsInterceptor {
  232    325   
    fn name(&self) -> &'static str {
  233    326   
        "DescribeAggregationAuthorizationsEndpointParamsInterceptor"
  234    327   
    }
  235    328   

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

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

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

@@ -7,7 +141,193 @@
   27     27   
    "DescribeAggregationAuthorizationsOutput",
   28     28   
);
   29     29   
static DESCRIBEAGGREGATIONAUTHORIZATIONSOUTPUT_MEMBER_AGGREGATION_AUTHORIZATIONS: ::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#DescribeAggregationAuthorizationsOutput$AggregationAuthorizations",
   33     33   
            "com.amazonaws.configservice.synthetic",
   34     34   
            "DescribeAggregationAuthorizationsOutput",
   35     35   
        ),
   36     36   
        ::aws_smithy_schema::ShapeType::List,
   37         -
        "aggregation_authorizations",
          37  +
        "AggregationAuthorizations",
   38     38   
        0,
   39     39   
    );
   40     40   
static DESCRIBEAGGREGATIONAUTHORIZATIONSOUTPUT_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#DescribeAggregationAuthorizationsOutput$NextToken",
   43     43   
        "com.amazonaws.configservice.synthetic",
   44     44   
        "DescribeAggregationAuthorizationsOutput",
   45     45   
    ),
   46     46   
    ::aws_smithy_schema::ShapeType::String,
   47         -
    "next_token",
          47  +
    "NextToken",
   48     48   
    1,
   49     49   
);
          50  +
static DESCRIBEAGGREGATIONAUTHORIZATIONSOUTPUT_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 DESCRIBEAGGREGATIONAUTHORIZATIONSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   51     58   
    DESCRIBEAGGREGATIONAUTHORIZATIONSOUTPUT_SCHEMA_ID,
   52     59   
    ::aws_smithy_schema::ShapeType::Structure,
   53     60   
    &[
   54     61   
        &DESCRIBEAGGREGATIONAUTHORIZATIONSOUTPUT_MEMBER_AGGREGATION_AUTHORIZATIONS,
   55     62   
        &DESCRIBEAGGREGATIONAUTHORIZATIONSOUTPUT_MEMBER_NEXT_TOKEN,
          63  +
        &DESCRIBEAGGREGATIONAUTHORIZATIONSOUTPUT_MEMBER__REQUEST_ID,
   56     64   
    ],
   57     65   
);
   58     66   
impl DescribeAggregationAuthorizationsOutput {
   59     67   
    /// The schema for this shape.
   60     68   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEAGGREGATIONAUTHORIZATIONSOUTPUT_SCHEMA;
   61     69   
}
   62     70   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeAggregationAuthorizationsOutput {
   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.aggregation_authorizations {
   69     77   
            ser.write_list(
   70     78   
                &DESCRIBEAGGREGATIONAUTHORIZATIONSOUTPUT_MEMBER_AGGREGATION_AUTHORIZATIONS,
   71     79   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   72     80   
                    for item in val {
   73     81   
                        ser.write_struct(crate::types::AggregationAuthorization::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(&DESCRIBEAGGREGATIONAUTHORIZATIONSOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   81     89   
        }
   82     90   
        Ok(())
   83     91   
    }
   84     92   
}
   85     93   
impl DescribeAggregationAuthorizationsOutput {
   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(&DESCRIBEAGGREGATIONAUTHORIZATIONSOUTPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&DESCRIBEAGGREGATIONAUTHORIZATIONSOUTPUT_SCHEMA, &mut |member, deser| {
         108  +
            match member.member_index() {
         109  +
                Some(0) => {
         110  +
                    builder.aggregation_authorizations = Some({
         111  +
                        let mut container = Vec::new();
         112  +
                        deser.read_list(member, &mut |deser| {
         113  +
                            container.push(crate::types::AggregationAuthorization::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 DescribeAggregationAuthorizationsOutput {
         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(&DESCRIBEAGGREGATIONAUTHORIZATIONSOUTPUT_SCHEMA, &mut |member, deser| {
  100    155   
            match member.member_index() {
  101    156   
                Some(0) => {
  102    157   
                    builder.aggregation_authorizations = 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::AggregationAuthorization::deserialize(deser)?);
  110         -
                            Ok(list)
  111         -
                        })?
         158  +
                        let mut container = Vec::new();
         159  +
                        deser.read_list(member, &mut |deser| {
         160  +
                            container.push(crate::types::AggregationAuthorization::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_compliance_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 `DescribeComplianceByConfigRule`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeComplianceByConfigRule;
    6      6   
impl DescribeComplianceByConfigRule {
    7      7   
    /// Creates a new `DescribeComplianceByConfigRule`
    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_compliance_by_config_rule::DescribeComplianceByConfigRuleInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_compliance_by_config_rule::DescribeComplianceByConfigRuleOutput::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_compliance_by_config_rule::DescribeComplianceByConfigRuleInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_compliance_by_config_rule::DescribeComplianceByConfigRuleOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_compliance_by_config_rule::DescribeComplianceByConfigRuleError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -124,130 +255,348 @@
  144    150   
                crate::operation::describe_compliance_by_config_rule::DescribeComplianceByConfigRuleError,
  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 DescribeComplianceByConfigRuleResponseDeserializer;
  153    159   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeComplianceByConfigRuleResponseDeserializer {
  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_compliance_by_config_rule::de_describe_compliance_by_config_rule_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_compliance_by_config_rule::DescribeComplianceByConfigRuleError::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_compliance_by_config_rule::DescribeComplianceByConfigRuleError::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_compliance_by_config_rule::DescribeComplianceByConfigRuleError::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  +
                "NoSuchConfigRuleException" => {
         246  +
                    crate::operation::describe_compliance_by_config_rule::DescribeComplianceByConfigRuleError::NoSuchConfigRuleException({
         247  +
                        let mut tmp = match protocol
         248  +
                            .deserialize_response(response, crate::types::error::NoSuchConfigRuleException::SCHEMA, _cfg)
         249  +
                            .and_then(|mut deser| {
         250  +
                                crate::types::error::NoSuchConfigRuleException::deserialize_with_response(
         251  +
                                    &mut *deser,
         252  +
                                    response.headers(),
         253  +
                                    response.status().into(),
         254  +
                                    body,
         255  +
                                )
         256  +
                            }) {
         257  +
                            ::std::result::Result::Ok(val) => val,
         258  +
                            ::std::result::Result::Err(e) => {
         259  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         260  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         261  +
                                ))
         262  +
                            }
         263  +
                        };
         264  +
                        tmp.meta = generic;
         265  +
                        if tmp.message.is_none() {
         266  +
                            tmp.message = _error_message;
         267  +
                        }
         268  +
                        tmp
         269  +
                    })
         270  +
                }
         271  +
                _ => crate::operation::describe_compliance_by_config_rule::DescribeComplianceByConfigRuleError::generic(generic),
         272  +
            };
         273  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         274  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         275  +
            ))
  166    276   
        } else {
  167         -
            crate::protocol_serde::shape_describe_compliance_by_config_rule::de_describe_compliance_by_config_rule_http_response(
  168         -
                status, headers, body,
         277  +
            let protocol = _cfg
         278  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         279  +
                .expect("a SharedClientProtocol is required");
         280  +
            let mut deser = protocol
         281  +
                .deserialize_response(response, DescribeComplianceByConfigRule::OUTPUT_SCHEMA, _cfg)
         282  +
                .map_err(|e| {
         283  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         284  +
                })?;
         285  +
            let body = response.body().bytes().expect("body loaded");
         286  +
            let output = crate::operation::describe_compliance_by_config_rule::DescribeComplianceByConfigRuleOutput::deserialize_with_response(
         287  +
                &mut *deser,
         288  +
                response.headers(),
         289  +
                response.status().into(),
         290  +
                body,
  169    291   
            )
  170         -
        };
  171         -
        crate::protocol_serde::type_erase_result(parse_result)
         292  +
            .map_err(|e| {
         293  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         294  +
            })?;
         295  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         296  +
        }
  172    297   
    }
  173    298   
}
  174    299   
#[derive(Debug)]
  175    300   
struct DescribeComplianceByConfigRuleRequestSerializer;
  176    301   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeComplianceByConfigRuleRequestSerializer {
  177    302   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  178    303   
    fn serialize_input(
  179    304   
        &self,
  180    305   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  181    306   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  182    307   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  183    308   
        let input = input
  184    309   
            .downcast::<crate::operation::describe_compliance_by_config_rule::DescribeComplianceByConfigRuleInput>()
  185    310   
            .expect("correct type");
  186         -
        let _header_serialization_settings = _cfg
  187         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  188         -
            .cloned()
  189         -
            .unwrap_or_default();
  190         -
        let mut request_builder = {
  191         -
            #[allow(clippy::uninlined_format_args)]
  192         -
            fn uri_base(
  193         -
                _input: &crate::operation::describe_compliance_by_config_rule::DescribeComplianceByConfigRuleInput,
  194         -
                output: &mut ::std::string::String,
  195         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  196         -
                use ::std::fmt::Write as _;
  197         -
                ::std::write!(output, "/").expect("formatting should succeed");
  198         -
                ::std::result::Result::Ok(())
  199         -
            }
  200         -
            #[allow(clippy::unnecessary_wraps)]
  201         -
            fn update_http_builder(
  202         -
                input: &crate::operation::describe_compliance_by_config_rule::DescribeComplianceByConfigRuleInput,
  203         -
                builder: ::http_1x::request::Builder,
  204         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  205         -
                let mut uri = ::std::string::String::new();
  206         -
                uri_base(input, &mut uri)?;
  207         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  208         -
            }
  209         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  210         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  211         -
            builder = _header_serialization_settings.set_default_header(
  212         -
                builder,
  213         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  214         -
                "StarlingDoveService.DescribeComplianceByConfigRule",
  215         -
            );
  216         -
            builder
  217         -
        };
  218         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  219         -
            crate::protocol_serde::shape_describe_compliance_by_config_rule::ser_describe_compliance_by_config_rule_input(&input)?,
  220         -
        );
  221         -
        if let Some(content_length) = body.content_length() {
  222         -
            let content_length = content_length.to_string();
  223         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  224         -
        }
  225         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         311  +
        let protocol = _cfg
         312  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         313  +
            .expect("a SharedClientProtocol is required");
         314  +
        let mut request = protocol
         315  +
            .serialize_request(&input, DescribeComplianceByConfigRule::INPUT_SCHEMA, "", _cfg)
         316  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         317  +
         318  +
        return ::std::result::Result::Ok(request);
  226    319   
    }
  227    320   
}
  228    321   
#[derive(Debug)]
  229    322   
struct DescribeComplianceByConfigRuleEndpointParamsInterceptor;
  230    323   
  231    324   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeComplianceByConfigRuleEndpointParamsInterceptor {
  232    325   
    fn name(&self) -> &'static str {
  233    326   
        "DescribeComplianceByConfigRuleEndpointParamsInterceptor"
  234    327   
    }
  235    328   

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

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

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

@@ -7,7 +141,193 @@
   27     27   
    "com.amazonaws.configservice.synthetic",
   28     28   
    "DescribeComplianceByConfigRuleOutput",
   29     29   
);
   30     30   
static DESCRIBECOMPLIANCEBYCONFIGRULEOUTPUT_MEMBER_COMPLIANCE_BY_CONFIG_RULES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   31     31   
    ::aws_smithy_schema::ShapeId::from_static(
   32     32   
        "com.amazonaws.configservice.synthetic#DescribeComplianceByConfigRuleOutput$ComplianceByConfigRules",
   33     33   
        "com.amazonaws.configservice.synthetic",
   34     34   
        "DescribeComplianceByConfigRuleOutput",
   35     35   
    ),
   36     36   
    ::aws_smithy_schema::ShapeType::List,
   37         -
    "compliance_by_config_rules",
          37  +
    "ComplianceByConfigRules",
   38     38   
    0,
   39     39   
);
   40     40   
static DESCRIBECOMPLIANCEBYCONFIGRULEOUTPUT_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#DescribeComplianceByConfigRuleOutput$NextToken",
   43     43   
        "com.amazonaws.configservice.synthetic",
   44     44   
        "DescribeComplianceByConfigRuleOutput",
   45     45   
    ),
   46     46   
    ::aws_smithy_schema::ShapeType::String,
   47         -
    "next_token",
          47  +
    "NextToken",
   48     48   
    1,
   49     49   
);
          50  +
static DESCRIBECOMPLIANCEBYCONFIGRULEOUTPUT_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 DESCRIBECOMPLIANCEBYCONFIGRULEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   51     58   
    DESCRIBECOMPLIANCEBYCONFIGRULEOUTPUT_SCHEMA_ID,
   52     59   
    ::aws_smithy_schema::ShapeType::Structure,
   53     60   
    &[
   54     61   
        &DESCRIBECOMPLIANCEBYCONFIGRULEOUTPUT_MEMBER_COMPLIANCE_BY_CONFIG_RULES,
   55     62   
        &DESCRIBECOMPLIANCEBYCONFIGRULEOUTPUT_MEMBER_NEXT_TOKEN,
          63  +
        &DESCRIBECOMPLIANCEBYCONFIGRULEOUTPUT_MEMBER__REQUEST_ID,
   56     64   
    ],
   57     65   
);
   58     66   
impl DescribeComplianceByConfigRuleOutput {
   59     67   
    /// The schema for this shape.
   60     68   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBECOMPLIANCEBYCONFIGRULEOUTPUT_SCHEMA;
   61     69   
}
   62     70   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeComplianceByConfigRuleOutput {
   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.compliance_by_config_rules {
   69     77   
            ser.write_list(
   70     78   
                &DESCRIBECOMPLIANCEBYCONFIGRULEOUTPUT_MEMBER_COMPLIANCE_BY_CONFIG_RULES,
   71     79   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   72     80   
                    for item in val {
   73     81   
                        ser.write_struct(crate::types::ComplianceByConfigRule::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(&DESCRIBECOMPLIANCEBYCONFIGRULEOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   81     89   
        }
   82     90   
        Ok(())
   83     91   
    }
   84     92   
}
   85     93   
impl DescribeComplianceByConfigRuleOutput {
   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(&DESCRIBECOMPLIANCEBYCONFIGRULEOUTPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&DESCRIBECOMPLIANCEBYCONFIGRULEOUTPUT_SCHEMA, &mut |member, deser| {
         108  +
            match member.member_index() {
         109  +
                Some(0) => {
         110  +
                    builder.compliance_by_config_rules = Some({
         111  +
                        let mut container = Vec::new();
         112  +
                        deser.read_list(member, &mut |deser| {
         113  +
                            container.push(crate::types::ComplianceByConfigRule::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 DescribeComplianceByConfigRuleOutput {
         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(&DESCRIBECOMPLIANCEBYCONFIGRULEOUTPUT_SCHEMA, &mut |member, deser| {
  100    155   
            match member.member_index() {
  101    156   
                Some(0) => {
  102    157   
                    builder.compliance_by_config_rules = 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::ComplianceByConfigRule::deserialize(deser)?);
  110         -
                            Ok(list)
  111         -
                        })?
         158  +
                        let mut container = Vec::new();
         159  +
                        deser.read_list(member, &mut |deser| {
         160  +
                            container.push(crate::types::ComplianceByConfigRule::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_compliance_by_resource.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 `DescribeComplianceByResource`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeComplianceByResource;
    6      6   
impl DescribeComplianceByResource {
    7      7   
    /// Creates a new `DescribeComplianceByResource`
    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_compliance_by_resource::DescribeComplianceByResourceInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_compliance_by_resource::DescribeComplianceByResourceOutput::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_compliance_by_resource::DescribeComplianceByResourceInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_compliance_by_resource::DescribeComplianceByResourceOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_compliance_by_resource::DescribeComplianceByResourceError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -124,130 +253,322 @@
  144    150   
                crate::operation::describe_compliance_by_resource::DescribeComplianceByResourceError,
  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 DescribeComplianceByResourceResponseDeserializer;
  153    159   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeComplianceByResourceResponseDeserializer {
  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_compliance_by_resource::de_describe_compliance_by_resource_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_compliance_by_resource::DescribeComplianceByResourceError::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_compliance_by_resource::DescribeComplianceByResourceError::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_compliance_by_resource::DescribeComplianceByResourceError::InvalidParameterValueException({
         221  +
                        let mut tmp = match protocol
         222  +
                            .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         223  +
                            .and_then(|mut deser| {
         224  +
                                crate::types::error::InvalidParameterValueException::deserialize_with_response(
         225  +
                                    &mut *deser,
         226  +
                                    response.headers(),
         227  +
                                    response.status().into(),
         228  +
                                    body,
         229  +
                                )
         230  +
                            }) {
         231  +
                            ::std::result::Result::Ok(val) => val,
         232  +
                            ::std::result::Result::Err(e) => {
         233  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         234  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         235  +
                                ))
         236  +
                            }
         237  +
                        };
         238  +
                        tmp.meta = generic;
         239  +
                        if tmp.message.is_none() {
         240  +
                            tmp.message = _error_message;
         241  +
                        }
         242  +
                        tmp
         243  +
                    })
         244  +
                }
         245  +
                _ => crate::operation::describe_compliance_by_resource::DescribeComplianceByResourceError::generic(generic),
         246  +
            };
         247  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         248  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         249  +
            ))
  166    250   
        } else {
  167         -
            crate::protocol_serde::shape_describe_compliance_by_resource::de_describe_compliance_by_resource_http_response(status, headers, body)
  168         -
        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         251  +
            let protocol = _cfg
         252  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         253  +
                .expect("a SharedClientProtocol is required");
         254  +
            let mut deser = protocol
         255  +
                .deserialize_response(response, DescribeComplianceByResource::OUTPUT_SCHEMA, _cfg)
         256  +
                .map_err(|e| {
         257  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         258  +
                })?;
         259  +
            let body = response.body().bytes().expect("body loaded");
         260  +
            let output = crate::operation::describe_compliance_by_resource::DescribeComplianceByResourceOutput::deserialize_with_response(
         261  +
                &mut *deser,
         262  +
                response.headers(),
         263  +
                response.status().into(),
         264  +
                body,
         265  +
            )
         266  +
            .map_err(|e| {
         267  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         268  +
            })?;
         269  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         270  +
        }
  170    271   
    }
  171    272   
}
  172    273   
#[derive(Debug)]
  173    274   
struct DescribeComplianceByResourceRequestSerializer;
  174    275   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeComplianceByResourceRequestSerializer {
  175    276   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    277   
    fn serialize_input(
  177    278   
        &self,
  178    279   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    280   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    281   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    282   
        let input = input
  182    283   
            .downcast::<crate::operation::describe_compliance_by_resource::DescribeComplianceByResourceInput>()
  183    284   
            .expect("correct type");
  184         -
        let _header_serialization_settings = _cfg
  185         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  186         -
            .cloned()
  187         -
            .unwrap_or_default();
  188         -
        let mut request_builder = {
  189         -
            #[allow(clippy::uninlined_format_args)]
  190         -
            fn uri_base(
  191         -
                _input: &crate::operation::describe_compliance_by_resource::DescribeComplianceByResourceInput,
  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_compliance_by_resource::DescribeComplianceByResourceInput,
  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.DescribeComplianceByResource",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  217         -
            crate::protocol_serde::shape_describe_compliance_by_resource::ser_describe_compliance_by_resource_input(&input)?,
  218         -
        );
  219         -
        if let Some(content_length) = body.content_length() {
  220         -
            let content_length = content_length.to_string();
  221         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  222         -
        }
  223         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         285  +
        let protocol = _cfg
         286  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         287  +
            .expect("a SharedClientProtocol is required");
         288  +
        let mut request = protocol
         289  +
            .serialize_request(&input, DescribeComplianceByResource::INPUT_SCHEMA, "", _cfg)
         290  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         291  +
         292  +
        return ::std::result::Result::Ok(request);
  224    293   
    }
  225    294   
}
  226    295   
#[derive(Debug)]
  227    296   
struct DescribeComplianceByResourceEndpointParamsInterceptor;
  228    297   
  229    298   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeComplianceByResourceEndpointParamsInterceptor {
  230    299   
    fn name(&self) -> &'static str {
  231    300   
        "DescribeComplianceByResourceEndpointParamsInterceptor"
  232    301   
    }
  233    302