AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

tmp-codegen-diff/aws-sdk/sdk/sso/src/operation/list_account_roles/_list_account_roles_input.rs

@@ -25,25 +188,234 @@
   45     45   
    "com.amazonaws.sso.synthetic",
   46     46   
    "ListAccountRolesInput",
   47     47   
);
   48     48   
static LISTACCOUNTROLESINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   49     49   
    ::aws_smithy_schema::ShapeId::from_static(
   50     50   
        "com.amazonaws.sso.synthetic#ListAccountRolesInput$nextToken",
   51     51   
        "com.amazonaws.sso.synthetic",
   52     52   
        "ListAccountRolesInput",
   53     53   
    ),
   54     54   
    ::aws_smithy_schema::ShapeType::String,
   55         -
    "next_token",
          55  +
    "nextToken",
   56     56   
    0,
   57     57   
)
   58     58   
.with_http_query("next_token");
   59     59   
static LISTACCOUNTROLESINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   60     60   
    ::aws_smithy_schema::ShapeId::from_static(
   61     61   
        "com.amazonaws.sso.synthetic#ListAccountRolesInput$maxResults",
   62     62   
        "com.amazonaws.sso.synthetic",
   63     63   
        "ListAccountRolesInput",
   64     64   
    ),
   65     65   
    ::aws_smithy_schema::ShapeType::Integer,
   66         -
    "max_results",
          66  +
    "maxResults",
   67     67   
    1,
   68     68   
)
   69     69   
.with_http_query("max_result");
   70     70   
static LISTACCOUNTROLESINPUT_MEMBER_ACCESS_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "com.amazonaws.sso.synthetic#ListAccountRolesInput$accessToken",
   73     73   
        "com.amazonaws.sso.synthetic",
   74     74   
        "ListAccountRolesInput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::String,
   77         -
    "access_token",
          77  +
    "accessToken",
   78     78   
    2,
   79     79   
)
   80     80   
.with_http_header("x-amz-sso_bearer_token");
   81     81   
static LISTACCOUNTROLESINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   82     82   
    ::aws_smithy_schema::ShapeId::from_static(
   83     83   
        "com.amazonaws.sso.synthetic#ListAccountRolesInput$accountId",
   84     84   
        "com.amazonaws.sso.synthetic",
   85     85   
        "ListAccountRolesInput",
   86     86   
    ),
   87     87   
    ::aws_smithy_schema::ShapeType::String,
   88         -
    "account_id",
          88  +
    "accountId",
   89     89   
    3,
   90     90   
)
   91     91   
.with_http_query("account_id");
   92     92   
static LISTACCOUNTROLESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   93     93   
    LISTACCOUNTROLESINPUT_SCHEMA_ID,
   94     94   
    ::aws_smithy_schema::ShapeType::Structure,
   95     95   
    &[
   96     96   
        &LISTACCOUNTROLESINPUT_MEMBER_NEXT_TOKEN,
   97     97   
        &LISTACCOUNTROLESINPUT_MEMBER_MAX_RESULTS,
   98     98   
        &LISTACCOUNTROLESINPUT_MEMBER_ACCESS_TOKEN,
   99     99   
        &LISTACCOUNTROLESINPUT_MEMBER_ACCOUNT_ID,
  100    100   
    ],
  101         -
);
         101  +
)
         102  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/assignment/roles", None));
  102    103   
impl ListAccountRolesInput {
  103    104   
    /// The schema for this shape.
  104    105   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTACCOUNTROLESINPUT_SCHEMA;
  105    106   
}
  106    107   
impl ::aws_smithy_schema::serde::SerializableStruct for ListAccountRolesInput {
  107    108   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  108    109   
    fn serialize_members(
  109    110   
        &self,
  110    111   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  111    112   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  112    113   
        if let Some(ref val) = self.next_token {
  113    114   
            ser.write_string(&LISTACCOUNTROLESINPUT_MEMBER_NEXT_TOKEN, val)?;
  114    115   
        }
  115    116   
        if let Some(ref val) = self.max_results {
  116    117   
            ser.write_integer(&LISTACCOUNTROLESINPUT_MEMBER_MAX_RESULTS, *val)?;
  117    118   
        }
  118    119   
        if let Some(ref val) = self.access_token {
  119    120   
            ser.write_string(&LISTACCOUNTROLESINPUT_MEMBER_ACCESS_TOKEN, val)?;
  120    121   
        }
  121    122   
        if let Some(ref val) = self.account_id {
  122    123   
            ser.write_string(&LISTACCOUNTROLESINPUT_MEMBER_ACCOUNT_ID, val)?;
  123    124   
        }
  124    125   
        Ok(())
  125    126   
    }
  126    127   
}
  127    128   
