AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/signin/src/serde_util.rs

@@ -1,0 +94,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn access_denied_exception_correct_errors(
    3         -
    mut builder: crate::types::error::builders::AccessDeniedExceptionBuilder,
    4         -
) -> crate::types::error::builders::AccessDeniedExceptionBuilder {
    5         -
    if builder.error.is_none() {
    6         -
        builder.error = "no value was set".parse::<crate::types::OAuth2ErrorCode>().ok()
    7         -
    }
    8         -
    if builder.message.is_none() {
    9         -
        builder.message = Some(Default::default())
   10         -
    }
   11         -
    builder
   12         -
}
   13         -
   14         -
pub(crate) fn internal_server_exception_correct_errors(
   15         -
    mut builder: crate::types::error::builders::InternalServerExceptionBuilder,
   16         -
) -> crate::types::error::builders::InternalServerExceptionBuilder {
   17         -
    if builder.error.is_none() {
   18         -
        builder.error = "no value was set".parse::<crate::types::OAuth2ErrorCode>().ok()
   19         -
    }
   20         -
    if builder.message.is_none() {
   21         -
        builder.message = Some(Default::default())
   22         -
    }
   23         -
    builder
   24         -
}
   25         -
   26         -
pub(crate) fn too_many_requests_error_correct_errors(
   27         -
    mut builder: crate::types::error::builders::TooManyRequestsErrorBuilder,
   28         -
) -> crate::types::error::builders::TooManyRequestsErrorBuilder {
   29         -
    if builder.error.is_none() {
   30         -
        builder.error = "no value was set".parse::<crate::types::OAuth2ErrorCode>().ok()
   31         -
    }
   32         -
    if builder.message.is_none() {
   33         -
        builder.message = Some(Default::default())
   34         -
    }
   35         -
    builder
   36         -
}
   37         -
   38         -
pub(crate) fn validation_exception_correct_errors(
   39         -
    mut builder: crate::types::error::builders::ValidationExceptionBuilder,
   40         -
) -> crate::types::error::builders::ValidationExceptionBuilder {
   41         -
    if builder.error.is_none() {
   42         -
        builder.error = "no value was set".parse::<crate::types::OAuth2ErrorCode>().ok()
   43         -
    }
   44         -
    if builder.message.is_none() {
   45         -
        builder.message = Some(Default::default())
   46         -
    }
   47         -
    builder
   48         -
}
   49         -
   50         -
pub(crate) fn create_o_auth2_token_output_output_correct_errors(
   51         -
    mut builder: crate::operation::create_o_auth2_token::builders::CreateOAuth2TokenOutputBuilder,
   52         -
) -> crate::operation::create_o_auth2_token::builders::CreateOAuth2TokenOutputBuilder {
   53         -
    if builder.token_output.is_none() {
   54         -
        builder.token_output = {
   55         -
            let builder = crate::types::builders::CreateOAuth2TokenResponseBodyBuilder::default();
   56         -
            crate::serde_util::create_o_auth2_token_response_body_correct_errors(builder).build().ok()
   57         -
        }
   58         -
    }
   59         -
    builder
   60         -
}
   61         -
   62         -
pub(crate) fn create_o_auth2_token_response_body_correct_errors(
   63         -
    mut builder: crate::types::builders::CreateOAuth2TokenResponseBodyBuilder,
   64         -
) -> crate::types::builders::CreateOAuth2TokenResponseBodyBuilder {
   65         -
    if builder.access_token.is_none() {
   66         -
        builder.access_token = {
   67         -
            let builder = crate::types::builders::AccessTokenBuilder::default();
   68         -
            crate::serde_util::access_token_correct_errors(builder).build().ok()
   69         -
        }
   70         -
    }
   71         -
    if builder.token_type.is_none() {
   72         -
        builder.token_type = Some(Default::default())
   73         -
    }
   74         -
    if builder.expires_in.is_none() {
   75         -
        builder.expires_in = Some(Default::default())
   76         -
    }
   77         -
    if builder.refresh_token.is_none() {
   78         -
        builder.refresh_token = Some(Default::default())
   79         -
    }
   80         -
    builder
   81         -
}
   82         -
   83         -
pub(crate) fn access_token_correct_errors(mut builder: crate::types::builders::AccessTokenBuilder) -> crate::types::builders::AccessTokenBuilder {
   84         -
    if builder.access_key_id.is_none() {
   85         -
        builder.access_key_id = Some(Default::default())
   86         -
    }
   87         -
    if builder.secret_access_key.is_none() {
   88         -
        builder.secret_access_key = Some(Default::default())
   89         -
    }
   90         -
    if builder.session_token.is_none() {
   91         -
        builder.session_token = Some(Default::default())
   92         -
    }
   93         -
    builder
   94         -
}

tmp-codegen-diff/aws-sdk/sdk/signin/src/serialization_settings.rs

@@ -1,0 +89,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/*
    3         -
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    4         -
 * SPDX-License-Identifier: Apache-2.0
    5         -
 */
    6         -
    7         -
#![allow(dead_code)]
    8         -
    9         -
use aws_smithy_http::header::set_request_header_if_absent;
   10         -
use aws_smithy_types::config_bag::{Storable, StoreReplace};
   11         -
use http_1x::header::{HeaderName, CONTENT_LENGTH, CONTENT_TYPE};
   12         -
   13         -
/// Configuration for how default protocol headers are serialized
   14         -
#[derive(Clone, Debug, Default)]
   15         -
pub(crate) struct HeaderSerializationSettings {
   16         -
    omit_default_content_length: bool,
   17         -
    omit_default_content_type: bool,
   18         -
}
   19         -
   20         -
impl HeaderSerializationSettings {
   21         -
    /// Creates new [`HeaderSerializationSettings`]
   22         -
    pub(crate) fn new() -> Self {
   23         -
        Default::default()
   24         -
    }
   25         -
   26         -
    /// Omit the default `Content-Length` header during serialization
   27         -
    pub(crate) fn omit_default_content_length(self) -> Self {
   28         -
        Self {
   29         -
            omit_default_content_length: true,
   30         -
            ..self
   31         -
        }
   32         -
    }
   33         -
   34         -
    /// Omit the default `Content-Type` header during serialization
   35         -
    pub(crate) fn omit_default_content_type(self) -> Self {
   36         -
        Self {
   37         -
            omit_default_content_type: true,
   38         -
            ..self
   39         -
        }
   40         -
    }
   41         -
   42         -
    /// Returns true if the given default header name should be serialized
   43         -
    fn include_header(&self, header: &HeaderName) -> bool {
   44         -
        (!self.omit_default_content_length || header != CONTENT_LENGTH) && (!self.omit_default_content_type || header != CONTENT_TYPE)
   45         -
    }
   46         -
   47         -
    /// Sets a default header on the given request builder if it should be serialized
   48         -
    pub(crate) fn set_default_header(
   49         -
        &self,
   50         -
        mut request: http_1x::request::Builder,
   51         -
        header_name: HeaderName,
   52         -
        value: &str,
   53         -
    ) -> http_1x::request::Builder {
   54         -
        if self.include_header(&header_name) {
   55         -
            request = set_request_header_if_absent(request, header_name, value);
   56         -
        }
   57         -
        request
   58         -
    }
   59         -
}
   60         -
   61         -
impl Storable for HeaderSerializationSettings {
   62         -
    type Storer = StoreReplace<Self>;
   63         -
}
   64         -
   65         -
#[cfg(test)]
   66         -
mod tests {
   67         -
    use super::*;
   68         -
   69         -
    #[test]
   70         -
    fn test_include_header() {
   71         -
        let settings = HeaderSerializationSettings::default();
   72         -
        assert!(settings.include_header(&CONTENT_LENGTH));
   73         -
        assert!(settings.include_header(&CONTENT_TYPE));
   74         -
   75         -
        let settings = HeaderSerializationSettings::default().omit_default_content_length();
   76         -
        assert!(!settings.include_header(&CONTENT_LENGTH));
   77         -
        assert!(settings.include_header(&CONTENT_TYPE));
   78         -
   79         -
        let settings = HeaderSerializationSettings::default().omit_default_content_type();
   80         -
        assert!(settings.include_header(&CONTENT_LENGTH));
   81         -
        assert!(!settings.include_header(&CONTENT_TYPE));
   82         -
   83         -
        let settings = HeaderSerializationSettings::default()
   84         -
            .omit_default_content_type()
   85         -
            .omit_default_content_length();
   86         -
        assert!(!settings.include_header(&CONTENT_LENGTH));
   87         -
        assert!(!settings.include_header(&CONTENT_TYPE));
   88         -
    }
   89         -
}

