AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/sso/src/types/error/_too_many_requests_exception.rs

@@ -19,19 +102,113 @@
   39     39   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   40     40   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   41     41   
        if let Some(ref val) = self.message {
   42     42   
            ser.write_string(&TOOMANYREQUESTSEXCEPTION_MEMBER_MESSAGE, val)?;
   43     43   
        }
   44     44   
        Ok(())
   45     45   
    }
   46     46   
}
   47     47   
impl TooManyRequestsException {
   48     48   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   49         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   50         -
        deserializer: &mut D,
          49  +
    pub fn deserialize(
          50  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   51     51   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   52     52   
        #[allow(unused_variables, unused_mut)]
   53     53   
        let mut builder = Self::builder();
   54     54   
        #[allow(
   55     55   
            unused_variables,
   56     56   
            unreachable_code,
   57     57   
            clippy::single_match,
   58     58   
            clippy::match_single_binding,
   59     59   
            clippy::diverging_sub_expression
   60     60   
        )]
   61         -
        deserializer.read_struct(&TOOMANYREQUESTSEXCEPTION_SCHEMA, (), |_, member, deser| {
          61  +
        deserializer.read_struct(&TOOMANYREQUESTSEXCEPTION_SCHEMA, &mut |member, deser| {
   62     62   
            match member.member_index() {
   63     63   
                Some(0) => {
   64     64   
                    builder.message = Some(deser.read_string(member)?);
   65     65   
                }
   66     66   
                _ => {}
   67     67   
            }
   68     68   
            Ok(())
   69     69   
        })?;
   70     70   
        Ok(builder.build())
   71     71   
    }
   72     72   
}
          73  +
impl TooManyRequestsException {
          74  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          75  +
    pub fn deserialize_with_response(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          77  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          78  +
        _status: u16,
          79  +
        _body: &[u8],
          80  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          81  +
        Self::deserialize(deserializer)
          82  +
    }
          83  +
}
   73     84   
impl TooManyRequestsException {
   74     85   
    /// Returns the error message.
   75     86   
    pub fn message(&self) -> ::std::option::Option<&str> {
   76     87   
        self.message.as_deref()
   77     88   
    }
   78     89   
}
   79     90   
impl ::std::fmt::Display for TooManyRequestsException {
   80     91   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   81     92   
        ::std::write!(f, "TooManyRequestsException")?;
   82     93   
        if let ::std::option::Option::Some(inner_1) = &self.message {

tmp-codegen-diff/aws-sdk/sdk/sso/src/types/error/_unauthorized_exception.rs

@@ -16,16 +99,110 @@
   36     36   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   37     37   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   38     38   
        if let Some(ref val) = self.message {
   39     39   
            ser.write_string(&UNAUTHORIZEDEXCEPTION_MEMBER_MESSAGE, val)?;
   40     40   
        }
   41     41   
        Ok(())
   42     42   
    }
   43     43   
}
   44     44   
impl UnauthorizedException {
   45     45   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   46         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   47         -
        deserializer: &mut D,
          46  +
    pub fn deserialize(
          47  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   48     48   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   49     49   
        #[allow(unused_variables, unused_mut)]
   50     50   
        let mut builder = Self::builder();
   51     51   
        #[allow(
   52     52   
            unused_variables,
   53     53   
            unreachable_code,
   54     54   
            clippy::single_match,
   55     55   
            clippy::match_single_binding,
   56     56   
            clippy::diverging_sub_expression
   57     57   
        )]
   58         -
        deserializer.read_struct(&UNAUTHORIZEDEXCEPTION_SCHEMA, (), |_, member, deser| {
          58  +
        deserializer.read_struct(&UNAUTHORIZEDEXCEPTION_SCHEMA, &mut |member, deser| {
   59     59   
            match member.member_index() {
   60     60   
                Some(0) => {
   61     61   
                    builder.message = Some(deser.read_string(member)?);
   62     62   
                }
   63     63   
                _ => {}
   64     64   
            }
   65     65   
            Ok(())
   66     66   
        })?;
   67     67   
        Ok(builder.build())
   68     68   
    }
   69     69   
}
          70  +
impl UnauthorizedException {
          71  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          72  +
    pub fn deserialize_with_response(
          73  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          74  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          75  +
        _status: u16,
          76  +
        _body: &[u8],
          77  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          78  +
        Self::deserialize(deserializer)
          79  +
    }
          80  +
}
   70     81   
impl UnauthorizedException {
   71     82   
    /// Returns the error message.
   72     83   
    pub fn message(&self) -> ::std::option::Option<&str> {
   73     84   
        self.message.as_deref()
   74     85   
    }
   75     86   
}
   76     87   
impl ::std::fmt::Display for UnauthorizedException {
   77     88   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   78     89   
        ::std::write!(f, "UnauthorizedException")?;
   79     90   
        if let ::std::option::Option::Some(inner_1) = &self.message {

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

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

tmp-codegen-diff/aws-sdk/sdk/ssooidc/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_ssooidc::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("AWSSSOOIDCService");
        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/ssooidc/src/lib.rs

@@ -136,136 +173,171 @@
  156    156   
  157    157   
/// Data structures used by operation inputs/outputs.
  158    158   
pub mod types;
  159    159   
  160    160   
mod observability_feature;
  161    161   
  162    162   
pub(crate) mod protocol_serde;
  163    163   
  164    164   
mod sdk_feature_tracker;
  165    165   
  166         -
mod serialization_settings;
  167         -
  168    166   
mod endpoint_lib;
  169    167   
  170    168   
mod json_errors;
  171    169   
  172    170   
#[doc(inline)]
  173    171   
pub use client::Client;

tmp-codegen-diff/aws-sdk/sdk/ssooidc/src/operation/create_token.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 `CreateToken`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateToken;
    6      6   
impl CreateToken {
    7      7   
    /// Creates a new `CreateToken`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_token::CreateTokenInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_token::CreateTokenOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::create_token::CreateTokenInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_token::CreateTokenOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_token::CreateTokenError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -106,110 +228,510 @@
  126    130   
                crate::operation::create_token::CreateTokenError,
  127    131   
            >::new());
  128    132   
  129    133   
        ::std::borrow::Cow::Owned(rcb)
  130    134   
    }
  131    135   
}
  132    136   
  133    137   
#[derive(Debug)]
  134    138   