impl ListAccountRolesInput {
  128    129   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  129         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  130         -
        deserializer: &mut D,
         130  +
    pub fn deserialize(
         131  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  131    132   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  132    133   
        #[allow(unused_variables, unused_mut)]
  133    134   
        let mut builder = Self::builder();
  134    135   
        #[allow(
  135    136   
            unused_variables,
  136    137   
            unreachable_code,
  137    138   
            clippy::single_match,
  138    139   
            clippy::match_single_binding,
  139    140   
            clippy::diverging_sub_expression
  140    141   
        )]
  141         -
        deserializer.read_struct(&LISTACCOUNTROLESINPUT_SCHEMA, (), |_, member, deser| {
         142  +
        deserializer.read_struct(&LISTACCOUNTROLESINPUT_SCHEMA, &mut |member, deser| {
  142    143   
            match member.member_index() {
  143    144   
                Some(0) => {
  144    145   
                    builder.next_token = Some(deser.read_string(member)?);
  145    146   
                }
  146    147   
                Some(1) => {
  147    148   
                    builder.max_results = Some(deser.read_integer(member)?);
  148    149   
                }
  149    150   
                Some(2) => {
  150    151   
                    builder.access_token = Some(deser.read_string(member)?);
  151    152   
                }
  152    153   
                Some(3) => {
  153    154   
                    builder.account_id = Some(deser.read_string(member)?);
  154    155   
                }
  155    156   
                _ => {}
  156    157   
            }
  157    158   
            Ok(())
  158    159   
        })?;
         160  +
        builder.access_token = builder.access_token.or(Some(String::new()));
         161  +
        builder.account_id = builder.account_id.or(Some(String::new()));
         162  +
        builder
         163  +
            .build()
         164  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         165  +
    }
         166  +
}
         167  +
impl ListAccountRolesInput {
         168  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         169  +
    /// Header-bound members are read directly from headers, avoiding runtime
         170  +
    /// member iteration overhead. Body members are read via the deserializer.
         171  +
    pub fn deserialize_with_response(
         172  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         173  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         174  +
        _status: u16,
         175  +
        _body: &[u8],
         176  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         177  +
        #[allow(unused_variables, unused_mut)]
         178  +
        let mut builder = Self::builder();
         179  +
        if let Some(val) = headers.get("x-amz-sso_bearer_token") {
         180  +
            builder.access_token = Some(val.to_string());
         181  +
        }
         182  +
        #[allow(
         183  +
            unused_variables,
         184  +
            unreachable_code,
         185  +
            clippy::single_match,
         186  +
            clippy::match_single_binding,
         187  +
            clippy::diverging_sub_expression
         188  +
        )]
         189  +
        deserializer.read_struct(&LISTACCOUNTROLESINPUT_SCHEMA, &mut |member, deser| {
         190  +
            match member.member_index() {
         191  +
                Some(0) => {
         192  +
                    builder.next_token = Some(deser.read_string(member)?);
         193  +
                }
         194  +
                Some(1) => {
         195  +
                    builder.max_results = Some(deser.read_integer(member)?);
         196  +
                }
         197  +
                Some(2) => { /* read from headers above */ }
         198  +
                Some(3) => {
         199  +
                    builder.account_id = Some(deser.read_string(member)?);
         200  +
                }
         201  +
                _ => {}
         202  +
            }
         203  +
            Ok(())
         204  +
        })?;
  159    205   
        builder
  160    206   
            .build()
  161    207   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  162    208   
    }
  163    209   
}
  164    210   
impl ListAccountRolesInput {
  165    211   
    /// Creates a new builder-style object to manufacture [`ListAccountRolesInput`](crate::operation::list_account_roles::ListAccountRolesInput).
  166    212   
    pub fn builder() -> crate::operation::list_account_roles::builders::ListAccountRolesInputBuilder {
  167    213   
        crate::operation::list_account_roles::builders::ListAccountRolesInputBuilder::default()
  168    214   
    }

tmp-codegen-diff/aws-sdk/sdk/sso/src/operation/list_account_roles/_list_account_roles_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/sso/src/operation/list_accounts.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 `ListAccounts`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListAccounts;
    6      6   
impl ListAccounts {
    7      7   
    /// Creates a new `ListAccounts`
    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::list_accounts::ListAccountsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_accounts::ListAccountsOutput::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::list_accounts::ListAccountsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_accounts::ListAccountsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_accounts::ListAccountsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -105,109 +242,341 @@
  125    129   
                crate::operation::list_accounts::ListAccountsError,
  126    130   
            >::new());
  127    131   
  128    132   
        ::std::borrow::Cow::Owned(rcb)
  129    133   
    }
  130    134   
}
  131    135   
  132    136   
#[derive(Debug)]
  133    137   