tmp-codegen-diff/aws-sdk/sdk/signin/src/types/_access_token.rs

@@ -15,15 +161,175 @@
   35     35   
        formatter.field("secret_access_key", &"*** Sensitive Data Redacted ***");
   36     36   
        formatter.field("session_token", &"*** Sensitive Data Redacted ***");
   37     37   
        formatter.finish()
   38     38   
    }
   39     39   
}
   40     40   
static ACCESSTOKEN_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
   41     41   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.signin#AccessToken", "com.amazonaws.signin", "AccessToken");
   42     42   
static ACCESSTOKEN_MEMBER_ACCESS_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   43     43   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.signin#AccessToken$accessKeyId", "com.amazonaws.signin", "AccessToken"),
   44     44   
    ::aws_smithy_schema::ShapeType::String,
   45         -
    "access_key_id",
          45  +
    "accessKeyId",
   46     46   
    0,
   47     47   
)
   48     48   
.with_json_name("accessKeyId");
   49     49   
static ACCESSTOKEN_MEMBER_SECRET_ACCESS_KEY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   50     50   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.signin#AccessToken$secretAccessKey", "com.amazonaws.signin", "AccessToken"),
   51     51   
    ::aws_smithy_schema::ShapeType::String,
   52         -
    "secret_access_key",
          52  +
    "secretAccessKey",
   53     53   
    1,
   54     54   
)
   55     55   
.with_json_name("secretAccessKey");
   56     56   
static ACCESSTOKEN_MEMBER_SESSION_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   57     57   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.signin#AccessToken$sessionToken", "com.amazonaws.signin", "AccessToken"),
   58     58   
    ::aws_smithy_schema::ShapeType::String,
   59         -
    "session_token",
          59  +
    "sessionToken",
   60     60   
    2,
   61     61   
)
   62     62   
.with_json_name("sessionToken");
   63     63   
static ACCESSTOKEN_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   64     64   
    ACCESSTOKEN_SCHEMA_ID,
   65     65   
    ::aws_smithy_schema::ShapeType::Structure,
   66     66   
    &[
   67     67   
        &ACCESSTOKEN_MEMBER_ACCESS_KEY_ID,
   68     68   
        &ACCESSTOKEN_MEMBER_SECRET_ACCESS_KEY,
   69     69   
        &ACCESSTOKEN_MEMBER_SESSION_TOKEN,
   70     70   
    ],
   71     71   
)
   72     72   
.with_sensitive();
   73     73   
impl AccessToken {
   74     74   
    /// The schema for this shape.
   75     75   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ACCESSTOKEN_SCHEMA;
   76     76   
}
   77     77   
impl ::aws_smithy_schema::serde::SerializableStruct for AccessToken {
   78     78   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   79     79   
    fn serialize_members(
   80     80   
        &self,
   81     81   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   82     82   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   83     83   
        {
   84     84   
            let val = &self.access_key_id;
   85     85   
            ser.write_string(&ACCESSTOKEN_MEMBER_ACCESS_KEY_ID, val)?;
   86     86   
        }
   87     87   
        {
   88     88   
            let val = &self.secret_access_key;
   89     89   
            ser.write_string(&ACCESSTOKEN_MEMBER_SECRET_ACCESS_KEY, val)?;
   90     90   
        }
   91     91   
        {
   92     92   
            let val = &self.session_token;
   93     93   
            ser.write_string(&ACCESSTOKEN_MEMBER_SESSION_TOKEN, val)?;
   94     94   
        }
   95     95   
        Ok(())
   96     96   
    }
   97     97   
}
   98     98   
impl AccessToken {
   99     99   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  100         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  101         -
        deserializer: &mut D,
         100  +
    pub fn deserialize(
         101  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  102    102   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  103    103   
        #[allow(unused_variables, unused_mut)]
  104    104   
        let mut builder = Self::builder();
  105    105   
        #[allow(
  106    106   
            unused_variables,
  107    107   
            unreachable_code,
  108    108   
            clippy::single_match,
  109    109   
            clippy::match_single_binding,
  110    110   
            clippy::diverging_sub_expression
  111    111   
        )]
  112         -
        deserializer.read_struct(&ACCESSTOKEN_SCHEMA, (), |_, member, deser| {
         112  +
        deserializer.read_struct(&ACCESSTOKEN_SCHEMA, &mut |member, deser| {
  113    113   
            match member.member_index() {
  114    114   
                Some(0) => {
  115    115   
                    builder.access_key_id = Some(deser.read_string(member)?);
  116    116   
                }
  117    117   
                Some(1) => {
  118    118   
                    builder.secret_access_key = Some(deser.read_string(member)?);
  119    119   
                }
  120    120   
                Some(2) => {
  121    121   
                    builder.session_token = Some(deser.read_string(member)?);
  122    122   
                }
  123    123   
                _ => {}
  124    124   
            }
  125    125   
            Ok(())
  126    126   
        })?;
         127  +
        builder.access_key_id = builder.access_key_id.or(Some(String::new()));
         128  +
        builder.secret_access_key = builder.secret_access_key.or(Some(String::new()));
         129  +
        builder.session_token = builder.session_token.or(Some(String::new()));
  127    130   
        builder
  128    131   
            .build()
  129    132   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  130    133   
    }
  131    134   
}
         135  +
impl AccessToken {
         136  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         137  +
    pub fn deserialize_with_response(
         138  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         139  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         140  +
        _status: u16,
         141  +
        _body: &[u8],
         142  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         143  +
        Self::deserialize(deserializer)
         144  +
    }
         145  +
}
  132    146   
impl AccessToken {
  133    147   
    /// Creates a new builder-style object to manufacture [`AccessToken`](crate::types::AccessToken).
  134    148   
    pub fn builder() -> crate::types::builders::AccessTokenBuilder {
  135    149   
        crate::types::builders::AccessTokenBuilder::default()
  136    150   
    }
  137    151   
}
  138    152   
  139    153   
/// A builder for [`AccessToken`](crate::types::AccessToken).
  140    154   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
  141    155   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/signin/src/types/_create_o_auth2_token_request_body.rs

@@ -42,42 +247,260 @@
   62     62   
    "com.amazonaws.signin",
   63     63   
    "CreateOAuth2TokenRequestBody",
   64     64   
);
   65     65   
static CREATEOAUTH2TOKENREQUESTBODY_MEMBER_CLIENT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   66     66   
    ::aws_smithy_schema::ShapeId::from_static(
   67     67   
        "com.amazonaws.signin#CreateOAuth2TokenRequestBody$clientId",
   68     68   
        "com.amazonaws.signin",
   69     69   
        "CreateOAuth2TokenRequestBody",
   70     70   
    ),
   71     71   
    ::aws_smithy_schema::ShapeType::String,
   72         -
    "client_id",
          72  +
    "clientId",
   73     73   
    0,
   74     74   
)
   75     75   
.with_json_name("clientId");
   76     76   
static CREATEOAUTH2TOKENREQUESTBODY_MEMBER_GRANT_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   77     77   
    ::aws_smithy_schema::ShapeId::from_static(
   78     78   
        "com.amazonaws.signin#CreateOAuth2TokenRequestBody$grantType",
   79     79   
        "com.amazonaws.signin",
   80     80   
        "CreateOAuth2TokenRequestBody",
   81     81   
    ),
   82     82   
    ::aws_smithy_schema::ShapeType::String,
   83         -
    "grant_type",
          83  +
    "grantType",
   84     84   
    1,
   85     85   
)
   86     86   
.with_json_name("grantType");
   87     87   
static CREATEOAUTH2TOKENREQUESTBODY_MEMBER_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   88     88   
    ::aws_smithy_schema::ShapeId::from_static(
   89     89   
        "com.amazonaws.signin#CreateOAuth2TokenRequestBody$code",
   90     90   
        "com.amazonaws.signin",
   91     91   
        "CreateOAuth2TokenRequestBody",
   92     92   
    ),
   93     93   
    ::aws_smithy_schema::ShapeType::String,
   94     94   
    "code",
   95     95   
    2,
   96     96   
);
   97     97   
static CREATEOAUTH2TOKENREQUESTBODY_MEMBER_REDIRECT_URI: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   98     98   
    ::aws_smithy_schema::ShapeId::from_static(
   99     99   
        "com.amazonaws.signin#CreateOAuth2TokenRequestBody$redirectUri",
  100    100   
        "com.amazonaws.signin",
  101    101   
        "CreateOAuth2TokenRequestBody",
  102    102   
    ),
  103    103   
    ::aws_smithy_schema::ShapeType::String,
  104         -
    "redirect_uri",
         104  +
    "redirectUri",
  105    105   
    3,
  106    106   
)
  107    107   
