AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36 (ignoring whitespace)

Files changed:

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

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

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

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

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

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

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

@@ -1,1 +80,111 @@
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct PutExternalEvaluationOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static PUTEXTERNALEVALUATIONOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.configservice.synthetic#PutExternalEvaluationOutput",
   10     10   
    "com.amazonaws.configservice.synthetic",
   11     11   
    "PutExternalEvaluationOutput",
   12     12   
);
   13         -
static PUTEXTERNALEVALUATIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(PUTEXTERNALEVALUATIONOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static PUTEXTERNALEVALUATIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          14  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          15  +
    ::aws_smithy_schema::ShapeType::String,
          16  +
    "request_id",
          17  +
    0,
          18  +
)
          19  +
.with_http_header("x-amzn-requestid");
          20  +
static PUTEXTERNALEVALUATIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    PUTEXTERNALEVALUATIONOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&PUTEXTERNALEVALUATIONOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl PutExternalEvaluationOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTEXTERNALEVALUATIONOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for PutExternalEvaluationOutput {
   20     30   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   21     31   
    fn serialize_members(
   22     32   
        &self,
   23     33   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   24     34   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   25     35   
        Ok(())
   26     36   
    }
   27     37   
}
   28     38   
impl PutExternalEvaluationOutput {
   29     39   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   30         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   31         -
        deserializer: &mut D,
          40  +
    pub fn deserialize(
          41  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   32     42   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   33     43   
        #[allow(unused_variables, unused_mut)]
   34     44   
        let mut builder = Self::builder();
   35     45   
        #[allow(
   36     46   
            unused_variables,
   37     47   
            unreachable_code,
   38     48   
            clippy::single_match,
   39     49   
            clippy::match_single_binding,
   40     50   
            clippy::diverging_sub_expression
   41     51   
        )]
   42         -
        deserializer.read_struct(&PUTEXTERNALEVALUATIONOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&PUTEXTERNALEVALUATIONOUTPUT_SCHEMA, &mut |member, deser| {
   43     53   
            match member.member_index() {
          54  +
                Some(0) => {
          55  +
                    builder._request_id = Some(deser.read_string(member)?);
          56  +
                }
   44     57   
                _ => {}
   45     58   
            }
   46     59   
            Ok(())
   47     60   
        })?;
   48     61   
        Ok(builder.build())
   49     62   
    }
   50     63   
}
          64  +
impl PutExternalEvaluationOutput {
          65  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          66  +
    /// Header-bound members are read directly from headers, avoiding runtime
          67  +
    /// member iteration overhead. Body members are read via the deserializer.
          68  +
    pub fn deserialize_with_response(
          69  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        if let Some(val) = headers.get("x-amzn-requestid") {
          77  +
            builder._request_id = Some(val.to_string());
          78  +
        }
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
   51     82   
impl ::aws_types::request_id::RequestId for PutExternalEvaluationOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl PutExternalEvaluationOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`PutExternalEvaluationOutput`](crate::operation::put_external_evaluation::PutExternalEvaluationOutput).
   58     89   
    pub fn builder() -> crate::operation::put_external_evaluation::builders::PutExternalEvaluationOutputBuilder {
   59     90   
        crate::operation::put_external_evaluation::builders::PutExternalEvaluationOutputBuilder::default()
   60     91   
    }

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

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `PutOrganizationConfigRule`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutOrganizationConfigRule;
    6      6   
impl PutOrganizationConfigRule {
    7      7   
    /// Creates a new `PutOrganizationConfigRule`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::put_organization_config_rule::PutOrganizationConfigRuleInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::put_organization_config_rule::PutOrganizationConfigRuleOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::put_organization_config_rule::PutOrganizationConfigRuleInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::put_organization_config_rule::PutOrganizationConfigRuleOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -127,133 +253,374 @@
  147    153   
        ::std::borrow::Cow::Owned(rcb)
  148    154   
    }
  149    155   
}
  150    156   
  151    157   
#[derive(Debug)]
  152    158   