struct ListAccountsResponseDeserializer;
  134    138   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListAccountsResponseDeserializer {
  135         -
    fn deserialize_nonstreaming(
         139  +
    fn deserialize_nonstreaming_with_config(
  136    140   
        &self,
  137    141   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         142  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  138    143   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  139    144   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  140         -
        let headers = response.headers();
  141         -
        let body = response.body().bytes().expect("body loaded");
  142    145   
        #[allow(unused_mut)]
  143    146   
        let mut force_error = false;
  144    147   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  145         -
        let parse_result = if !success && status != 200 || force_error {
  146         -
            crate::protocol_serde::shape_list_accounts::de_list_accounts_http_error(status, headers, body)
         148  +
        if !success && status != 200 || force_error {
         149  +
            let headers = response.headers();
         150  +
            let body = response.body().bytes().expect("body loaded");
         151  +
            #[allow(unused_mut)]
         152  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         153  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         154  +
            })?;
         155  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         156  +
            let generic = generic_builder.build();
         157  +
            let error_code = match generic.code() {
         158  +
                ::std::option::Option::Some(code) => code,
         159  +
                ::std::option::Option::None => {
         160  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         161  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::list_accounts::ListAccountsError::unhandled(generic)),
         162  +
                    ))
         163  +
                }
         164  +
            };
         165  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         166  +
            let protocol = _cfg
         167  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         168  +
                .expect("a SharedClientProtocol is required");
         169  +
            let err = match error_code {
         170  +
                "InvalidRequestException" => crate::operation::list_accounts::ListAccountsError::InvalidRequestException({
         171  +
                    let mut tmp = match protocol
         172  +
                        .deserialize_response(response, crate::types::error::InvalidRequestException::SCHEMA, _cfg)
         173  +
                        .and_then(|mut deser| {
         174  +
                            crate::types::error::InvalidRequestException::deserialize_with_response(
         175  +
                                &mut *deser,
         176  +
                                response.headers(),
         177  +
                                response.status().into(),
         178  +
                                body,
         179  +
                            )
         180  +
                        }) {
         181  +
                        ::std::result::Result::Ok(val) => val,
         182  +
                        ::std::result::Result::Err(e) => {
         183  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         184  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         185  +
                            ))
         186  +
                        }
         187  +
                    };
         188  +
                    tmp.meta = generic;
         189  +
                    if tmp.message.is_none() {
         190  +
                        tmp.message = _error_message;
         191  +
                    }
         192  +
                    tmp
         193  +
                }),
         194  +
                "ResourceNotFoundException" => crate::operation::list_accounts::ListAccountsError::ResourceNotFoundException({
         195  +
                    let mut tmp = match protocol
         196  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         197  +
                        .and_then(|mut deser| {
         198  +
                            crate::types::error::ResourceNotFoundException::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  +
                "TooManyRequestsException" => crate::operation::list_accounts::ListAccountsError::TooManyRequestsException({
         219  +
                    let mut tmp = match protocol
         220  +
                        .deserialize_response(response, crate::types::error::TooManyRequestsException::SCHEMA, _cfg)
         221  +
                        .and_then(|mut deser| {
         222  +
                            crate::types::error::TooManyRequestsException::deserialize_with_response(
         223  +
                                &mut *deser,
         224  +
                                response.headers(),
         225  +
                                response.status().into(),
         226  +
                                body,
         227  +
                            )
         228  +
                        }) {
         229  +
                        ::std::result::Result::Ok(val) => val,
         230  +
                        ::std::result::Result::Err(e) => {
         231  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         232  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         233  +
                            ))
         234  +
                        }
         235  +
                    };
         236  +
                    tmp.meta = generic;
         237  +
                    if tmp.message.is_none() {
         238  +
                        tmp.message = _error_message;
         239  +
                    }
         240  +
                    tmp
         241  +
                }),
         242  +
                "UnauthorizedException" => crate::operation::list_accounts::ListAccountsError::UnauthorizedException({
         243  +
                    let mut tmp = match protocol
         244  +
                        .deserialize_response(response, crate::types::error::UnauthorizedException::SCHEMA, _cfg)
         245  +
                        .and_then(|mut deser| {
         246  +
                            crate::types::error::UnauthorizedException::deserialize_with_response(
         247  +
                                &mut *deser,
         248  +
                                response.headers(),
         249  +
                                response.status().into(),
         250  +
                                body,
         251  +
                            )
         252  +
                        }) {
         253  +
                        ::std::result::Result::Ok(val) => val,
         254  +
                        ::std::result::Result::Err(e) => {
         255  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         256  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         257  +
                            ))
         258  +
                        }
         259  +
                    };
         260  +
                    tmp.meta = generic;
         261  +
                    if tmp.message.is_none() {
         262  +
                        tmp.message = _error_message;
         263  +
                    }
         264  +
                    tmp
         265  +
                }),
         266  +
                _ => crate::operation::list_accounts::ListAccountsError::generic(generic),
         267  +
            };
         268  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         269  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         270  +
            ))
  147    271   
        } else {
  148         -
            crate::protocol_serde::shape_list_accounts::de_list_accounts_http_response(status, headers, body)
  149         -
        };
  150         -
        crate::protocol_serde::type_erase_result(parse_result)
         272  +
            let protocol = _cfg
         273  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         274  +
                .expect("a SharedClientProtocol is required");
         275  +
            let mut deser = protocol.deserialize_response(response, ListAccounts::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         276  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         277  +
            })?;
         278  +
            let body = response.body().bytes().expect("body loaded");
         279  +
            let output = crate::operation::list_accounts::ListAccountsOutput::deserialize_with_response(
         280  +
                &mut *deser,
         281  +
                response.headers(),
         282  +
                response.status().into(),
         283  +
                body,
         284  +
            )
         285  +
            .map_err(|e| {
         286  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         287  +
            })?;
         288  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         289  +
        }
  151    290   
    }
  152    291   
}
  153    292   
