AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36 (ignoring whitespace)

Files changed:

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

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

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

@@ -7,7 +141,193 @@
   27     27   
    "DescribeOrganizationConfigRuleStatusesOutput",
   28     28   
);
   29     29   
static DESCRIBEORGANIZATIONCONFIGRULESTATUSESOUTPUT_MEMBER_ORGANIZATION_CONFIG_RULE_STATUSES: ::aws_smithy_schema::Schema =
   30     30   
    ::aws_smithy_schema::Schema::new_member(
   31     31   
        ::aws_smithy_schema::ShapeId::from_static(
   32     32   
            "com.amazonaws.configservice.synthetic#DescribeOrganizationConfigRuleStatusesOutput$OrganizationConfigRuleStatuses",
   33     33   
            "com.amazonaws.configservice.synthetic",
   34     34   
            "DescribeOrganizationConfigRuleStatusesOutput",
   35     35   
        ),
   36     36   
        ::aws_smithy_schema::ShapeType::List,
   37         -
        "organization_config_rule_statuses",
          37  +
        "OrganizationConfigRuleStatuses",
   38     38   
        0,
   39     39   
    );
   40     40   
static DESCRIBEORGANIZATIONCONFIGRULESTATUSESOUTPUT_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#DescribeOrganizationConfigRuleStatusesOutput$NextToken",
   43     43   
        "com.amazonaws.configservice.synthetic",
   44     44   
        "DescribeOrganizationConfigRuleStatusesOutput",
   45     45   
    ),
   46     46   
    ::aws_smithy_schema::ShapeType::String,
   47         -
    "next_token",
          47  +
    "NextToken",
   48     48   
    1,
   49     49   
);
          50  +
static DESCRIBEORGANIZATIONCONFIGRULESTATUSESOUTPUT_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 DESCRIBEORGANIZATIONCONFIGRULESTATUSESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   51     58   
    DESCRIBEORGANIZATIONCONFIGRULESTATUSESOUTPUT_SCHEMA_ID,
   52     59   
    ::aws_smithy_schema::ShapeType::Structure,
   53     60   
    &[
   54     61   
        &DESCRIBEORGANIZATIONCONFIGRULESTATUSESOUTPUT_MEMBER_ORGANIZATION_CONFIG_RULE_STATUSES,
   55     62   
        &DESCRIBEORGANIZATIONCONFIGRULESTATUSESOUTPUT_MEMBER_NEXT_TOKEN,
          63  +
        &DESCRIBEORGANIZATIONCONFIGRULESTATUSESOUTPUT_MEMBER__REQUEST_ID,
   56     64   
    ],
   57     65   
);
   58     66   