struct PutOrganizationConfigRuleResponseDeserializer;
  153    159   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutOrganizationConfigRuleResponseDeserializer {
  154    160   
    fn deserialize_nonstreaming(
  155    161   
        &self,
  156    162   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         163  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    164   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    165   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  159         -
        let headers = response.headers();
  160         -
        let body = response.body().bytes().expect("body loaded");
  161    166   
        #[allow(unused_mut)]
  162    167   
        let mut force_error = false;
  163    168   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_put_organization_config_rule::de_put_organization_config_rule_http_error(status, headers, body)
  166         -
        } else {
  167         -
            crate::protocol_serde::shape_put_organization_config_rule::de_put_organization_config_rule_http_response(status, headers, body)
         169  +
        if !success && status != 200 || force_error {
         170  +
            let headers = response.headers();
         171  +
            let body = response.body().bytes().expect("body loaded");
         172  +
            #[allow(unused_mut)]
         173  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         174  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         175  +
            })?;
         176  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         177  +
            let generic = generic_builder.build();
         178  +
            let error_code = match generic.code() {
         179  +
                ::std::option::Option::Some(code) => code,
         180  +
                ::std::option::Option::None => {
         181  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         182  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         183  +
                            crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::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  +
"InsufficientPermissionsException" => crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::InsufficientPermissionsException({
         194  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::InsufficientPermissionsException::SCHEMA, _cfg)
         195  +
                        .and_then(|mut deser| crate::types::error::InsufficientPermissionsException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         196  +
                    {
         197  +
                        ::std::result::Result::Ok(val) => val,
         198  +
                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
         199  +
                    };
         200  +
                    tmp.meta = generic;
         201  +
if tmp.message.is_none() {
         202  +
                                tmp.message = _error_message;
         203  +
                            }
         204  +
tmp
         205  +
}),
         206  +
"InvalidParameterValueException" => crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::InvalidParameterValueException({
         207  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         208  +
                        .and_then(|mut deser| crate::types::error::InvalidParameterValueException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         209  +
                    {
         210  +
                        ::std::result::Result::Ok(val) => val,
         211  +
                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
         212  +
                    };
         213  +
                    tmp.meta = generic;
         214  +
if tmp.message.is_none() {
         215  +
                                tmp.message = _error_message;
         216  +
                            }
         217  +
tmp
         218  +
}),
         219  +
"MaxNumberOfOrganizationConfigRulesExceededException" => crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::MaxNumberOfOrganizationConfigRulesExceededException({
         220  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::MaxNumberOfOrganizationConfigRulesExceededException::SCHEMA, _cfg)
         221  +
                        .and_then(|mut deser| crate::types::error::MaxNumberOfOrganizationConfigRulesExceededException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         222  +
                    {
         223  +
                        ::std::result::Result::Ok(val) => val,
         224  +
                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
         225  +
                    };
         226  +
                    tmp.meta = generic;
         227  +
if tmp.message.is_none() {
         228  +
                                tmp.message = _error_message;
         229  +
                            }
         230  +
tmp
         231  +
}),
         232  +
"NoAvailableOrganizationException" => crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::NoAvailableOrganizationException({
         233  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::NoAvailableOrganizationException::SCHEMA, _cfg)
         234  +
                        .and_then(|mut deser| crate::types::error::NoAvailableOrganizationException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         235  +
                    {
         236  +
                        ::std::result::Result::Ok(val) => val,
         237  +
                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
         238  +
                    };
         239  +
                    tmp.meta = generic;
         240  +
if tmp.message.is_none() {
         241  +
                                tmp.message = _error_message;
         242  +
                            }
         243  +
tmp
         244  +
}),
         245  +
"OrganizationAccessDeniedException" => crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::OrganizationAccessDeniedException({
         246  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::OrganizationAccessDeniedException::SCHEMA, _cfg)
         247  +
                        .and_then(|mut deser| crate::types::error::OrganizationAccessDeniedException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         248  +
                    {
         249  +
                        ::std::result::Result::Ok(val) => val,
         250  +
                        ::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    251   
                    };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         252  +
                    tmp.meta = generic;
         253  +
if tmp.message.is_none() {
         254  +
                                tmp.message = _error_message;
         255  +
                            }
         256  +
tmp
         257  +
}),
         258  +
"OrganizationAllFeaturesNotEnabledException" => crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::OrganizationAllFeaturesNotEnabledException({
         259  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::OrganizationAllFeaturesNotEnabledException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| crate::types::error::OrganizationAllFeaturesNotEnabledException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         261  +
                    {
         262  +
                        ::std::result::Result::Ok(val) => val,
         263  +
                        ::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))),
         264  +
                    };
         265  +
                    tmp.meta = generic;
         266  +
if tmp.message.is_none() {
         267  +
                                tmp.message = _error_message;
         268  +
                            }
         269  +
tmp
         270  +
}),
         271  +
"ResourceInUseException" => crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::ResourceInUseException({
         272  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::ResourceInUseException::SCHEMA, _cfg)
         273  +
                        .and_then(|mut deser| crate::types::error::ResourceInUseException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         274  +
                    {
         275  +
                        ::std::result::Result::Ok(val) => val,
         276  +
                        ::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))),
         277  +
                    };
         278  +
                    tmp.meta = generic;
         279  +