#[derive(Debug)]
  154    293   
struct ListAccountsRequestSerializer;
  155    294   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListAccountsRequestSerializer {
  156    295   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  157    296   
    fn serialize_input(
  158    297   
        &self,
  159    298   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  160    299   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  161    300   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  162    301   
        let input = input
  163    302   
            .downcast::<crate::operation::list_accounts::ListAccountsInput>()
  164    303   
            .expect("correct type");
  165         -
        let _header_serialization_settings = _cfg
  166         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  167         -
            .cloned()
  168         -
            .unwrap_or_default();
  169         -
        let mut request_builder = {
  170         -
            #[allow(clippy::uninlined_format_args)]
  171         -
            fn uri_base(
  172         -
                _input: &crate::operation::list_accounts::ListAccountsInput,
  173         -
                output: &mut ::std::string::String,
  174         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  175         -
                use ::std::fmt::Write as _;
  176         -
                ::std::write!(output, "/assignment/accounts").expect("formatting should succeed");
  177         -
                ::std::result::Result::Ok(())
  178         -
            }
  179         -
            fn uri_query(
  180         -
                _input: &crate::operation::list_accounts::ListAccountsInput,
  181         -
                mut output: &mut ::std::string::String,
  182         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  183         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  184         -
                if let ::std::option::Option::Some(inner_1) = &_input.next_token {
  185         -
                    {
  186         -
                        query.push_kv("next_token", &::aws_smithy_http::query::fmt_string(inner_1));
  187         -
                    }
  188         -
                }
  189         -
                if let ::std::option::Option::Some(inner_2) = &_input.max_results {
  190         -
                    {
  191         -
                        query.push_kv("max_result", ::aws_smithy_types::primitive::Encoder::from(*inner_2).encode());
  192         -
                    }
  193         -
                }
  194         -
                ::std::result::Result::Ok(())
  195         -
            }
  196         -
            #[allow(clippy::unnecessary_wraps)]
  197         -
            fn update_http_builder(
  198         -
                input: &crate::operation::list_accounts::ListAccountsInput,
  199         -
                builder: ::http_1x::request::Builder,
  200         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  201         -
                let mut uri = ::std::string::String::new();
  202         -
                uri_base(input, &mut uri)?;
  203         -
                uri_query(input, &mut uri)?;
  204         -
                let builder = crate::protocol_serde::shape_list_accounts::ser_list_accounts_headers(input, builder)?;
  205         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  206         -
            }
  207         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
         304  +
        let protocol = _cfg
         305  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         306  +
            .expect("a SharedClientProtocol is required");
         307  +
        let mut request = protocol
         308  +
            .serialize_request(&input, ListAccounts::INPUT_SCHEMA, "", _cfg)
         309  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
  211    310   
  212         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         311  +
        return ::std::result::Result::Ok(request);
  213    312   
    }
  214    313   
}
  215    314   
#[derive(Debug)]
  216    315   
struct ListAccountsEndpointParamsInterceptor;
  217    316   
  218    317   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListAccountsEndpointParamsInterceptor {
  219    318   
    fn name(&self) -> &'static str {
  220    319   
        "ListAccountsEndpointParamsInterceptor"
  221    320   
    }
  222    321   

tmp-codegen-diff/aws-sdk/sdk/sso/src/operation/list_accounts/_list_accounts_input.rs

@@ -18,18 +163,205 @@
   38     38   
    "com.amazonaws.sso.synthetic",
   39     39   
    "ListAccountsInput",
   40     40   
);
   41     41   
static LISTACCOUNTSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   42     42   
    ::aws_smithy_schema::ShapeId::from_static(
   43     43   
        "com.amazonaws.sso.synthetic#ListAccountsInput$nextToken",
   44     44   
        "com.amazonaws.sso.synthetic",
   45     45   
        "ListAccountsInput",
   46     46   
    ),
   47     47   
    ::aws_smithy_schema::ShapeType::String,
   48         -
    "next_token",
          48  +
    "nextToken",
   49     49   
    0,
   50     50   
)
   51     51   
.with_http_query("next_token");
   52     52   
static LISTACCOUNTSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.sso.synthetic#ListAccountsInput$maxResults",
   55     55   
        "com.amazonaws.sso.synthetic",
   56     56   
        "ListAccountsInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::Integer,
   59         -
    "max_results",
          59  +
    "maxResults",
   60     60   
    1,
   61     61   
)
   62     62   
.with_http_query("max_result");
   63     63   
static LISTACCOUNTSINPUT_MEMBER_ACCESS_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   64     64   
    ::aws_smithy_schema::ShapeId::from_static(
   65     65   
        "com.amazonaws.sso.synthetic#ListAccountsInput$accessToken",
   66     66   
        "com.amazonaws.sso.synthetic",
   67     67   
        "ListAccountsInput",
   68     68   
    ),
   69     69   
    ::aws_smithy_schema::ShapeType::String,
   70         -
    "access_token",
          70  +
    "accessToken",
   71     71   
    2,
   72     72   
)
   73     73   