.with_json_name("redirectUri");
  108    108   
static CREATEOAUTH2TOKENREQUESTBODY_MEMBER_CODE_VERIFIER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  109    109   
    ::aws_smithy_schema::ShapeId::from_static(
  110    110   
        "com.amazonaws.signin#CreateOAuth2TokenRequestBody$codeVerifier",
  111    111   
        "com.amazonaws.signin",
  112    112   
        "CreateOAuth2TokenRequestBody",
  113    113   
    ),
  114    114   
    ::aws_smithy_schema::ShapeType::String,
  115         -
    "code_verifier",
         115  +
    "codeVerifier",
  116    116   
    4,
  117    117   
)
  118    118   
.with_json_name("codeVerifier");
  119    119   
static CREATEOAUTH2TOKENREQUESTBODY_MEMBER_REFRESH_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  120    120   
    ::aws_smithy_schema::ShapeId::from_static(
  121    121   
        "com.amazonaws.signin#CreateOAuth2TokenRequestBody$refreshToken",
  122    122   
        "com.amazonaws.signin",
  123    123   
        "CreateOAuth2TokenRequestBody",
  124    124   
    ),
  125    125   
    ::aws_smithy_schema::ShapeType::String,
  126         -
    "refresh_token",
         126  +
    "refreshToken",
  127    127   
    5,
  128    128   
)
  129    129   
.with_json_name("refreshToken");
  130    130   
static CREATEOAUTH2TOKENREQUESTBODY_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  131    131   
    CREATEOAUTH2TOKENREQUESTBODY_SCHEMA_ID,
  132    132   
    ::aws_smithy_schema::ShapeType::Structure,
  133    133   
    &[
  134    134   
        &CREATEOAUTH2TOKENREQUESTBODY_MEMBER_CLIENT_ID,
  135    135   
        &CREATEOAUTH2TOKENREQUESTBODY_MEMBER_GRANT_TYPE,
  136    136   
        &CREATEOAUTH2TOKENREQUESTBODY_MEMBER_CODE,
  137    137   
        &CREATEOAUTH2TOKENREQUESTBODY_MEMBER_REDIRECT_URI,
  138    138   
        &CREATEOAUTH2TOKENREQUESTBODY_MEMBER_CODE_VERIFIER,
  139    139   
        &CREATEOAUTH2TOKENREQUESTBODY_MEMBER_REFRESH_TOKEN,
  140    140   
    ],
  141    141   
);
  142    142   
impl CreateOAuth2TokenRequestBody {
  143    143   
    /// The schema for this shape.
  144    144   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATEOAUTH2TOKENREQUESTBODY_SCHEMA;
  145    145   
}
  146    146   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateOAuth2TokenRequestBody {
  147    147   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  148    148   
    fn serialize_members(
  149    149   
        &self,
  150    150   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  151    151   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  152    152   
        {
  153    153   
            let val = &self.client_id;
  154    154   
            ser.write_string(&CREATEOAUTH2TOKENREQUESTBODY_MEMBER_CLIENT_ID, val)?;
  155    155   
        }
  156    156   
        {
  157    157   
            let val = &self.grant_type;
  158    158   
            ser.write_string(&CREATEOAUTH2TOKENREQUESTBODY_MEMBER_GRANT_TYPE, val)?;
  159    159   
        }
  160    160   
        if let Some(ref val) = self.code {
  161    161   
            ser.write_string(&CREATEOAUTH2TOKENREQUESTBODY_MEMBER_CODE, val)?;
  162    162   
        }
  163    163   
        if let Some(ref val) = self.redirect_uri {
  164    164   
            ser.write_string(&CREATEOAUTH2TOKENREQUESTBODY_MEMBER_REDIRECT_URI, val)?;
  165    165   
        }
  166    166   
        if let Some(ref val) = self.code_verifier {
  167    167   
            ser.write_string(&CREATEOAUTH2TOKENREQUESTBODY_MEMBER_CODE_VERIFIER, val)?;
  168    168   
        }
  169    169   
        if let Some(ref val) = self.refresh_token {
  170    170   
            ser.write_string(&CREATEOAUTH2TOKENREQUESTBODY_MEMBER_REFRESH_TOKEN, val)?;
  171    171   
        }
  172    172   
        Ok(())
  173    173   
    }
  174    174   
}
  175    175   
impl CreateOAuth2TokenRequestBody {
  176    176   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  177         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  178         -
        deserializer: &mut D,
         177  +
    pub fn deserialize(
         178  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  179    179   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  180    180   
        #[allow(unused_variables, unused_mut)]
  181    181   
        let mut builder = Self::builder();
  182    182   
        #[allow(
  183    183   
            unused_variables,
  184    184   
            unreachable_code,
  185    185   
            clippy::single_match,
  186    186   
            clippy::match_single_binding,
  187    187   
            clippy::diverging_sub_expression
  188    188   
        )]
  189         -
        deserializer.read_struct(&CREATEOAUTH2TOKENREQUESTBODY_SCHEMA, (), |_, member, deser| {
         189  +
        deserializer.read_struct(&CREATEOAUTH2TOKENREQUESTBODY_SCHEMA, &mut |member, deser| {
  190    190   
            match member.member_index() {
  191    191   
                Some(0) => {
  192    192   
                    builder.client_id = Some(deser.read_string(member)?);
  193    193   
                }
  194    194   
                Some(1) => {
  195    195   
                    builder.grant_type = Some(deser.read_string(member)?);
  196    196   
                }
  197    197   
                Some(2) => {
  198    198   
                    builder.code = Some(deser.read_string(member)?);
  199    199   
                }
  200    200   
                Some(3) => {
  201    201   
                    builder.redirect_uri = Some(deser.read_string(member)?);
  202    202   
                }
  203    203   
                Some(4) => {
  204    204   
                    builder.code_verifier = Some(deser.read_string(member)?);
  205    205   
                }
  206    206   
                Some(5) => {
  207    207   
                    builder.refresh_token = Some(deser.read_string(member)?);
  208    208   
                }
  209    209   
                _ => {}
  210    210   
            }
  211    211   
            Ok(())
  212    212   
        })?;
         213  +
        builder.client_id = builder.client_id.or(Some(String::new()));
         214  +
        builder.grant_type = builder.grant_type.or(Some(String::new()));
  213    215   
        builder
  214    216   
            .build()
  215    217   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  216    218   
    }
  217    219   
}
         220  +
impl CreateOAuth2TokenRequestBody {
         221  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         222  +
    pub fn deserialize_with_response(
         223  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         224  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         225  +
        _status: u16,
         226  +
        _body: &[u8],
         227  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         228  +
        Self::deserialize(deserializer)
         229  +
    }
         230  +
}
  218    231   
impl CreateOAuth2TokenRequestBody {
  219    232   
    /// Creates a new builder-style object to manufacture [`CreateOAuth2TokenRequestBody`](crate::types::CreateOAuth2TokenRequestBody).
  220    233   
    pub fn builder() -> crate::types::builders::CreateOAuth2TokenRequestBodyBuilder {
  221    234   
        crate::types::builders::CreateOAuth2TokenRequestBodyBuilder::default()
  222    235   
    }
  223    236   
}
  224    237   
  225    238   
/// A builder for [`CreateOAuth2TokenRequestBody`](crate::types::CreateOAuth2TokenRequestBody).
  226    239   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
  227    240   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/signin/src/types/_create_o_auth2_token_response_body.rs

@@ -35,35 +224,238 @@
   55     55   
    "com.amazonaws.signin",
   56     56   
    "CreateOAuth2TokenResponseBody",
   57     57   
);
   58     58   
static CREATEOAUTH2TOKENRESPONSEBODY_MEMBER_ACCESS_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   59     59   
    ::aws_smithy_schema::ShapeId::from_static(
   60     60   
        "com.amazonaws.signin#CreateOAuth2TokenResponseBody$accessToken",
   61     61   
        "com.amazonaws.signin",
   62     62   
        "CreateOAuth2TokenResponseBody",
   63     63   
    ),
   64     64   
    ::aws_smithy_schema::ShapeType::Structure,
   65         -
    "access_token",
          65  +
    "accessToken",
   66     66   
    0,
   67     67   
)
   68     68   
.with_json_name("accessToken");
   69     69   
static CREATEOAUTH2TOKENRESPONSEBODY_MEMBER_TOKEN_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   70     70   
    ::aws_smithy_schema::ShapeId::from_static(
   71     71   
        "com.amazonaws.signin#CreateOAuth2TokenResponseBody$tokenType",
   72     72   
        "com.amazonaws.signin",
   73     73   
        "CreateOAuth2TokenResponseBody",
   74     74   
    ),
   75     75   
    ::aws_smithy_schema::ShapeType::String,
   76         -
    "token_type",
          76  +
    "tokenType",
   77     77   
    1,
   78     78   
)
   79     79   