if tmp.message.is_none() {
         280  +
                                tmp.message = _error_message;
         281  +
                            }
         282  +
tmp
         283  +
}),
         284  +
"ValidationException" => crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::ValidationException({
         285  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         286  +
                        .and_then(|mut deser| crate::types::error::ValidationException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         287  +
                    {
         288  +
                        ::std::result::Result::Ok(val) => val,
         289  +
                        ::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))),
         290  +
                    };
         291  +
                    tmp.meta = generic;
         292  +
if tmp.message.is_none() {
         293  +
                                tmp.message = _error_message;
         294  +
                            }
         295  +
tmp
         296  +
}),
         297  +
_ => crate::operation::put_organization_config_rule::PutOrganizationConfigRuleError::generic(generic)
         298  +
};
         299  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         300  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         301  +
            ))
         302  +
        } else {
         303  +
            let protocol = _cfg
         304  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         305  +
                .expect("a SharedClientProtocol is required");
         306  +
            let mut deser = protocol
         307  +
                .deserialize_response(response, PutOrganizationConfigRule::OUTPUT_SCHEMA, _cfg)
         308  +
                .map_err(|e| {
         309  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         310  +
                })?;
         311  +
            let body = response.body().bytes().expect("body loaded");
         312  +
            let output = crate::operation::put_organization_config_rule::PutOrganizationConfigRuleOutput::deserialize_with_response(
         313  +
                &mut *deser,
         314  +
                response.headers(),
         315  +
                response.status().into(),
         316  +
                body,
         317  +
            )
         318  +
            .map_err(|e| {
         319  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         320  +
            })?;
         321  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         322  +
        }
  170    323   
    }
  171    324   
}
  172    325   
#[derive(Debug)]
  173    326   
struct PutOrganizationConfigRuleRequestSerializer;
  174    327   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutOrganizationConfigRuleRequestSerializer {
  175    328   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    329   
    fn serialize_input(
  177    330   
        &self,
  178    331   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    332   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    333   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    334   
        let input = input
  182    335   
            .downcast::<crate::operation::put_organization_config_rule::PutOrganizationConfigRuleInput>()
  183    336   
            .expect("correct type");
  184         -
        let _header_serialization_settings = _cfg
  185         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  186         -
            .cloned()
  187         -
            .unwrap_or_default();
  188         -
        let mut request_builder = {
  189         -
            #[allow(clippy::uninlined_format_args)]
  190         -
            fn uri_base(
  191         -
                _input: &crate::operation::put_organization_config_rule::PutOrganizationConfigRuleInput,
  192         -
                output: &mut ::std::string::String,
  193         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  194         -
                use ::std::fmt::Write as _;
  195         -
                ::std::write!(output, "/").expect("formatting should succeed");
  196         -
                ::std::result::Result::Ok(())
  197         -
            }
  198         -
            #[allow(clippy::unnecessary_wraps)]
  199         -
            fn update_http_builder(
  200         -
                input: &crate::operation::put_organization_config_rule::PutOrganizationConfigRuleInput,
  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.PutOrganizationConfigRule",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  217         -
            crate::protocol_serde::shape_put_organization_config_rule::ser_put_organization_config_rule_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())
         337  +
        let protocol = _cfg
         338  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         339  +
            .expect("a SharedClientProtocol is required");
         340  +
        let mut request = protocol
         341  +
            .serialize_request(&input, PutOrganizationConfigRule::INPUT_SCHEMA, "", _cfg)
         342  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         343  +
         344  +
        return ::std::result::Result::Ok(request);
  224    345   
    }
  225    346   
}
  226    347   
#[derive(Debug)]
  227    348   
struct PutOrganizationConfigRuleEndpointParamsInterceptor;
  228    349   
  229    350   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutOrganizationConfigRuleEndpointParamsInterceptor {
  230    351   
    fn name(&self) -> &'static str {
  231    352   
        "PutOrganizationConfigRuleEndpointParamsInterceptor"
  232    353   
    }
  233    354   

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

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

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

@@ -1,1 +96,143 @@
   18     18   
    "com.amazonaws.configservice.synthetic",
   19     19   
    "PutOrganizationConfigRuleOutput",
   20     20   
);
   21     21   