.with_http_header("x-amz-sso_bearer_token");
   74     74   
static LISTACCOUNTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   75     75   
    LISTACCOUNTSINPUT_SCHEMA_ID,
   76     76   
    ::aws_smithy_schema::ShapeType::Structure,
   77     77   
    &[
   78     78   
        &LISTACCOUNTSINPUT_MEMBER_NEXT_TOKEN,
   79     79   
        &LISTACCOUNTSINPUT_MEMBER_MAX_RESULTS,
   80     80   
        &LISTACCOUNTSINPUT_MEMBER_ACCESS_TOKEN,
   81     81   
    ],
   82         -
);
          82  +
)
          83  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/assignment/accounts", None));
   83     84   
impl ListAccountsInput {
   84     85   
    /// The schema for this shape.
   85     86   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTACCOUNTSINPUT_SCHEMA;
   86     87   
}
   87     88   
impl ::aws_smithy_schema::serde::SerializableStruct for ListAccountsInput {
   88     89   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   89     90   
    fn serialize_members(
   90     91   
        &self,
   91     92   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   92     93   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   93     94   
        if let Some(ref val) = self.next_token {
   94     95   
            ser.write_string(&LISTACCOUNTSINPUT_MEMBER_NEXT_TOKEN, val)?;
   95     96   
        }
   96     97   
        if let Some(ref val) = self.max_results {
   97     98   
            ser.write_integer(&LISTACCOUNTSINPUT_MEMBER_MAX_RESULTS, *val)?;
   98     99   
        }
   99    100   
        if let Some(ref val) = self.access_token {
  100    101   
            ser.write_string(&LISTACCOUNTSINPUT_MEMBER_ACCESS_TOKEN, val)?;
  101    102   
        }
  102    103   
        Ok(())
  103    104   
    }
  104    105   
}
  105    106   
impl ListAccountsInput {
  106    107   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  107         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  108         -
        deserializer: &mut D,
         108  +
    pub fn deserialize(
         109  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  109    110   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  110    111   
        #[allow(unused_variables, unused_mut)]
  111    112   
        let mut builder = Self::builder();
  112    113   
        #[allow(
  113    114   
            unused_variables,
  114    115   
            unreachable_code,
  115    116   
            clippy::single_match,
  116    117   
            clippy::match_single_binding,
  117    118   
            clippy::diverging_sub_expression
  118    119   
        )]
  119         -
        deserializer.read_struct(&LISTACCOUNTSINPUT_SCHEMA, (), |_, member, deser| {
         120  +
        deserializer.read_struct(&LISTACCOUNTSINPUT_SCHEMA, &mut |member, deser| {
  120    121   
            match member.member_index() {
  121    122   
                Some(0) => {
  122    123   
                    builder.next_token = Some(deser.read_string(member)?);
  123    124   
                }
  124    125   
                Some(1) => {
  125    126   
                    builder.max_results = Some(deser.read_integer(member)?);
  126    127   
                }
  127    128   
                Some(2) => {
  128    129   
                    builder.access_token = Some(deser.read_string(member)?);
  129    130   
                }
  130    131   
                _ => {}
  131    132   
            }
  132    133   
            Ok(())
  133    134   
        })?;
         135  +
        builder.access_token = builder.access_token.or(Some(String::new()));
         136  +
        builder
         137  +
            .build()
         138  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         139  +
    }
         140  +
}
         141  +
impl ListAccountsInput {
         142  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         143  +
    /// Header-bound members are read directly from headers, avoiding runtime
         144  +
    /// member iteration overhead. Body members are read via the deserializer.
         145  +
    pub fn deserialize_with_response(
         146  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         147  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         148  +
        _status: u16,
         149  +
        _body: &[u8],
         150  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         151  +
        #[allow(unused_variables, unused_mut)]
         152  +
        let mut builder = Self::builder();
         153  +
        if let Some(val) = headers.get("x-amz-sso_bearer_token") {
         154  +
            builder.access_token = Some(val.to_string());
         155  +
        }
         156  +
        #[allow(
         157  +
            unused_variables,
         158  +
            unreachable_code,
         159  +
            clippy::single_match,
         160  +
            clippy::match_single_binding,
         161  +
            clippy::diverging_sub_expression
         162  +
        )]
         163  +
        deserializer.read_struct(&LISTACCOUNTSINPUT_SCHEMA, &mut |member, deser| {
         164  +
            match member.member_index() {
         165  +
                Some(0) => {
         166  +
                    builder.next_token = Some(deser.read_string(member)?);
         167  +
                }
         168  +
                Some(1) => {
         169  +
                    builder.max_results = Some(deser.read_integer(member)?);
         170  +
                }
         171  +
                Some(2) => { /* read from headers above */ }
         172  +
                _ => {}
         173  +
            }
         174  +
            Ok(())
         175  +
        })?;
  134    176   
        builder
  135    177   
            .build()
  136    178   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  137    179   
    }
  138    180   
}
  139    181   
