AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

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   
    > {
@@ -109,113 +255,382 @@
  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    140   
    fn deserialize_nonstreaming(
  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)
         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  +
                        }
         190  +
                    };
         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  +
            ))
  148    274   
        } else {
  149         -
            crate::protocol_serde::shape_get_role_credentials::de_get_role_credentials_http_response(status, headers, body)
  150         -
        };
  151         -
        crate::protocol_serde::type_erase_result(parse_result)
         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         -
                    ));
         309  +
        let protocol = _cfg
         310  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         311  +
            .expect("a SharedClientProtocol is required");
         312  +
        if protocol.supports_http_bindings() {
         313  +
            let mut request = protocol
         314  +
                .serialize_body(&input, GetRoleCredentials::INPUT_SCHEMA, "", _cfg)
         315  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         316  +
            {
         317  +
                let mut uri = "/federation/credentials".to_string();
         318  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         319  +
                if let Some(ref val) = input.role_name {
         320  +
                    query_params.push(("role_name".to_string(), val.to_string()));
  194    321   
                }
  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         -
                    ));
         322  +
                if let Some(ref val) = input.account_id {
         323  +
                    query_params.push(("account_id".to_string(), val.to_string()));
  205    324   
                }
  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))
         325  +
                if let Some(ref val) = input.access_token {
         326  +
                    request.headers_mut().insert("x-amz-sso_bearer_token", val.to_string());
         327  +
                }
         328  +
                if !query_params.is_empty() {
         329  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         330  +
                    let pairs: Vec<String> = query_params
         331  +
                        .iter()
         332  +
                        .map(|(k, v)| {
         333  +
                            format!(
         334  +
                                "{}={}",
         335  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         336  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         337  +
                            )
         338  +
                        })
         339  +
                        .collect();
         340  +
                    uri.push_str(&pairs.join("&"));
         341  +
                }
         342  +
                request.set_uri(uri.as_str()).expect("valid URI");
  219    343   
            }
  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("");
  224    344   
  225         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         345  +
            return ::std::result::Result::Ok(request);
         346  +
        } else {
         347  +
            let mut request = protocol
         348  +
                .serialize_request(&input, GetRoleCredentials::INPUT_SCHEMA, "", _cfg)
         349  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         350  +
         351  +
            return ::std::result::Result::Ok(request);
         352  +
        }
  226    353   
    }
  227    354   
}
  228    355   
#[derive(Debug)]
  229    356   
struct GetRoleCredentialsEndpointParamsInterceptor;
  230    357   
  231    358   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetRoleCredentialsEndpointParamsInterceptor {
  232    359   
    fn name(&self) -> &'static str {
  233    360   
        "GetRoleCredentialsEndpointParamsInterceptor"
  234    361   
    }
  235    362   

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   
    > {
@@ -108,112 +253,384 @@
  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    139   
    fn deserialize_nonstreaming(
  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)
         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  +
                }
         166  +
            };
         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  +
            ))
  147    273   
        } else {
  148         -
            crate::protocol_serde::shape_list_account_roles::de_list_account_roles_http_response(status, headers, body)
  149         -
        };
  150         -
        crate::protocol_serde::type_erase_result(parse_result)
         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         -
                    }
         308  +
        let protocol = _cfg
         309  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         310  +
            .expect("a SharedClientProtocol is required");
         311  +
        if protocol.supports_http_bindings() {
         312  +
            let mut request = protocol
         313  +
                .serialize_body(&input, ListAccountRoles::INPUT_SCHEMA, "", _cfg)
         314  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         315  +
            {
         316  +
                let mut uri = "/assignment/roles".to_string();
         317  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         318  +
                if let Some(ref val) = input.next_token {
         319  +
                    query_params.push(("next_token".to_string(), val.to_string()));
  188    320   
                }
  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         -
                    }
         321  +
                if let Some(ref val) = input.max_results {
         322  +
                    query_params.push(("max_result".to_string(), val.to_string()));
  193    323   
                }
  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         -
                    ));
         324  +
                if let Some(ref val) = input.access_token {
         325  +
                    request.headers_mut().insert("x-amz-sso_bearer_token", val.to_string());
  203    326   
                }
  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))
         327  +
                if let Some(ref val) = input.account_id {
         328  +
                    query_params.push(("account_id".to_string(), val.to_string()));
         329  +
                }
         330  +
                if !query_params.is_empty() {
         331  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         332  +
                    let pairs: Vec<String> = query_params
         333  +
                        .iter()
         334  +
                        .map(|(k, v)| {
         335  +
                            format!(
         336  +
                                "{}={}",
         337  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         338  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         339  +
                            )
         340  +
                        })
         341  +
                        .collect();
         342  +
                    uri.push_str(&pairs.join("&"));
         343  +
                }
         344  +
                request.set_uri(uri.as_str()).expect("valid URI");
  217    345   
            }
  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("");
  222    346   
  223         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         347  +
            return ::std::result::Result::Ok(request);
         348  +
        } else {
         349  +
            let mut request = protocol
         350  +
                .serialize_request(&input, ListAccountRoles::INPUT_SCHEMA, "", _cfg)
         351  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         352  +
         353  +
            return ::std::result::Result::Ok(request);
         354  +
        }
  224    355   
    }
  225    356   
}
  226    357   
#[derive(Debug)]
  227    358   
struct ListAccountRolesEndpointParamsInterceptor;
  228    359   
  229    360   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListAccountRolesEndpointParamsInterceptor {
  230    361   
    fn name(&self) -> &'static str {
  231    362   
        "ListAccountRolesEndpointParamsInterceptor"
  232    363   
    }
  233    364   

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

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

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

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

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

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