static PUTORGANIZATIONCONFIGRULEOUTPUT_MEMBER_ORGANIZATION_CONFIG_RULE_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   22     22   
    ::aws_smithy_schema::ShapeId::from_static(
   23     23   
        "com.amazonaws.configservice.synthetic#PutOrganizationConfigRuleOutput$OrganizationConfigRuleArn",
   24     24   
        "com.amazonaws.configservice.synthetic",
   25     25   
        "PutOrganizationConfigRuleOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::String,
   28         -
    "organization_config_rule_arn",
          28  +
    "OrganizationConfigRuleArn",
   29     29   
    0,
   30     30   
);
          31  +
static PUTORGANIZATIONCONFIGRULEOUTPUT_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 PUTORGANIZATIONCONFIGRULEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    PUTORGANIZATIONCONFIGRULEOUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&PUTORGANIZATIONCONFIGRULEOUTPUT_MEMBER_ORGANIZATION_CONFIG_RULE_ARN],
          41  +
    &[
          42  +
        &PUTORGANIZATIONCONFIGRULEOUTPUT_MEMBER_ORGANIZATION_CONFIG_RULE_ARN,
          43  +
        &PUTORGANIZATIONCONFIGRULEOUTPUT_MEMBER__REQUEST_ID,
          44  +
    ],
   35     45   
);
   36     46   
impl PutOrganizationConfigRuleOutput {
   37     47   
    /// The schema for this shape.
   38     48   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTORGANIZATIONCONFIGRULEOUTPUT_SCHEMA;
   39     49   
}
   40     50   
impl ::aws_smithy_schema::serde::SerializableStruct for PutOrganizationConfigRuleOutput {
   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.organization_config_rule_arn {
   47     57   
            ser.write_string(&PUTORGANIZATIONCONFIGRULEOUTPUT_MEMBER_ORGANIZATION_CONFIG_RULE_ARN, val)?;
   48     58   
        }
   49     59   
        Ok(())
   50     60   
    }
   51     61   
}
   52     62   