impl ListAccountsInput {
  140    182   
    /// Creates a new builder-style object to manufacture [`ListAccountsInput`](crate::operation::list_accounts::ListAccountsInput).
  141    183   
    pub fn builder() -> crate::operation::list_accounts::builders::ListAccountsInputBuilder {
  142    184   
        crate::operation::list_accounts::builders::ListAccountsInputBuilder::default()
  143    185   
    }

tmp-codegen-diff/aws-sdk/sdk/sso/src/operation/list_accounts/_list_accounts_output.rs

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

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

tmp-codegen-diff/aws-sdk/sdk/sso/src/operation/logout/_logout_input.rs

@@ -1,1 +108,130 @@
   21     21   
}
   22     22   
static LOGOUTINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
   23     23   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.sso.synthetic#LogoutInput", "com.amazonaws.sso.synthetic", "LogoutInput");
   24     24   
static LOGOUTINPUT_MEMBER_ACCESS_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   25     25   
    ::aws_smithy_schema::ShapeId::from_static(
   26     26   
        "com.amazonaws.sso.synthetic#LogoutInput$accessToken",
   27     27   
        "com.amazonaws.sso.synthetic",
   28     28   
        "LogoutInput",
   29     29   
    ),
   30     30   
    ::aws_smithy_schema::ShapeType::String,
   31         -
    "access_token",
          31  +
    "accessToken",
   32     32   
    0,
   33     33   
)
   34     34   
.with_http_header("x-amz-sso_bearer_token");
   35     35   
static LOGOUTINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   36     36   
    LOGOUTINPUT_SCHEMA_ID,
   37     37   
    ::aws_smithy_schema::ShapeType::Structure,
   38     38   
    &[&LOGOUTINPUT_MEMBER_ACCESS_TOKEN],
   39         -
);
          39  +
)
          40  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/logout", None));
   40     41   
impl LogoutInput {
   41     42   
    /// The schema for this shape.
   42     43   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LOGOUTINPUT_SCHEMA;
   43     44   
}
   44     45   
impl ::aws_smithy_schema::serde::SerializableStruct for LogoutInput {
   45     46   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   46     47   
    fn serialize_members(
   47     48   
        &self,
   48     49   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   49     50   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   50     51   
        if let Some(ref val) = self.access_token {
   51     52   
            ser.write_string(&LOGOUTINPUT_MEMBER_ACCESS_TOKEN, val)?;
   52     53   
        }
   53     54   
        Ok(())
   54     55   
    }
   55     56   
}
   56     57   
impl LogoutInput {
   57     58   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   58         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   59         -
        deserializer: &mut D,
          59  +
    pub fn deserialize(
          60  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   60     61   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   61     62   
        #[allow(unused_variables, unused_mut)]
   62     63   
        let mut builder = Self::builder();
   63     64   
        #[allow(
   64     65   
            unused_variables,
   65     66   
            unreachable_code,
   66     67   
            clippy::single_match,
   67     68   
            clippy::match_single_binding,
   68     69   
            clippy::diverging_sub_expression
   69     70   
        )]
   70         -
        deserializer.read_struct(&LOGOUTINPUT_SCHEMA, (), |_, member, deser| {
          71  +
        deserializer.read_struct(&LOGOUTINPUT_SCHEMA, &mut |member, deser| {
   71     72   
            match member.member_index() {
   72     73   
                Some(0) => {
   73     74   
                    builder.access_token = Some(deser.read_string(member)?);
   74     75   
                }
   75     76   
                _ => {}
   76     77   
            }
   77     78   
            Ok(())
   78     79   
        })?;
          80  +
        builder.access_token = builder.access_token.or(Some(String::new()));
          81  +
        builder
          82  +
            .build()
          83  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
          84  +
    }
          85  +
}
          86  +
impl LogoutInput {
          87  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          88  +
    /// Header-bound members are read directly from headers, avoiding runtime
          89  +
    /// member iteration overhead. Body members are read via the deserializer.
          90  +
    pub fn deserialize_with_response(
          91  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          92  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          93  +
        _status: u16,
          94  +
        _body: &[u8],
          95  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          96  +
        #[allow(unused_variables, unused_mut)]
          97  +
        let mut builder = Self::builder();
          98  +
        if let Some(val) = headers.get("x-amz-sso_bearer_token") {
          99  +
            builder.access_token = Some(val.to_string());
         100  +
        }
   79    101   
        builder
   80    102   
            .build()
   81    103   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   82    104   
    }
   83    105   
}
   84    106   