.with_json_name("tokenType");
   80     80   
static CREATEOAUTH2TOKENRESPONSEBODY_MEMBER_EXPIRES_IN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   81     81   
    ::aws_smithy_schema::ShapeId::from_static(
   82     82   
        "com.amazonaws.signin#CreateOAuth2TokenResponseBody$expiresIn",
   83     83   
        "com.amazonaws.signin",
   84     84   
        "CreateOAuth2TokenResponseBody",
   85     85   
    ),
   86     86   
    ::aws_smithy_schema::ShapeType::Integer,
   87         -
    "expires_in",
          87  +
    "expiresIn",
   88     88   
    2,
   89     89   
)
   90     90   
.with_json_name("expiresIn");
   91     91   
static CREATEOAUTH2TOKENRESPONSEBODY_MEMBER_REFRESH_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   92     92   
    ::aws_smithy_schema::ShapeId::from_static(
   93     93   
        "com.amazonaws.signin#CreateOAuth2TokenResponseBody$refreshToken",
   94     94   
        "com.amazonaws.signin",
   95     95   
        "CreateOAuth2TokenResponseBody",
   96     96   
    ),
   97     97   
    ::aws_smithy_schema::ShapeType::String,
   98         -
    "refresh_token",
          98  +
    "refreshToken",
   99     99   
    3,
  100    100   
)
  101    101   
.with_json_name("refreshToken");
  102    102   
static CREATEOAUTH2TOKENRESPONSEBODY_MEMBER_ID_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  103    103   
    ::aws_smithy_schema::ShapeId::from_static(
  104    104   
        "com.amazonaws.signin#CreateOAuth2TokenResponseBody$idToken",
  105    105   
        "com.amazonaws.signin",
  106    106   
        "CreateOAuth2TokenResponseBody",
  107    107   
    ),
  108    108   
    ::aws_smithy_schema::ShapeType::String,
  109         -
    "id_token",
         109  +
    "idToken",
  110    110   
    4,
  111    111   
)
  112    112   
.with_json_name("idToken");
  113    113   
static CREATEOAUTH2TOKENRESPONSEBODY_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  114    114   
    CREATEOAUTH2TOKENRESPONSEBODY_SCHEMA_ID,
  115    115   
    ::aws_smithy_schema::ShapeType::Structure,
  116    116   
    &[
  117    117   
        &CREATEOAUTH2TOKENRESPONSEBODY_MEMBER_ACCESS_TOKEN,
  118    118   
        &CREATEOAUTH2TOKENRESPONSEBODY_MEMBER_TOKEN_TYPE,
  119    119   
        &CREATEOAUTH2TOKENRESPONSEBODY_MEMBER_EXPIRES_IN,
  120    120   
        &CREATEOAUTH2TOKENRESPONSEBODY_MEMBER_REFRESH_TOKEN,
  121    121   
        &CREATEOAUTH2TOKENRESPONSEBODY_MEMBER_ID_TOKEN,
  122    122   
    ],
  123    123   
);
  124    124   
impl CreateOAuth2TokenResponseBody {
  125    125   
    /// The schema for this shape.
  126    126   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATEOAUTH2TOKENRESPONSEBODY_SCHEMA;
  127    127   
}
  128    128   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateOAuth2TokenResponseBody {
  129    129   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  130    130   
    fn serialize_members(
  131    131   
        &self,
  132    132   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  133    133   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  134    134   
        if let Some(ref val) = self.access_token {
  135    135   
            ser.write_struct(&CREATEOAUTH2TOKENRESPONSEBODY_MEMBER_ACCESS_TOKEN, val)?;
  136    136   
        }
  137    137   
        {
  138    138   
            let val = &self.token_type;
  139    139   
            ser.write_string(&CREATEOAUTH2TOKENRESPONSEBODY_MEMBER_TOKEN_TYPE, val)?;
  140    140   
        }
  141    141   
        {
  142    142   
            let val = &self.expires_in;
  143    143   
            ser.write_integer(&CREATEOAUTH2TOKENRESPONSEBODY_MEMBER_EXPIRES_IN, *val)?;
  144    144   
        }
  145    145   
        {
  146    146   
            let val = &self.refresh_token;
  147    147   
            ser.write_string(&CREATEOAUTH2TOKENRESPONSEBODY_MEMBER_REFRESH_TOKEN, val)?;
  148    148   
        }
  149    149   
        if let Some(ref val) = self.id_token {
  150    150   
            ser.write_string(&CREATEOAUTH2TOKENRESPONSEBODY_MEMBER_ID_TOKEN, val)?;
  151    151   
        }
  152    152   
        Ok(())
  153    153   
    }
  154    154   
}
  155    155   
impl CreateOAuth2TokenResponseBody {
  156    156   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  157         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  158         -
        deserializer: &mut D,
         157  +
    pub fn deserialize(
         158  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  159    159   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  160    160   
        #[allow(unused_variables, unused_mut)]
  161    161   
        let mut builder = Self::builder();
  162    162   
        #[allow(
  163    163   
            unused_variables,
  164    164   
            unreachable_code,
  165    165   
            clippy::single_match,
  166    166   
            clippy::match_single_binding,
  167    167   
            clippy::diverging_sub_expression
  168    168   
        )]
  169         -
        deserializer.read_struct(&CREATEOAUTH2TOKENRESPONSEBODY_SCHEMA, (), |_, member, deser| {
         169  +
        deserializer.read_struct(&CREATEOAUTH2TOKENRESPONSEBODY_SCHEMA, &mut |member, deser| {
  170    170   
            match member.member_index() {
  171    171   
                Some(0) => {
  172    172   
                    builder.access_token = Some(crate::types::AccessToken::deserialize(deser)?);
  173    173   
                }
  174    174   
                Some(1) => {
  175    175   
                    builder.token_type = Some(deser.read_string(member)?);
  176    176   
                }
  177    177   
                Some(2) => {
  178    178   
                    builder.expires_in = Some(deser.read_integer(member)?);
  179    179   
                }
  180    180   
                Some(3) => {
  181    181   
                    builder.refresh_token = Some(deser.read_string(member)?);
  182    182   
                }
  183    183   
                Some(4) => {
  184    184   
                    builder.id_token = Some(deser.read_string(member)?);
  185    185   
                }
  186    186   
                _ => {}
  187    187   
            }
  188    188   
            Ok(())
  189    189   
        })?;
         190  +
        builder.token_type = builder.token_type.or(Some(String::new()));
         191  +
        builder.expires_in = builder.expires_in.or(Some(0i32));
         192  +
        builder.refresh_token = builder.refresh_token.or(Some(String::new()));
  190    193   
        builder
  191    194   
            .build()
  192    195   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  193    196   
    }
  194    197   
}
         198  +
impl CreateOAuth2TokenResponseBody {
         199  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         200  +
    pub fn deserialize_with_response(
         201  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         202  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         203  +
        _status: u16,
         204  +
        _body: &[u8],
         205  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         206  +
        Self::deserialize(deserializer)
         207  +
    }
         208  +
}
  195    209   
impl CreateOAuth2TokenResponseBody {
  196    210   
    /// Creates a new builder-style object to manufacture [`CreateOAuth2TokenResponseBody`](crate::types::CreateOAuth2TokenResponseBody).
  197    211   
    pub fn builder() -> crate::types::builders::CreateOAuth2TokenResponseBodyBuilder {
  198    212   
        crate::types::builders::CreateOAuth2TokenResponseBodyBuilder::default()
  199    213   
    }
  200    214   
}
  201    215   
  202    216   
/// A builder for [`CreateOAuth2TokenResponseBody`](crate::types::CreateOAuth2TokenResponseBody).
  203    217   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
  204    218   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/signin/src/types/error/_access_denied_exception.rs

@@ -42,42 +130,142 @@
   62     62   
        }
   63     63   
        {
   64     64   
            let val = &self.message;
   65     65   
            ser.write_string(&ACCESSDENIEDEXCEPTION_MEMBER_MESSAGE, val)?;
   66     66   
        }
   67     67   
        Ok(())
   68     68   
    }
   69     69   
}
   70     70   