struct CreateTokenResponseDeserializer;
  135    139   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateTokenResponseDeserializer {
  136         -
    fn deserialize_nonstreaming(
         140  +
    fn deserialize_nonstreaming_with_config(
  137    141   
        &self,
  138    142   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         143  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  139    144   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  140    145   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  141         -
        let headers = response.headers();
  142         -
        let body = response.body().bytes().expect("body loaded");
  143    146   
        #[allow(unused_mut)]
  144    147   
        let mut force_error = false;
  145    148   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  146         -
        let parse_result = if !success && status != 200 || force_error {
  147         -
            crate::protocol_serde::shape_create_token::de_create_token_http_error(status, headers, body)
  148         -
        } else {
  149         -
            crate::protocol_serde::shape_create_token::de_create_token_http_response(status, headers, body)
         149  +
        if !success && status != 200 || force_error {
         150  +
            let headers = response.headers();
         151  +
            let body = response.body().bytes().expect("body loaded");
         152  +
            #[allow(unused_mut)]
         153  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         154  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         155  +
            })?;
         156  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         157  +
            let generic = generic_builder.build();
         158  +
            let error_code = match generic.code() {
         159  +
                ::std::option::Option::Some(code) => code,
         160  +
                ::std::option::Option::None => {
         161  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         162  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::create_token::CreateTokenError::unhandled(generic)),
         163  +
                    ))
         164  +
                }
         165  +
            };
         166  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         167  +
            let protocol = _cfg
         168  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         169  +
                .expect("a SharedClientProtocol is required");
         170  +
            let err = match error_code {
         171  +
                "AccessDeniedException" => crate::operation::create_token::CreateTokenError::AccessDeniedException({
         172  +
                    let mut tmp = match protocol
         173  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         174  +
                        .and_then(|mut deser| {
         175  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         176  +
                                &mut *deser,
         177  +
                                response.headers(),
         178  +
                                response.status().into(),
         179  +
                                body,
         180  +
                            )
         181  +
                        }) {
         182  +
                        ::std::result::Result::Ok(val) => val,
         183  +
                        ::std::result::Result::Err(e) => {
         184  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         185  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         186  +
                            ))
         187  +
                        }
         188  +
                    };
         189  +
                    tmp.meta = generic;
         190  +
                    if tmp.message.is_none() {
         191  +
                        tmp.message = _error_message;
         192  +
                    }
         193  +
                    tmp
         194  +
                }),
         195  +
                "AuthorizationPendingException" => crate::operation::create_token::CreateTokenError::AuthorizationPendingException({
         196  +
                    let mut tmp = match protocol
         197  +
                        .deserialize_response(response, crate::types::error::AuthorizationPendingException::SCHEMA, _cfg)
         198  +
                        .and_then(|mut deser| {
         199  +
                            crate::types::error::AuthorizationPendingException::deserialize_with_response(
         200  +
                                &mut *deser,
         201  +
                                response.headers(),
         202  +
                                response.status().into(),
         203  +
                                body,
         204  +
                            )
         205  +
                        }) {
         206  +
                        ::std::result::Result::Ok(val) => val,
         207  +
                        ::std::result::Result::Err(e) => {
         208  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         209  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         210  +
                            ))
         211  +
                        }
  150    212   
                    };
  151         -
        crate::protocol_serde::type_erase_result(parse_result)
         213  +
                    tmp.meta = generic;
         214  +
                    if tmp.message.is_none() {
         215  +
                        tmp.message = _error_message;
         216  +
                    }
         217  +
                    tmp
         218  +
                }),
         219  +
                "ExpiredTokenException" => crate::operation::create_token::CreateTokenError::ExpiredTokenException({
         220  +
                    let mut tmp = match protocol
         221  +
                        .deserialize_response(response, crate::types::error::ExpiredTokenException::SCHEMA, _cfg)
         222  +
                        .and_then(|mut deser| {
         223  +
                            crate::types::error::ExpiredTokenException::deserialize_with_response(
         224  +
                                &mut *deser,
         225  +
                                response.headers(),
         226  +
                                response.status().into(),
         227  +
                                body,
         228  +
                            )
         229  +
                        }) {
         230  +
                        ::std::result::Result::Ok(val) => val,
         231  +
                        ::std::result::Result::Err(e) => {
         232  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         233  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         234  +
                            ))
         235  +
                        }
         236  +
                    };
         237  +
                    tmp.meta = generic;
         238  +
                    if tmp.message.is_none() {
         239  +
                        tmp.message = _error_message;
         240  +
                    }
         241  +
                    tmp
         242  +
                }),
         243  +
                "InternalServerException" => crate::operation::create_token::CreateTokenError::InternalServerException({
         244  +
                    let mut tmp = match protocol
         245  +
                        .deserialize_response(response, crate::types::error::InternalServerException::SCHEMA, _cfg)
         246  +
                        .and_then(|mut deser| {
         247  +
                            crate::types::error::InternalServerException::deserialize_with_response(
         248  +
                                &mut *deser,
         249  +
                                response.headers(),
         250  +
                                response.status().into(),
         251  +
                                body,
         252  +
                            )
         253  +
                        }) {
         254  +
                        ::std::result::Result::Ok(val) => val,
         255  +
                        ::std::result::Result::Err(e) => {
         256  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         257  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         258  +
                            ))
         259  +
                        }
         260  +
                    };
         261  +
                    tmp.meta = generic;
         262  +
                    if tmp.message.is_none() {
         263  +
                        tmp.message = _error_message;
         264  +
                    }
         265  +
                    tmp
         266  +
                }),
         267  +
                "InvalidClientException" => crate::operation::create_token::CreateTokenError::InvalidClientException({
         268  +
                    let mut tmp = match protocol
         269  +
                        .deserialize_response(response, crate::types::error::InvalidClientException::SCHEMA, _cfg)
         270  +
                        .and_then(|mut deser| {
         271  +
                            crate::types::error::InvalidClientException::deserialize_with_response(
         272  +
                                &mut *deser,
         273  +
                                response.headers(),
         274  +
                                response.status().into(),
         275  +
                                body,
         276  +
                            )
         277  +
                        }) {
         278  +
                        ::std::result::Result::Ok(val) => val,
         279  +
                        ::std::result::Result::Err(e) => {
         280  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         281  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         282  +
                            ))
         283  +
                        }
         284  +
                    };
         285  +
                    tmp.meta = generic;
         286  +
                    if tmp.message.is_none() {
         287  +
                        tmp.message = _error_message;
         288  +
                    }
         289  +
                    tmp
         290  +
                }),
         291  +
                "InvalidGrantException" => crate::operation::create_token::CreateTokenError::InvalidGrantException({
         292  +
                    let mut tmp = match protocol
         293  +
                        .deserialize_response(response, crate::types::error::InvalidGrantException::SCHEMA, _cfg)
         294  +
                        .and_then(|mut deser| {
         295  +
                            crate::types::error::InvalidGrantException::deserialize_with_response(
         296  +
                                &mut *deser,
         297  +
                                response.headers(),
         298  +
                                response.status().into(),
         299  +
                                body,
         300  +
                            )
         301  +
                        }) {
         302  +
                        ::std::result::Result::Ok(val) => val,
         303  +
                        ::std::result::Result::Err(e) => {
         304  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         305  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         306  +
                            ))
         307  +
                        }
         308  +
                    };
         309  +
                    tmp.meta = generic;
         310  +
                    if tmp.message.is_none() {
         311  +
                        tmp.message = _error_message;
         312  +
                    }
         313  +
                    tmp
         314  +
                }),
         315  +
                "InvalidRequestException" => crate::operation::create_token::CreateTokenError::InvalidRequestException({
         316  +
                    let mut tmp = match protocol
         317  +
                        .deserialize_response(response, crate::types::error::InvalidRequestException::SCHEMA, _cfg)
         318  +
                        .and_then(|mut deser| {
         319  +
                            crate::types::error::InvalidRequestException::deserialize_with_response(
         320  +
                                &mut *deser,
         321  +
                                response.headers(),
         322  +
                                response.status().into(),
         323  +
                                body,
         324  +
                            )
         325  +
                        }) {
         326  +
                        ::std::result::Result::Ok(val) => val,
         327  +
                        ::std::result::Result::Err(e) => {
         328  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         329  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         330  +
                            ))
         331  +
                        }
         332  +
                    };
         333  +
                    tmp.meta = generic;
         334  +
                    if tmp.message.is_none() {
         335  +
                        tmp.message = _error_message;
         336  +
                    }
         337  +
                    tmp
         338  +
                }),
         339  +
                "InvalidScopeException" => crate::operation::create_token::CreateTokenError::InvalidScopeException({
         340  +
                    let mut tmp = match protocol
         341  +
                        .deserialize_response(response, crate::types::error::InvalidScopeException::SCHEMA, _cfg)
         342  +
                        .and_then(|mut deser| {
         343  +
                            crate::types::error::InvalidScopeException::deserialize_with_response(
         344  +
                                &mut *deser,
         345  +
                                response.headers(),
         346  +
                                response.status().into(),
         347  +
                                body,
         348  +
                            )
         349  +
                        }) {
         350  +
                        ::std::result::Result::Ok(val) => val,
         351  +
                        ::std::result::Result::Err(e) => {
         352  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         353  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         354  +
                            ))
         355  +
                        }
         356  +
                    };
         357  +
                    tmp.meta = generic;
         358  +
                    if tmp.message.is_none() {
         359  +
                        tmp.message = _error_message;
         360  +
                    }
         361  +
                    tmp
         362  +
                }),
         363  +
                "SlowDownException" => crate::operation::create_token::CreateTokenError::SlowDownException({
         364  +
                    let mut tmp = match protocol
         365  +
                        .deserialize_response(response, crate::types::error::SlowDownException::SCHEMA, _cfg)
         366  +
                        .and_then(|mut deser| {
         367  +
                            crate::types::error::SlowDownException::deserialize_with_response(
         368  +
                                &mut *deser,
         369  +
                                response.headers(),
         370  +
                                response.status().into(),
         371  +
                                body,
         372  +
                            )
         373  +
                        }) {
         374  +
                        ::std::result::Result::Ok(val) => val,
         375  +
                        ::std::result::Result::Err(e) => {
         376  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         377  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         378  +
                            ))
         379  +
                        }
         380  +
                    };
         381  +
                    tmp.meta = generic;
         382  +
                    if tmp.message.is_none() {
         383  +
                        tmp.message = _error_message;
         384  +
                    }
         385  +
                    tmp
         386  +
                }),
         387  +
                "UnauthorizedClientException" => crate::operation::create_token::CreateTokenError::UnauthorizedClientException({
         388  +
                    let mut tmp = match protocol
         389  +
                        .deserialize_response(response, crate::types::error::UnauthorizedClientException::SCHEMA, _cfg)
         390  +
                        .and_then(|mut deser| {
         391  +
                            crate::types::error::UnauthorizedClientException::deserialize_with_response(
         392  +
                                &mut *deser,
         393  +
                                response.headers(),
         394  +
                                response.status().into(),
         395  +
                                body,
         396  +
                            )
         397  +
                        }) {
         398  +
                        ::std::result::Result::Ok(val) => val,
         399  +
                        ::std::result::Result::Err(e) => {
         400  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         401  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         402  +
                            ))
         403  +
                        }
         404  +
                    };
         405  +
                    tmp.meta = generic;
         406  +
                    if tmp.message.is_none() {
         407  +
                        tmp.message = _error_message;
         408  +
                    }
         409  +
                    tmp
         410  +
                }),
         411  +
                "UnsupportedGrantTypeException" => crate::operation::create_token::CreateTokenError::UnsupportedGrantTypeException({
         412  +
                    let mut tmp = match protocol
         413  +
                        .deserialize_response(response, crate::types::error::UnsupportedGrantTypeException::SCHEMA, _cfg)
         414  +
                        .and_then(|mut deser| {
         415  +
                            crate::types::error::UnsupportedGrantTypeException::deserialize_with_response(
         416  +
                                &mut *deser,
         417  +
                                response.headers(),
         418  +
                                response.status().into(),
         419  +
                                body,
         420  +
                            )
         421  +
                        }) {
         422  +
                        ::std::result::Result::Ok(val) => val,
         423  +
                        ::std::result::Result::Err(e) => {
         424  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         425  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         426  +
                            ))
         427  +
                        }
         428  +
                    };
         429  +
                    tmp.meta = generic;
         430  +
                    if tmp.message.is_none() {
         431  +
                        tmp.message = _error_message;
         432  +
                    }
         433  +
                    tmp
         434  +
                }),
         435  +
                _ => crate::operation::create_token::CreateTokenError::generic(generic),
         436  +
            };
         437  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         438  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         439  +
            ))
         440  +
        } else {
         441  +
            let protocol = _cfg
         442  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         443  +
                .expect("a SharedClientProtocol is required");
         444  +
            let mut deser = protocol.deserialize_response(response, CreateToken::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         445  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         446  +
            })?;
         447  +
            let body = response.body().bytes().expect("body loaded");
         448  +
            let output = crate::operation::create_token::CreateTokenOutput::deserialize_with_response(
         449  +
                &mut *deser,
         450  +
                response.headers(),
         451  +
                response.status().into(),
         452  +
                body,
         453  +
            )
         454  +
            .map_err(|e| {
         455  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         456  +
            })?;
         457  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         458  +
        }
  152    459   
    }
  153    460   
}
  154    461   
