AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

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

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

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

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

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

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `Logout`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct Logout;
    6      6   
impl Logout {
    7      7   
    /// Creates a new `Logout`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::logout::LogoutInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::logout::LogoutOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::logout::LogoutInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::logout::LogoutOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::logout::LogoutError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -100,104 +214,335 @@
  120    124   
        ::std::borrow::Cow::Owned(rcb)
  121    125   
    }
  122    126   
}
  123    127   
  124    128   
#[derive(Debug)]
  125    129   
struct LogoutResponseDeserializer;
  126    130   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for LogoutResponseDeserializer {
  127    131   
    fn deserialize_nonstreaming(
  128    132   
        &self,
  129    133   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         134  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  130    135   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  131    136   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  132         -
        let headers = response.headers();
  133         -
        let body = response.body().bytes().expect("body loaded");
  134    137   
        #[allow(unused_mut)]
  135    138   
        let mut force_error = false;
  136    139   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  137         -
        let parse_result = if !success && status != 200 || force_error {
  138         -
            crate::protocol_serde::shape_logout::de_logout_http_error(status, headers, body)
         140  +
        if !success && status != 200 || force_error {
         141  +
            let headers = response.headers();
         142  +
            let body = response.body().bytes().expect("body loaded");
         143  +
            #[allow(unused_mut)]
         144  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         145  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         146  +
            })?;
         147  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         148  +
            let generic = generic_builder.build();
         149  +
            let error_code = match generic.code() {
         150  +
                ::std::option::Option::Some(code) => code,
         151  +
                ::std::option::Option::None => {
         152  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         153  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::logout::LogoutError::unhandled(generic)),
         154  +
                    ))
         155  +
                }
         156  +
            };
         157  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         158  +
            let protocol = _cfg
         159  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         160  +
                .expect("a SharedClientProtocol is required");
         161  +
            let err = match error_code {
         162  +
                "InvalidRequestException" => crate::operation::logout::LogoutError::InvalidRequestException({
         163  +
                    let mut tmp = match protocol
         164  +
                        .deserialize_response(response, crate::types::error::InvalidRequestException::SCHEMA, _cfg)
         165  +
                        .and_then(|mut deser| {
         166  +
                            crate::types::error::InvalidRequestException::deserialize_with_response(
         167  +
                                &mut *deser,
         168  +
                                response.headers(),
         169  +
                                response.status().into(),
         170  +
                                body,
         171  +
                            )
         172  +
                        }) {
         173  +
                        ::std::result::Result::Ok(val) => val,
         174  +
                        ::std::result::Result::Err(e) => {
         175  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         176  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         177  +
                            ))
         178  +
                        }
         179  +
                    };
         180  +
                    tmp.meta = generic;
         181  +
                    if tmp.message.is_none() {
         182  +
                        tmp.message = _error_message;
         183  +
                    }
         184  +
                    tmp
         185  +
                }),
         186  +
                "TooManyRequestsException" => crate::operation::logout::LogoutError::TooManyRequestsException({
         187  +
                    let mut tmp = match protocol
         188  +
                        .deserialize_response(response, crate::types::error::TooManyRequestsException::SCHEMA, _cfg)
         189  +
                        .and_then(|mut deser| {
         190  +
                            crate::types::error::TooManyRequestsException::deserialize_with_response(
         191  +
                                &mut *deser,
         192  +
                                response.headers(),
         193  +
                                response.status().into(),
         194  +
                                body,
         195  +
                            )
         196  +
                        }) {
         197  +
                        ::std::result::Result::Ok(val) => val,
         198  +
                        ::std::result::Result::Err(e) => {
         199  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         200  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         201  +
                            ))
         202  +
                        }
         203  +
                    };
         204  +
                    tmp.meta = generic;
         205  +
                    if tmp.message.is_none() {
         206  +
                        tmp.message = _error_message;
         207  +
                    }
         208  +
                    tmp
         209  +
                }),
         210  +
                "UnauthorizedException" => crate::operation::logout::LogoutError::UnauthorizedException({
         211  +
                    let mut tmp = match protocol
         212  +
                        .deserialize_response(response, crate::types::error::UnauthorizedException::SCHEMA, _cfg)
         213  +
                        .and_then(|mut deser| {
         214  +
                            crate::types::error::UnauthorizedException::deserialize_with_response(
         215  +
                                &mut *deser,
         216  +
                                response.headers(),
         217  +
                                response.status().into(),
         218  +
                                body,
         219  +
                            )
         220  +
                        }) {
         221  +
                        ::std::result::Result::Ok(val) => val,
         222  +
                        ::std::result::Result::Err(e) => {
         223  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         224  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         225  +
                            ))
         226  +
                        }
         227  +
                    };
         228  +
                    tmp.meta = generic;
         229  +
                    if tmp.message.is_none() {
         230  +
                        tmp.message = _error_message;
         231  +
                    }
         232  +
                    tmp
         233  +
                }),
         234  +
                _ => crate::operation::logout::LogoutError::generic(generic),
         235  +
            };
         236  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         237  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         238  +
            ))
  139    239   
        } else {
  140         -
            crate::protocol_serde::shape_logout::de_logout_http_response(status, headers, body)
  141         -
        };
  142         -
        crate::protocol_serde::type_erase_result(parse_result)
         240  +
            let protocol = _cfg
         241  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         242  +
                .expect("a SharedClientProtocol is required");
         243  +
            let mut deser = protocol.deserialize_response(response, Logout::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         244  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         245  +
            })?;
         246  +
            let body = response.body().bytes().expect("body loaded");
         247  +
            let output =
         248  +
                crate::operation::logout::LogoutOutput::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body)
         249  +
                    .map_err(|e| {
         250  +
                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
         251  +
                            e,
         252  +
                        ))
         253  +
                    })?;
         254  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         255  +
        }
  143    256   
    }
  144    257   
}
  145    258   