impl AccessDeniedException {
   71     71   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   72         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   73         -
        deserializer: &mut D,
          72  +
    pub fn deserialize(
          73  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   74     74   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   75     75   
        #[allow(unused_variables, unused_mut)]
   76     76   
        let mut builder = Self::builder();
   77     77   
        #[allow(
   78     78   
            unused_variables,
   79     79   
            unreachable_code,
   80     80   
            clippy::single_match,
   81     81   
            clippy::match_single_binding,
   82     82   
            clippy::diverging_sub_expression
   83     83   
        )]
   84         -
        deserializer.read_struct(&ACCESSDENIEDEXCEPTION_SCHEMA, (), |_, member, deser| {
          84  +
        deserializer.read_struct(&ACCESSDENIEDEXCEPTION_SCHEMA, &mut |member, deser| {
   85     85   
            match member.member_index() {
   86     86   
                Some(0) => {
   87     87   
                    builder.error = Some(crate::types::OAuth2ErrorCode::from(deser.read_string(member)?.as_str()));
   88     88   
                }
   89     89   
                Some(1) => {
   90     90   
                    builder.message = Some(deser.read_string(member)?);
   91     91   
                }
   92     92   
                _ => {}
   93     93   
            }
   94     94   
            Ok(())
   95     95   
        })?;
          96  +
        builder.message = builder.message.or(Some(String::new()));
   96     97   
        builder
   97     98   
            .build()
   98     99   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   99    100   
    }
  100    101   
}
         102  +
impl AccessDeniedException {
         103  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         104  +
    pub fn deserialize_with_response(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         106  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         107  +
        _status: u16,
         108  +
        _body: &[u8],
         109  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         110  +
        Self::deserialize(deserializer)
         111  +
    }
         112  +
}
  101    113   
impl AccessDeniedException {
  102    114   
    /// Returns the error message.
  103    115   
    pub fn message(&self) -> &str {
  104    116   
        &self.message
  105    117   
    }
  106    118   
}
  107    119   
impl ::std::fmt::Display for AccessDeniedException {
  108    120   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  109    121   
        ::std::write!(f, "AccessDeniedException")?;
  110    122   
        {

tmp-codegen-diff/aws-sdk/sdk/signin/src/types/error/_internal_server_exception.rs

@@ -42,42 +130,142 @@
   62     62   
        }
   63     63   
        {
   64     64   
            let val = &self.message;
   65     65   
            ser.write_string(&INTERNALSERVEREXCEPTION_MEMBER_MESSAGE, val)?;
   66     66   
        }
   67     67   
        Ok(())
   68     68   
    }
   69     69   
}
   70     70   
impl InternalServerException {
   71     71   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   72         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   73         -
        deserializer: &mut D,
          72  +
    pub fn deserialize(
          73  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   74     74   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   75     75   
        #[allow(unused_variables, unused_mut)]
   76     76   
        let mut builder = Self::builder();
   77     77   
        #[allow(
   78     78   
            unused_variables,
   79     79   
            unreachable_code,
   80     80   
            clippy::single_match,
   81     81   
            clippy::match_single_binding,
   82     82   
            clippy::diverging_sub_expression
   83     83   
        )]
   84         -
        deserializer.read_struct(&INTERNALSERVEREXCEPTION_SCHEMA, (), |_, member, deser| {
          84  +
        deserializer.read_struct(&INTERNALSERVEREXCEPTION_SCHEMA, &mut |member, deser| {
   85     85   
            match member.member_index() {
   86     86   
                Some(0) => {
   87     87   
                    builder.error = Some(crate::types::OAuth2ErrorCode::from(deser.read_string(member)?.as_str()));
   88     88   
                }
   89     89   
                Some(1) => {
   90     90   
                    builder.message = Some(deser.read_string(member)?);
   91     91   
                }
   92     92   
                _ => {}
   93     93   
            }
   94     94   
            Ok(())
   95     95   
        })?;
          96  +
        builder.message = builder.message.or(Some(String::new()));
   96     97   
        builder
   97     98   
            .build()
   98     99   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   99    100   
    }
  100    101   
}
         102  +
impl InternalServerException {
         103  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         104  +
    pub fn deserialize_with_response(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         106  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         107  +
        _status: u16,
         108  +
        _body: &[u8],
         109  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         110  +
        Self::deserialize(deserializer)
         111  +
    }
         112  +
}
  101    113   
impl InternalServerException {
  102    114   
    /// Returns the error message.
  103    115   
    pub fn message(&self) -> &str {
  104    116   
        &self.message
  105    117   
    }
  106    118   
}
  107    119   
impl ::std::fmt::Display for InternalServerException {
  108    120   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  109    121   
        ::std::write!(f, "InternalServerException")?;
  110    122   
        {

tmp-codegen-diff/aws-sdk/sdk/signin/src/types/error/_too_many_requests_error.rs

@@ -42,42 +130,142 @@
   62     62   
        }
   63     63   
        {
   64     64   
            let val = &self.message;
   65     65   
            ser.write_string(&TOOMANYREQUESTSERROR_MEMBER_MESSAGE, val)?;
   66     66   
        }
   67     67   
        Ok(())
   68     68   
    }
   69     69   
}
   70     70   
impl TooManyRequestsError {
   71     71   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   72         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   73         -
        deserializer: &mut D,
          72  +
    pub fn deserialize(
          73  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   74     74   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   75     75   
        #[allow(unused_variables, unused_mut)]
   76     76   
        let mut builder = Self::builder();
   77     77   
        #[allow(
   78     78   
            unused_variables,
   79     79   
            unreachable_code,
   80     80   
            clippy::single_match,
   81     81   
            clippy::match_single_binding,
   82     82   
            clippy::diverging_sub_expression
   83     83   
        )]
   84         -
        deserializer.read_struct(&TOOMANYREQUESTSERROR_SCHEMA, (), |_, member, deser| {
          84  +
        deserializer.read_struct(&TOOMANYREQUESTSERROR_SCHEMA, &mut |member, deser| {
   85     85   
            match member.member_index() {
   86     86   
                Some(0) => {
   87     87   
                    builder.error = Some(crate::types::OAuth2ErrorCode::from(deser.read_string(member)?.as_str()));
   88     88   
                }
   89     89   
                Some(1) => {
   90     90   
                    builder.message = Some(deser.read_string(member)?);
   91     91   
                }
   92     92   
                _ => {}
   93     93   
            }
   94     94   
            Ok(())
   95     95   
        })?;
          96  +
        builder.message = builder.message.or(Some(String::new()));
   96     97   
        builder
   97     98   
            .build()
   98     99   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   99    100   
    }
  100    101   
}
         102  +
impl TooManyRequestsError {
         103  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         104  +
    pub fn deserialize_with_response(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         106  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         107  +
        _status: u16,
         108  +
        _body: &[u8],
         109  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         110  +
        Self::deserialize(deserializer)
         111  +
    }
         112  +
}
  101    113   
impl TooManyRequestsError {
  102    114   
    /// Returns the error message.
  103    115   
    pub fn message(&self) -> &str {
  104    116   
        &self.message
  105    117   
    }
  106    118   
}
  107    119   
impl ::std::fmt::Display for TooManyRequestsError {
  108    120   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  109    121   
        ::std::write!(f, "TooManyRequestsError")?;
  110    122   
        {

tmp-codegen-diff/aws-sdk/sdk/signin/src/types/error/_validation_exception.rs

@@ -39,39 +127,139 @@
   59     59   
        }
   60     60   
        {
   61     61   
            let val = &self.message;
   62     62   
            ser.write_string(&VALIDATIONEXCEPTION_MEMBER_MESSAGE, val)?;
   63     63   
        }
   64     64   
        Ok(())
   65     65   
    }
   66     66   
}
   67     67   
impl ValidationException {
   68     68   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   69         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   70         -
        deserializer: &mut D,
          69  +
    pub fn deserialize(
          70  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   71     71   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   72     72   
        #[allow(unused_variables, unused_mut)]
   73     73   
        let mut builder = Self::builder();
   74     74   
        #[allow(
   75     75   
            unused_variables,
   76     76   
            unreachable_code,
   77     77   
            clippy::single_match,
   78     78   
            clippy::match_single_binding,
   79     79   
            clippy::diverging_sub_expression
   80     80   
        )]
   81         -
        deserializer.read_struct(&VALIDATIONEXCEPTION_SCHEMA, (), |_, member, deser| {
          81  +
        deserializer.read_struct(&VALIDATIONEXCEPTION_SCHEMA, &mut |member, deser| {
   82     82   
            match member.member_index() {
   83     83   
                Some(0) => {
   84     84   
                    builder.error = Some(crate::types::OAuth2ErrorCode::from(deser.read_string(member)?.as_str()));
   85     85   
                }
   86     86   
                Some(1) => {
   87     87   
                    builder.message = Some(deser.read_string(member)?);
   88     88   
                }
   89     89   
                _ => {}
   90     90   
            }
   91     91   
            Ok(())
   92     92   
        })?;
          93  +
        builder.message = builder.message.or(Some(String::new()));
   93     94   
        builder
   94     95   
            .build()
   95     96   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   96     97   
    }
   97     98   
}
          99  +