#[derive(Debug)]
  155    462   
struct CreateTokenRequestSerializer;
  156    463   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateTokenRequestSerializer {
  157    464   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  158    465   
    fn serialize_input(
  159    466   
        &self,
  160    467   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  161    468   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  162    469   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  163    470   
        let input = input
  164    471   
            .downcast::<crate::operation::create_token::CreateTokenInput>()
  165    472   
            .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::create_token::CreateTokenInput,
  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, "/token").expect("formatting should succeed");
  178         -
                ::std::result::Result::Ok(())
  179         -
            }
  180         -
            #[allow(clippy::unnecessary_wraps)]
  181         -
            fn update_http_builder(
  182         -
                input: &crate::operation::create_token::CreateTokenInput,
  183         -
                builder: ::http_1x::request::Builder,
  184         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  185         -
                let mut uri = ::std::string::String::new();
  186         -
                uri_base(input, &mut uri)?;
  187         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  188         -
            }
  189         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  190         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  191         -
            builder
  192         -
        };
  193         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_token::ser_create_token_input(&input)?);
  194         -
        if let Some(content_length) = body.content_length() {
  195         -
            let content_length = content_length.to_string();
  196         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  197         -
        }
  198         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         473  +
        let protocol = _cfg
         474  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         475  +
            .expect("a SharedClientProtocol is required");
         476  +
        let mut request = protocol
         477  +
            .serialize_request(&input, CreateToken::INPUT_SCHEMA, "", _cfg)
         478  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         479  +
         480  +
        return ::std::result::Result::Ok(request);
  199    481   
    }
  200    482   
}
  201    483   
#[derive(Debug)]
  202    484   
struct CreateTokenEndpointParamsInterceptor;
  203    485   
  204    486   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateTokenEndpointParamsInterceptor {
  205    487   
    fn name(&self) -> &'static str {
  206    488   
        "CreateTokenEndpointParamsInterceptor"
  207    489   
    }
  208    490   

tmp-codegen-diff/aws-sdk/sdk/ssooidc/src/operation/create_token/_create_token_input.rs

@@ -70,70 +337,342 @@
   90     90   
    "com.amazonaws.ssooidc.synthetic",
   91     91   
    "CreateTokenInput",
   92     92   
);
   93     93   
static CREATETOKENINPUT_MEMBER_CLIENT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   94     94   
    ::aws_smithy_schema::ShapeId::from_static(
   95     95   
        "com.amazonaws.ssooidc.synthetic#CreateTokenInput$clientId",
   96     96   
        "com.amazonaws.ssooidc.synthetic",
   97     97   
        "CreateTokenInput",
   98     98   
    ),
   99     99   
    ::aws_smithy_schema::ShapeType::String,
  100         -
    "client_id",
         100  +
    "clientId",
  101    101   
    0,
  102    102   
);
  103    103   
static CREATETOKENINPUT_MEMBER_CLIENT_SECRET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  104    104   
    ::aws_smithy_schema::ShapeId::from_static(
  105    105   
        "com.amazonaws.ssooidc.synthetic#CreateTokenInput$clientSecret",
  106    106   
        "com.amazonaws.ssooidc.synthetic",
  107    107   
        "CreateTokenInput",
  108    108   
    ),
  109    109   
    ::aws_smithy_schema::ShapeType::String,
  110         -
    "client_secret",
         110  +
    "clientSecret",
  111    111   
    1,
  112    112   
);
  113    113   
static CREATETOKENINPUT_MEMBER_GRANT_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  114    114   
    ::aws_smithy_schema::ShapeId::from_static(
  115    115   
        "com.amazonaws.ssooidc.synthetic#CreateTokenInput$grantType",
  116    116   
        "com.amazonaws.ssooidc.synthetic",
  117    117   
        "CreateTokenInput",
  118    118   
    ),
  119    119   
    ::aws_smithy_schema::ShapeType::String,
  120         -
    "grant_type",
         120  +
    "grantType",
  121    121   
    2,
  122    122   
);
  123    123   
static CREATETOKENINPUT_MEMBER_DEVICE_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  124    124   
    ::aws_smithy_schema::ShapeId::from_static(
  125    125   
        "com.amazonaws.ssooidc.synthetic#CreateTokenInput$deviceCode",
  126    126   
        "com.amazonaws.ssooidc.synthetic",
  127    127   
        "CreateTokenInput",
  128    128   
    ),
  129    129   
    ::aws_smithy_schema::ShapeType::String,
  130         -
    "device_code",
         130  +
    "deviceCode",
  131    131   
    3,
  132    132   
);
  133    133   
static CREATETOKENINPUT_MEMBER_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  134    134   
    ::aws_smithy_schema::ShapeId::from_static(
  135    135   
        "com.amazonaws.ssooidc.synthetic#CreateTokenInput$code",
  136    136   
        "com.amazonaws.ssooidc.synthetic",
  137    137   
        "CreateTokenInput",
  138    138   
    ),
  139    139   
    ::aws_smithy_schema::ShapeType::String,
  140    140   
    "code",
  141    141   
    4,
  142    142   
);
  143    143   
static CREATETOKENINPUT_MEMBER_REFRESH_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  144    144   
    ::aws_smithy_schema::ShapeId::from_static(
  145    145   
        "com.amazonaws.ssooidc.synthetic#CreateTokenInput$refreshToken",
  146    146   
        "com.amazonaws.ssooidc.synthetic",
  147    147   
        "CreateTokenInput",
  148    148   
    ),
  149    149   
    ::aws_smithy_schema::ShapeType::String,
  150         -
    "refresh_token",
         150  +
    "refreshToken",
  151    151   
    5,
  152    152   
);
  153    153   
static CREATETOKENINPUT_MEMBER_SCOPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  154    154   
    ::aws_smithy_schema::ShapeId::from_static(
  155    155   
        "com.amazonaws.ssooidc.synthetic#CreateTokenInput$scope",
  156    156   
        "com.amazonaws.ssooidc.synthetic",
  157    157   
        "CreateTokenInput",
  158    158   
    ),
  159    159   
    ::aws_smithy_schema::ShapeType::List,
  160    160   
    "scope",
  161    161   
    6,
  162    162   
);
  163    163   
static CREATETOKENINPUT_MEMBER_REDIRECT_URI: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  164    164   
    ::aws_smithy_schema::ShapeId::from_static(
  165    165   
        "com.amazonaws.ssooidc.synthetic#CreateTokenInput$redirectUri",
  166    166   
        "com.amazonaws.ssooidc.synthetic",
  167    167   
        "CreateTokenInput",
  168    168   
    ),
  169    169   
    ::aws_smithy_schema::ShapeType::String,
  170         -
    "redirect_uri",
         170  +
    "redirectUri",
  171    171   
    7,
  172    172   
);
  173    173   
static CREATETOKENINPUT_MEMBER_CODE_VERIFIER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  174    174   
    ::aws_smithy_schema::ShapeId::from_static(
  175    175   
        "com.amazonaws.ssooidc.synthetic#CreateTokenInput$codeVerifier",
  176    176   
        "com.amazonaws.ssooidc.synthetic",
  177    177   
        "CreateTokenInput",
  178    178   
    ),
  179    179   
    ::aws_smithy_schema::ShapeType::String,
  180         -
    "code_verifier",
         180  +
    "codeVerifier",
  181    181   
    8,
  182    182   
);
  183    183   
static CREATETOKENINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  184    184   
    CREATETOKENINPUT_SCHEMA_ID,
  185    185   
    ::aws_smithy_schema::ShapeType::Structure,
  186    186   
    &[
  187    187   
        &CREATETOKENINPUT_MEMBER_CLIENT_ID,
  188    188   
        &CREATETOKENINPUT_MEMBER_CLIENT_SECRET,
  189    189   
        &CREATETOKENINPUT_MEMBER_GRANT_TYPE,
  190    190   
        &CREATETOKENINPUT_MEMBER_DEVICE_CODE,
  191    191   
        &CREATETOKENINPUT_MEMBER_CODE,
  192    192   
        &CREATETOKENINPUT_MEMBER_REFRESH_TOKEN,
  193    193   
        &CREATETOKENINPUT_MEMBER_SCOPE,
  194    194   
        &CREATETOKENINPUT_MEMBER_REDIRECT_URI,
  195    195   
        &CREATETOKENINPUT_MEMBER_CODE_VERIFIER,
  196    196   
    ],
  197         -
);
         197  +
)
         198  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/token", None));
  198    199   