impl DescribeOrganizationConfigRuleStatusesOutput {
   59     67   
    /// The schema for this shape.
   60     68   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEORGANIZATIONCONFIGRULESTATUSESOUTPUT_SCHEMA;
   61     69   
}
   62     70   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeOrganizationConfigRuleStatusesOutput {
   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.organization_config_rule_statuses {
   69     77   
            ser.write_list(
   70     78   
                &DESCRIBEORGANIZATIONCONFIGRULESTATUSESOUTPUT_MEMBER_ORGANIZATION_CONFIG_RULE_STATUSES,
   71     79   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   72     80   
                    for item in val {
   73     81   
                        ser.write_struct(crate::types::OrganizationConfigRuleStatus::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(&DESCRIBEORGANIZATIONCONFIGRULESTATUSESOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   81     89   
        }
   82     90   
        Ok(())
   83     91   
    }
   84     92   
}
   85     93   
impl DescribeOrganizationConfigRuleStatusesOutput {
   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(&DESCRIBEORGANIZATIONCONFIGRULESTATUSESOUTPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&DESCRIBEORGANIZATIONCONFIGRULESTATUSESOUTPUT_SCHEMA, &mut |member, deser| {
  100    108   
            match member.member_index() {
  101    109   
                Some(0) => {
  102    110   
                    builder.organization_config_rule_statuses = Some({
  103         -
                        let container = if let Some(cap) = deser.container_size() {
  104         -
                            Vec::with_capacity(cap)
  105         -
                        } else {
  106         -
                            Vec::new()
  107         -
                        };
  108         -
                        deser.read_list(member, container, |mut list, deser| {
  109         -
                            list.push(crate::types::OrganizationConfigRuleStatus::deserialize(deser)?);
  110         -
                            Ok(list)
  111         -
                        })?
         111  +
                        let mut container = Vec::new();
         112  +
                        deser.read_list(member, &mut |deser| {
         113  +
                            container.push(crate::types::OrganizationConfigRuleStatus::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 DescribeOrganizationConfigRuleStatusesOutput {
         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(&DESCRIBEORGANIZATIONCONFIGRULESTATUSESOUTPUT_SCHEMA, &mut |member, deser| {
         155  +
            match member.member_index() {
         156  +
                Some(0) => {
         157  +
                    builder.organization_config_rule_statuses = Some({
         158  +
                        let mut container = Vec::new();
         159  +
                        deser.read_list(member, &mut |deser| {
         160  +
                            container.push(crate::types::OrganizationConfigRuleStatus::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_organization_config_rules.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 `DescribeOrganizationConfigRules`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeOrganizationConfigRules;
    6      6   
impl DescribeOrganizationConfigRules {
    7      7   
    /// Creates a new `DescribeOrganizationConfigRules`
    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_organization_config_rules::DescribeOrganizationConfigRulesInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_organization_config_rules::DescribeOrganizationConfigRulesOutput::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_organization_config_rules::DescribeOrganizationConfigRulesInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_organization_config_rules::DescribeOrganizationConfigRulesOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_organization_config_rules::DescribeOrganizationConfigRulesError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -127,133 +255,376 @@
  147    153   
        ::std::borrow::Cow::Owned(rcb)
  148    154   
    }
  149    155   
}
  150    156   
  151    157   
#[derive(Debug)]
  152    158   
struct DescribeOrganizationConfigRulesResponseDeserializer;
  153    159   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeOrganizationConfigRulesResponseDeserializer {
  154    160   
    fn deserialize_nonstreaming(
  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_organization_config_rules::de_describe_organization_config_rules_http_error(status, headers, body)
  166         -
        } else {
  167         -
            crate::protocol_serde::shape_describe_organization_config_rules::de_describe_organization_config_rules_http_response(
  168         -
                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_organization_config_rules::DescribeOrganizationConfigRulesError::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_organization_config_rules::DescribeOrganizationConfigRulesError::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_organization_config_rules::DescribeOrganizationConfigRulesError::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  +
                "NoSuchOrganizationConfigRuleException" => {
         246  +
                    crate::operation::describe_organization_config_rules::DescribeOrganizationConfigRulesError::NoSuchOrganizationConfigRuleException(
         247  +
                        {
         248  +
                            let mut tmp = match protocol
         249  +
                                .deserialize_response(response, crate::types::error::NoSuchOrganizationConfigRuleException::SCHEMA, _cfg)
         250  +
                                .and_then(|mut deser| {
         251  +
                                    crate::types::error::NoSuchOrganizationConfigRuleException::deserialize_with_response(
         252  +
                                        &mut *deser,
         253  +
                                        response.headers(),
         254  +
                                        response.status().into(),
         255  +
                                        body,
  169    256   
                                    )
         257  +
                                }) {
         258  +
                                ::std::result::Result::Ok(val) => val,
         259  +
                                ::std::result::Result::Err(e) => {
         260  +
                                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         261  +
                                        ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         262  +
                                    ))
         263  +
                                }
         264  +
                            };
         265  +
                            tmp.meta = generic;
         266  +
                            if tmp.message.is_none() {
         267  +
                                tmp.message = _error_message;
         268  +
                            }
         269  +
                            tmp
         270  +
                        },
         271  +
                    )
         272  +
                }
         273  +
                "OrganizationAccessDeniedException" => {
         274  +
                    crate::operation::describe_organization_config_rules::DescribeOrganizationConfigRulesError::OrganizationAccessDeniedException({
         275  +
                        let mut tmp = match protocol
         276  +
                            .deserialize_response(response, crate::types::error::OrganizationAccessDeniedException::SCHEMA, _cfg)
         277  +
                            .and_then(|mut deser| {
         278  +
                                crate::types::error::OrganizationAccessDeniedException::deserialize_with_response(
         279  +
                                    &mut *deser,
         280  +
                                    response.headers(),
         281  +
                                    response.status().into(),
         282  +
                                    body,
         283  +
                                )
         284  +
                            }) {
         285  +
                            ::std::result::Result::Ok(val) => val,
         286  +
                            ::std::result::Result::Err(e) => {
         287  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         288  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         289  +
                                ))
         290  +
                            }
         291  +
                        };
         292  +
                        tmp.meta = generic;
         293  +
                        if tmp.message.is_none() {
         294  +
                            tmp.message = _error_message;
         295  +
                        }
         296  +
                        tmp
         297  +
                    })
         298  +
                }
         299  +
                _ => crate::operation::describe_organization_config_rules::DescribeOrganizationConfigRulesError::generic(generic),
  170    300   
            };
  171         -
        crate::protocol_serde::type_erase_result(parse_result)
         301  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         302  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         303  +
            ))
         304  +
        } else {
         305  +
            let protocol = _cfg
         306  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         307  +
                .expect("a SharedClientProtocol is required");
         308  +
            let mut deser = protocol
         309  +
                .deserialize_response(response, DescribeOrganizationConfigRules::OUTPUT_SCHEMA, _cfg)
         310  +
                .map_err(|e| {
         311  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         312  +
                })?;
         313  +
            let body = response.body().bytes().expect("body loaded");
         314  +
            let output = crate::operation::describe_organization_config_rules::DescribeOrganizationConfigRulesOutput::deserialize_with_response(
         315  +
                &mut *deser,
         316  +
                response.headers(),
         317  +
                response.status().into(),
         318  +
                body,
         319  +
            )
         320  +
            .map_err(|e| {
         321  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         322  +
            })?;
         323  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         324  +
        }
  172    325   
    }
  173    326   
}
  174    327   
#[derive(Debug)]
  175    328   
struct DescribeOrganizationConfigRulesRequestSerializer;
  176    329   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeOrganizationConfigRulesRequestSerializer {
  177    330   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  178    331   
    fn serialize_input(
  179    332   
        &self,
  180    333   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  181    334   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  182    335   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  183    336   
        let input = input
  184    337   
            .downcast::<crate::operation::describe_organization_config_rules::DescribeOrganizationConfigRulesInput>()
  185    338   
            .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_organization_config_rules::DescribeOrganizationConfigRulesInput,
  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_organization_config_rules::DescribeOrganizationConfigRulesInput,
  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.DescribeOrganizationConfigRules",
  215         -
            );
  216         -
            builder
  217         -
        };
  218         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  219         -
            crate::protocol_serde::shape_describe_organization_config_rules::ser_describe_organization_config_rules_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())
         339  +
        let protocol = _cfg
         340  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         341  +
            .expect("a SharedClientProtocol is required");
         342  +
        let mut request = protocol
         343  +
            .serialize_request(&input, DescribeOrganizationConfigRules::INPUT_SCHEMA, "", _cfg)
         344  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         345  +
         346  +
        return ::std::result::Result::Ok(request);
  226    347   
    }
  227    348   
}
  228    349   
#[derive(Debug)]
  229    350   
struct DescribeOrganizationConfigRulesEndpointParamsInterceptor;
  230    351   
  231    352   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeOrganizationConfigRulesEndpointParamsInterceptor {
  232    353   
    fn name(&self) -> &'static str {
  233    354   
        "DescribeOrganizationConfigRulesEndpointParamsInterceptor"
  234    355   
    }
  235    356   

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

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

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

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

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

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

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

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

@@ -7,7 +141,193 @@
   27     27   
    "DescribeOrganizationConformancePackStatusesOutput",
   28     28   
);
   29     29   
static DESCRIBEORGANIZATIONCONFORMANCEPACKSTATUSESOUTPUT_MEMBER_ORGANIZATION_CONFORMANCE_PACK_STATUSES: ::aws_smithy_schema::Schema =
   30     30   
    ::aws_smithy_schema::Schema::new_member(
   31     31   
        ::aws_smithy_schema::ShapeId::from_static(
   32     32   
            "com.amazonaws.configservice.synthetic#DescribeOrganizationConformancePackStatusesOutput$OrganizationConformancePackStatuses",
   33     33   
            "com.amazonaws.configservice.synthetic",
   34     34   
            "DescribeOrganizationConformancePackStatusesOutput",
   35     35   
        ),
   36     36   
        ::aws_smithy_schema::ShapeType::List,
   37         -
        "organization_conformance_pack_statuses",
          37  +
        "OrganizationConformancePackStatuses",
   38     38   
        0,
   39     39   
    );
   40     40   
static DESCRIBEORGANIZATIONCONFORMANCEPACKSTATUSESOUTPUT_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#DescribeOrganizationConformancePackStatusesOutput$NextToken",
   43     43   
        "com.amazonaws.configservice.synthetic",
   44     44   
        "DescribeOrganizationConformancePackStatusesOutput",
   45     45   
    ),
   46     46   
    ::aws_smithy_schema::ShapeType::String,
   47         -
    "next_token",
          47  +
    "NextToken",
   48     48   
    1,
   49     49   
);
          50  +
static DESCRIBEORGANIZATIONCONFORMANCEPACKSTATUSESOUTPUT_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 DESCRIBEORGANIZATIONCONFORMANCEPACKSTATUSESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   51     58   
    DESCRIBEORGANIZATIONCONFORMANCEPACKSTATUSESOUTPUT_SCHEMA_ID,
   52     59   
    ::aws_smithy_schema::ShapeType::Structure,
   53     60   
    &[
   54     61   
        &DESCRIBEORGANIZATIONCONFORMANCEPACKSTATUSESOUTPUT_MEMBER_ORGANIZATION_CONFORMANCE_PACK_STATUSES,
   55     62   
        &DESCRIBEORGANIZATIONCONFORMANCEPACKSTATUSESOUTPUT_MEMBER_NEXT_TOKEN,
          63  +
        &DESCRIBEORGANIZATIONCONFORMANCEPACKSTATUSESOUTPUT_MEMBER__REQUEST_ID,
   56     64   
    ],
   57     65   
);
   58     66   
impl DescribeOrganizationConformancePackStatusesOutput {
   59     67   
    /// The schema for this shape.
   60     68   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEORGANIZATIONCONFORMANCEPACKSTATUSESOUTPUT_SCHEMA;
   61     69   
}
   62     70   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeOrganizationConformancePackStatusesOutput {
   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.organization_conformance_pack_statuses {
   69     77   
            ser.write_list(
   70     78   
                &DESCRIBEORGANIZATIONCONFORMANCEPACKSTATUSESOUTPUT_MEMBER_ORGANIZATION_CONFORMANCE_PACK_STATUSES,
   71     79   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   72     80   
                    for item in val {
   73     81   
                        ser.write_struct(crate::types::OrganizationConformancePackStatus::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(&DESCRIBEORGANIZATIONCONFORMANCEPACKSTATUSESOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   81     89   
        }
   82     90   
        Ok(())
   83     91   
    }
   84     92   
}
   85     93   
impl DescribeOrganizationConformancePackStatusesOutput {
   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(&DESCRIBEORGANIZATIONCONFORMANCEPACKSTATUSESOUTPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&DESCRIBEORGANIZATIONCONFORMANCEPACKSTATUSESOUTPUT_SCHEMA, &mut |member, deser| {
  100    108   
            match member.member_index() {
  101    109   
                Some(0) => {
  102    110   
                    builder.organization_conformance_pack_statuses = Some({
  103         -
                        let container = if let Some(cap) = deser.container_size() {
  104         -
                            Vec::with_capacity(cap)
  105         -
                        } else {
  106         -
                            Vec::new()
  107         -
                        };
  108         -
                        deser.read_list(member, container, |mut list, deser| {
  109         -
                            list.push(crate::types::OrganizationConformancePackStatus::deserialize(deser)?);
  110         -
                            Ok(list)
  111         -
                        })?
         111  +
                        let mut container = Vec::new();
         112  +
                        deser.read_list(member, &mut |deser| {
         113  +
                            container.push(crate::types::OrganizationConformancePackStatus::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 DescribeOrganizationConformancePackStatusesOutput {
         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(&DESCRIBEORGANIZATIONCONFORMANCEPACKSTATUSESOUTPUT_SCHEMA, &mut |member, deser| {
         155  +
            match member.member_index() {
         156  +
                Some(0) => {
         157  +
                    builder.organization_conformance_pack_statuses = Some({
         158  +
                        let mut container = Vec::new();
         159  +
                        deser.read_list(member, &mut |deser| {
         160  +
                            container.push(crate::types::OrganizationConformancePackStatus::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_organization_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 `DescribeOrganizationConformancePacks`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeOrganizationConformancePacks;
    6      6   
impl DescribeOrganizationConformancePacks {
    7      7   
    /// Creates a new `DescribeOrganizationConformancePacks`
    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_organization_conformance_packs::DescribeOrganizationConformancePacksInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_organization_conformance_packs::DescribeOrganizationConformancePacksOutput::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_organization_conformance_packs::DescribeOrganizationConformancePacksInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_organization_conformance_packs::DescribeOrganizationConformancePacksOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_organization_conformance_packs::DescribeOrganizationConformancePacksError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -127,133 +257,323 @@
  147    153   
        ::std::borrow::Cow::Owned(rcb)
  148    154   
    }
  149    155   
}
  150    156   
  151    157   
#[derive(Debug)]
  152    158   
struct DescribeOrganizationConformancePacksResponseDeserializer;
  153    159   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeOrganizationConformancePacksResponseDeserializer {
  154    160   
    fn deserialize_nonstreaming(
  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_organization_conformance_packs::de_describe_organization_conformance_packs_http_error(
  166         -
                status, headers, body,
  167         -
            )
         169  +
        if !success && status != 200 || force_error {
         170  +
            let headers = response.headers();
         171  +
            let body = response.body().bytes().expect("body loaded");
         172  +
            #[allow(unused_mut)]
         173  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         174  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         175  +
            })?;
         176  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         177  +
            let generic = generic_builder.build();
         178  +
            let error_code = match generic.code() {
         179  +
                ::std::option::Option::Some(code) => code,
         180  +
                ::std::option::Option::None => {
         181  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         182  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         183  +
                            crate::operation::describe_organization_conformance_packs::DescribeOrganizationConformancePacksError::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" => crate::operation::describe_organization_conformance_packs::DescribeOrganizationConformancePacksError::InvalidLimitException({
         194  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::InvalidLimitException::SCHEMA, _cfg)
         195  +
                        .and_then(|mut deser| crate::types::error::InvalidLimitException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         196  +
                    {
         197  +
                        ::std::result::Result::Ok(val) => val,
         198  +
                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
         199  +
                    };
         200  +
                    tmp.meta = generic;
         201  +
if tmp.message.is_none() {
         202  +
                                tmp.message = _error_message;
         203  +
                            }
         204  +
tmp
         205  +
}),
         206  +
"InvalidNextTokenException" => crate::operation::describe_organization_conformance_packs::DescribeOrganizationConformancePacksError::InvalidNextTokenException({
         207  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::InvalidNextTokenException::SCHEMA, _cfg)
         208  +
                        .and_then(|mut deser| crate::types::error::InvalidNextTokenException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         209  +
                    {
         210  +
                        ::std::result::Result::Ok(val) => val,
         211  +
                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
         212  +
                    };
         213  +
                    tmp.meta = generic;
         214  +
if tmp.message.is_none() {
         215  +
                                tmp.message = _error_message;
         216  +
                            }
         217  +
tmp
         218  +
}),
         219  +
"NoSuchOrganizationConformancePackException" => crate::operation::describe_organization_conformance_packs::DescribeOrganizationConformancePacksError::NoSuchOrganizationConformancePackException({
         220  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::NoSuchOrganizationConformancePackException::SCHEMA, _cfg)
         221  +
                        .and_then(|mut deser| crate::types::error::NoSuchOrganizationConformancePackException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         222  +
                    {
         223  +
                        ::std::result::Result::Ok(val) => val,
         224  +
                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
         225  +
                    };
         226  +
                    tmp.meta = generic;
         227  +
if tmp.message.is_none() {
         228  +
                                tmp.message = _error_message;
         229  +
                            }
         230  +
tmp
         231  +
}),
         232  +
"OrganizationAccessDeniedException" => crate::operation::describe_organization_conformance_packs::DescribeOrganizationConformancePacksError::OrganizationAccessDeniedException({
         233  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::OrganizationAccessDeniedException::SCHEMA, _cfg)
         234  +
                        .and_then(|mut deser| crate::types::error::OrganizationAccessDeniedException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         235  +
                    {
         236  +
                        ::std::result::Result::Ok(val) => val,
         237  +
                        ::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))),
         238  +
                    };
         239  +
                    tmp.meta = generic;
         240  +
if tmp.message.is_none() {
         241  +
                                tmp.message = _error_message;
         242  +
                            }
         243  +
tmp
         244  +
}),
         245  +
_ => crate::operation::describe_organization_conformance_packs::DescribeOrganizationConformancePacksError::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  +
            ))
  168    250   
        } else {
  169         -
            crate::protocol_serde::shape_describe_organization_conformance_packs::de_describe_organization_conformance_packs_http_response(
  170         -
                status, headers, body,
         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, DescribeOrganizationConformancePacks::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 =
         261  +
                crate::operation::describe_organization_conformance_packs::DescribeOrganizationConformancePacksOutput::deserialize_with_response(
         262  +
                    &mut *deser,
         263  +
                    response.headers(),
         264  +
                    response.status().into(),
         265  +
                    body,
  171    266   
                )
  172         -
        };
  173         -
        crate::protocol_serde::type_erase_result(parse_result)
         267  +
                .map_err(|e| {
         268  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         269  +
                })?;
         270  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         271  +
        }
  174    272   
    }
  175    273   
}
  176    274   
#[derive(Debug)]
  177    275   
struct DescribeOrganizationConformancePacksRequestSerializer;
  178    276   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeOrganizationConformancePacksRequestSerializer {
  179    277   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  180    278   
    fn serialize_input(
  181    279   
        &self,
  182    280   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  183    281   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  184    282   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  185    283   
        let input = input
  186    284   
            .downcast::<crate::operation::describe_organization_conformance_packs::DescribeOrganizationConformancePacksInput>()
  187    285   
            .expect("correct type");
  188         -
        let _header_serialization_settings = _cfg
  189         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  190         -
            .cloned()
  191         -
            .unwrap_or_default();
  192         -
        let mut request_builder = {
  193         -
            #[allow(clippy::uninlined_format_args)]
  194         -
            fn uri_base(
  195         -
                _input: &crate::operation::describe_organization_conformance_packs::DescribeOrganizationConformancePacksInput,
  196         -
                output: &mut ::std::string::String,
  197         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  198         -
                use ::std::fmt::Write as _;
  199         -
                ::std::write!(output, "/").expect("formatting should succeed");
  200         -
                ::std::result::Result::Ok(())
  201         -
            }
  202         -
            #[allow(clippy::unnecessary_wraps)]
  203         -
            fn update_http_builder(
  204         -
                input: &crate::operation::describe_organization_conformance_packs::DescribeOrganizationConformancePacksInput,
  205         -
                builder: ::http_1x::request::Builder,
  206         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  207         -
                let mut uri = ::std::string::String::new();
  208         -
                uri_base(input, &mut uri)?;
  209         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  210         -
            }
  211         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  212         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  213         -
            builder = _header_serialization_settings.set_default_header(
  214         -
                builder,
  215         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  216         -
                "StarlingDoveService.DescribeOrganizationConformancePacks",
  217         -
            );
  218         -
            builder
  219         -
        };
  220         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  221         -
            crate::protocol_serde::shape_describe_organization_conformance_packs::ser_describe_organization_conformance_packs_input(&input)?,
  222         -
        );
  223         -
        if let Some(content_length) = body.content_length() {
  224         -
            let content_length = content_length.to_string();
  225         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  226         -
        }
  227         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         286  +
        let protocol = _cfg
         287  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         288  +
            .expect("a SharedClientProtocol is required");
         289  +
        let mut request = protocol
         290  +
            .serialize_request(&input, DescribeOrganizationConformancePacks::INPUT_SCHEMA, "", _cfg)
         291  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         292  +
         293  +
        return ::std::result::Result::Ok(request);
  228    294   
    }
  229    295   
}
  230    296   
#[derive(Debug)]
  231    297   
struct DescribeOrganizationConformancePacksEndpointParamsInterceptor;
  232    298   
  233    299   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeOrganizationConformancePacksEndpointParamsInterceptor {
  234    300   
    fn name(&self) -> &'static str {
  235    301   
        "DescribeOrganizationConformancePacksEndpointParamsInterceptor"
  236    302   
    }
  237    303   

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

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

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

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