impl PutOrganizationConfigRuleOutput {
   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(&PUTORGANIZATIONCONFIGRULEOUTPUT_SCHEMA, (), |_, member, deser| {
          76  +
        deserializer.read_struct(&PUTORGANIZATIONCONFIGRULEOUTPUT_SCHEMA, &mut |member, deser| {
          77  +
            match member.member_index() {
          78  +
                Some(0) => {
          79  +
                    builder.organization_config_rule_arn = 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 PutOrganizationConfigRuleOutput {
          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(&PUTORGANIZATIONCONFIGRULEOUTPUT_SCHEMA, &mut |member, deser| {
   67    114   
            match member.member_index() {
   68    115   
                Some(0) => {
   69    116   
                    builder.organization_config_rule_arn = 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/put_organization_conformance_pack.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 `PutOrganizationConformancePack`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutOrganizationConformancePack;
    6      6   
impl PutOrganizationConformancePack {
    7      7   
    /// Creates a new `PutOrganizationConformancePack`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -127,133 +253,374 @@
  147    153   
        ::std::borrow::Cow::Owned(rcb)
  148    154   
    }
  149    155   
}
  150    156   
  151    157   
#[derive(Debug)]
  152    158   
struct PutOrganizationConformancePackResponseDeserializer;
  153    159   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutOrganizationConformancePackResponseDeserializer {
  154    160   
    fn deserialize_nonstreaming(
  155    161   
        &self,
  156    162   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         163  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    164   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    165   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  159         -
        let headers = response.headers();
  160         -
        let body = response.body().bytes().expect("body loaded");
  161    166   
        #[allow(unused_mut)]
  162    167   
        let mut force_error = false;
  163    168   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_put_organization_conformance_pack::de_put_organization_conformance_pack_http_error(status, headers, body)
  166         -
        } else {
  167         -
            crate::protocol_serde::shape_put_organization_conformance_pack::de_put_organization_conformance_pack_http_response(status, headers, body)
         169  +
        if !success && status != 200 || force_error {
         170  +
            let headers = response.headers();
         171  +
            let body = response.body().bytes().expect("body loaded");
         172  +
            #[allow(unused_mut)]
         173  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         174  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         175  +
            })?;
         176  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         177  +
            let generic = generic_builder.build();
         178  +
            let error_code = match generic.code() {
         179  +
                ::std::option::Option::Some(code) => code,
         180  +
                ::std::option::Option::None => {
         181  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         182  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         183  +
                            crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::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  +
"InsufficientPermissionsException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::InsufficientPermissionsException({
         194  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::InsufficientPermissionsException::SCHEMA, _cfg)
         195  +
                        .and_then(|mut deser| crate::types::error::InsufficientPermissionsException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         196  +
                    {
         197  +
                        ::std::result::Result::Ok(val) => val,
         198  +
                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
         199  +
                    };
         200  +
                    tmp.meta = generic;
         201  +
if tmp.message.is_none() {
         202  +
                                tmp.message = _error_message;
         203  +
                            }
         204  +
tmp
         205  +
}),
         206  +
"MaxNumberOfOrganizationConformancePacksExceededException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::MaxNumberOfOrganizationConformancePacksExceededException({
         207  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::MaxNumberOfOrganizationConformancePacksExceededException::SCHEMA, _cfg)
         208  +
                        .and_then(|mut deser| crate::types::error::MaxNumberOfOrganizationConformancePacksExceededException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         209  +
                    {
         210  +
                        ::std::result::Result::Ok(val) => val,
         211  +
                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
         212  +
                    };
         213  +
                    tmp.meta = generic;
         214  +
if tmp.message.is_none() {
         215  +
                                tmp.message = _error_message;
         216  +
                            }
         217  +
tmp
         218  +
}),
         219  +
"NoAvailableOrganizationException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::NoAvailableOrganizationException({
         220  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::NoAvailableOrganizationException::SCHEMA, _cfg)
         221  +
                        .and_then(|mut deser| crate::types::error::NoAvailableOrganizationException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         222  +
                    {
         223  +
                        ::std::result::Result::Ok(val) => val,
         224  +
                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
         225  +
                    };
         226  +
                    tmp.meta = generic;
         227  +
if tmp.message.is_none() {
         228  +
                                tmp.message = _error_message;
         229  +
                            }
         230  +
tmp
         231  +
}),
         232  +
"OrganizationAccessDeniedException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::OrganizationAccessDeniedException({
         233  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::OrganizationAccessDeniedException::SCHEMA, _cfg)
         234  +
                        .and_then(|mut deser| crate::types::error::OrganizationAccessDeniedException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         235  +
                    {
         236  +
                        ::std::result::Result::Ok(val) => val,
         237  +
                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
         238  +
                    };
         239  +
                    tmp.meta = generic;
         240  +
if tmp.message.is_none() {
         241  +
                                tmp.message = _error_message;
         242  +
                            }
         243  +
tmp
         244  +
}),
         245  +
"OrganizationAllFeaturesNotEnabledException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::OrganizationAllFeaturesNotEnabledException({
         246  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::OrganizationAllFeaturesNotEnabledException::SCHEMA, _cfg)
         247  +
                        .and_then(|mut deser| crate::types::error::OrganizationAllFeaturesNotEnabledException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         248  +
                    {
         249  +
                        ::std::result::Result::Ok(val) => val,
         250  +
                        ::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    251   
                    };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         252  +
                    tmp.meta = generic;
         253  +
if tmp.message.is_none() {
         254  +
                                tmp.message = _error_message;
         255  +
                            }
         256  +
tmp
         257  +
}),
         258  +
"OrganizationConformancePackTemplateValidationException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::OrganizationConformancePackTemplateValidationException({
         259  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::OrganizationConformancePackTemplateValidationException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| crate::types::error::OrganizationConformancePackTemplateValidationException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         261  +
                    {
         262  +
                        ::std::result::Result::Ok(val) => val,
         263  +
                        ::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))),
         264  +
                    };
         265  +
                    tmp.meta = generic;
         266  +
if tmp.message.is_none() {
         267  +
                                tmp.message = _error_message;
         268  +
                            }
         269  +
tmp
         270  +
}),
         271  +