impl CreateTokenInput {
  199    200   
    /// The schema for this shape.
  200    201   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATETOKENINPUT_SCHEMA;
  201    202   
}
  202    203   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateTokenInput {
  203    204   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  204    205   
    fn serialize_members(
  205    206   
        &self,
  206    207   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  207    208   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  208    209   
        if let Some(ref val) = self.client_id {
  209    210   
            ser.write_string(&CREATETOKENINPUT_MEMBER_CLIENT_ID, val)?;
  210    211   
        }
  211    212   
        if let Some(ref val) = self.client_secret {
  212    213   
            ser.write_string(&CREATETOKENINPUT_MEMBER_CLIENT_SECRET, val)?;
  213    214   
        }
  214    215   
        if let Some(ref val) = self.grant_type {
  215    216   
            ser.write_string(&CREATETOKENINPUT_MEMBER_GRANT_TYPE, val)?;
  216    217   
        }
  217    218   
        if let Some(ref val) = self.device_code {
  218    219   
            ser.write_string(&CREATETOKENINPUT_MEMBER_DEVICE_CODE, val)?;
  219    220   
        }
  220    221   
        if let Some(ref val) = self.code {
  221    222   
            ser.write_string(&CREATETOKENINPUT_MEMBER_CODE, val)?;
  222    223   
        }
  223    224   
        if let Some(ref val) = self.refresh_token {
  224    225   
            ser.write_string(&CREATETOKENINPUT_MEMBER_REFRESH_TOKEN, val)?;
  225    226   
        }
  226    227   
        if let Some(ref val) = self.scope {
  227    228   
            ser.write_list(
  228    229   
                &CREATETOKENINPUT_MEMBER_SCOPE,
  229    230   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  230    231   
                    for item in val {
  231    232   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
  232    233   
                    }
  233    234   
                    Ok(())
  234    235   
                },
  235    236   
            )?;
  236    237   
        }
  237    238   
        if let Some(ref val) = self.redirect_uri {
  238    239   
            ser.write_string(&CREATETOKENINPUT_MEMBER_REDIRECT_URI, val)?;
  239    240   
        }
  240    241   
        if let Some(ref val) = self.code_verifier {
  241    242   
            ser.write_string(&CREATETOKENINPUT_MEMBER_CODE_VERIFIER, val)?;
  242    243   
        }
  243    244   
        Ok(())
  244    245   
    }
  245    246   
}
  246    247   
impl CreateTokenInput {
  247    248   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  248         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  249         -
        deserializer: &mut D,
         249  +
    pub fn deserialize(
         250  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  250    251   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  251    252   
        #[allow(unused_variables, unused_mut)]
  252    253   
        let mut builder = Self::builder();
  253    254   
        #[allow(
  254    255   
            unused_variables,
  255    256   
            unreachable_code,
  256    257   
            clippy::single_match,
  257    258   
            clippy::match_single_binding,
  258    259   
            clippy::diverging_sub_expression
  259    260   
        )]
  260         -
        deserializer.read_struct(&CREATETOKENINPUT_SCHEMA, (), |_, member, deser| {
         261  +
        deserializer.read_struct(&CREATETOKENINPUT_SCHEMA, &mut |member, deser| {
  261    262   
            match member.member_index() {
  262    263   
                Some(0) => {
  263    264   
                    builder.client_id = Some(deser.read_string(member)?);
  264    265   
                }
  265    266   
                Some(1) => {
  266    267   
                    builder.client_secret = Some(deser.read_string(member)?);
  267    268   
                }
  268    269   
                Some(2) => {
  269    270   
                    builder.grant_type = Some(deser.read_string(member)?);
  270    271   
                }
  271    272   
                Some(3) => {
  272    273   
                    builder.device_code = Some(deser.read_string(member)?);
  273    274   
                }
  274    275   
                Some(4) => {
  275    276   
                    builder.code = Some(deser.read_string(member)?);
  276    277   
                }
  277    278   
                Some(5) => {
  278    279   
                    builder.refresh_token = Some(deser.read_string(member)?);
  279    280   
                }
  280    281   
                Some(6) => {
  281         -
                    builder.scope = Some({
  282         -
                        let container = if let Some(cap) = deser.container_size() {
  283         -
                            Vec::with_capacity(cap)
  284         -
                        } else {
  285         -
                            Vec::new()
  286         -
                        };
  287         -
                        deser.read_list(member, container, |mut list, deser| {
  288         -
                            list.push(deser.read_string(member)?);
  289         -
                            Ok(list)
  290         -
                        })?
  291         -
                    });
         282  +
                    builder.scope = Some(deser.read_string_list(member)?);
  292    283   
                }
  293    284   
                Some(7) => {
  294    285   
                    builder.redirect_uri = Some(deser.read_string(member)?);
  295    286   
                }
  296    287   
                Some(8) => {
  297    288   
                    builder.code_verifier = Some(deser.read_string(member)?);
  298    289   
                }
  299    290   
                _ => {}
  300    291   
            }
  301    292   
            Ok(())
  302    293   
        })?;
         294  +
        builder.client_id = builder.client_id.or(Some(String::new()));
         295  +
        builder.client_secret = builder.client_secret.or(Some(String::new()));
         296  +
        builder.grant_type = builder.grant_type.or(Some(String::new()));
  303    297   
        builder
  304    298   
            .build()
  305    299   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  306    300   
    }
  307    301   
}
         302  +
impl CreateTokenInput {
         303  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         304  +
    pub fn deserialize_with_response(
         305  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         306  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         307  +
        _status: u16,
         308  +
        _body: &[u8],
         309  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         310  +
        Self::deserialize(deserializer)
         311  +
    }
         312  +
}
  308    313   
impl CreateTokenInput {
  309    314   
    /// Creates a new builder-style object to manufacture [`CreateTokenInput`](crate::operation::create_token::CreateTokenInput).
  310    315   
    pub fn builder() -> crate::operation::create_token::builders::CreateTokenInputBuilder {
  311    316   
        crate::operation::create_token::builders::CreateTokenInputBuilder::default()
  312    317   
    }
  313    318   
}
  314    319   
  315    320   
/// A builder for [`CreateTokenInput`](crate::operation::create_token::CreateTokenInput).
  316    321   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
  317    322   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/ssooidc/src/operation/create_token/_create_token_output.rs

@@ -38,38 +195,252 @@
   58     58   
    "com.amazonaws.ssooidc.synthetic",
   59     59   
    "CreateTokenOutput",
   60     60   
);
   61     61   
static CREATETOKENOUTPUT_MEMBER_ACCESS_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   62     62   
    ::aws_smithy_schema::ShapeId::from_static(
   63     63   
        "com.amazonaws.ssooidc.synthetic#CreateTokenOutput$accessToken",
   64     64   
        "com.amazonaws.ssooidc.synthetic",
   65     65   
        "CreateTokenOutput",
   66     66   
    ),
   67     67   
    ::aws_smithy_schema::ShapeType::String,
   68         -
    "access_token",
          68  +
    "accessToken",
   69     69   
    0,
   70     70   
);
   71     71   
static CREATETOKENOUTPUT_MEMBER_TOKEN_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   72     72   
    ::aws_smithy_schema::ShapeId::from_static(
   73     73   
        "com.amazonaws.ssooidc.synthetic#CreateTokenOutput$tokenType",
   74     74   
        "com.amazonaws.ssooidc.synthetic",
   75     75   
        "CreateTokenOutput",
   76     76   
    ),
   77     77   
    ::aws_smithy_schema::ShapeType::String,
   78         -
    "token_type",
          78  +
    "tokenType",
   79     79   
    1,
   80     80   
);
   81     81   
static CREATETOKENOUTPUT_MEMBER_EXPIRES_IN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   82     82   
    ::aws_smithy_schema::ShapeId::from_static(
   83     83   
        "com.amazonaws.ssooidc.synthetic#CreateTokenOutput$expiresIn",
   84     84   
        "com.amazonaws.ssooidc.synthetic",
   85     85   
        "CreateTokenOutput",
   86     86   
    ),
   87     87   
    ::aws_smithy_schema::ShapeType::Integer,
   88         -
    "expires_in",
          88  +
    "expiresIn",
   89     89   
    2,
   90     90   
);
   91     91   
static CREATETOKENOUTPUT_MEMBER_REFRESH_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   92     92   
    ::aws_smithy_schema::ShapeId::from_static(
   93     93   
        "com.amazonaws.ssooidc.synthetic#CreateTokenOutput$refreshToken",
   94     94   
        "com.amazonaws.ssooidc.synthetic",
   95     95   
        "CreateTokenOutput",
   96     96   
    ),
   97     97   
    ::aws_smithy_schema::ShapeType::String,
   98         -
    "refresh_token",
          98  +
    "refreshToken",
   99     99   
    3,
  100    100   
);
  101    101   
static CREATETOKENOUTPUT_MEMBER_ID_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  102    102   
    ::aws_smithy_schema::ShapeId::from_static(
  103    103   
        "com.amazonaws.ssooidc.synthetic#CreateTokenOutput$idToken",
  104    104   
        "com.amazonaws.ssooidc.synthetic",
  105    105   
        "CreateTokenOutput",
  106    106   
    ),
  107    107   
    ::aws_smithy_schema::ShapeType::String,
  108         -
    "id_token",
         108  +
    "idToken",
  109    109   
    4,
  110    110   
);
         111  +
static CREATETOKENOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         112  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         113  +
    ::aws_smithy_schema::ShapeType::String,
         114  +
    "request_id",
         115  +
    5,
         116  +
)
         117  +
.with_http_header("x-amzn-requestid");
  111    118   
static CREATETOKENOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  112    119   
    CREATETOKENOUTPUT_SCHEMA_ID,
  113    120   
    ::aws_smithy_schema::ShapeType::Structure,
  114    121   
    &[
  115    122   
        &CREATETOKENOUTPUT_MEMBER_ACCESS_TOKEN,
  116    123   
        &CREATETOKENOUTPUT_MEMBER_TOKEN_TYPE,
  117    124   
        &CREATETOKENOUTPUT_MEMBER_EXPIRES_IN,
  118    125   
        &CREATETOKENOUTPUT_MEMBER_REFRESH_TOKEN,
  119    126   
        &CREATETOKENOUTPUT_MEMBER_ID_TOKEN,
         127  +
        &CREATETOKENOUTPUT_MEMBER__REQUEST_ID,
  120    128   
    ],
  121    129   
);
  122    130   
