AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

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

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

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

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

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

@@ -7,7 +141,193 @@
   27     27   
    "GetOrganizationConfigRuleDetailedStatusOutput",
   28     28   
);
   29     29   
static GETORGANIZATIONCONFIGRULEDETAILEDSTATUSOUTPUT_MEMBER_ORGANIZATION_CONFIG_RULE_DETAILED_STATUS: ::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#GetOrganizationConfigRuleDetailedStatusOutput$OrganizationConfigRuleDetailedStatus",
   33     33   
            "com.amazonaws.configservice.synthetic",
   34     34   
            "GetOrganizationConfigRuleDetailedStatusOutput",
   35     35   
        ),
   36     36   
        ::aws_smithy_schema::ShapeType::List,
   37         -
        "organization_config_rule_detailed_status",
          37  +
        "OrganizationConfigRuleDetailedStatus",
   38     38   
        0,
   39     39   
    );
   40     40   
static GETORGANIZATIONCONFIGRULEDETAILEDSTATUSOUTPUT_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#GetOrganizationConfigRuleDetailedStatusOutput$NextToken",
   43     43   
        "com.amazonaws.configservice.synthetic",
   44     44   
        "GetOrganizationConfigRuleDetailedStatusOutput",
   45     45   
    ),
   46     46   
    ::aws_smithy_schema::ShapeType::String,
   47         -
    "next_token",
          47  +
    "NextToken",
   48     48   
    1,
   49     49   
);
          50  +
static GETORGANIZATIONCONFIGRULEDETAILEDSTATUSOUTPUT_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 GETORGANIZATIONCONFIGRULEDETAILEDSTATUSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   51     58   
    GETORGANIZATIONCONFIGRULEDETAILEDSTATUSOUTPUT_SCHEMA_ID,
   52     59   
    ::aws_smithy_schema::ShapeType::Structure,
   53     60   
    &[
   54     61   
        &GETORGANIZATIONCONFIGRULEDETAILEDSTATUSOUTPUT_MEMBER_ORGANIZATION_CONFIG_RULE_DETAILED_STATUS,
   55     62   
        &GETORGANIZATIONCONFIGRULEDETAILEDSTATUSOUTPUT_MEMBER_NEXT_TOKEN,
          63  +
        &GETORGANIZATIONCONFIGRULEDETAILEDSTATUSOUTPUT_MEMBER__REQUEST_ID,
   56     64   
    ],
   57     65   
);
   58     66   
impl GetOrganizationConfigRuleDetailedStatusOutput {
   59     67   
    /// The schema for this shape.
   60     68   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETORGANIZATIONCONFIGRULEDETAILEDSTATUSOUTPUT_SCHEMA;
   61     69   
}
   62     70   