"ResourceInUseException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::ResourceInUseException({
         272  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::ResourceInUseException::SCHEMA, _cfg)
         273  +
                        .and_then(|mut deser| crate::types::error::ResourceInUseException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         274  +
                    {
         275  +
                        ::std::result::Result::Ok(val) => val,
         276  +
                        ::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))),
         277  +
                    };
         278  +
                    tmp.meta = generic;
         279  +
if tmp.message.is_none() {
         280  +
                                tmp.message = _error_message;
         281  +
                            }
         282  +
tmp
         283  +
}),
         284  +
"ValidationException" => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::ValidationException({
         285  +
let mut tmp = match protocol.deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         286  +
                        .and_then(|mut deser| crate::types::error::ValidationException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
         287  +
                    {
         288  +
                        ::std::result::Result::Ok(val) => val,
         289  +
                        ::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))),
         290  +
                    };
         291  +
                    tmp.meta = generic;
         292  +
if tmp.message.is_none() {
         293  +
                                tmp.message = _error_message;
         294  +
                            }
         295  +
tmp
         296  +
}),
         297  +
_ => crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackError::generic(generic)
         298  +
};
         299  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         300  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         301  +
            ))
         302  +
        } else {
         303  +
            let protocol = _cfg
         304  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         305  +
                .expect("a SharedClientProtocol is required");
         306  +
            let mut deser = protocol
         307  +
                .deserialize_response(response, PutOrganizationConformancePack::OUTPUT_SCHEMA, _cfg)
         308  +
                .map_err(|e| {
         309  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         310  +
                })?;
         311  +
            let body = response.body().bytes().expect("body loaded");
         312  +
            let output = crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackOutput::deserialize_with_response(
         313  +
                &mut *deser,
         314  +
                response.headers(),
         315  +
                response.status().into(),
         316  +
                body,
         317  +
            )
         318  +
            .map_err(|e| {
         319  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         320  +
            })?;
         321  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         322  +
        }
  170    323   
    }
  171    324   
}
  172    325   
#[derive(Debug)]
  173    326   
struct PutOrganizationConformancePackRequestSerializer;
  174    327   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutOrganizationConformancePackRequestSerializer {
  175    328   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    329   
    fn serialize_input(
  177    330   
        &self,
  178    331   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    332   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    333   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    334   
        let input = input
  182    335   
            .downcast::<crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackInput>()
  183    336   
            .expect("correct type");
  184         -
        let _header_serialization_settings = _cfg
  185         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  186         -
            .cloned()
  187         -
            .unwrap_or_default();
  188         -
        let mut request_builder = {
  189         -
            #[allow(clippy::uninlined_format_args)]
  190         -
            fn uri_base(
  191         -
                _input: &crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackInput,
  192         -
                output: &mut ::std::string::String,
  193         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  194         -
                use ::std::fmt::Write as _;
  195         -
                ::std::write!(output, "/").expect("formatting should succeed");
  196         -
                ::std::result::Result::Ok(())
  197         -
            }
  198         -
            #[allow(clippy::unnecessary_wraps)]
  199         -
            fn update_http_builder(
  200         -
                input: &crate::operation::put_organization_conformance_pack::PutOrganizationConformancePackInput,
  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.PutOrganizationConformancePack",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  217         -
            crate::protocol_serde::shape_put_organization_conformance_pack::ser_put_organization_conformance_pack_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())
         337  +
        let protocol = _cfg
         338  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         339  +
            .expect("a SharedClientProtocol is required");
         340  +
        let mut request = protocol
         341  +
            .serialize_request(&input, PutOrganizationConformancePack::INPUT_SCHEMA, "", _cfg)
         342  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         343  +
         344  +
        return ::std::result::Result::Ok(request);
  224    345   
    }
  225    346   
}
  226    347   
#[derive(Debug)]
  227    348   
struct PutOrganizationConformancePackEndpointParamsInterceptor;
  228    349   
  229    350   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutOrganizationConformancePackEndpointParamsInterceptor {
  230    351   
    fn name(&self) -> &'static str {
  231    352   
        "PutOrganizationConformancePackEndpointParamsInterceptor"
  232    353   
    }
  233    354   

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

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

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

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

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

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