impl CreateTokenOutput {
  123    131   
    /// The schema for this shape.
  124    132   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATETOKENOUTPUT_SCHEMA;
  125    133   
}
  126    134   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateTokenOutput {
  127    135   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  128    136   
    fn serialize_members(
  129    137   
        &self,
  130    138   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  131    139   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  132    140   
        if let Some(ref val) = self.access_token {
  133    141   
            ser.write_string(&CREATETOKENOUTPUT_MEMBER_ACCESS_TOKEN, val)?;
  134    142   
        }
  135    143   
        if let Some(ref val) = self.token_type {
  136    144   
            ser.write_string(&CREATETOKENOUTPUT_MEMBER_TOKEN_TYPE, val)?;
  137    145   
        }
  138    146   
        {
  139    147   
            let val = &self.expires_in;
  140    148   
            ser.write_integer(&CREATETOKENOUTPUT_MEMBER_EXPIRES_IN, *val)?;
  141    149   
        }
  142    150   
        if let Some(ref val) = self.refresh_token {
  143    151   
            ser.write_string(&CREATETOKENOUTPUT_MEMBER_REFRESH_TOKEN, val)?;
  144    152   
        }
  145    153   
        if let Some(ref val) = self.id_token {
  146    154   
            ser.write_string(&CREATETOKENOUTPUT_MEMBER_ID_TOKEN, val)?;
  147    155   
        }
  148    156   
        Ok(())
  149    157   
    }
  150    158   
}
  151    159   
impl CreateTokenOutput {
  152    160   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  153         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  154         -
        deserializer: &mut D,
         161  +
    pub fn deserialize(
         162  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  155    163   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  156    164   
        #[allow(unused_variables, unused_mut)]
  157    165   
        let mut builder = Self::builder();
  158    166   
        #[allow(
  159    167   
            unused_variables,
  160    168   
            unreachable_code,
  161    169   
            clippy::single_match,
  162    170   
            clippy::match_single_binding,
  163    171   
            clippy::diverging_sub_expression
  164    172   
        )]
  165         -
        deserializer.read_struct(&CREATETOKENOUTPUT_SCHEMA, (), |_, member, deser| {
         173  +
        deserializer.read_struct(&CREATETOKENOUTPUT_SCHEMA, &mut |member, deser| {
         174  +
            match member.member_index() {
         175  +
                Some(0) => {
         176  +
                    builder.access_token = Some(deser.read_string(member)?);
         177  +
                }
         178  +
                Some(1) => {
         179  +
                    builder.token_type = Some(deser.read_string(member)?);
         180  +
                }
         181  +
                Some(2) => {
         182  +
                    builder.expires_in = Some(deser.read_integer(member)?);
         183  +
                }
         184  +
                Some(3) => {
         185  +
                    builder.refresh_token = Some(deser.read_string(member)?);
         186  +
                }
         187  +
                Some(4) => {
         188  +
                    builder.id_token = Some(deser.read_string(member)?);
         189  +
                }
         190  +
                Some(5) => {
         191  +
                    builder._request_id = Some(deser.read_string(member)?);
         192  +
                }
         193  +
                _ => {}
         194  +
            }
         195  +
            Ok(())
         196  +
        })?;
         197  +
        Ok(builder.build())
         198  +
    }
         199  +
}
         200  +