impl ::aws_smithy_schema::serde::SerializableStruct for GetOrganizationConfigRuleDetailedStatusOutput {
   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_detailed_status {
   69     77   
            ser.write_list(
   70     78   
                &GETORGANIZATIONCONFIGRULEDETAILEDSTATUSOUTPUT_MEMBER_ORGANIZATION_CONFIG_RULE_DETAILED_STATUS,
   71     79   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   72     80   
                    for item in val {
   73     81   
                        ser.write_struct(crate::types::MemberAccountStatus::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(&GETORGANIZATIONCONFIGRULEDETAILEDSTATUSOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   81     89   
        }
   82     90   
        Ok(())
   83     91   
    }
   84     92   
}
   85     93   
impl GetOrganizationConfigRuleDetailedStatusOutput {
   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(&GETORGANIZATIONCONFIGRULEDETAILEDSTATUSOUTPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&GETORGANIZATIONCONFIGRULEDETAILEDSTATUSOUTPUT_SCHEMA, &mut |member, deser| {
  100    108   
            match member.member_index() {
  101    109   
                Some(0) => {
  102    110   
                    builder.organization_config_rule_detailed_status = 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::MemberAccountStatus::deserialize(deser)?);
  110         -
                            Ok(list)
  111         -
                        })?
         111  +
                        let mut container = Vec::new();
         112  +
                        deser.read_list(member, &mut |deser| {
         113  +
                            container.push(crate::types::MemberAccountStatus::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 GetOrganizationConfigRuleDetailedStatusOutput {
         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(&GETORGANIZATIONCONFIGRULEDETAILEDSTATUSOUTPUT_SCHEMA, &mut |member, deser| {
         155  +
            match member.member_index() {
         156  +
                Some(0) => {
         157  +
                    builder.organization_config_rule_detailed_status = Some({
         158  +
                        let mut container = Vec::new();
         159  +
                        deser.read_list(member, &mut |deser| {
         160  +
                            container.push(crate::types::MemberAccountStatus::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/get_organization_conformance_pack_detailed_status.rs

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

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/config/src/operation/get_organization_custom_rule_policy.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 `GetOrganizationCustomRulePolicy`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct GetOrganizationCustomRulePolicy;
    6      6   
impl GetOrganizationCustomRulePolicy {
    7      7   
    /// Creates a new `GetOrganizationCustomRulePolicy`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -124,130 +255,324 @@
  144    150   
                crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError,
  145    151   
            >::new());
  146    152   
  147    153   
        ::std::borrow::Cow::Owned(rcb)
  148    154   
    }
  149    155   
}
  150    156   
  151    157   
#[derive(Debug)]
  152    158   
struct GetOrganizationCustomRulePolicyResponseDeserializer;
  153    159   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetOrganizationCustomRulePolicyResponseDeserializer {
  154         -
    fn deserialize_nonstreaming(
         160  +
    fn deserialize_nonstreaming_with_config(
  155    161   
        &self,
  156    162   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         163  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    164   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    165   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  159         -
        let headers = response.headers();
  160         -
        let body = response.body().bytes().expect("body loaded");
  161    166   
        #[allow(unused_mut)]
  162    167   
        let mut force_error = false;
  163    168   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_get_organization_custom_rule_policy::de_get_organization_custom_rule_policy_http_error(status, headers, body)
  166         -
        } else {
  167         -
            crate::protocol_serde::shape_get_organization_custom_rule_policy::de_get_organization_custom_rule_policy_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::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError::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  +
                "NoSuchOrganizationConfigRuleException" => {
         194  +
                    crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError::NoSuchOrganizationConfigRuleException(
         195  +
                        {
         196  +
                            let mut tmp = match protocol
         197  +
                                .deserialize_response(response, crate::types::error::NoSuchOrganizationConfigRuleException::SCHEMA, _cfg)
         198  +
                                .and_then(|mut deser| {
         199  +
                                    crate::types::error::NoSuchOrganizationConfigRuleException::deserialize_with_response(
         200  +
                                        &mut *deser,
         201  +
                                        response.headers(),
         202  +
                                        response.status().into(),
         203  +
                                        body,
         204  +
                                    )
         205  +
                                }) {
         206  +
                                ::std::result::Result::Ok(val) => val,
         207  +
                                ::std::result::Result::Err(e) => {
         208  +
                                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         209  +
                                        ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         210  +
                                    ))
         211  +
                                }
         212  +
                            };
         213  +
                            tmp.meta = generic;
         214  +
                            if tmp.message.is_none() {
         215  +
                                tmp.message = _error_message;
         216  +
                            }
         217  +
                            tmp
         218  +
                        },
         219  +
                    )
         220  +
                }
         221  +
                "OrganizationAccessDeniedException" => {
         222  +
                    crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError::OrganizationAccessDeniedException({
         223  +
                        let mut tmp = match protocol
         224  +
                            .deserialize_response(response, crate::types::error::OrganizationAccessDeniedException::SCHEMA, _cfg)
         225  +
                            .and_then(|mut deser| {
         226  +
                                crate::types::error::OrganizationAccessDeniedException::deserialize_with_response(
         227  +
                                    &mut *deser,
         228  +
                                    response.headers(),
         229  +
                                    response.status().into(),
         230  +
                                    body,
  169    231   
                                )
         232  +
                            }) {
         233  +
                            ::std::result::Result::Ok(val) => val,
         234  +
                            ::std::result::Result::Err(e) => {
         235  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         236  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         237  +
                                ))
         238  +
                            }
  170    239   
                        };
  171         -
        crate::protocol_serde::type_erase_result(parse_result)
         240  +
                        tmp.meta = generic;
         241  +
                        if tmp.message.is_none() {
         242  +
                            tmp.message = _error_message;
         243  +
                        }
         244  +
                        tmp
         245  +
                    })
         246  +
                }
         247  +
                _ => crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError::generic(generic),
         248  +
            };
         249  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         250  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         251  +
            ))
         252  +
        } else {
         253  +
            let protocol = _cfg
         254  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         255  +
                .expect("a SharedClientProtocol is required");
         256  +
            let mut deser = protocol
         257  +
                .deserialize_response(response, GetOrganizationCustomRulePolicy::OUTPUT_SCHEMA, _cfg)
         258  +
                .map_err(|e| {
         259  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         260  +
                })?;
         261  +
            let body = response.body().bytes().expect("body loaded");
         262  +
            let output = crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyOutput::deserialize_with_response(
         263  +
                &mut *deser,
         264  +
                response.headers(),
         265  +
                response.status().into(),
         266  +
                body,
         267  +
            )
         268  +
            .map_err(|e| {
         269  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         270  +
            })?;
         271  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         272  +
        }
  172    273   
    }
  173    274   
}
  174    275   
#[derive(Debug)]
  175    276   
struct GetOrganizationCustomRulePolicyRequestSerializer;
  176    277   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetOrganizationCustomRulePolicyRequestSerializer {
  177    278   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  178    279   
    fn serialize_input(
  179    280   
        &self,
  180    281   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  181    282   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  182    283   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  183    284   
        let input = input
  184    285   
            .downcast::<crate::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyInput>()
  185    286   
            .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::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyInput,
  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::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyInput,
  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.GetOrganizationCustomRulePolicy",
  215         -
            );
  216         -
            builder
  217         -
        };
  218         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  219         -
            crate::protocol_serde::shape_get_organization_custom_rule_policy::ser_get_organization_custom_rule_policy_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())
         287  +
        let protocol = _cfg
         288  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         289  +
            .expect("a SharedClientProtocol is required");
         290  +
        let mut request = protocol
         291  +
            .serialize_request(&input, GetOrganizationCustomRulePolicy::INPUT_SCHEMA, "", _cfg)
         292  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         293  +
         294  +
        return ::std::result::Result::Ok(request);
  226    295   
    }
  227    296   
}
  228    297   
#[derive(Debug)]
  229    298   
struct GetOrganizationCustomRulePolicyEndpointParamsInterceptor;
  230    299   
  231    300   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetOrganizationCustomRulePolicyEndpointParamsInterceptor {
  232    301   
    fn name(&self) -> &'static str {
  233    302   
        "GetOrganizationCustomRulePolicyEndpointParamsInterceptor"
  234    303   
    }
  235    304   

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

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

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

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

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