impl ValidationException {
         100  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         101  +
    pub fn deserialize_with_response(
         102  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         103  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         104  +
        _status: u16,
         105  +
        _body: &[u8],
         106  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         107  +
        Self::deserialize(deserializer)
         108  +
    }
         109  +
}
   98    110   
impl ValidationException {
   99    111   
    /// Returns the error message.
  100    112   
    pub fn message(&self) -> &str {
  101    113   
        &self.message
  102    114   
    }
  103    115   
}
  104    116   
impl ::std::fmt::Display for ValidationException {
  105    117   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  106    118   
        ::std::write!(f, "ValidationException")?;
  107    119   
        {

tmp-codegen-diff/aws-sdk/sdk/sso/Cargo.toml

@@ -1,1 +80,80 @@
   14     14   
protocol = "aws.protocols#restJson1"
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20     20   
version = "1.2.14"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24         -
version = "1.7.3"
          24  +
version = "1.7.4"
   25     25   
   26     26   
[dependencies.aws-smithy-async]
   27     27   
path = "../aws-smithy-async"
   28     28   
version = "1.2.14"
   29     29   
   30     30   
[dependencies.aws-smithy-http]
   31     31   
path = "../aws-smithy-http"
   32     32   
version = "0.63.6"
   33     33   
   34     34   
[dependencies.aws-smithy-json]
   35     35   
path = "../aws-smithy-json"
   36     36   
version = "0.62.6"
   37     37   
   38     38   
[dependencies.aws-smithy-observability]
   39     39   
path = "../aws-smithy-observability"
   40     40   
version = "0.2.6"
   41     41   
   42     42   
[dependencies.aws-smithy-runtime]
   43     43   
path = "../aws-smithy-runtime"
   44     44   
features = ["client"]
   45         -
version = "1.10.3"
          45  +
version = "1.10.4"
   46     46   
   47     47   
[dependencies.aws-smithy-runtime-api]
   48     48   
path = "../aws-smithy-runtime-api"
   49     49   
features = ["client", "http-1x"]
   50         -
version = "1.11.6"
          50  +
version = "1.11.7"
   51     51   
   52     52   
[dependencies.aws-smithy-schema]
   53     53   
path = "../aws-smithy-schema"
   54     54   
version = "1.0.0"
   55     55   
   56     56   
[dependencies.aws-smithy-types]
   57     57   
path = "../aws-smithy-types"
   58     58   
features = ["http-body-1-x"]
   59     59   
version = "1.4.7"
   60     60   

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

@@ -23,23 +82,86 @@
   43     43   
            config: self.cloneable.clone(),
   44     44   
            runtime_components: self.runtime_components.clone(),
   45     45   
            runtime_plugins: self.runtime_plugins.clone(),
   46     46   
            behavior_version: self.behavior_version,
   47     47   
        }
   48     48   
    }
   49     49   
    /// Return a reference to the stalled stream protection configuration contained in this config, if any.
   50     50   
    pub fn stalled_stream_protection(&self) -> ::std::option::Option<&crate::config::StalledStreamProtectionConfig> {
   51     51   
        self.config.load::<crate::config::StalledStreamProtectionConfig>()
   52     52   
    }
          53  +
    /// Returns the client protocol used for serialization and deserialization.
          54  +
    pub fn protocol(&self) -> ::std::option::Option<&::aws_smithy_schema::protocol::SharedClientProtocol> {
          55  +
        self.config.load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
          56  +
    }
   53     57   
    /// Return the [`SharedHttpClient`](crate::config::SharedHttpClient) to use when making requests, if any.
   54     58   
    pub fn http_client(&self) -> Option<crate::config::SharedHttpClient> {
   55     59   
        self.runtime_components.http_client()
   56     60   
    }
   57     61   
    /// Return the auth schemes configured on this service config
   58     62   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   59     63   
        self.runtime_components.auth_schemes()
   60     64   
    }
   61     65   
   62     66   
    /// Return the auth scheme resolver configured on this service config
@@ -153,157 +238,261 @@
  173    177   
    ///
  174    178   
    pub fn new() -> Self {
  175    179   
        Self::default()
  176    180   
    }
  177    181   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  178    182   
    /// but not those in runtime components.
  179    183   
    #[allow(unused)]
  180    184   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  181    185   
        let mut builder = Self::new();
  182    186   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         187  +
        if let ::std::option::Option::Some(protocol) = config_bag.load::<::aws_smithy_schema::protocol::SharedClientProtocol>().cloned() {
         188  +
            builder.set_protocol(::std::option::Option::Some(protocol));
         189  +
        }
  183    190   
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  184    191   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  185    192   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  186    193   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  187    194   
        builder.set_app_name(config_bag.load::<::aws_types::app_name::AppName>().cloned());
  188    195   
        builder.set_endpoint_url(config_bag.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()));
  189    196   
        builder.set_use_dual_stack(config_bag.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0));
  190    197   
        builder.set_use_fips(config_bag.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0));
  191    198   
        builder.set_region(config_bag.load::<crate::config::Region>().cloned());
  192    199   
        builder
  193    200   
    }
  194    201   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  195    202   
    /// to configure protection for stalled streams.
  196    203   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  197    204   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  198    205   
        self
  199    206   
    }
  200    207   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  201    208   
    /// to configure protection for stalled streams.
  202    209   
    pub fn set_stalled_stream_protection(
  203    210   
        &mut self,
  204    211   
        stalled_stream_protection_config: ::std::option::Option<crate::config::StalledStreamProtectionConfig>,
  205    212   
    ) -> &mut Self {
  206    213   
        self.config.store_or_unset(stalled_stream_protection_config);
  207    214   
        self
  208    215   
    }
         216  +
    /// Sets the client protocol to use for serialization and deserialization.
         217  +
    ///
         218  +
    /// This overrides the default protocol determined by the service model,
         219  +
    /// enabling runtime protocol selection.
         220  +
    pub fn protocol(mut self, protocol: impl ::aws_smithy_schema::protocol::ClientProtocol + 'static) -> Self {
         221  +
        self.set_protocol(::std::option::Option::Some(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         222  +
            protocol,
         223  +
        )));
         224  +
        self
         225  +
    }
         226  +
         227  +
    /// Sets the client protocol to use for serialization and deserialization.
         228  +
    pub fn set_protocol(&mut self, protocol: ::std::option::Option<::aws_smithy_schema::protocol::SharedClientProtocol>) -> &mut Self {
         229  +
        self.config.store_or_unset(protocol);
         230  +
        self
         231  +
    }
  209    232   
    /// Sets the HTTP client to use when making requests.
  210    233   
    ///
  211    234   
    /// # Examples
  212    235   
    /// ```no_run
  213    236   
    /// # #[cfg(test)]
  214    237   
    /// # mod tests {
  215    238   
    /// # #[test]
  216    239   
    /// # fn example() {
  217    240   
    /// use std::time::Duration;
  218    241   
    /// use aws_sdk_sso::config::Config;
@@ -1272,1295 +1331,1359 @@
 1292   1315   
#[derive(::std::fmt::Debug)]
 1293   1316   
pub(crate) struct ServiceRuntimePlugin {
 1294   1317   
    config: ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer>,
 1295   1318   
    runtime_components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1296   1319   
}
 1297   1320   
 1298   1321   