impl CreateTokenOutput {
         201  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         202  +
    /// Header-bound members are read directly from headers, avoiding runtime
         203  +
    /// member iteration overhead. Body members are read via the deserializer.
         204  +
    pub fn deserialize_with_response(
         205  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         206  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         207  +
        _status: u16,
         208  +
        _body: &[u8],
         209  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         210  +
        #[allow(unused_variables, unused_mut)]
         211  +
        let mut builder = Self::builder();
         212  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         213  +
            builder._request_id = Some(val.to_string());
         214  +
        }
         215  +
        #[allow(
         216  +
            unused_variables,
         217  +
            unreachable_code,
         218  +
            clippy::single_match,
         219  +
            clippy::match_single_binding,
         220  +
            clippy::diverging_sub_expression
         221  +
        )]
         222  +
        deserializer.read_struct(&CREATETOKENOUTPUT_SCHEMA, &mut |member, deser| {
  166    223   
            match member.member_index() {
  167    224   
                Some(0) => {
  168    225   
                    builder.access_token = Some(deser.read_string(member)?);
  169    226   
                }
  170    227   
                Some(1) => {
  171    228   
                    builder.token_type = Some(deser.read_string(member)?);
  172    229   
                }
  173    230   
                Some(2) => {
  174    231   
                    builder.expires_in = Some(deser.read_integer(member)?);
  175    232   
                }

tmp-codegen-diff/aws-sdk/sdk/ssooidc/src/operation/create_token_with_iam.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 `CreateTokenWithIAM`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateTokenWithIAM;
    6      6   
impl CreateTokenWithIAM {
    7      7   
    /// Creates a new `CreateTokenWithIAM`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_token_with_iam::CreateTokenWithIamInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_token_with_iam::CreateTokenWithIamOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::create_token_with_iam::CreateTokenWithIamInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_token_with_iam::CreateTokenWithIamOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_token_with_iam::CreateTokenWithIAMError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -119,123 +252,551 @@
  139    143   
                crate::operation::create_token_with_iam::CreateTokenWithIAMError,
  140    144   
            >::new());
  141    145   
  142    146   
        ::std::borrow::Cow::Owned(rcb)
  143    147   
    }
  144    148   
}
  145    149   
  146    150   
#[derive(Debug)]
  147    151   
struct CreateTokenWithIAMResponseDeserializer;
  148    152   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateTokenWithIAMResponseDeserializer {
  149         -
    fn deserialize_nonstreaming(
         153  +
    fn deserialize_nonstreaming_with_config(
  150    154   
        &self,
  151    155   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         156  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  152    157   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  153    158   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  154         -
        let headers = response.headers();
  155         -
        let body = response.body().bytes().expect("body loaded");
  156    159   
        #[allow(unused_mut)]
  157    160   
        let mut force_error = false;
  158    161   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  159         -
        let parse_result = if !success && status != 200 || force_error {
  160         -
            crate::protocol_serde::shape_create_token_with_iam::de_create_token_with_iam_http_error(status, headers, body)
  161         -
        } else {
  162         -
            crate::protocol_serde::shape_create_token_with_iam::de_create_token_with_iam_http_response(status, headers, body)
         162  +
        if !success && status != 200 || force_error {
         163  +
            let headers = response.headers();
         164  +
            let body = response.body().bytes().expect("body loaded");
         165  +
            #[allow(unused_mut)]
         166  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         167  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         168  +
            })?;
         169  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         170  +
            let generic = generic_builder.build();
         171  +
            let error_code = match generic.code() {
         172  +
                ::std::option::Option::Some(code) => code,
         173  +
                ::std::option::Option::None => {
         174  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         175  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         176  +
                            crate::operation::create_token_with_iam::CreateTokenWithIAMError::unhandled(generic),
         177  +
                        ),
         178  +
                    ))
         179  +
                }
         180  +
            };
         181  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         182  +
            let protocol = _cfg
         183  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         184  +
                .expect("a SharedClientProtocol is required");
         185  +
            let err = match error_code {
         186  +
                "AccessDeniedException" => crate::operation::create_token_with_iam::CreateTokenWithIAMError::AccessDeniedException({
         187  +
                    let mut tmp = match protocol
         188  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         189  +
                        .and_then(|mut deser| {
         190  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         191  +
                                &mut *deser,
         192  +
                                response.headers(),
         193  +
                                response.status().into(),
         194  +
                                body,
         195  +
                            )
         196  +
                        }) {
         197  +
                        ::std::result::Result::Ok(val) => val,
         198  +
                        ::std::result::Result::Err(e) => {
         199  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         200  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         201  +
                            ))
         202  +
                        }
         203  +
                    };
         204  +
                    tmp.meta = generic;
         205  +
                    if tmp.message.is_none() {
         206  +
                        tmp.message = _error_message;
         207  +
                    }
         208  +
                    tmp
         209  +
                }),
         210  +
                "AuthorizationPendingException" => crate::operation::create_token_with_iam::CreateTokenWithIAMError::AuthorizationPendingException({
         211  +
                    let mut tmp = match protocol
         212  +
                        .deserialize_response(response, crate::types::error::AuthorizationPendingException::SCHEMA, _cfg)
         213  +
                        .and_then(|mut deser| {
         214  +
                            crate::types::error::AuthorizationPendingException::deserialize_with_response(
         215  +
                                &mut *deser,
         216  +
                                response.headers(),
         217  +
                                response.status().into(),
         218  +
                                body,
         219  +
                            )
         220  +
                        }) {
         221  +
                        ::std::result::Result::Ok(val) => val,
         222  +
                        ::std::result::Result::Err(e) => {
         223  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         224  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         225  +
                            ))
         226  +
                        }
         227  +
                    };
         228  +
                    tmp.meta = generic;
         229  +
                    if tmp.message.is_none() {
         230  +
                        tmp.message = _error_message;
         231  +
                    }
         232  +
                    tmp
         233  +
                }),
         234  +
                "ExpiredTokenException" => crate::operation::create_token_with_iam::CreateTokenWithIAMError::ExpiredTokenException({
         235  +
                    let mut tmp = match protocol
         236  +
                        .deserialize_response(response, crate::types::error::ExpiredTokenException::SCHEMA, _cfg)
         237  +
                        .and_then(|mut deser| {
         238  +
                            crate::types::error::ExpiredTokenException::deserialize_with_response(
         239  +
                                &mut *deser,
         240  +
                                response.headers(),
         241  +
                                response.status().into(),
         242  +
                                body,
         243  +
                            )
         244  +
                        }) {
         245  +
                        ::std::result::Result::Ok(val) => val,
         246  +
                        ::std::result::Result::Err(e) => {
         247  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         248  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         249  +
                            ))
         250  +
                        }
         251  +
                    };
         252  +
                    tmp.meta = generic;
         253  +
                    if tmp.message.is_none() {
         254  +
                        tmp.message = _error_message;
         255  +
                    }
         256  +
                    tmp
         257  +
                }),
         258  +
                "InternalServerException" => crate::operation::create_token_with_iam::CreateTokenWithIAMError::InternalServerException({
         259  +
                    let mut tmp = match protocol
         260  +
                        .deserialize_response(response, crate::types::error::InternalServerException::SCHEMA, _cfg)
         261  +
                        .and_then(|mut deser| {
         262  +
                            crate::types::error::InternalServerException::deserialize_with_response(
         263  +
                                &mut *deser,
         264  +
                                response.headers(),
         265  +
                                response.status().into(),
         266  +
                                body,
         267  +
                            )
         268  +
                        }) {
         269  +
                        ::std::result::Result::Ok(val) => val,
         270  +
                        ::std::result::Result::Err(e) => {
         271  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         272  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         273  +
                            ))
         274  +
                        }
         275  +
                    };
         276  +
                    tmp.meta = generic;
         277  +
                    if tmp.message.is_none() {
         278  +
                        tmp.message = _error_message;
         279  +
                    }
         280  +
                    tmp
         281  +
                }),
         282  +
                "InvalidClientException" => crate::operation::create_token_with_iam::CreateTokenWithIAMError::InvalidClientException({
         283  +
                    let mut tmp = match protocol
         284  +
                        .deserialize_response(response, crate::types::error::InvalidClientException::SCHEMA, _cfg)
         285  +
                        .and_then(|mut deser| {
         286  +
                            crate::types::error::InvalidClientException::deserialize_with_response(
         287  +
                                &mut *deser,
         288  +
                                response.headers(),
         289  +
                                response.status().into(),
         290  +
                                body,
         291  +
                            )
         292  +
                        }) {
         293  +
                        ::std::result::Result::Ok(val) => val,
         294  +
                        ::std::result::Result::Err(e) => {
         295  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         296  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         297  +
                            ))
         298  +
                        }
         299  +
                    };
         300  +
                    tmp.meta = generic;
         301  +
                    if tmp.message.is_none() {
         302  +
                        tmp.message = _error_message;
         303  +
                    }
         304  +
                    tmp
         305  +
                }),
         306  +
                "InvalidGrantException" => crate::operation::create_token_with_iam::CreateTokenWithIAMError::InvalidGrantException({
         307  +
                    let mut tmp = match protocol
         308  +
                        .deserialize_response(response, crate::types::error::InvalidGrantException::SCHEMA, _cfg)
         309  +
                        .and_then(|mut deser| {
         310  +
                            crate::types::error::InvalidGrantException::deserialize_with_response(
         311  +
                                &mut *deser,
         312  +
                                response.headers(),
         313  +
                                response.status().into(),
         314  +
                                body,
         315  +
                            )
         316  +
                        }) {
         317  +
                        ::std::result::Result::Ok(val) => val,
         318  +
                        ::std::result::Result::Err(e) => {
         319  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         320  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         321  +
                            ))
         322  +
                        }
         323  +
                    };
         324  +
                    tmp.meta = generic;
         325  +
                    if tmp.message.is_none() {
         326  +
                        tmp.message = _error_message;
         327  +
                    }
         328  +
                    tmp
         329  +
                }),
         330  +
                "InvalidRequestException" => crate::operation::create_token_with_iam::CreateTokenWithIAMError::InvalidRequestException({
         331  +
                    let mut tmp = match protocol
         332  +
                        .deserialize_response(response, crate::types::error::InvalidRequestException::SCHEMA, _cfg)
         333  +
                        .and_then(|mut deser| {
         334  +
                            crate::types::error::InvalidRequestException::deserialize_with_response(
         335  +
                                &mut *deser,
         336  +
                                response.headers(),
         337  +
                                response.status().into(),
         338  +
                                body,
         339  +
                            )
         340  +
                        }) {
         341  +
                        ::std::result::Result::Ok(val) => val,
         342  +
                        ::std::result::Result::Err(e) => {
         343  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         344  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         345  +
                            ))
         346  +
                        }
         347  +
                    };
         348  +
                    tmp.meta = generic;
         349  +
                    if tmp.message.is_none() {
         350  +
                        tmp.message = _error_message;
         351  +
                    }
         352  +
                    tmp
         353  +
                }),
         354  +
                "InvalidRequestRegionException" => crate::operation::create_token_with_iam::CreateTokenWithIAMError::InvalidRequestRegionException({
         355  +
                    let mut tmp = match protocol
         356  +
                        .deserialize_response(response, crate::types::error::InvalidRequestRegionException::SCHEMA, _cfg)
         357  +
                        .and_then(|mut deser| {
         358  +
                            crate::types::error::InvalidRequestRegionException::deserialize_with_response(
         359  +
                                &mut *deser,
         360  +
                                response.headers(),
         361  +
                                response.status().into(),
         362  +
                                body,
         363  +
                            )
         364  +
                        }) {
         365  +
                        ::std::result::Result::Ok(val) => val,
         366  +
                        ::std::result::Result::Err(e) => {
         367  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         368  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         369  +
                            ))
         370  +
                        }
         371  +
                    };
         372  +
                    tmp.meta = generic;
         373  +
                    if tmp.message.is_none() {
         374  +
                        tmp.message = _error_message;
         375  +
                    }
         376  +
                    tmp
         377  +
                }),
         378  +
                "InvalidScopeException" => crate::operation::create_token_with_iam::CreateTokenWithIAMError::InvalidScopeException({
         379  +
                    let mut tmp = match protocol
         380  +
                        .deserialize_response(response, crate::types::error::InvalidScopeException::SCHEMA, _cfg)
         381  +
                        .and_then(|mut deser| {
         382  +
                            crate::types::error::InvalidScopeException::deserialize_with_response(
         383  +
                                &mut *deser,
         384  +
                                response.headers(),
         385  +
                                response.status().into(),
         386  +
                                body,
         387  +
                            )
         388  +
                        }) {
         389  +
                        ::std::result::Result::Ok(val) => val,
         390  +
                        ::std::result::Result::Err(e) => {
         391  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         392  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         393  +
                            ))
         394  +
                        }
         395  +
                    };
         396  +
                    tmp.meta = generic;
         397  +
                    if tmp.message.is_none() {
         398  +
                        tmp.message = _error_message;
         399  +
                    }
         400  +
                    tmp
         401  +
                }),
         402  +
                "SlowDownException" => crate::operation::create_token_with_iam::CreateTokenWithIAMError::SlowDownException({
         403  +
                    let mut tmp = match protocol
         404  +
                        .deserialize_response(response, crate::types::error::SlowDownException::SCHEMA, _cfg)
         405  +
                        .and_then(|mut deser| {
         406  +
                            crate::types::error::SlowDownException::deserialize_with_response(
         407  +
                                &mut *deser,
         408  +
                                response.headers(),
         409  +
                                response.status().into(),
         410  +
                                body,
         411  +
                            )
         412  +
                        }) {
         413  +
                        ::std::result::Result::Ok(val) => val,
         414  +
                        ::std::result::Result::Err(e) => {
         415  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         416  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         417  +
                            ))
         418  +
                        }
         419  +
                    };
         420  +
                    tmp.meta = generic;
         421  +
                    if tmp.message.is_none() {
         422  +
                        tmp.message = _error_message;
         423  +
                    }
         424  +
                    tmp
         425  +
                }),
         426  +
                "UnauthorizedClientException" => crate::operation::create_token_with_iam::CreateTokenWithIAMError::UnauthorizedClientException({
         427  +
                    let mut tmp = match protocol
         428  +
                        .deserialize_response(response, crate::types::error::UnauthorizedClientException::SCHEMA, _cfg)
         429  +
                        .and_then(|mut deser| {
         430  +
                            crate::types::error::UnauthorizedClientException::deserialize_with_response(
         431  +
                                &mut *deser,
         432  +
                                response.headers(),
         433  +
                                response.status().into(),
         434  +
                                body,
         435  +
                            )
         436  +
                        }) {
         437  +
                        ::std::result::Result::Ok(val) => val,
         438  +
                        ::std::result::Result::Err(e) => {
         439  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         440  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         441  +
                            ))
         442  +
                        }
         443  +
                    };
         444  +
                    tmp.meta = generic;
         445  +
                    if tmp.message.is_none() {
         446  +
                        tmp.message = _error_message;
         447  +
                    }
         448  +
                    tmp
         449  +
                }),
         450  +
                "UnsupportedGrantTypeException" => crate::operation::create_token_with_iam::CreateTokenWithIAMError::UnsupportedGrantTypeException({
         451  +
                    let mut tmp = match protocol
         452  +
                        .deserialize_response(response, crate::types::error::UnsupportedGrantTypeException::SCHEMA, _cfg)
         453  +
                        .and_then(|mut deser| {
         454  +
                            crate::types::error::UnsupportedGrantTypeException::deserialize_with_response(
         455  +
                                &mut *deser,
         456  +
                                response.headers(),
         457  +
                                response.status().into(),
         458  +
                                body,
         459  +
                            )
         460  +
                        }) {
         461  +
                        ::std::result::Result::Ok(val) => val,
         462  +
                        ::std::result::Result::Err(e) => {
         463  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         464  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         465  +
                            ))
         466  +
                        }
         467  +
                    };
         468  +
                    tmp.meta = generic;
         469  +
                    if tmp.message.is_none() {
         470  +
                        tmp.message = _error_message;
         471  +
                    }
         472  +
                    tmp
         473  +
                }),
         474  +
                _ => crate::operation::create_token_with_iam::CreateTokenWithIAMError::generic(generic),
  163    475   
            };
  164         -
        crate::protocol_serde::type_erase_result(parse_result)
         476  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         477  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         478  +
            ))
         479  +
        } else {
         480  +
            let protocol = _cfg
         481  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         482  +
                .expect("a SharedClientProtocol is required");
         483  +
            let mut deser = protocol
         484  +
                .deserialize_response(response, CreateTokenWithIAM::OUTPUT_SCHEMA, _cfg)
         485  +
                .map_err(|e| {
         486  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         487  +
                })?;
         488  +
            let body = response.body().bytes().expect("body loaded");
         489  +
            let output = crate::operation::create_token_with_iam::CreateTokenWithIamOutput::deserialize_with_response(
         490  +
                &mut *deser,
         491  +
                response.headers(),
         492  +
                response.status().into(),
         493  +
                body,
         494  +
            )
         495  +
            .map_err(|e| {
         496  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         497  +
            })?;
         498  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         499  +
        }
  165    500   
    }
  166    501   
}
  167    502   
