AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/attach_group_policy.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 `AttachGroupPolicy`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct AttachGroupPolicy;
    6      6   
impl AttachGroupPolicy {
    7      7   
    /// Creates a new `AttachGroupPolicy`
    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::attach_group_policy::AttachGroupPolicyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::attach_group_policy::AttachGroupPolicyOutput::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::attach_group_policy::AttachGroupPolicyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::attach_group_policy::AttachGroupPolicyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::attach_group_policy::AttachGroupPolicyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +177,182 @@
  135    139   
                crate::operation::attach_group_policy::AttachGroupPolicyError,
  136    140   
            >::new());
  137    141   
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct AttachGroupPolicyResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for AttachGroupPolicyResponseDeserializer {
  145         -
    fn deserialize_nonstreaming(
         149  +
    fn deserialize_nonstreaming_with_config(
  146    150   
        &self,
  147    151   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         152  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  148    153   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  149    154   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  150    155   
        let headers = response.headers();
  151    156   
        let body = response.body().bytes().expect("body loaded");
  152    157   
        #[allow(unused_mut)]
  153    158   
        let mut force_error = false;
  154    159   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  155    160   
        let parse_result = if !success && status != 200 || force_error {
  156    161   
            crate::protocol_serde::shape_attach_group_policy::de_attach_group_policy_http_error(status, headers, body)
  157    162   
        } else {

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/attach_group_policy/_attach_group_policy_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/attach_group_policy/_attach_group_policy_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 AttachGroupPolicyOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static ATTACHGROUPPOLICYOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.iam.synthetic#AttachGroupPolicyOutput",
   10     10   
    "com.amazonaws.iam.synthetic",
   11     11   
    "AttachGroupPolicyOutput",
   12     12   
);
   13         -
static ATTACHGROUPPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(ATTACHGROUPPOLICYOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static ATTACHGROUPPOLICYOUTPUT_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 ATTACHGROUPPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    ATTACHGROUPPOLICYOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&ATTACHGROUPPOLICYOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl AttachGroupPolicyOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ATTACHGROUPPOLICYOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for AttachGroupPolicyOutput {
   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 AttachGroupPolicyOutput {
   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(&ATTACHGROUPPOLICYOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&ATTACHGROUPPOLICYOUTPUT_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 AttachGroupPolicyOutput {
          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 AttachGroupPolicyOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl AttachGroupPolicyOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`AttachGroupPolicyOutput`](crate::operation::attach_group_policy::AttachGroupPolicyOutput).
   58     89   
    pub fn builder() -> crate::operation::attach_group_policy::builders::AttachGroupPolicyOutputBuilder {
   59     90   
        crate::operation::attach_group_policy::builders::AttachGroupPolicyOutputBuilder::default()
   60     91   
    }

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/attach_role_policy.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 `AttachRolePolicy`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct AttachRolePolicy;
    6      6   
impl AttachRolePolicy {
    7      7   
    /// Creates a new `AttachRolePolicy`
    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::attach_role_policy::AttachRolePolicyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::attach_role_policy::AttachRolePolicyOutput::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::attach_role_policy::AttachRolePolicyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::attach_role_policy::AttachRolePolicyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::attach_role_policy::AttachRolePolicyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +177,182 @@
  135    139   
                crate::operation::attach_role_policy::AttachRolePolicyError,
  136    140   
            >::new());
  137    141   
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct AttachRolePolicyResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for AttachRolePolicyResponseDeserializer {
  145         -
    fn deserialize_nonstreaming(
         149  +
    fn deserialize_nonstreaming_with_config(
  146    150   
        &self,
  147    151   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         152  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  148    153   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  149    154   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  150    155   
        let headers = response.headers();
  151    156   
        let body = response.body().bytes().expect("body loaded");
  152    157   
        #[allow(unused_mut)]
  153    158   
        let mut force_error = false;
  154    159   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  155    160   
        let parse_result = if !success && status != 200 || force_error {
  156    161   
            crate::protocol_serde::shape_attach_role_policy::de_attach_role_policy_http_error(status, headers, body)
  157    162   
        } else {

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/attach_role_policy/_attach_role_policy_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/attach_role_policy/_attach_role_policy_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 AttachRolePolicyOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static ATTACHROLEPOLICYOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.iam.synthetic#AttachRolePolicyOutput",
   10     10   
    "com.amazonaws.iam.synthetic",
   11     11   
    "AttachRolePolicyOutput",
   12     12   
);
   13         -
static ATTACHROLEPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(ATTACHROLEPOLICYOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static ATTACHROLEPOLICYOUTPUT_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 ATTACHROLEPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    ATTACHROLEPOLICYOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&ATTACHROLEPOLICYOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl AttachRolePolicyOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ATTACHROLEPOLICYOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for AttachRolePolicyOutput {
   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 AttachRolePolicyOutput {
   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(&ATTACHROLEPOLICYOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&ATTACHROLEPOLICYOUTPUT_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 AttachRolePolicyOutput {
          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 AttachRolePolicyOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl AttachRolePolicyOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`AttachRolePolicyOutput`](crate::operation::attach_role_policy::AttachRolePolicyOutput).
   58     89   
    pub fn builder() -> crate::operation::attach_role_policy::builders::AttachRolePolicyOutputBuilder {
   59     90   
        crate::operation::attach_role_policy::builders::AttachRolePolicyOutputBuilder::default()
   60     91   
    }

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/attach_user_policy.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 `AttachUserPolicy`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct AttachUserPolicy;
    6      6   
impl AttachUserPolicy {
    7      7   
    /// Creates a new `AttachUserPolicy`
    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::attach_user_policy::AttachUserPolicyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::attach_user_policy::AttachUserPolicyOutput::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::attach_user_policy::AttachUserPolicyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::attach_user_policy::AttachUserPolicyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::attach_user_policy::AttachUserPolicyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +177,182 @@
  135    139   
                crate::operation::attach_user_policy::AttachUserPolicyError,
  136    140   
            >::new());
  137    141   
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct AttachUserPolicyResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for AttachUserPolicyResponseDeserializer {
  145         -
    fn deserialize_nonstreaming(
         149  +
    fn deserialize_nonstreaming_with_config(
  146    150   
        &self,
  147    151   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         152  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  148    153   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  149    154   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  150    155   
        let headers = response.headers();
  151    156   
        let body = response.body().bytes().expect("body loaded");
  152    157   
        #[allow(unused_mut)]
  153    158   
        let mut force_error = false;
  154    159   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  155    160   
        let parse_result = if !success && status != 200 || force_error {
  156    161   
            crate::protocol_serde::shape_attach_user_policy::de_attach_user_policy_http_error(status, headers, body)
  157    162   
        } else {

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/attach_user_policy/_attach_user_policy_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/attach_user_policy/_attach_user_policy_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 AttachUserPolicyOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static ATTACHUSERPOLICYOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.iam.synthetic#AttachUserPolicyOutput",
   10     10   
    "com.amazonaws.iam.synthetic",
   11     11   
    "AttachUserPolicyOutput",
   12     12   
);
   13         -
static ATTACHUSERPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(ATTACHUSERPOLICYOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static ATTACHUSERPOLICYOUTPUT_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 ATTACHUSERPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    ATTACHUSERPOLICYOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&ATTACHUSERPOLICYOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl AttachUserPolicyOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ATTACHUSERPOLICYOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for AttachUserPolicyOutput {
   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 AttachUserPolicyOutput {
   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(&ATTACHUSERPOLICYOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&ATTACHUSERPOLICYOUTPUT_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 AttachUserPolicyOutput {
          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 AttachUserPolicyOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl AttachUserPolicyOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`AttachUserPolicyOutput`](crate::operation::attach_user_policy::AttachUserPolicyOutput).
   58     89   
    pub fn builder() -> crate::operation::attach_user_policy::builders::AttachUserPolicyOutputBuilder {
   59     90   
        crate::operation::attach_user_policy::builders::AttachUserPolicyOutputBuilder::default()
   60     91   
    }

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/change_password.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 `ChangePassword`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ChangePassword;
    6      6   
impl ChangePassword {
    7      7   
    /// Creates a new `ChangePassword`
    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::change_password::ChangePasswordInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::change_password::ChangePasswordOutput::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::change_password::ChangePasswordInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::change_password::ChangePasswordOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::change_password::ChangePasswordError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +177,182 @@
  135    139   
                crate::operation::change_password::ChangePasswordError,
  136    140   
            >::new());
  137    141   
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct ChangePasswordResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ChangePasswordResponseDeserializer {
  145         -
    fn deserialize_nonstreaming(
         149  +
    fn deserialize_nonstreaming_with_config(
  146    150   
        &self,
  147    151   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         152  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  148    153   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  149    154   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  150    155   
        let headers = response.headers();
  151    156   
        let body = response.body().bytes().expect("body loaded");
  152    157   
        #[allow(unused_mut)]
  153    158   
        let mut force_error = false;
  154    159   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  155    160   
        let parse_result = if !success && status != 200 || force_error {
  156    161   
            crate::protocol_serde::shape_change_password::de_change_password_http_error(status, headers, body)
  157    162   
        } else {

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/change_password/_change_password_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/change_password/_change_password_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 ChangePasswordOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static CHANGEPASSWORDOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.iam.synthetic#ChangePasswordOutput",
   10     10   
    "com.amazonaws.iam.synthetic",
   11     11   
    "ChangePasswordOutput",
   12     12   
);
   13         -
static CHANGEPASSWORDOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(CHANGEPASSWORDOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static CHANGEPASSWORDOUTPUT_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 CHANGEPASSWORDOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    CHANGEPASSWORDOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&CHANGEPASSWORDOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl ChangePasswordOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CHANGEPASSWORDOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for ChangePasswordOutput {
   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 ChangePasswordOutput {
   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(&CHANGEPASSWORDOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&CHANGEPASSWORDOUTPUT_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 ChangePasswordOutput {
          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 ChangePasswordOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl ChangePasswordOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`ChangePasswordOutput`](crate::operation::change_password::ChangePasswordOutput).
   58     89   
    pub fn builder() -> crate::operation::change_password::builders::ChangePasswordOutputBuilder {
   59     90   
        crate::operation::change_password::builders::ChangePasswordOutputBuilder::default()
   60     91   
    }

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/create_access_key.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 `CreateAccessKey`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateAccessKey;
    6      6   
impl CreateAccessKey {
    7      7   
    /// Creates a new `CreateAccessKey`
    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::create_access_key::CreateAccessKeyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_access_key::CreateAccessKeyOutput::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::create_access_key::CreateAccessKeyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_access_key::CreateAccessKeyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_access_key::CreateAccessKeyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -116,120 +178,183 @@
  136    140   
                crate::operation::create_access_key::CreateAccessKeyError,
  137    141   
            >::new());
  138    142   
  139    143   
        ::std::borrow::Cow::Owned(rcb)
  140    144   
    }
  141    145   
}
  142    146   
  143    147   
#[derive(Debug)]
  144    148   
struct CreateAccessKeyResponseDeserializer;
  145    149   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateAccessKeyResponseDeserializer {
  146         -
    fn deserialize_nonstreaming(
         150  +
    fn deserialize_nonstreaming_with_config(
  147    151   
        &self,
  148    152   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         153  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  149    154   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  150    155   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  151    156   
        let headers = response.headers();
  152    157   
        let body = response.body().bytes().expect("body loaded");
  153    158   
        #[allow(unused_mut)]
  154    159   
        let mut force_error = false;
  155    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  156    161   
        let parse_result = if !success && status != 200 || force_error {
  157    162   
            crate::protocol_serde::shape_create_access_key::de_create_access_key_http_error(status, headers, body)
  158    163   
        } else {

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/create_access_key/_create_access_key_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/create_access_key/_create_access_key_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/iam/src/operation/create_account_alias.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 `CreateAccountAlias`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateAccountAlias;
    6      6   
impl CreateAccountAlias {
    7      7   
    /// Creates a new `CreateAccountAlias`
    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::create_account_alias::CreateAccountAliasInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_account_alias::CreateAccountAliasOutput::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::create_account_alias::CreateAccountAliasInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_account_alias::CreateAccountAliasOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_account_alias::CreateAccountAliasError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +177,182 @@
  135    139   
                crate::operation::create_account_alias::CreateAccountAliasError,
  136    140   
            >::new());
  137    141   
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct CreateAccountAliasResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateAccountAliasResponseDeserializer {
  145         -
    fn deserialize_nonstreaming(
         149  +
    fn deserialize_nonstreaming_with_config(
  146    150   
        &self,
  147    151   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         152  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  148    153   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  149    154   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  150    155   
        let headers = response.headers();
  151    156   
        let body = response.body().bytes().expect("body loaded");
  152    157   
        #[allow(unused_mut)]
  153    158   
        let mut force_error = false;
  154    159   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  155    160   
        let parse_result = if !success && status != 200 || force_error {
  156    161   
            crate::protocol_serde::shape_create_account_alias::de_create_account_alias_http_error(status, headers, body)
  157    162   
        } else {