impl ServiceRuntimePlugin {
 1299   1322   
    pub fn new(_service_config: crate::config::Config) -> Self {
 1300   1323   
        let config = {
 1301   1324   
            let mut cfg = ::aws_smithy_types::config_bag::Layer::new("SWBPortalService");
        1325  +
            if _service_config.protocol().is_none() {
        1326  +
                cfg.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
        1327  +
                    ::aws_smithy_json::protocol::aws_rest_json_1::AwsRestJsonProtocol::new(),
        1328  +
                ));
        1329  +
            }
 1302   1330   
            cfg.store_put(::aws_smithy_runtime::client::orchestrator::AuthSchemeAndEndpointOrchestrationV2);
 1303   1331   
            ::std::option::Option::Some(cfg.freeze())
 1304   1332   
        };
 1305   1333   
        let mut runtime_components = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ServiceRuntimePlugin");
 1306   1334   
        runtime_components.set_auth_scheme_option_resolver(::std::option::Option::Some({
 1307   1335   
            use crate::config::auth::ResolveAuthScheme;
 1308   1336   
            crate::config::auth::DefaultAuthSchemeResolver::default().into_shared_resolver()
 1309   1337   
        }));
 1310   1338   
        runtime_components.set_endpoint_resolver(::std::option::Option::Some({
 1311   1339   
            use crate::config::endpoint::ResolveEndpoint;
@@ -1407,1435 +1466,1497 @@
 1427   1455   
        }
 1428   1456   
        // resiliency
 1429   1457   
        builder.set_retry_config(input.retry_config().cloned());
 1430   1458   
        builder.set_timeout_config(input.timeout_config().cloned());
 1431   1459   
        builder.set_sleep_impl(input.sleep_impl());
 1432   1460   
 1433   1461   
        builder.set_http_client(input.http_client());
 1434   1462   
        builder.set_time_source(input.time_source());
 1435   1463   
        builder.set_behavior_version(input.behavior_version());
 1436   1464   
        builder.set_auth_scheme_preference(input.auth_scheme_preference().cloned());
        1465  +
        if let Some(protocol) = input.protocol() {
        1466  +
            builder.set_protocol(Some(protocol.clone()));
        1467  +
        }
 1437   1468   
        // setting `None` here removes the default
 1438   1469   
        if let Some(config) = input.stalled_stream_protection() {
 1439   1470   
            builder.set_stalled_stream_protection(Some(config));
 1440   1471   
        }
 1441   1472   
 1442   1473   
        if let Some(cache) = input.identity_cache() {
 1443   1474   
            builder.set_identity_cache(cache);
 1444   1475   
        }
 1445   1476   
        builder.set_app_name(input.app_name().cloned());
 1446   1477   

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

@@ -124,124 +163,161 @@
  144    144   
  145    145   
/// Data structures used by operation inputs/outputs.
  146    146   
pub mod types;
  147    147   
  148    148   
mod observability_feature;
  149    149   
  150    150   
pub(crate) mod protocol_serde;
  151    151   
  152    152   
mod sdk_feature_tracker;
  153    153   
  154         -
mod serialization_settings;
  155         -
  156    154   
mod endpoint_lib;
  157    155   
  158         -
mod lens;
  159         -
  160    156   
mod json_errors;
  161    157   
         158  +
mod lens;
         159  +
  162    160   
#[doc(inline)]
  163    161   
pub use client::Client;

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

tmp-codegen-diff/aws-sdk/sdk/sso/src/operation/get_role_credentials/_get_role_credentials_input.rs

@@ -18,18 +163,207 @@
   38     38   
    "com.amazonaws.sso.synthetic",
   39     39   
    "GetRoleCredentialsInput",
   40     40   
);
   41     41   
static GETROLECREDENTIALSINPUT_MEMBER_ROLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   42     42   
    ::aws_smithy_schema::ShapeId::from_static(
   43     43   
        "com.amazonaws.sso.synthetic#GetRoleCredentialsInput$roleName",
   44     44   
        "com.amazonaws.sso.synthetic",
   45     45   
        "GetRoleCredentialsInput",
   46     46   
    ),
   47     47   
    ::aws_smithy_schema::ShapeType::String,
   48         -
    "role_name",
          48  +
    "roleName",
   49     49   
    0,
   50     50   
)
   51     51   
.with_http_query("role_name");
   52     52   
static GETROLECREDENTIALSINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.sso.synthetic#GetRoleCredentialsInput$accountId",
   55     55   
        "com.amazonaws.sso.synthetic",
   56     56   
        "GetRoleCredentialsInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::String,
   59         -
    "account_id",
          59  +
    "accountId",
   60     60   
    1,
   61     61   
)
   62     62   
.with_http_query("account_id");
   63     63   
static GETROLECREDENTIALSINPUT_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#GetRoleCredentialsInput$accessToken",
   66     66   
        "com.amazonaws.sso.synthetic",
   67     67   
        "GetRoleCredentialsInput",
   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 GETROLECREDENTIALSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   75     75   
    GETROLECREDENTIALSINPUT_SCHEMA_ID,
   76     76   
    ::aws_smithy_schema::ShapeType::Structure,
   77     77   
    &[
   78     78   
        &GETROLECREDENTIALSINPUT_MEMBER_ROLE_NAME,
   79     79   
        &GETROLECREDENTIALSINPUT_MEMBER_ACCOUNT_ID,
   80     80   
        &GETROLECREDENTIALSINPUT_MEMBER_ACCESS_TOKEN,
   81     81   
    ],
   82         -
);
          82  +
)
          83  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/federation/credentials", None));
   83     84   
impl GetRoleCredentialsInput {
   84     85   
    /// The schema for this shape.
   85     86   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETROLECREDENTIALSINPUT_SCHEMA;
   86     87   
}
   87     88   
impl ::aws_smithy_schema::serde::SerializableStruct for GetRoleCredentialsInput {
   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.role_name {
   94     95   
            ser.write_string(&GETROLECREDENTIALSINPUT_MEMBER_ROLE_NAME, val)?;
   95     96   
        }
   96     97   
        if let Some(ref val) = self.account_id {
   97     98   
            ser.write_string(&GETROLECREDENTIALSINPUT_MEMBER_ACCOUNT_ID, val)?;
   98     99   
        }
   99    100   
        if let Some(ref val) = self.access_token {
  100    101   
            ser.write_string(&GETROLECREDENTIALSINPUT_MEMBER_ACCESS_TOKEN, val)?;
  101    102   
        }
  102    103   
        Ok(())
  103    104   
    }
  104    105   
}
  105    106   