#[derive(Debug)]
  168    503   
struct CreateTokenWithIAMRequestSerializer;
  169    504   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateTokenWithIAMRequestSerializer {
  170    505   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  171    506   
    fn serialize_input(
  172    507   
        &self,
  173    508   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  174    509   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  175    510   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  176    511   
        let input = input
  177    512   
            .downcast::<crate::operation::create_token_with_iam::CreateTokenWithIamInput>()
  178    513   
            .expect("correct type");
  179         -
        let _header_serialization_settings = _cfg
  180         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  181         -
            .cloned()
  182         -
            .unwrap_or_default();
  183         -
        let mut request_builder = {
  184         -
            #[allow(clippy::uninlined_format_args)]
  185         -
            fn uri_base(
  186         -
                _input: &crate::operation::create_token_with_iam::CreateTokenWithIamInput,
  187         -
                output: &mut ::std::string::String,
  188         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  189         -
                use ::std::fmt::Write as _;
  190         -
                ::std::write!(output, "/token").expect("formatting should succeed");
  191         -
                ::std::result::Result::Ok(())
  192         -
            }
  193         -
            fn uri_query(
  194         -
                _input: &crate::operation::create_token_with_iam::CreateTokenWithIamInput,
  195         -
                mut output: &mut ::std::string::String,
  196         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  197         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  198         -
                query.push_kv("aws_iam", "t");
  199         -
                ::std::result::Result::Ok(())
  200         -
            }
  201         -
            #[allow(clippy::unnecessary_wraps)]
  202         -
            fn update_http_builder(
  203         -
                input: &crate::operation::create_token_with_iam::CreateTokenWithIamInput,
  204         -
                builder: ::http_1x::request::Builder,
  205         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  206         -
                let mut uri = ::std::string::String::new();
  207         -
                uri_base(input, &mut uri)?;
  208         -
                uri_query(input, &mut uri)?;
  209         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  210         -
            }
  211         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  212         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  213         -
            builder
  214         -
        };
  215         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_token_with_iam::ser_create_token_with_iam_input(
  216         -
            &input,
  217         -
        )?);
  218         -
        if let Some(content_length) = body.content_length() {
  219         -
            let content_length = content_length.to_string();
  220         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  221         -
        }
  222         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         514  +
        let protocol = _cfg
         515  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         516  +
            .expect("a SharedClientProtocol is required");
         517  +
        let mut request = protocol
         518  +
            .serialize_request(&input, CreateTokenWithIAM::INPUT_SCHEMA, "", _cfg)
         519  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         520  +
         521  +
        return ::std::result::Result::Ok(request);
  223    522   
    }
  224    523   
}
  225    524   
#[derive(Debug)]
  226    525   
struct CreateTokenWithIAMEndpointParamsInterceptor;
  227    526   
  228    527   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateTokenWithIAMEndpointParamsInterceptor {
  229    528   
    fn name(&self) -> &'static str {
  230    529   
        "CreateTokenWithIAMEndpointParamsInterceptor"
  231    530   
    }
  232    531   

tmp-codegen-diff/aws-sdk/sdk/ssooidc/src/operation/create_token_with_iam/_create_token_with_iam_input.rs

@@ -92,92 +393,397 @@
  112    112   
    "com.amazonaws.ssooidc.synthetic",
  113    113   
    "CreateTokenWithIAMInput",
  114    114   
);
  115    115   
static CREATETOKENWITHIAMINPUT_MEMBER_CLIENT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  116    116   
    ::aws_smithy_schema::ShapeId::from_static(
  117    117   
        "com.amazonaws.ssooidc.synthetic#CreateTokenWithIAMInput$clientId",
  118    118   
        "com.amazonaws.ssooidc.synthetic",
  119    119   
        "CreateTokenWithIAMInput",
  120    120   
    ),
  121    121   
    ::aws_smithy_schema::ShapeType::String,
  122         -
    "client_id",
         122  +
    "clientId",
  123    123   
    0,
  124    124   
);
  125    125   
static CREATETOKENWITHIAMINPUT_MEMBER_GRANT_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  126    126   
    ::aws_smithy_schema::ShapeId::from_static(
  127    127   
        "com.amazonaws.ssooidc.synthetic#CreateTokenWithIAMInput$grantType",
  128    128   
        "com.amazonaws.ssooidc.synthetic",
  129    129   
        "CreateTokenWithIAMInput",
  130    130   
    ),
  131    131   
    ::aws_smithy_schema::ShapeType::String,
  132         -
    "grant_type",
         132  +
    "grantType",
  133    133   
    1,
  134    134   
);
  135    135   
static CREATETOKENWITHIAMINPUT_MEMBER_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  136    136   
    ::aws_smithy_schema::ShapeId::from_static(
  137    137   
        "com.amazonaws.ssooidc.synthetic#CreateTokenWithIAMInput$code",
  138    138   
        "com.amazonaws.ssooidc.synthetic",
  139    139   
        "CreateTokenWithIAMInput",
  140    140   
    ),
  141    141   
    ::aws_smithy_schema::ShapeType::String,
  142    142   
    "code",
  143    143   
    2,
  144    144   
);
  145    145   
static CREATETOKENWITHIAMINPUT_MEMBER_REFRESH_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  146    146   
    ::aws_smithy_schema::ShapeId::from_static(
  147    147   
        "com.amazonaws.ssooidc.synthetic#CreateTokenWithIAMInput$refreshToken",
  148    148   
        "com.amazonaws.ssooidc.synthetic",
  149    149   
        "CreateTokenWithIAMInput",
  150    150   
    ),
  151    151   
    ::aws_smithy_schema::ShapeType::String,
  152         -
    "refresh_token",
         152  +
    "refreshToken",
  153    153   
    3,
  154    154   
);
  155    155   
static CREATETOKENWITHIAMINPUT_MEMBER_ASSERTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  156    156   
    ::aws_smithy_schema::ShapeId::from_static(
  157    157   
        "com.amazonaws.ssooidc.synthetic#CreateTokenWithIAMInput$assertion",
  158    158   
        "com.amazonaws.ssooidc.synthetic",
  159    159   
        "CreateTokenWithIAMInput",
  160    160   
    ),
  161    161   
    ::aws_smithy_schema::ShapeType::String,
  162    162   
    "assertion",
  163    163   
    4,
  164    164   
);
  165    165   
static CREATETOKENWITHIAMINPUT_MEMBER_SCOPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  166    166   
    ::aws_smithy_schema::ShapeId::from_static(
  167    167   
        "com.amazonaws.ssooidc.synthetic#CreateTokenWithIAMInput$scope",
  168    168   
        "com.amazonaws.ssooidc.synthetic",
  169    169   
        "CreateTokenWithIAMInput",
  170    170   
    ),
  171    171   
    ::aws_smithy_schema::ShapeType::List,
  172    172   
    "scope",
  173    173   
    5,
  174    174   
);
  175    175   
static CREATETOKENWITHIAMINPUT_MEMBER_REDIRECT_URI: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  176    176   
    ::aws_smithy_schema::ShapeId::from_static(
  177    177   
        "com.amazonaws.ssooidc.synthetic#CreateTokenWithIAMInput$redirectUri",
  178    178   
        "com.amazonaws.ssooidc.synthetic",
  179    179   
        "CreateTokenWithIAMInput",
  180    180   
    ),
  181    181   
    ::aws_smithy_schema::ShapeType::String,
  182         -
    "redirect_uri",
         182  +
    "redirectUri",
  183    183   
    6,
  184    184   
);
  185    185   
static CREATETOKENWITHIAMINPUT_MEMBER_SUBJECT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  186    186   
    ::aws_smithy_schema::ShapeId::from_static(
  187    187   
        "com.amazonaws.ssooidc.synthetic#CreateTokenWithIAMInput$subjectToken",
  188    188   
        "com.amazonaws.ssooidc.synthetic",
  189    189   
        "CreateTokenWithIAMInput",
  190    190   
    ),
  191    191   
    ::aws_smithy_schema::ShapeType::String,
  192         -
    "subject_token",
         192  +
    "subjectToken",
  193    193   
    7,
  194    194   
);
  195    195   
static CREATETOKENWITHIAMINPUT_MEMBER_SUBJECT_TOKEN_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  196    196   
    ::aws_smithy_schema::ShapeId::from_static(
  197    197   
        "com.amazonaws.ssooidc.synthetic#CreateTokenWithIAMInput$subjectTokenType",
  198    198   
        "com.amazonaws.ssooidc.synthetic",
  199    199   
        "CreateTokenWithIAMInput",
  200    200   
    ),
  201    201   
    ::aws_smithy_schema::ShapeType::String,
  202         -
    "subject_token_type",
         202  +
    "subjectTokenType",
  203    203   
    8,
  204    204   
);
  205    205   