impl LogoutInput {
   85    107   
    /// Creates a new builder-style object to manufacture [`LogoutInput`](crate::operation::logout::LogoutInput).
   86    108   
    pub fn builder() -> crate::operation::logout::builders::LogoutInputBuilder {
   87    109   
        crate::operation::logout::builders::LogoutInputBuilder::default()
   88    110   
    }

tmp-codegen-diff/aws-sdk/sdk/sso/src/operation/logout/_logout_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/sso/src/protocol_serde.rs

@@ -1,1 +58,0 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn type_erase_result<O, E>(
    3         -
    result: ::std::result::Result<O, E>,
    4         -
) -> ::std::result::Result<
    5         -
    ::aws_smithy_runtime_api::client::interceptors::context::Output,
    6         -
    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
    7         -
>
    8         -
where
    9         -
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   10         -
    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   11         -
{
   12         -
    result
   13         -
        .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
   14         -
        .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
   15         -
        .map_err(::std::convert::Into::into)
   16         -
}
   17         -
   18      2   
pub fn parse_http_error_metadata(
   19      3   
    _response_status: u16,
   20      4   
    response_headers: &::aws_smithy_runtime_api::http::Headers,
   21      5   
    response_body: &[u8],
   22      6   
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
   23      7   
    crate::json_errors::parse_error_metadata(response_body, response_headers)
   24      8   
}
   25         -
   26         -
pub(crate) mod shape_get_role_credentials;
   27         -
   28         -
pub(crate) mod shape_list_account_roles;
   29         -
   30         -
pub(crate) mod shape_list_accounts;
   31         -
   32         -
pub(crate) mod shape_logout;
   33         -
   34         -
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
   35         -
    if data.is_empty() {
   36         -
        b"{}"
   37         -
    } else {
   38         -
        data
   39         -
    }
   40         -
}
   41         -
   42         -
pub(crate) mod shape_invalid_request_exception;
   43         -
   44         -
pub(crate) mod shape_resource_not_found_exception;
   45         -
   46         -
pub(crate) mod shape_too_many_requests_exception;
   47         -
   48         -
pub(crate) mod shape_unauthorized_exception;
   49         -
   50         -
pub(crate) mod shape_account_list_type;
   51         -
   52         -
pub(crate) mod shape_role_credentials;
   53         -
   54         -
pub(crate) mod shape_role_list_type;
   55         -
   56         -
pub(crate) mod shape_account_info;
   57         -
   58         -
pub(crate) mod shape_role_info;

tmp-codegen-diff/aws-sdk/sdk/sso/src/protocol_serde/shape_account_info.rs

@@ -1,0 +54,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_account_info<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::AccountInfo>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   12         -
            #[allow(unused_mut)]
   13         -
            let mut builder = crate::types::builders::AccountInfoBuilder::default();
   14         -
            loop {
   15         -
                match tokens.next().transpose()? {
   16         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   17         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   18         -
                        "accountId" => {
   19         -
                            builder = builder.set_account_id(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "accountName" => {
   26         -
                            builder = builder.set_account_name(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "emailAddress" => {
   33         -
                            builder = builder.set_email_address(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   35         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   40         -
                    },
   41         -
                    other => {
   42         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   43         -
                            "expected object key or end object, found: {other:?}"
   44         -
                        )))
   45         -
                    }
   46         -
                }
   47         -
            }
   48         -
            Ok(Some(builder.build()))
   49         -
        }
   50         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   51         -
            "expected start object or null",
   52         -
        )),
   53         -
    }
   54         -
}

tmp-codegen-diff/aws-sdk/sdk/sso/src/protocol_serde/shape_account_list_type.rs

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_account_list_type<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::AccountInfo>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   12         -
            let mut items = Vec::new();
   13         -
            loop {
   14         -
                match tokens.peek() {
   15         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   16         -
                        tokens.next().transpose().unwrap();
   17         -
                        break;
   18         -
                    }
   19         -
                    _ => {
   20         -
                        let value = crate::protocol_serde::shape_account_info::de_account_info(tokens, _value)?;
   21         -
                        if let Some(value) = value {
   22         -
                            items.push(value);
   23         -
                        } else {
   24         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25         -
                                "dense list cannot contain null values",
   26         -
                            ));
   27         -
                        }
   28         -
                    }
   29         -
                }
   30         -
            }
   31         -
            Ok(Some(items))
   32         -
        }
   33         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "expected start array or null",
   35         -
        )),
   36         -
    }
   37         -
}

tmp-codegen-diff/aws-sdk/sdk/sso/src/protocol_serde/shape_get_role_credentials.rs