#[derive(Debug)]
  146    259   
struct LogoutRequestSerializer;
  147    260   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for LogoutRequestSerializer {
  148    261   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  149    262   
    fn serialize_input(
  150    263   
        &self,
  151    264   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  152    265   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  153    266   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  154    267   
        let input = input.downcast::<crate::operation::logout::LogoutInput>().expect("correct type");
  155         -
        let _header_serialization_settings = _cfg
  156         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  157         -
            .cloned()
  158         -
            .unwrap_or_default();
  159         -
        let mut request_builder = {
  160         -
            #[allow(clippy::uninlined_format_args)]
  161         -
            fn uri_base(
  162         -
                _input: &crate::operation::logout::LogoutInput,
  163         -
                output: &mut ::std::string::String,
  164         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  165         -
                use ::std::fmt::Write as _;
  166         -
                ::std::write!(output, "/logout").expect("formatting should succeed");
  167         -
                ::std::result::Result::Ok(())
  168         -
            }
  169         -
            #[allow(clippy::unnecessary_wraps)]
  170         -
            fn update_http_builder(
  171         -
                input: &crate::operation::logout::LogoutInput,
  172         -
                builder: ::http_1x::request::Builder,
  173         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  174         -
                let mut uri = ::std::string::String::new();
  175         -
                uri_base(input, &mut uri)?;
  176         -
                let builder = crate::protocol_serde::shape_logout::ser_logout_headers(input, builder)?;
  177         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
         268  +
        let protocol = _cfg
         269  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         270  +
            .expect("a SharedClientProtocol is required");
         271  +
        if protocol.supports_http_bindings() {
         272  +
            let mut request = protocol
         273  +
                .serialize_body(&input, Logout::INPUT_SCHEMA, "", _cfg)
         274  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         275  +
            {
         276  +
                let mut uri = "/logout".to_string();
         277  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         278  +
                if let Some(ref val) = input.access_token {
         279  +
                    request.headers_mut().insert("x-amz-sso_bearer_token", val.to_string());
         280  +
                }
         281  +
                if !query_params.is_empty() {
         282  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         283  +
                    let pairs: Vec<String> = query_params
         284  +
                        .iter()
         285  +
                        .map(|(k, v)| {
         286  +
                            format!(
         287  +
                                "{}={}",
         288  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         289  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         290  +
                            )
         291  +
                        })
         292  +
                        .collect();
         293  +
                    uri.push_str(&pairs.join("&"));
         294  +
                }
         295  +
                request.set_uri(uri.as_str()).expect("valid URI");
  178    296   
            }
  179         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  180         -
            builder
  181         -
        };
  182         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  183    297   
  184         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         298  +
            return ::std::result::Result::Ok(request);
         299  +
        } else {
         300  +
            let mut request = protocol
         301  +
                .serialize_request(&input, Logout::INPUT_SCHEMA, "", _cfg)
         302  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         303  +
         304  +
            return ::std::result::Result::Ok(request);
         305  +
        }
  185    306   
    }
  186    307   
}
  187    308   
#[derive(Debug)]
  188    309   
struct LogoutEndpointParamsInterceptor;
  189    310   
  190    311   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for LogoutEndpointParamsInterceptor {
  191    312   
    fn name(&self) -> &'static str {
  192    313   
        "LogoutEndpointParamsInterceptor"
  193    314   
    }
  194    315   

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -1,0 +35,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_invalid_request_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::InvalidRequestExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::InvalidRequestExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
    6         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    7         -
    let tokens = &mut tokens_owned;
    8         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
    9         -
    loop {
   10         -
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "message" => {
   14         -
                    builder = builder.set_message(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
   19         -
                }
   20         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   21         -
            },
   22         -
            other => {
   23         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   24         -
                    "expected object key or end object, found: {other:?}"
   25         -
                )))
   26         -
            }
   27         -
        }
   28         -
    }
   29         -
    if tokens.next().is_some() {
   30         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   31         -
            "found more JSON tokens after completing parsing",
   32         -
        ));
   33         -
    }
   34         -
    Ok(builder)
   35         -
}

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

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

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

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