static CREATETOKENWITHIAMINPUT_MEMBER_REQUESTED_TOKEN_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  206    206   
    ::aws_smithy_schema::ShapeId::from_static(
  207    207   
        "com.amazonaws.ssooidc.synthetic#CreateTokenWithIAMInput$requestedTokenType",
  208    208   
        "com.amazonaws.ssooidc.synthetic",
  209    209   
        "CreateTokenWithIAMInput",
  210    210   
    ),
  211    211   
    ::aws_smithy_schema::ShapeType::String,
  212         -
    "requested_token_type",
         212  +
    "requestedTokenType",
  213    213   
    9,
  214    214   
);
  215    215   
static CREATETOKENWITHIAMINPUT_MEMBER_CODE_VERIFIER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  216    216   
    ::aws_smithy_schema::ShapeId::from_static(
  217    217   
        "com.amazonaws.ssooidc.synthetic#CreateTokenWithIAMInput$codeVerifier",
  218    218   
        "com.amazonaws.ssooidc.synthetic",
  219    219   
        "CreateTokenWithIAMInput",
  220    220   
    ),
  221    221   
    ::aws_smithy_schema::ShapeType::String,
  222         -
    "code_verifier",
         222  +
    "codeVerifier",
  223    223   
    10,
  224    224   
);
  225    225   
static CREATETOKENWITHIAMINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  226    226   
    CREATETOKENWITHIAMINPUT_SCHEMA_ID,
  227    227   
    ::aws_smithy_schema::ShapeType::Structure,
  228    228   
    &[
  229    229   
        &CREATETOKENWITHIAMINPUT_MEMBER_CLIENT_ID,
  230    230   
        &CREATETOKENWITHIAMINPUT_MEMBER_GRANT_TYPE,
  231    231   
        &CREATETOKENWITHIAMINPUT_MEMBER_CODE,
  232    232   
        &CREATETOKENWITHIAMINPUT_MEMBER_REFRESH_TOKEN,
  233    233   
        &CREATETOKENWITHIAMINPUT_MEMBER_ASSERTION,
  234    234   
        &CREATETOKENWITHIAMINPUT_MEMBER_SCOPE,
  235    235   
        &CREATETOKENWITHIAMINPUT_MEMBER_REDIRECT_URI,
  236    236   
        &CREATETOKENWITHIAMINPUT_MEMBER_SUBJECT_TOKEN,
  237    237   
        &CREATETOKENWITHIAMINPUT_MEMBER_SUBJECT_TOKEN_TYPE,
  238    238   
        &CREATETOKENWITHIAMINPUT_MEMBER_REQUESTED_TOKEN_TYPE,
  239    239   
        &CREATETOKENWITHIAMINPUT_MEMBER_CODE_VERIFIER,
  240    240   
    ],
  241         -
);
         241  +
)
         242  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/token?aws_iam=t", None));
  242    243   
impl CreateTokenWithIamInput {
  243    244   
    /// The schema for this shape.
  244    245   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATETOKENWITHIAMINPUT_SCHEMA;
  245    246   
}
  246    247   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateTokenWithIamInput {
  247    248   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  248    249   
    fn serialize_members(
  249    250   
        &self,
  250    251   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  251    252   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  252    253   
        if let Some(ref val) = self.client_id {
  253    254   
            ser.write_string(&CREATETOKENWITHIAMINPUT_MEMBER_CLIENT_ID, val)?;
  254    255   
        }
  255    256   
        if let Some(ref val) = self.grant_type {
  256    257   
            ser.write_string(&CREATETOKENWITHIAMINPUT_MEMBER_GRANT_TYPE, val)?;
  257    258   
        }
  258    259   
        if let Some(ref val) = self.code {
  259    260   
            ser.write_string(&CREATETOKENWITHIAMINPUT_MEMBER_CODE, val)?;
  260    261   
        }
  261    262   
        if let Some(ref val) = self.refresh_token {
  262    263   
            ser.write_string(&CREATETOKENWITHIAMINPUT_MEMBER_REFRESH_TOKEN, val)?;
  263    264   
        }
  264    265   
        if let Some(ref val) = self.assertion {
  265    266   
            ser.write_string(&CREATETOKENWITHIAMINPUT_MEMBER_ASSERTION, val)?;
  266    267   
        }
  267    268   
        if let Some(ref val) = self.scope {
  268    269   
            ser.write_list(
  269    270   
                &CREATETOKENWITHIAMINPUT_MEMBER_SCOPE,
  270    271   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  271    272   
                    for item in val {
  272    273   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
  273    274   
                    }
  274    275   
                    Ok(())
  275    276   
                },
  276    277   
            )?;
  277    278   
        }
  278    279   
        if let Some(ref val) = self.redirect_uri {
  279    280   
            ser.write_string(&CREATETOKENWITHIAMINPUT_MEMBER_REDIRECT_URI, val)?;
  280    281   
        }
  281    282   
        if let Some(ref val) = self.subject_token {
  282    283   
            ser.write_string(&CREATETOKENWITHIAMINPUT_MEMBER_SUBJECT_TOKEN, val)?;
  283    284   
        }
  284    285   
        if let Some(ref val) = self.subject_token_type {
  285    286   
            ser.write_string(&CREATETOKENWITHIAMINPUT_MEMBER_SUBJECT_TOKEN_TYPE, val)?;
  286    287   
        }
  287    288   
        if let Some(ref val) = self.requested_token_type {
  288    289   
            ser.write_string(&CREATETOKENWITHIAMINPUT_MEMBER_REQUESTED_TOKEN_TYPE, val)?;
  289    290   
        }
  290    291   
        if let Some(ref val) = self.code_verifier {
  291    292   
            ser.write_string(&CREATETOKENWITHIAMINPUT_MEMBER_CODE_VERIFIER, val)?;
  292    293   
        }
  293    294   
        Ok(())
  294    295   
    }
  295    296   
}
  296    297   
impl CreateTokenWithIamInput {
  297    298   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  298         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  299         -
        deserializer: &mut D,
         299  +
    pub fn deserialize(
         300  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  300    301   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  301    302   
        #[allow(unused_variables, unused_mut)]
  302    303   
        let mut builder = Self::builder();
  303    304   
        #[allow(
  304    305   
            unused_variables,
  305    306   
            unreachable_code,
  306    307   
            clippy::single_match,
  307    308   
            clippy::match_single_binding,
  308    309   
            clippy::diverging_sub_expression
  309    310   
        )]
  310         -
        deserializer.read_struct(&CREATETOKENWITHIAMINPUT_SCHEMA, (), |_, member, deser| {
         311  +
        deserializer.read_struct(&CREATETOKENWITHIAMINPUT_SCHEMA, &mut |member, deser| {
  311    312   
            match member.member_index() {
  312    313   
                Some(0) => {
  313    314   
                    builder.client_id = Some(deser.read_string(member)?);
  314    315   
                }
  315    316   
                Some(1) => {
  316    317   
                    builder.grant_type = Some(deser.read_string(member)?);
  317    318   
                }
  318    319   
                Some(2) => {
  319    320   
                    builder.code = Some(deser.read_string(member)?);
  320    321   
                }
  321    322   
                Some(3) => {
  322    323   
                    builder.refresh_token = Some(deser.read_string(member)?);
  323    324   
                }
  324    325   
                Some(4) => {
  325    326   
                    builder.assertion = Some(deser.read_string(member)?);
  326    327   
                }
  327    328   
                Some(5) => {
  328         -
                    builder.scope = Some({
  329         -
                        let container = if let Some(cap) = deser.container_size() {
  330         -
                            Vec::with_capacity(cap)
  331         -
                        } else {
  332         -
                            Vec::new()
  333         -
                        };
  334         -
                        deser.read_list(member, container, |mut list, deser| {
  335         -
                            list.push(deser.read_string(member)?);
  336         -
                            Ok(list)
  337         -
                        })?
  338         -
                    });
         329  +
                    builder.scope = Some(deser.read_string_list(member)?);
  339    330   
                }
  340    331   
                Some(6) => {
  341    332   
                    builder.redirect_uri = Some(deser.read_string(member)?);
  342    333   
                }
  343    334   
                Some(7) => {
  344    335   
                    builder.subject_token = Some(deser.read_string(member)?);
  345    336   
                }
  346    337   
                Some(8) => {
  347    338   
                    builder.subject_token_type = Some(deser.read_string(member)?);
  348    339   
                }
  349    340   
                Some(9) => {
  350    341   
                    builder.requested_token_type = Some(deser.read_string(member)?);
  351    342   
                }
  352    343   
                Some(10) => {
  353    344   
                    builder.code_verifier = Some(deser.read_string(member)?);
  354    345   
                }
  355    346   
                _ => {}
  356    347   
            }
  357    348   
            Ok(())
  358    349   
        })?;
         350  +
        builder.client_id = builder.client_id.or(Some(String::new()));
         351  +
        builder.grant_type = builder.grant_type.or(Some(String::new()));
  359    352   
        builder
  360    353   
            .build()
  361    354   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  362    355   
    }
  363    356   
}
         357  +
impl CreateTokenWithIamInput {
         358  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         359  +
    pub fn deserialize_with_response(
         360  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         361  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         362  +
        _status: u16,
         363  +
        _body: &[u8],
         364  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         365  +
        Self::deserialize(deserializer)
         366  +
    }
         367  +
}
  364    368   
impl CreateTokenWithIamInput {
  365    369   
    /// Creates a new builder-style object to manufacture [`CreateTokenWithIamInput`](crate::operation::create_token_with_iam::CreateTokenWithIamInput).
  366    370   
    pub fn builder() -> crate::operation::create_token_with_iam::builders::CreateTokenWithIamInputBuilder {
  367    371   
        crate::operation::create_token_with_iam::builders::CreateTokenWithIamInputBuilder::default()
  368    372   
    }
  369    373   
}
  370    374   
  371    375   
/// A builder for [`CreateTokenWithIamInput`](crate::operation::create_token_with_iam::CreateTokenWithIamInput).
  372    376   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
  373    377   
#[non_exhaustive]