impl GetRoleCredentialsInput {
  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(&GETROLECREDENTIALSINPUT_SCHEMA, (), |_, member, deser| {
         120  +
        deserializer.read_struct(&GETROLECREDENTIALSINPUT_SCHEMA, &mut |member, deser| {
  120    121   
            match member.member_index() {
  121    122   
                Some(0) => {
  122    123   
                    builder.role_name = Some(deser.read_string(member)?);
  123    124   
                }
  124    125   
                Some(1) => {
  125    126   
                    builder.account_id = Some(deser.read_string(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.role_name = builder.role_name.or(Some(String::new()));
         136  +
        builder.account_id = builder.account_id.or(Some(String::new()));
         137  +
        builder.access_token = builder.access_token.or(Some(String::new()));
         138  +
        builder
         139  +
            .build()
         140  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         141  +
    }
         142  +
}
         143  +
impl GetRoleCredentialsInput {
         144  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         145  +
    /// Header-bound members are read directly from headers, avoiding runtime
         146  +
    /// member iteration overhead. Body members are read via the deserializer.
         147  +
    pub fn deserialize_with_response(
         148  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         149  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         150  +
        _status: u16,
         151  +
        _body: &[u8],
         152  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         153  +
        #[allow(unused_variables, unused_mut)]
         154  +
        let mut builder = Self::builder();
         155  +
        if let Some(val) = headers.get("x-amz-sso_bearer_token") {
         156  +
            builder.access_token = Some(val.to_string());
         157  +
        }
         158  +
        #[allow(
         159  +
            unused_variables,
         160  +
            unreachable_code,
         161  +
            clippy::single_match,
         162  +
            clippy::match_single_binding,
         163  +
            clippy::diverging_sub_expression
         164  +
        )]
         165  +
        deserializer.read_struct(&GETROLECREDENTIALSINPUT_SCHEMA, &mut |member, deser| {
         166  +
            match member.member_index() {
         167  +
                Some(0) => {
         168  +
                    builder.role_name = Some(deser.read_string(member)?);
         169  +
                }
         170  +
                Some(1) => {
         171  +
                    builder.account_id = Some(deser.read_string(member)?);
         172  +
                }
         173  +
                Some(2) => { /* read from headers above */ }
         174  +
                _ => {}
         175  +
            }
         176  +
            Ok(())
         177  +
        })?;
  134    178   
        builder
  135    179   
            .build()
  136    180   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  137    181   
    }
  138    182   
}
  139    183   
impl GetRoleCredentialsInput {
  140    184   
    /// Creates a new builder-style object to manufacture [`GetRoleCredentialsInput`](crate::operation::get_role_credentials::GetRoleCredentialsInput).
  141    185   
    pub fn builder() -> crate::operation::get_role_credentials::builders::GetRoleCredentialsInputBuilder {
  142    186   
        crate::operation::get_role_credentials::builders::GetRoleCredentialsInputBuilder::default()
  143    187   
    }

tmp-codegen-diff/aws-sdk/sdk/sso/src/operation/get_role_credentials/_get_role_credentials_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/sso/src/operation/list_account_roles.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 `ListAccountRoles`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListAccountRoles;
    6      6   
impl ListAccountRoles {
    7      7   
    /// Creates a new `ListAccountRoles`
    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_account_roles::ListAccountRolesInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_account_roles::ListAccountRolesOutput::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_account_roles::ListAccountRolesInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_account_roles::ListAccountRolesOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_account_roles::ListAccountRolesError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -105,109 +253,345 @@
  125    129   
                crate::operation::list_account_roles::ListAccountRolesError,
  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 ListAccountRolesResponseDeserializer;
  134    138   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListAccountRolesResponseDeserializer {
  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_account_roles::de_list_account_roles_http_error(status, headers, body)
  147         -
        } else {
  148         -
            crate::protocol_serde::shape_list_account_roles::de_list_account_roles_http_response(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_account_roles::ListAccountRolesError::unhandled(
         162  +
                            generic,
         163  +
                        )),
         164  +
                    ))
         165  +
                }
  149    166   
            };
  150         -
        crate::protocol_serde::type_erase_result(parse_result)
         167  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         168  +
            let protocol = _cfg
         169  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         170  +
                .expect("a SharedClientProtocol is required");
         171  +
            let err = match error_code {
         172  +
                "InvalidRequestException" => crate::operation::list_account_roles::ListAccountRolesError::InvalidRequestException({
         173  +
                    let mut tmp = match protocol
         174  +
                        .deserialize_response(response, crate::types::error::InvalidRequestException::SCHEMA, _cfg)
         175  +
                        .and_then(|mut deser| {
         176  +
                            crate::types::error::InvalidRequestException::deserialize_with_response(
         177  +
                                &mut *deser,
         178  +
                                response.headers(),
         179  +
                                response.status().into(),
         180  +
                                body,
         181  +
                            )
         182  +
                        }) {
         183  +
                        ::std::result::Result::Ok(val) => val,
         184  +
                        ::std::result::Result::Err(e) => {
         185  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         186  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         187  +
                            ))
         188  +
                        }
         189  +
                    };
         190  +
                    tmp.meta = generic;
         191  +
                    if tmp.message.is_none() {
         192  +
                        tmp.message = _error_message;
         193  +
                    }
         194  +
                    tmp
         195  +
                }),
         196  +
                "ResourceNotFoundException" => crate::operation::list_account_roles::ListAccountRolesError::ResourceNotFoundException({
         197  +
                    let mut tmp = match protocol
         198  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         199  +
                        .and_then(|mut deser| {
         200  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         201  +
                                &mut *deser,
         202  +
                                response.headers(),
         203  +
                                response.status().into(),
         204  +
                                body,
         205  +
                            )
         206  +
                        }) {
         207  +
                        ::std::result::Result::Ok(val) => val,
         208  +
                        ::std::result::Result::Err(e) => {
         209  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         210  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         211  +
                            ))
         212  +
                        }
         213  +
                    };
         214  +
                    tmp.meta = generic;
         215  +
                    if tmp.message.is_none() {
         216  +
                        tmp.message = _error_message;
         217  +
                    }
         218  +
                    tmp
         219  +
                }),
         220  +
                "TooManyRequestsException" => crate::operation::list_account_roles::ListAccountRolesError::TooManyRequestsException({
         221  +
                    let mut tmp = match protocol
         222  +
                        .deserialize_response(response, crate::types::error::TooManyRequestsException::SCHEMA, _cfg)
         223  +
                        .and_then(|mut deser| {
         224  +
                            crate::types::error::TooManyRequestsException::deserialize_with_response(
         225  +
                                &mut *deser,
         226  +
                                response.headers(),
         227  +
                                response.status().into(),
         228  +
                                body,
         229  +
                            )
         230  +
                        }) {
         231  +
                        ::std::result::Result::Ok(val) => val,
         232  +
                        ::std::result::Result::Err(e) => {
         233  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         234  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         235  +
                            ))
         236  +
                        }
         237  +
                    };
         238  +
                    tmp.meta = generic;
         239  +
                    if tmp.message.is_none() {
         240  +
                        tmp.message = _error_message;
         241  +
                    }
         242  +
                    tmp
         243  +
                }),
         244  +
                "UnauthorizedException" => crate::operation::list_account_roles::ListAccountRolesError::UnauthorizedException({
         245  +
                    let mut tmp = match protocol
         246  +
                        .deserialize_response(response, crate::types::error::UnauthorizedException::SCHEMA, _cfg)
         247  +
                        .and_then(|mut deser| {
         248  +
                            crate::types::error::UnauthorizedException::deserialize_with_response(
         249  +
                                &mut *deser,
         250  +
                                response.headers(),
         251  +
                                response.status().into(),
         252  +
                                body,
         253  +
                            )
         254  +
                        }) {
         255  +
                        ::std::result::Result::Ok(val) => val,
         256  +
                        ::std::result::Result::Err(e) => {
         257  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         258  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         259  +
                            ))
         260  +
                        }
         261  +
                    };
         262  +
                    tmp.meta = generic;
         263  +
                    if tmp.message.is_none() {
         264  +
                        tmp.message = _error_message;
         265  +
                    }
         266  +
                    tmp
         267  +
                }),
         268  +
                _ => crate::operation::list_account_roles::ListAccountRolesError::generic(generic),
         269  +
            };
         270  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         271  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         272  +
            ))
         273  +
        } else {
         274  +
            let protocol = _cfg
         275  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         276  +
                .expect("a SharedClientProtocol is required");
         277  +
            let mut deser = protocol
         278  +
                .deserialize_response(response, ListAccountRoles::OUTPUT_SCHEMA, _cfg)
         279  +
                .map_err(|e| {
         280  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         281  +
                })?;
         282  +
            let body = response.body().bytes().expect("body loaded");
         283  +
            let output = crate::operation::list_account_roles::ListAccountRolesOutput::deserialize_with_response(
         284  +
                &mut *deser,
         285  +
                response.headers(),
         286  +
                response.status().into(),
         287  +
                body,
         288  +
            )
         289  +
            .map_err(|e| {
         290  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         291  +
            })?;
         292  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         293  +
        }
  151    294   
    }
  152    295   
}
  153    296   
#[derive(Debug)]
  154    297   
struct ListAccountRolesRequestSerializer;
  155    298   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListAccountRolesRequestSerializer {
  156    299   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  157    300   
    fn serialize_input(
  158    301   
        &self,
  159    302   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  160    303   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  161    304   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  162    305   
        let input = input
  163    306   
            .downcast::<crate::operation::list_account_roles::ListAccountRolesInput>()
  164    307   
            .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_account_roles::ListAccountRolesInput,
  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/roles").expect("formatting should succeed");
  177         -
                ::std::result::Result::Ok(())
  178         -
            }
  179         -
            fn uri_query(
  180         -
                _input: &crate::operation::list_account_roles::ListAccountRolesInput,
  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         -
                let inner_3 = &_input.account_id;
  195         -
                let inner_3 = inner_3
  196         -
                    .as_ref()
  197         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("account_id", "cannot be empty or unset"))?;
  198         -
                if inner_3.is_empty() {
  199         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  200         -
                        "account_id",
  201         -
                        "cannot be empty or unset",
  202         -
                    ));
  203         -
                }
  204         -
                query.push_kv("account_id", &::aws_smithy_http::query::fmt_string(inner_3));
  205         -
                ::std::result::Result::Ok(())
  206         -
            }
  207         -
            #[allow(clippy::unnecessary_wraps)]
  208         -
            fn update_http_builder(
  209         -
                input: &crate::operation::list_account_roles::ListAccountRolesInput,
  210         -
                builder: ::http_1x::request::Builder,
  211         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  212         -
                let mut uri = ::std::string::String::new();
  213         -
                uri_base(input, &mut uri)?;
  214         -
                uri_query(input, &mut uri)?;
  215         -
                let builder = crate::protocol_serde::shape_list_account_roles::ser_list_account_roles_headers(input, builder)?;
  216         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  217         -
            }
  218         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  219         -
            builder
  220         -
        };
  221         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
         308  +
        let protocol = _cfg
         309  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         310  +
            .expect("a SharedClientProtocol is required");
         311  +
        let mut request = protocol
         312  +
            .serialize_request(&input, ListAccountRoles::INPUT_SCHEMA, "", _cfg)
         313  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
  222    314   
  223         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         315  +
        return ::std::result::Result::Ok(request);
  224    316   
    }
  225    317   
}
  226    318   
#[derive(Debug)]
  227    319   
struct ListAccountRolesEndpointParamsInterceptor;
  228    320   
  229    321   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListAccountRolesEndpointParamsInterceptor {
  230    322   
    fn name(&self) -> &'static str {
  231    323   
        "ListAccountRolesEndpointParamsInterceptor"
  232    324   
    }
  233    325