@@ -1,0 +156,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_get_role_credentials_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::get_role_credentials::GetRoleCredentialsOutput,
    9         -
    crate::operation::get_role_credentials::GetRoleCredentialsError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::get_role_credentials::GetRoleCredentialsError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => return Err(crate::operation::get_role_credentials::GetRoleCredentialsError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "InvalidRequestException" => crate::operation::get_role_credentials::GetRoleCredentialsError::InvalidRequestException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::InvalidRequestExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_invalid_request_exception::de_invalid_request_exception_json_err(_response_body, output)
   29         -
                    .map_err(crate::operation::get_role_credentials::GetRoleCredentialsError::unhandled)?;
   30         -
                let output = output.meta(generic);
   31         -
                output.build()
   32         -
            };
   33         -
            if tmp.message.is_none() {
   34         -
                tmp.message = _error_message;
   35         -
            }
   36         -
            tmp
   37         -
        }),
   38         -
        "ResourceNotFoundException" => crate::operation::get_role_credentials::GetRoleCredentialsError::ResourceNotFoundException({
   39         -
            #[allow(unused_mut)]
   40         -
            let mut tmp = {
   41         -
                #[allow(unused_mut)]
   42         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   43         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   44         -
                    .map_err(crate::operation::get_role_credentials::GetRoleCredentialsError::unhandled)?;
   45         -
                let output = output.meta(generic);
   46         -
                output.build()
   47         -
            };
   48         -
            if tmp.message.is_none() {
   49         -
                tmp.message = _error_message;
   50         -
            }
   51         -
            tmp
   52         -
        }),
   53         -
        "TooManyRequestsException" => crate::operation::get_role_credentials::GetRoleCredentialsError::TooManyRequestsException({
   54         -
            #[allow(unused_mut)]
   55         -
            let mut tmp = {
   56         -
                #[allow(unused_mut)]
   57         -
                let mut output = crate::types::error::builders::TooManyRequestsExceptionBuilder::default();
   58         -
                output = crate::protocol_serde::shape_too_many_requests_exception::de_too_many_requests_exception_json_err(_response_body, output)
   59         -
                    .map_err(crate::operation::get_role_credentials::GetRoleCredentialsError::unhandled)?;
   60         -
                let output = output.meta(generic);
   61         -
                output.build()
   62         -
            };
   63         -
            if tmp.message.is_none() {
   64         -
                tmp.message = _error_message;
   65         -
            }
   66         -
            tmp
   67         -
        }),
   68         -
        "UnauthorizedException" => crate::operation::get_role_credentials::GetRoleCredentialsError::UnauthorizedException({
   69         -
            #[allow(unused_mut)]
   70         -
            let mut tmp = {
   71         -
                #[allow(unused_mut)]
   72         -
                let mut output = crate::types::error::builders::UnauthorizedExceptionBuilder::default();
   73         -
                output = crate::protocol_serde::shape_unauthorized_exception::de_unauthorized_exception_json_err(_response_body, output)
   74         -
                    .map_err(crate::operation::get_role_credentials::GetRoleCredentialsError::unhandled)?;
   75         -
                let output = output.meta(generic);
   76         -
                output.build()
   77         -
            };
   78         -
            if tmp.message.is_none() {
   79         -
                tmp.message = _error_message;
   80         -
            }
   81         -
            tmp
   82         -
        }),
   83         -
        _ => crate::operation::get_role_credentials::GetRoleCredentialsError::generic(generic),
   84         -
    })
   85         -
}
   86         -
   87         -
#[allow(clippy::unnecessary_wraps)]
   88         -
pub fn de_get_role_credentials_http_response(
   89         -
    _response_status: u16,
   90         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   91         -
    _response_body: &[u8],
   92         -
) -> std::result::Result<
   93         -
    crate::operation::get_role_credentials::GetRoleCredentialsOutput,
   94         -
    crate::operation::get_role_credentials::GetRoleCredentialsError,
   95         -
> {
   96         -
    Ok({
   97         -
        #[allow(unused_mut)]
   98         -
        let mut output = crate::operation::get_role_credentials::builders::GetRoleCredentialsOutputBuilder::default();
   99         -
        output = crate::protocol_serde::shape_get_role_credentials::de_get_role_credentials(_response_body, output)
  100         -
            .map_err(crate::operation::get_role_credentials::GetRoleCredentialsError::unhandled)?;
  101         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  102         -
        output.build()
  103         -
    })
  104         -
}
  105         -
  106         -
pub fn ser_get_role_credentials_headers(
  107         -
    input: &crate::operation::get_role_credentials::GetRoleCredentialsInput,
  108         -
    mut builder: ::http_1x::request::Builder,
  109         -
) -> std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  110         -
    if let ::std::option::Option::Some(inner_1) = &input.access_token {
  111         -
        let formatted_2 = inner_1.as_str();
  112         -
        let header_value = formatted_2;
  113         -
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
  114         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  115         -
                "access_token",
  116         -
                format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
  117         -
            )
  118         -
        })?;
  119         -
        builder = builder.header("x-amz-sso_bearer_token", header_value);
  120         -
    }
  121         -
    Ok(builder)
  122         -
}
  123         -
  124         -
pub(crate) fn de_get_role_credentials(
  125         -
    _value: &[u8],
  126         -
    mut builder: crate::operation::get_role_credentials::builders::GetRoleCredentialsOutputBuilder,
  127         -
) -> ::std::result::Result<
  128         -
    crate::operation::get_role_credentials::builders::GetRoleCredentialsOutputBuilder,
  129         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  130         -
> {
  131         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  132         -
    let tokens = &mut tokens_owned;
  133         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  134         -
    loop {
  135         -
        match tokens.next().transpose()? {
  136         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  137         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  138         -
                "roleCredentials" => {
  139         -
                    builder = builder.set_role_credentials(crate::protocol_serde::shape_role_credentials::de_role_credentials(tokens, _value)?);
  140         -
                }
  141         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  142         -
            },
  143         -
            other => {
  144         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  145         -
                    "expected object key or end object, found: {other:?}"
  146         -
                )))
  147         -
            }
  148         -
        }
  149         -
    }
  150         -
    if tokens.next().is_some() {
  151         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  152         -
            "found more JSON tokens after completing parsing",
  153         -
        ));
  154         -
    }
  155         -
    Ok(builder)
  156         -
}