Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/config/endpoint.rs

@@ -1,1 +86,107 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ClientRuntimeTypesReExportGenerator.kt:38 */
    2      3   
pub use ::aws_smithy_runtime_api::client::endpoint::EndpointFuture;
    3      4   
pub use ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver;
    4      5   
pub use ::aws_smithy_types::endpoint::Endpoint;
    5      6   
           7  +
/* RustType.kt:516 */
    6      8   
#[cfg(test)]
    7         -
mod test {}
           9  +
/* EndpointsDecorator.kt:175 */
          10  +
mod test {
    8     11   
          12  +
    /* EndpointsDecorator.kt:175 */
          13  +
}
          14  +
          15  +
/* EndpointResolverGenerator.kt:416 */
    9     16   
/// Endpoint resolver trait specific to Sample Json 1.1 Protocol Service
   10     17   
pub trait ResolveEndpoint: ::std::marker::Send + ::std::marker::Sync + ::std::fmt::Debug {
   11     18   
    /// Resolve an endpoint with the given parameters
   12     19   
    fn resolve_endpoint<'a>(&'a self, params: &'a crate::config::endpoint::Params) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture<'a>;
   13     20   
   14     21   
    /// Convert this service-specific resolver into a `SharedEndpointResolver`
   15     22   
    ///
   16     23   
    /// The resulting resolver will downcast `EndpointResolverParams` into `crate::config::endpoint::Params`.
   17     24   
    fn into_shared_resolver(self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver
   18     25   
    where
   19     26   
        Self: Sized + 'static,
   20     27   
    {
   21     28   
        ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver::new(DowncastParams(self))
   22     29   
    }
   23     30   
}
   24     31   
   25     32   
#[derive(Debug)]
   26     33   
struct DowncastParams<T>(T);
   27     34   
impl<T> ::aws_smithy_runtime_api::client::endpoint::ResolveEndpoint for DowncastParams<T>
   28     35   
where
   29     36   
    T: ResolveEndpoint,
   30     37   
{
   31     38   
    fn resolve_endpoint<'a>(
   32     39   
        &'a self,
   33     40   
        params: &'a ::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams,
   34     41   
    ) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture<'a> {
   35     42   
        let ep = match params.get::<crate::config::endpoint::Params>() {
   36     43   
            Some(params) => self.0.resolve_endpoint(params),
   37     44   
            None => ::aws_smithy_runtime_api::client::endpoint::EndpointFuture::ready(Err("params of expected type was not present".into())),
   38     45   
        };
   39     46   
        ep
   40     47   
    }
   41     48   
}
   42     49   
          50  +
/* RustType.kt:516 */
   43     51   
#[non_exhaustive]
          52  +
/* RustType.kt:516 */
   44     53   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
   45         -
/// Configuration parameters for resolving the correct endpoint
   46         -
pub struct Params {}
          54  +
/// /* EndpointParamsGenerator.kt:178 */Configuration parameters for resolving the correct endpoint
          55  +
/* EndpointParamsGenerator.kt:179 */
          56  +
pub struct Params {/* EndpointParamsGenerator.kt:179 */}
          57  +
/* EndpointParamsGenerator.kt:188 */
   47     58   
impl Params {
          59  +
    /* EndpointParamsGenerator.kt:189 */
   48     60   
    /// Create a builder for [`Params`]
   49     61   
    pub fn builder() -> crate::config::endpoint::ParamsBuilder {
   50     62   
        crate::config::endpoint::ParamsBuilder::default()
   51     63   
    }
          64  +
    /* EndpointParamsGenerator.kt:188 */
   52     65   
}
   53     66   
   54         -
/// Builder for [`Params`]
          67  +
/// /* EndpointParamsGenerator.kt:234 */Builder for [`Params`]
          68  +
/* RustType.kt:516 */
   55     69   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   56         -
pub struct ParamsBuilder {}
          70  +
/* EndpointParamsGenerator.kt:238 */
          71  +
pub struct ParamsBuilder {/* EndpointParamsGenerator.kt:238 */}
          72  +
/* EndpointParamsGenerator.kt:246 */
   57     73   
impl ParamsBuilder {
   58         -
    /// Consume this builder, creating [`Params`].
          74  +
    /// /* EndpointParamsGenerator.kt:247 */Consume this builder, creating [`Params`].
          75  +
    /* EndpointParamsGenerator.kt:248 */
   59     76   
    pub fn build(self) -> ::std::result::Result<crate::config::endpoint::Params, crate::config::endpoint::InvalidParams> {
          77  +
        /* EndpointParamsGenerator.kt:272 */
   60     78   
        Ok(
   61     79   
            #[allow(clippy::unnecessary_lazy_evaluations)]
   62     80   
            crate::config::endpoint::Params {},
   63     81   
        )
          82  +
        /* EndpointParamsGenerator.kt:248 */
   64     83   
    }
          84  +
    /* EndpointParamsGenerator.kt:246 */
   65     85   
}
   66     86   
          87  +
/* EndpointParamsGenerator.kt:139 */
   67     88   
/// An error that occurred during endpoint resolution
   68     89   
#[derive(Debug)]
   69     90   
pub struct InvalidParams {
   70     91   
    field: std::borrow::Cow<'static, str>,
   71     92   
}
   72     93   
   73     94   
impl InvalidParams {
   74     95   
    #[allow(dead_code)]
   75     96   
    fn missing(field: &'static str) -> Self {
   76     97   
        Self { field: field.into() }

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/config/http.rs

@@ -1,1 +3,4 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ClientRuntimeTypesReExportGenerator.kt:60 */
    2      3   
pub use ::aws_smithy_runtime_api::client::orchestrator::HttpRequest;
    3      4   
pub use ::aws_smithy_runtime_api::client::orchestrator::HttpResponse;

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/config/interceptors.rs

@@ -1,1 +11,12 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ClientRuntimeTypesReExportGenerator.kt:70 */
    2      3   
pub use ::aws_smithy_runtime_api::client::interceptors::context::AfterDeserializationInterceptorContextRef;
    3      4   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeDeserializationInterceptorContextMut;
    4      5   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeDeserializationInterceptorContextRef;
    5      6   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextMut;
    6      7   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef;
    7      8   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeTransmitInterceptorContextMut;
    8      9   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeTransmitInterceptorContextRef;
    9     10   
pub use ::aws_smithy_runtime_api::client::interceptors::context::FinalizerInterceptorContextMut;
   10     11   
pub use ::aws_smithy_runtime_api::client::interceptors::context::FinalizerInterceptorContextRef;
   11     12   
pub use ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext;

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/config/retry.rs

@@ -1,1 +7,9 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ClientRuntimeTypesReExportGenerator.kt:48 */
    2      3   
pub use ::aws_smithy_runtime_api::client::retries::classifiers::ClassifyRetry;
    3      4   
pub use ::aws_smithy_runtime_api::client::retries::classifiers::RetryAction;
    4      5   
pub use ::aws_smithy_runtime_api::client::retries::ShouldAttempt;
    5      6   
    6         -
pub use ::aws_smithy_runtime::client::retries::RetryPartition;
           7  +
/* ResiliencyConfigCustomization.kt:324 */
           8  +
/* ResiliencyConfigCustomization.kt:329 */ pub use ::aws_smithy_runtime::client::retries::RetryPartition;
    7      9   
pub use ::aws_smithy_types::retry::{ReconnectMode, RetryConfig, RetryConfigBuilder, RetryMode};

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/config/timeout.rs

@@ -1,1 +2,3 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ResiliencyConfigCustomization.kt:335 */
    2      3   
pub use ::aws_smithy_types::timeout::{TimeoutConfig, TimeoutConfigBuilder};

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/error.rs

@@ -1,1 +30,33 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ClientRuntimeTypesReExportGenerator.kt:96 */
    2      3   
pub use ::aws_smithy_runtime_api::box_error::BoxError;
    3      4   
           5  +
/* RequiredCustomizations.kt:104 */
    4      6   
/// Error type returned by the client.
    5      7   
pub type SdkError<E, R = ::aws_smithy_runtime_api::client::orchestrator::HttpResponse> = ::aws_smithy_runtime_api::client::result::SdkError<E, R>;
    6      8   
pub use ::aws_smithy_runtime_api::client::result::ConnectorError;
    7      9   
pub use ::aws_smithy_types::error::operation::BuildError;
    8     10   
    9     11   
pub use ::aws_smithy_types::error::display::DisplayErrorContext;
   10     12   
pub use ::aws_smithy_types::error::metadata::ErrorMetadata;
   11     13   
pub use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
   12     14   
          15  +
/* ClientEnumGenerator.kt:302 */
   13     16   
/// The given enum value failed to parse since it is not a known value.
   14     17   
#[derive(Debug)]
   15     18   
pub struct UnknownVariantError {
   16     19   
    value: ::std::string::String,
   17     20   
}
   18     21   
impl UnknownVariantError {
   19     22   
    pub(crate) fn new(value: impl ::std::convert::Into<::std::string::String>) -> Self {
   20     23   
        Self { value: value.into() }
   21     24   
    }
   22     25   
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/error/sealed_unhandled.rs

@@ -1,1 +20,21 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServiceErrorGenerator.kt:277 */
    2      3   
/// This struct is not intended to be used.
    3      4   
///
    4      5   
/// This struct holds information about an unhandled error,
    5      6   
/// but that information should be obtained by using the
    6      7   
/// [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) trait
    7      8   
/// on the error type.
    8      9   
///
    9     10   
/// This struct intentionally doesn't yield any useful information itself.
   10     11   
#[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
   11     12   
variable wildcard pattern and check `.code()`:

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/error_meta.rs

@@ -1,1 +472,758 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServiceErrorGenerator.kt:252 */
    2      3   
/// All possible error types for this service.
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::fmt::Debug)]
    5         -
pub enum Error {
    6         -
    /// This error is thrown when a request is invalid.
           8  +
pub /* ServiceErrorGenerator.kt:257 */ enum Error {
           9  +
    /// /* ServiceErrorGenerator.kt:259 */This error is thrown when a request is invalid.
          10  +
    /* ServiceErrorGenerator.kt:262 */
    7     11   
    ComplexError(crate::types::error::ComplexError),
          12  +
    /* ServiceErrorGenerator.kt:259 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
          14  +
    /* ServiceErrorGenerator.kt:262 */
    9     15   
    ErrorWithMembers(crate::types::error::ErrorWithMembers),
          16  +
    /* ServiceErrorGenerator.kt:259 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
    /* ServiceErrorGenerator.kt:262 */
   11     19   
    ErrorWithoutMembers(crate::types::error::ErrorWithoutMembers),
   12         -
    /// This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
          20  +
    /// /* ServiceErrorGenerator.kt:259 */This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
          21  +
    /* ServiceErrorGenerator.kt:262 */
   13     22   
    FooError(crate::types::error::FooError),
   14         -
    /// This error is thrown when an invalid greeting value is provided.
          23  +
    /// /* ServiceErrorGenerator.kt:259 */This error is thrown when an invalid greeting value is provided.
          24  +
    /* ServiceErrorGenerator.kt:262 */
   15     25   
    InvalidGreeting(crate::types::error::InvalidGreeting),
   16         -
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
          26  +
    /// /* ServiceErrorGenerator.kt:264 */An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
          27  +
    /* ServiceErrorGenerator.kt:320 */
   17     28   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
   18     29   
    variable wildcard pattern and check `.code()`:
   19     30   
     \
   20     31   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
   21     32   
     \
   22     33   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
   23         -
    Unhandled(crate::error::sealed_unhandled::Unhandled),
          34  +
    /* ServiceErrorGenerator.kt:266 */
          35  +
    Unhandled(crate::error::sealed_unhandled::Unhandled), /* ServiceErrorGenerator.kt:257 */
   24     36   
}
          37  +
/* ServiceErrorGenerator.kt:131 */
   25     38   
impl ::std::fmt::Display for Error {
          39  +
    /* ServiceErrorGenerator.kt:132 */
   26     40   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          41  +
        /* ServiceErrorGenerator.kt:133 */
   27     42   
        match self {
   28         -
            Error::ComplexError(inner) => inner.fmt(f),
   29         -
            Error::ErrorWithMembers(inner) => inner.fmt(f),
   30         -
            Error::ErrorWithoutMembers(inner) => inner.fmt(f),
   31         -
            Error::FooError(inner) => inner.fmt(f),
   32         -
            Error::InvalidGreeting(inner) => inner.fmt(f),
          43  +
            /* ServiceErrorGenerator.kt:135 */ Error::ComplexError(inner) => inner.fmt(f),
          44  +
            /* ServiceErrorGenerator.kt:135 */ Error::ErrorWithMembers(inner) => inner.fmt(f),
          45  +
            /* ServiceErrorGenerator.kt:135 */ Error::ErrorWithoutMembers(inner) => inner.fmt(f),
          46  +
            /* ServiceErrorGenerator.kt:135 */ Error::FooError(inner) => inner.fmt(f),
          47  +
            /* ServiceErrorGenerator.kt:135 */ Error::InvalidGreeting(inner) => inner.fmt(f),
          48  +
            /* ServiceErrorGenerator.kt:137 */
   33     49   
            Error::Unhandled(_) => {
   34     50   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
   35     51   
                    write!(f, "unhandled error ({code})")
   36     52   
                } else {
   37     53   
                    f.write_str("unhandled error")
   38     54   
                }
   39         -
            }
          55  +
            } /* ServiceErrorGenerator.kt:133 */
   40     56   
        }
          57  +
        /* ServiceErrorGenerator.kt:132 */
   41     58   
    }
          59  +
    /* ServiceErrorGenerator.kt:131 */
   42     60   
}
          61  +
/* ServiceErrorGenerator.kt:154 */
   43     62   
impl From<::aws_smithy_types::error::operation::BuildError> for Error {
   44     63   
    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
   45     64   
        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   46     65   
            source: value.into(),
   47     66   
            meta: ::std::default::Default::default(),
   48     67   
        })
   49     68   
    }
   50     69   
}
          70  +
/* ServiceErrorGenerator.kt:223 */
   51     71   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
   52     72   
    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
   53     73   
        match self {
   54     74   
            Self::ComplexError(inner) => inner.meta(),
   55     75   
            Self::ErrorWithMembers(inner) => inner.meta(),
   56     76   
            Self::ErrorWithoutMembers(inner) => inner.meta(),
   57     77   
            Self::FooError(inner) => inner.meta(),
   58     78   
            Self::InvalidGreeting(inner) => inner.meta(),
   59     79   
            Self::Unhandled(inner) => &inner.meta,
   60     80   
        }
   61     81   
    }
   62     82   
}
          83  +
/* ServiceErrorGenerator.kt:174 */
   63     84   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::content_type_parameters::ContentTypeParametersError, R>> for Error
   64     85   
where
   65     86   
    R: Send + Sync + std::fmt::Debug + 'static,
   66     87   
{
          88  +
    /* ServiceErrorGenerator.kt:179 */
   67     89   
    fn from(
   68     90   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::content_type_parameters::ContentTypeParametersError, R>,
   69     91   
    ) -> Self {
          92  +
        /* ServiceErrorGenerator.kt:184 */
   70     93   
        match err {
          94  +
            /* ServiceErrorGenerator.kt:185 */
   71     95   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
          96  +
            /* ServiceErrorGenerator.kt:186 */
   72     97   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   73     98   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
   74     99   
                source: err.into(),
   75    100   
            }),
         101  +
            /* ServiceErrorGenerator.kt:184 */
   76    102   
        }
         103  +
        /* ServiceErrorGenerator.kt:179 */
   77    104   
    }
         105  +
    /* ServiceErrorGenerator.kt:174 */
   78    106   
}
         107  +
/* ServiceErrorGenerator.kt:202 */
   79    108   
impl From<crate::operation::content_type_parameters::ContentTypeParametersError> for Error {
         109  +
    /* ServiceErrorGenerator.kt:203 */
   80    110   
    fn from(err: crate::operation::content_type_parameters::ContentTypeParametersError) -> Self {
         111  +
        /* ServiceErrorGenerator.kt:204 */
   81    112   
        match err {
         113  +
            /* ServiceErrorGenerator.kt:212 */
   82    114   
            crate::operation::content_type_parameters::ContentTypeParametersError::Unhandled(inner) => Error::Unhandled(inner),
         115  +
            /* ServiceErrorGenerator.kt:204 */
   83    116   
        }
         117  +
        /* ServiceErrorGenerator.kt:203 */
   84    118   
    }
         119  +
    /* ServiceErrorGenerator.kt:202 */
   85    120   
}
         121  +
/* ServiceErrorGenerator.kt:174 */
   86    122   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::datetime_offsets::DatetimeOffsetsError, R>> for Error
   87    123   
where
   88    124   
    R: Send + Sync + std::fmt::Debug + 'static,
   89    125   
{
         126  +
    /* ServiceErrorGenerator.kt:179 */
   90    127   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::datetime_offsets::DatetimeOffsetsError, R>) -> Self {
         128  +
        /* ServiceErrorGenerator.kt:184 */
   91    129   
        match err {
         130  +
            /* ServiceErrorGenerator.kt:185 */
   92    131   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         132  +
            /* ServiceErrorGenerator.kt:186 */
   93    133   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   94    134   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
   95    135   
                source: err.into(),
   96    136   
            }),
         137  +
            /* ServiceErrorGenerator.kt:184 */
   97    138   
        }
         139  +
        /* ServiceErrorGenerator.kt:179 */
   98    140   
    }
         141  +
    /* ServiceErrorGenerator.kt:174 */
   99    142   
}
         143  +
/* ServiceErrorGenerator.kt:202 */
  100    144   
impl From<crate::operation::datetime_offsets::DatetimeOffsetsError> for Error {
         145  +
    /* ServiceErrorGenerator.kt:203 */
  101    146   
    fn from(err: crate::operation::datetime_offsets::DatetimeOffsetsError) -> Self {
         147  +
        /* ServiceErrorGenerator.kt:204 */
  102    148   
        match err {
         149  +
            /* ServiceErrorGenerator.kt:212 */
  103    150   
            crate::operation::datetime_offsets::DatetimeOffsetsError::Unhandled(inner) => Error::Unhandled(inner),
         151  +
            /* ServiceErrorGenerator.kt:204 */
  104    152   
        }
         153  +
        /* ServiceErrorGenerator.kt:203 */
  105    154   
    }
         155  +
    /* ServiceErrorGenerator.kt:202 */
  106    156   
}
         157  +
/* ServiceErrorGenerator.kt:174 */
  107    158   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::empty_operation::EmptyOperationError, R>> for Error
  108    159   
where
  109    160   
    R: Send + Sync + std::fmt::Debug + 'static,
  110    161   
{
         162  +
    /* ServiceErrorGenerator.kt:179 */
  111    163   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::empty_operation::EmptyOperationError, R>) -> Self {
         164  +
        /* ServiceErrorGenerator.kt:184 */
  112    165   
        match err {
         166  +
            /* ServiceErrorGenerator.kt:185 */
  113    167   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         168  +
            /* ServiceErrorGenerator.kt:186 */
  114    169   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  115    170   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  116    171   
                source: err.into(),
  117    172   
            }),
         173  +
            /* ServiceErrorGenerator.kt:184 */
  118    174   
        }
         175  +
        /* ServiceErrorGenerator.kt:179 */
  119    176   
    }
         177  +
    /* ServiceErrorGenerator.kt:174 */
  120    178   
}
         179  +
/* ServiceErrorGenerator.kt:202 */
  121    180   
impl From<crate::operation::empty_operation::EmptyOperationError> for Error {
         181  +
    /* ServiceErrorGenerator.kt:203 */
  122    182   
    fn from(err: crate::operation::empty_operation::EmptyOperationError) -> Self {
         183  +
        /* ServiceErrorGenerator.kt:204 */
  123    184   
        match err {
         185  +
            /* ServiceErrorGenerator.kt:212 */
  124    186   
            crate::operation::empty_operation::EmptyOperationError::Unhandled(inner) => Error::Unhandled(inner),
         187  +
            /* ServiceErrorGenerator.kt:204 */
  125    188   
        }
         189  +
        /* ServiceErrorGenerator.kt:203 */
  126    190   
    }
         191  +
    /* ServiceErrorGenerator.kt:202 */
  127    192   
}
         193  +
/* ServiceErrorGenerator.kt:174 */
  128    194   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::endpoint_operation::EndpointOperationError, R>> for Error
  129    195   
where
  130    196   
    R: Send + Sync + std::fmt::Debug + 'static,
  131    197   
{
         198  +
    /* ServiceErrorGenerator.kt:179 */
  132    199   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::endpoint_operation::EndpointOperationError, R>) -> Self {
         200  +
        /* ServiceErrorGenerator.kt:184 */
  133    201   
        match err {
         202  +
            /* ServiceErrorGenerator.kt:185 */
  134    203   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         204  +
            /* ServiceErrorGenerator.kt:186 */
  135    205   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  136    206   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  137    207   
                source: err.into(),
  138    208   
            }),
         209  +
            /* ServiceErrorGenerator.kt:184 */
  139    210   
        }
         211  +
        /* ServiceErrorGenerator.kt:179 */
  140    212   
    }
         213  +
    /* ServiceErrorGenerator.kt:174 */
  141    214   
}
         215  +
/* ServiceErrorGenerator.kt:202 */
  142    216   
impl From<crate::operation::endpoint_operation::EndpointOperationError> for Error {
         217  +
    /* ServiceErrorGenerator.kt:203 */
  143    218   
    fn from(err: crate::operation::endpoint_operation::EndpointOperationError) -> Self {
         219  +
        /* ServiceErrorGenerator.kt:204 */
  144    220   
        match err {
         221  +
            /* ServiceErrorGenerator.kt:212 */
  145    222   
            crate::operation::endpoint_operation::EndpointOperationError::Unhandled(inner) => Error::Unhandled(inner),
         223  +
            /* ServiceErrorGenerator.kt:204 */
  146    224   
        }
         225  +
        /* ServiceErrorGenerator.kt:203 */
  147    226   
    }
         227  +
    /* ServiceErrorGenerator.kt:202 */
  148    228   
}
         229  +
/* ServiceErrorGenerator.kt:174 */
  149    230   
impl<R>
  150    231   
    From<
  151    232   
        ::aws_smithy_runtime_api::client::result::SdkError<
  152    233   
            crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError,
  153    234   
            R,
  154    235   
        >,
  155    236   
    > for Error
  156    237   
where
  157    238   
    R: Send + Sync + std::fmt::Debug + 'static,
  158    239   
{
         240  +
    /* ServiceErrorGenerator.kt:179 */
  159    241   
    fn from(
  160    242   
        err: ::aws_smithy_runtime_api::client::result::SdkError<
  161    243   
            crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError,
  162    244   
            R,
  163    245   
        >,
  164    246   
    ) -> Self {
         247  +
        /* ServiceErrorGenerator.kt:184 */
  165    248   
        match err {
         249  +
            /* ServiceErrorGenerator.kt:185 */
  166    250   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         251  +
            /* ServiceErrorGenerator.kt:186 */
  167    252   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  168    253   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  169    254   
                source: err.into(),
  170    255   
            }),
         256  +
            /* ServiceErrorGenerator.kt:184 */
  171    257   
        }
         258  +
        /* ServiceErrorGenerator.kt:179 */
  172    259   
    }
         260  +
    /* ServiceErrorGenerator.kt:174 */
  173    261   
}
         262  +
/* ServiceErrorGenerator.kt:202 */
  174    263   
impl From<crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError> for Error {
         264  +
    /* ServiceErrorGenerator.kt:203 */
  175    265   
    fn from(err: crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError) -> Self {
         266  +
        /* ServiceErrorGenerator.kt:204 */
  176    267   
        match err {
         268  +
            /* ServiceErrorGenerator.kt:212 */
  177    269   
            crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError::Unhandled(inner) => Error::Unhandled(inner),
         270  +
            /* ServiceErrorGenerator.kt:204 */
  178    271   
        }
         272  +
        /* ServiceErrorGenerator.kt:203 */
  179    273   
    }
         274  +
    /* ServiceErrorGenerator.kt:202 */
  180    275   
}
         276  +
/* ServiceErrorGenerator.kt:174 */
  181    277   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::fractional_seconds::FractionalSecondsError, R>> for Error
  182    278   
where
  183    279   
    R: Send + Sync + std::fmt::Debug + 'static,
  184    280   
{
         281  +
    /* ServiceErrorGenerator.kt:179 */
  185    282   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::fractional_seconds::FractionalSecondsError, R>) -> Self {
         283  +
        /* ServiceErrorGenerator.kt:184 */
  186    284   
        match err {
         285  +
            /* ServiceErrorGenerator.kt:185 */
  187    286   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         287  +
            /* ServiceErrorGenerator.kt:186 */
  188    288   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  189    289   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  190    290   
                source: err.into(),
  191    291   
            }),
         292  +
            /* ServiceErrorGenerator.kt:184 */
  192    293   
        }
         294  +
        /* ServiceErrorGenerator.kt:179 */
  193    295   
    }
         296  +
    /* ServiceErrorGenerator.kt:174 */
  194    297   
}
         298  +
/* ServiceErrorGenerator.kt:202 */
  195    299   
impl From<crate::operation::fractional_seconds::FractionalSecondsError> for Error {
         300  +
    /* ServiceErrorGenerator.kt:203 */
  196    301   
    fn from(err: crate::operation::fractional_seconds::FractionalSecondsError) -> Self {
         302  +
        /* ServiceErrorGenerator.kt:204 */
  197    303   
        match err {
         304  +
            /* ServiceErrorGenerator.kt:212 */
  198    305   
            crate::operation::fractional_seconds::FractionalSecondsError::Unhandled(inner) => Error::Unhandled(inner),
         306  +
            /* ServiceErrorGenerator.kt:204 */
  199    307   
        }
         308  +
        /* ServiceErrorGenerator.kt:203 */
  200    309   
    }
         310  +
    /* ServiceErrorGenerator.kt:202 */
  201    311   
}
         312  +
/* ServiceErrorGenerator.kt:174 */
  202    313   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::greeting_with_errors::GreetingWithErrorsError, R>> for Error
  203    314   
where
  204    315   
    R: Send + Sync + std::fmt::Debug + 'static,
  205    316   
{
         317  +
    /* ServiceErrorGenerator.kt:179 */
  206    318   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::greeting_with_errors::GreetingWithErrorsError, R>) -> Self {
         319  +
        /* ServiceErrorGenerator.kt:184 */
  207    320   
        match err {
         321  +
            /* ServiceErrorGenerator.kt:185 */
  208    322   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         323  +
            /* ServiceErrorGenerator.kt:186 */
  209    324   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  210    325   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  211    326   
                source: err.into(),
  212    327   
            }),
         328  +
            /* ServiceErrorGenerator.kt:184 */
  213    329   
        }
         330  +
        /* ServiceErrorGenerator.kt:179 */
  214    331   
    }
         332  +
    /* ServiceErrorGenerator.kt:174 */
  215    333   
}
         334  +
/* ServiceErrorGenerator.kt:202 */
  216    335   
impl From<crate::operation::greeting_with_errors::GreetingWithErrorsError> for Error {
         336  +
    /* ServiceErrorGenerator.kt:203 */
  217    337   
    fn from(err: crate::operation::greeting_with_errors::GreetingWithErrorsError) -> Self {
         338  +
        /* ServiceErrorGenerator.kt:204 */
  218    339   
        match err {
         340  +
            /* ServiceErrorGenerator.kt:207 */
  219    341   
            crate::operation::greeting_with_errors::GreetingWithErrorsError::InvalidGreeting(inner) => Error::InvalidGreeting(inner),
         342  +
            /* ServiceErrorGenerator.kt:207 */
  220    343   
            crate::operation::greeting_with_errors::GreetingWithErrorsError::ComplexError(inner) => Error::ComplexError(inner),
         344  +
            /* ServiceErrorGenerator.kt:207 */
  221    345   
            crate::operation::greeting_with_errors::GreetingWithErrorsError::FooError(inner) => Error::FooError(inner),
         346  +
            /* ServiceErrorGenerator.kt:212 */
  222    347   
            crate::operation::greeting_with_errors::GreetingWithErrorsError::Unhandled(inner) => Error::Unhandled(inner),
         348  +
            /* ServiceErrorGenerator.kt:204 */
  223    349   
        }
         350  +
        /* ServiceErrorGenerator.kt:203 */
  224    351   
    }
         352  +
    /* ServiceErrorGenerator.kt:202 */
  225    353   
}
         354  +
/* ServiceErrorGenerator.kt:174 */
  226    355   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::host_with_path_operation::HostWithPathOperationError, R>> for Error
  227    356   
where
  228    357   
    R: Send + Sync + std::fmt::Debug + 'static,
  229    358   
{
         359  +
    /* ServiceErrorGenerator.kt:179 */
  230    360   
    fn from(
  231    361   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::host_with_path_operation::HostWithPathOperationError, R>,
  232    362   
    ) -> Self {
         363  +
        /* ServiceErrorGenerator.kt:184 */
  233    364   
        match err {
         365  +
            /* ServiceErrorGenerator.kt:185 */
  234    366   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         367  +
            /* ServiceErrorGenerator.kt:186 */
  235    368   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  236    369   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  237    370   
                source: err.into(),
  238    371   
            }),
         372  +
            /* ServiceErrorGenerator.kt:184 */
  239    373   
        }
         374  +
        /* ServiceErrorGenerator.kt:179 */
  240    375   
    }
         376  +
    /* ServiceErrorGenerator.kt:174 */
  241    377   
}
         378  +
/* ServiceErrorGenerator.kt:202 */
  242    379   
impl From<crate::operation::host_with_path_operation::HostWithPathOperationError> for Error {
         380  +
    /* ServiceErrorGenerator.kt:203 */
  243    381   
    fn from(err: crate::operation::host_with_path_operation::HostWithPathOperationError) -> Self {
         382  +
        /* ServiceErrorGenerator.kt:204 */
  244    383   
        match err {
         384  +
            /* ServiceErrorGenerator.kt:212 */
  245    385   
            crate::operation::host_with_path_operation::HostWithPathOperationError::Unhandled(inner) => Error::Unhandled(inner),
         386  +
            /* ServiceErrorGenerator.kt:204 */
  246    387   
        }
         388  +
        /* ServiceErrorGenerator.kt:203 */
  247    389   
    }
         390  +
    /* ServiceErrorGenerator.kt:202 */
  248    391   
}
         392  +
/* ServiceErrorGenerator.kt:174 */
  249    393   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::json_enums::JsonEnumsError, R>> for Error
  250    394   
where
  251    395   
    R: Send + Sync + std::fmt::Debug + 'static,
  252    396   
{
         397  +
    /* ServiceErrorGenerator.kt:179 */
  253    398   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::json_enums::JsonEnumsError, R>) -> Self {
         399  +
        /* ServiceErrorGenerator.kt:184 */
  254    400   
        match err {
         401  +
            /* ServiceErrorGenerator.kt:185 */
  255    402   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         403  +
            /* ServiceErrorGenerator.kt:186 */
  256    404   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  257    405   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  258    406   
                source: err.into(),
  259    407   
            }),
         408  +
            /* ServiceErrorGenerator.kt:184 */
  260    409   
        }
         410  +
        /* ServiceErrorGenerator.kt:179 */
  261    411   
    }
         412  +
    /* ServiceErrorGenerator.kt:174 */
  262    413   
}
         414  +
/* ServiceErrorGenerator.kt:202 */
  263    415   
impl From<crate::operation::json_enums::JsonEnumsError> for Error {
         416  +
    /* ServiceErrorGenerator.kt:203 */
  264    417   
    fn from(err: crate::operation::json_enums::JsonEnumsError) -> Self {
         418  +
        /* ServiceErrorGenerator.kt:204 */
  265    419   
        match err {
         420  +
            /* ServiceErrorGenerator.kt:212 */
  266    421   
            crate::operation::json_enums::JsonEnumsError::Unhandled(inner) => Error::Unhandled(inner),
         422  +
            /* ServiceErrorGenerator.kt:204 */
  267    423   
        }
         424  +
        /* ServiceErrorGenerator.kt:203 */
  268    425   
    }
         426  +
    /* ServiceErrorGenerator.kt:202 */
  269    427   
}
         428  +
/* ServiceErrorGenerator.kt:174 */
  270    429   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::json_unions::JsonUnionsError, R>> for Error
  271    430   
where
  272    431   
    R: Send + Sync + std::fmt::Debug + 'static,
  273    432   
{
         433  +
    /* ServiceErrorGenerator.kt:179 */
  274    434   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::json_unions::JsonUnionsError, R>) -> Self {
         435  +
        /* ServiceErrorGenerator.kt:184 */
  275    436   
        match err {
         437  +
            /* ServiceErrorGenerator.kt:185 */
  276    438   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         439  +
            /* ServiceErrorGenerator.kt:186 */
  277    440   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  278    441   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  279    442   
                source: err.into(),
  280    443   
            }),
         444  +
            /* ServiceErrorGenerator.kt:184 */
  281    445   
        }
         446  +
        /* ServiceErrorGenerator.kt:179 */
  282    447   
    }
         448  +
    /* ServiceErrorGenerator.kt:174 */
  283    449   
}
         450  +
/* ServiceErrorGenerator.kt:202 */
  284    451   
impl From<crate::operation::json_unions::JsonUnionsError> for Error {
         452  +
    /* ServiceErrorGenerator.kt:203 */
  285    453   
    fn from(err: crate::operation::json_unions::JsonUnionsError) -> Self {
         454  +
        /* ServiceErrorGenerator.kt:204 */
  286    455   
        match err {
         456  +
            /* ServiceErrorGenerator.kt:212 */
  287    457   
            crate::operation::json_unions::JsonUnionsError::Unhandled(inner) => Error::Unhandled(inner),
         458  +
            /* ServiceErrorGenerator.kt:204 */
  288    459   
        }
         460  +
        /* ServiceErrorGenerator.kt:203 */
  289    461   
    }
         462  +
    /* ServiceErrorGenerator.kt:202 */
  290    463   
}
         464  +
/* ServiceErrorGenerator.kt:174 */
  291    465   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::kitchen_sink_operation::KitchenSinkOperationError, R>> for Error
  292    466   
where
  293    467   
    R: Send + Sync + std::fmt::Debug + 'static,
  294    468   
{
         469  +
    /* ServiceErrorGenerator.kt:179 */
  295    470   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::kitchen_sink_operation::KitchenSinkOperationError, R>) -> Self {
         471  +
        /* ServiceErrorGenerator.kt:184 */
  296    472   
        match err {
         473  +
            /* ServiceErrorGenerator.kt:185 */
  297    474   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         475  +
            /* ServiceErrorGenerator.kt:186 */
  298    476   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  299    477   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  300    478   
                source: err.into(),
  301    479   
            }),
         480  +
            /* ServiceErrorGenerator.kt:184 */
  302    481   
        }
         482  +
        /* ServiceErrorGenerator.kt:179 */
  303    483   
    }
         484  +
    /* ServiceErrorGenerator.kt:174 */
  304    485   
}
         486  +
/* ServiceErrorGenerator.kt:202 */
  305    487   
impl From<crate::operation::kitchen_sink_operation::KitchenSinkOperationError> for Error {
         488  +
    /* ServiceErrorGenerator.kt:203 */
  306    489   
    fn from(err: crate::operation::kitchen_sink_operation::KitchenSinkOperationError) -> Self {
         490  +
        /* ServiceErrorGenerator.kt:204 */
  307    491   
        match err {
         492  +
            /* ServiceErrorGenerator.kt:207 */
  308    493   
            crate::operation::kitchen_sink_operation::KitchenSinkOperationError::ErrorWithMembers(inner) => Error::ErrorWithMembers(inner),
         494  +
            /* ServiceErrorGenerator.kt:207 */
  309    495   
            crate::operation::kitchen_sink_operation::KitchenSinkOperationError::ErrorWithoutMembers(inner) => Error::ErrorWithoutMembers(inner),
         496  +
            /* ServiceErrorGenerator.kt:212 */
  310    497   
            crate::operation::kitchen_sink_operation::KitchenSinkOperationError::Unhandled(inner) => Error::Unhandled(inner),
         498  +
            /* ServiceErrorGenerator.kt:204 */
  311    499   
        }
         500  +
        /* ServiceErrorGenerator.kt:203 */
  312    501   
    }
         502  +
    /* ServiceErrorGenerator.kt:202 */
  313    503   
}
         504  +
/* ServiceErrorGenerator.kt:174 */
  314    505   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::null_operation::NullOperationError, R>> for Error
  315    506   
where
  316    507   
    R: Send + Sync + std::fmt::Debug + 'static,
  317    508   
{
         509  +
    /* ServiceErrorGenerator.kt:179 */
  318    510   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::null_operation::NullOperationError, R>) -> Self {
         511  +
        /* ServiceErrorGenerator.kt:184 */
  319    512   
        match err {
         513  +
            /* ServiceErrorGenerator.kt:185 */
  320    514   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         515  +
            /* ServiceErrorGenerator.kt:186 */
  321    516   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  322    517   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  323    518   
                source: err.into(),
  324    519   
            }),
         520  +
            /* ServiceErrorGenerator.kt:184 */
  325    521   
        }
         522  +
        /* ServiceErrorGenerator.kt:179 */
  326    523   
    }
         524  +
    /* ServiceErrorGenerator.kt:174 */
  327    525   
}
         526  +
/* ServiceErrorGenerator.kt:202 */
  328    527   
impl From<crate::operation::null_operation::NullOperationError> for Error {
         528  +
    /* ServiceErrorGenerator.kt:203 */
  329    529   
    fn from(err: crate::operation::null_operation::NullOperationError) -> Self {
         530  +
        /* ServiceErrorGenerator.kt:204 */
  330    531   
        match err {
         532  +
            /* ServiceErrorGenerator.kt:212 */
  331    533   
            crate::operation::null_operation::NullOperationError::Unhandled(inner) => Error::Unhandled(inner),
         534  +
            /* ServiceErrorGenerator.kt:204 */
  332    535   
        }
         536  +
        /* ServiceErrorGenerator.kt:203 */
  333    537   
    }
         538  +
    /* ServiceErrorGenerator.kt:202 */
  334    539   
}
         540  +
/* ServiceErrorGenerator.kt:174 */
  335    541   
impl<R>
  336    542   
    From<
  337    543   
        ::aws_smithy_runtime_api::client::result::SdkError<
  338    544   
            crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError,
  339    545   
            R,
  340    546   
        >,
  341    547   
    > for Error
  342    548   
where
  343    549   
    R: Send + Sync + std::fmt::Debug + 'static,
  344    550   
{
         551  +
    /* ServiceErrorGenerator.kt:179 */
  345    552   
    fn from(
  346    553   
        err: ::aws_smithy_runtime_api::client::result::SdkError<
  347    554   
            crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError,
  348    555   
            R,
  349    556   
        >,
  350    557   
    ) -> Self {
         558  +
        /* ServiceErrorGenerator.kt:184 */
  351    559   
        match err {
         560  +
            /* ServiceErrorGenerator.kt:185 */
  352    561   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         562  +
            /* ServiceErrorGenerator.kt:186 */
  353    563   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  354    564   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  355    565   
                source: err.into(),
  356    566   
            }),
         567  +
            /* ServiceErrorGenerator.kt:184 */
  357    568   
        }
         569  +
        /* ServiceErrorGenerator.kt:179 */
  358    570   
    }
         571  +
    /* ServiceErrorGenerator.kt:174 */
  359    572   
}
         573  +
/* ServiceErrorGenerator.kt:202 */
  360    574   
impl From<crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError> for Error {
         575  +
    /* ServiceErrorGenerator.kt:203 */
  361    576   
    fn from(err: crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError) -> Self {
         577  +
        /* ServiceErrorGenerator.kt:204 */
  362    578   
        match err {
         579  +
            /* ServiceErrorGenerator.kt:212 */
  363    580   
            crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError::Unhandled(inner) => {
  364    581   
                Error::Unhandled(inner)
  365    582   
            }
         583  +
            /* ServiceErrorGenerator.kt:204 */
  366    584   
        }
         585  +
        /* ServiceErrorGenerator.kt:203 */
  367    586   
    }
         587  +
    /* ServiceErrorGenerator.kt:202 */
  368    588   
}
         589  +
/* ServiceErrorGenerator.kt:174 */
  369    590   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError, R>>
  370    591   
    for Error
  371    592   
where
  372    593   
    R: Send + Sync + std::fmt::Debug + 'static,
  373    594   
{
         595  +
    /* ServiceErrorGenerator.kt:179 */
  374    596   
    fn from(
  375    597   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError, R>,
  376    598   
    ) -> Self {
         599  +
        /* ServiceErrorGenerator.kt:184 */
  377    600   
        match err {
         601  +
            /* ServiceErrorGenerator.kt:185 */
  378    602   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         603  +
            /* ServiceErrorGenerator.kt:186 */
  379    604   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  380    605   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  381    606   
                source: err.into(),
  382    607   
            }),
         608  +
            /* ServiceErrorGenerator.kt:184 */
  383    609   
        }
         610  +
        /* ServiceErrorGenerator.kt:179 */
  384    611   
    }
         612  +
    /* ServiceErrorGenerator.kt:174 */
  385    613   
}
         614  +
/* ServiceErrorGenerator.kt:202 */
  386    615   
impl From<crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError> for Error {
         616  +
    /* ServiceErrorGenerator.kt:203 */
  387    617   
    fn from(err: crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError) -> Self {
         618  +
        /* ServiceErrorGenerator.kt:204 */
  388    619   
        match err {
         620  +
            /* ServiceErrorGenerator.kt:212 */
  389    621   
            crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError::Unhandled(inner) => Error::Unhandled(inner),
         622  +
            /* ServiceErrorGenerator.kt:204 */
  390    623   
        }
         624  +
        /* ServiceErrorGenerator.kt:203 */
  391    625   
    }
         626  +
    /* ServiceErrorGenerator.kt:202 */
  392    627   
}
         628  +
/* ServiceErrorGenerator.kt:174 */
  393    629   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_with_content_encoding::PutWithContentEncodingError, R>>
  394    630   
    for Error
  395    631   
where
  396    632   
    R: Send + Sync + std::fmt::Debug + 'static,
  397    633   
{
         634  +
    /* ServiceErrorGenerator.kt:179 */
  398    635   
    fn from(
  399    636   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_with_content_encoding::PutWithContentEncodingError, R>,
  400    637   
    ) -> Self {
         638  +
        /* ServiceErrorGenerator.kt:184 */
  401    639   
        match err {
         640  +
            /* ServiceErrorGenerator.kt:185 */
  402    641   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         642  +
            /* ServiceErrorGenerator.kt:186 */
  403    643   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  404    644   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  405    645   
                source: err.into(),
  406    646   
            }),
         647  +
            /* ServiceErrorGenerator.kt:184 */
  407    648   
        }
         649  +
        /* ServiceErrorGenerator.kt:179 */
  408    650   
    }
         651  +
    /* ServiceErrorGenerator.kt:174 */
  409    652   
}
         653  +
/* ServiceErrorGenerator.kt:202 */
  410    654   
impl From<crate::operation::put_with_content_encoding::PutWithContentEncodingError> for Error {
         655  +
    /* ServiceErrorGenerator.kt:203 */
  411    656   
    fn from(err: crate::operation::put_with_content_encoding::PutWithContentEncodingError) -> Self {
         657  +
        /* ServiceErrorGenerator.kt:204 */
  412    658   
        match err {
         659  +
            /* ServiceErrorGenerator.kt:212 */
  413    660   
            crate::operation::put_with_content_encoding::PutWithContentEncodingError::Unhandled(inner) => Error::Unhandled(inner),
         661  +
            /* ServiceErrorGenerator.kt:204 */
  414    662   
        }
         663  +
        /* ServiceErrorGenerator.kt:203 */
  415    664   
    }
         665  +
    /* ServiceErrorGenerator.kt:202 */
  416    666   
}
         667  +
/* ServiceErrorGenerator.kt:174 */
  417    668   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::simple_scalar_properties::SimpleScalarPropertiesError, R>> for Error
  418    669   
where
  419    670   
    R: Send + Sync + std::fmt::Debug + 'static,
  420    671   
{
         672  +
    /* ServiceErrorGenerator.kt:179 */
  421    673   
    fn from(
  422    674   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::simple_scalar_properties::SimpleScalarPropertiesError, R>,
  423    675   
    ) -> Self {
         676  +
        /* ServiceErrorGenerator.kt:184 */
  424    677   
        match err {
         678  +
            /* ServiceErrorGenerator.kt:185 */
  425    679   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         680  +
            /* ServiceErrorGenerator.kt:186 */
  426    681   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  427    682   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  428    683   
                source: err.into(),
  429    684   
            }),
         685  +
            /* ServiceErrorGenerator.kt:184 */
  430    686   
        }
         687  +
        /* ServiceErrorGenerator.kt:179 */
  431    688   
    }
         689  +
    /* ServiceErrorGenerator.kt:174 */
  432    690   
}
         691  +
/* ServiceErrorGenerator.kt:202 */
  433    692   
impl From<crate::operation::simple_scalar_properties::SimpleScalarPropertiesError> for Error {
         693  +
    /* ServiceErrorGenerator.kt:203 */
  434    694   
    fn from(err: crate::operation::simple_scalar_properties::SimpleScalarPropertiesError) -> Self {
         695  +
        /* ServiceErrorGenerator.kt:204 */
  435    696   
        match err {
         697  +
            /* ServiceErrorGenerator.kt:212 */
  436    698   
            crate::operation::simple_scalar_properties::SimpleScalarPropertiesError::Unhandled(inner) => Error::Unhandled(inner),
         699  +
            /* ServiceErrorGenerator.kt:204 */
  437    700   
        }
         701  +
        /* ServiceErrorGenerator.kt:203 */
  438    702   
    }
         703  +
    /* ServiceErrorGenerator.kt:202 */
  439    704   
}
         705  +
/* ServiceErrorGenerator.kt:174 */
  440    706   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::sparse_nulls_operation::SparseNullsOperationError, R>> for Error
  441    707   
where
  442    708   
    R: Send + Sync + std::fmt::Debug + 'static,
  443    709   
{
         710  +
    /* ServiceErrorGenerator.kt:179 */
  444    711   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::sparse_nulls_operation::SparseNullsOperationError, R>) -> Self {
         712  +
        /* ServiceErrorGenerator.kt:184 */
  445    713   
        match err {
         714  +
            /* ServiceErrorGenerator.kt:185 */
  446    715   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         716  +
            /* ServiceErrorGenerator.kt:186 */
  447    717   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  448    718   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  449    719   
                source: err.into(),
  450    720   
            }),
         721  +
            /* ServiceErrorGenerator.kt:184 */
  451    722   
        }
         723  +
        /* ServiceErrorGenerator.kt:179 */
  452    724   
    }
         725  +
    /* ServiceErrorGenerator.kt:174 */
  453    726   
}
         727  +
/* ServiceErrorGenerator.kt:202 */
  454    728   
impl From<crate::operation::sparse_nulls_operation::SparseNullsOperationError> for Error {
         729  +
    /* ServiceErrorGenerator.kt:203 */
  455    730   
    fn from(err: crate::operation::sparse_nulls_operation::SparseNullsOperationError) -> Self {
         731  +
        /* ServiceErrorGenerator.kt:204 */
  456    732   
        match err {
         733  +
            /* ServiceErrorGenerator.kt:212 */
  457    734   
            crate::operation::sparse_nulls_operation::SparseNullsOperationError::Unhandled(inner) => Error::Unhandled(inner),
         735  +
            /* ServiceErrorGenerator.kt:204 */
  458    736   
        }
         737  +
        /* ServiceErrorGenerator.kt:203 */
  459    738   
    }
         739  +
    /* ServiceErrorGenerator.kt:202 */
  460    740   
}
         741  +
/* ServiceErrorGenerator.kt:115 */
  461    742   
impl ::std::error::Error for Error {
         743  +
    /* ServiceErrorGenerator.kt:116 */
  462    744   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         745  +
        /* ServiceErrorGenerator.kt:117 */
  463    746   
        match self {
  464         -
            Error::ComplexError(inner) => inner.source(),
  465         -
            Error::ErrorWithMembers(inner) => inner.source(),
  466         -
            Error::ErrorWithoutMembers(inner) => inner.source(),
  467         -
            Error::FooError(inner) => inner.source(),
  468         -
            Error::InvalidGreeting(inner) => inner.source(),
  469         -
            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
         747  +
            /* ServiceErrorGenerator.kt:119 */ Error::ComplexError(inner) => inner.source(),
         748  +
            /* ServiceErrorGenerator.kt:119 */ Error::ErrorWithMembers(inner) => inner.source(),
         749  +
            /* ServiceErrorGenerator.kt:119 */ Error::ErrorWithoutMembers(inner) => inner.source(),
         750  +
            /* ServiceErrorGenerator.kt:119 */ Error::FooError(inner) => inner.source(),
         751  +
            /* ServiceErrorGenerator.kt:119 */ Error::InvalidGreeting(inner) => inner.source(),
         752  +
            /* ServiceErrorGenerator.kt:121 */
         753  +
            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source), /* ServiceErrorGenerator.kt:117 */
  470    754   
        }
         755  +
        /* ServiceErrorGenerator.kt:116 */
  471    756   
    }
         757  +
    /* ServiceErrorGenerator.kt:115 */
  472    758   
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/lib.rs

@@ -18,18 +132,142 @@
   38     38   
//! The [`operation`](crate::operation) module has a submodule for every API, and in each submodule
   39     39   
//! is the input, output, and error type for that API, as well as builders to construct each of those.
   40     40   
//!
   41     41   
//! There is a top-level [`Error`](crate::Error) type that encompasses all the errors that the
   42     42   
//! client can return. Any other error type can be converted to this `Error` type via the
   43     43   
//! [`From`](std::convert::From) trait.
   44     44   
//!
   45     45   
//! The other modules within this crate are not required for normal usage.
   46     46   
   47     47   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
          48  +
/* ServiceErrorGenerator.kt:127 */
   48     49   
pub use error_meta::Error;
   49     50   
          51  +
/* RustType.kt:516 */
   50     52   
#[doc(inline)]
          53  +
/* ServiceGenerator.kt:63 */
   51     54   
pub use config::Config;
   52     55   
   53         -
/// Client for calling Sample Json 1.1 Protocol Service.
          56  +
/// /* FluentClientDocs.kt:24 */Client for calling Sample Json 1.1 Protocol Service.
   54     57   
///
   55     58   
/// ## Constructing a `Client`
   56     59   
///
   57     60   
/// A `Client` requires a config in order to be constructed. With the default set of Cargo features,
   58     61   
/// this config will only require an endpoint to produce a functioning client. However, some Smithy
   59     62   
/// features will require additional configuration. For example, `@auth` requires some kind of identity
   60     63   
/// or identity resolver to be configured. The config is used to customize various aspects of the client,
   61     64   
/// such as:
   62     65   
///
   63     66   
///   - [The underlying HTTP client](crate::config::Builder::http_client)
   64     67   
///   - [Retries](crate::config::Builder::retry_config)
   65     68   
///   - [Timeouts](crate::config::Builder::timeout_config)
   66     69   
///   - [... and more](crate::config::Builder)
   67     70   
///
   68     71   
/// Below is a minimal example of how to create a client:
   69     72   
///
   70     73   
/// ```rust,no_run
   71     74   
/// let config = json_rpc11::Config::builder()
   72     75   
///     .endpoint_url("http://localhost:1234")
   73     76   
///     .build();
   74     77   
/// let client = json_rpc11::Client::from_conf(config);
   75     78   
/// ```
   76     79   
///
   77     80   
/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should be done
   78     81   
/// once at application start-up. Cloning a client is cheap (it's just an [`Arc`](std::sync::Arc) under the hood),
   79     82   
/// so creating it once at start-up and cloning it around the application as needed is recommended.
   80         -
/// # Using the `Client`
          83  +
/// /* FluentClientDocs.kt:79 */# Using the `Client`
   81     84   
///
   82     85   
/// A client has a function for every operation that can be performed by the service.
   83     86   
/// For example, the [`EndpointWithHostLabelOperation`](crate::operation::endpoint_with_host_label_operation) operation has
   84     87   
/// a [`Client::endpoint_with_host_label_operation`], function which returns a builder for that operation.
   85     88   
/// The fluent builder ultimately has a `send()` function that returns an async future that
   86     89   
/// returns a result, as illustrated below:
   87     90   
///
   88     91   
/// ```rust,ignore
   89     92   
/// let result = client.endpoint_with_host_label_operation()
   90     93   
///     .label("example")
   91     94   
///     .send()
   92     95   
///     .await;
   93     96   
/// ```
   94     97   
///
   95     98   
/// The underlying HTTP requests that get made by this can be modified with the `customize_operation`
   96     99   
/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more
   97    100   
/// information.
   98    101   
pub mod client;
   99    102   
  100         -
/// Configuration for Sample Json 1.1 Protocol Service.
         103  +
/// /* ClientRustModule.kt:121 */Configuration for Sample Json 1.1 Protocol Service.
  101    104   
pub mod config;
  102    105   
  103         -
/// Common errors and error handling utilities.
         106  +
/// /* ClientRustModule.kt:121 */Common errors and error handling utilities.
  104    107   
pub mod error;
  105    108   
         109  +
/* RustModule.kt:172 */
  106    110   
mod error_meta;
  107    111   
  108         -
/// Information about this crate.
         112  +
/// /* ClientRustModule.kt:121 */Information about this crate.
  109    113   
pub mod meta;
  110    114   
  111         -
/// Primitives such as `Blob` or `DateTime` used by other types.
         115  +
/// /* ClientRustModule.kt:121 */Primitives such as `Blob` or `DateTime` used by other types.
  112    116   
pub mod primitives;
  113    117   
  114         -
/// Data structures used by operation inputs/outputs.
         118  +
/// /* ClientRustModule.kt:121 */Data structures used by operation inputs/outputs.
  115    119   
pub mod types;
  116    120   
         121  +
/* RustModule.kt:172 */
  117    122   
mod auth_plugin;
  118    123   
         124  +
/* RustModule.kt:172 */
  119    125   
mod client_request_compression;
  120    126   
  121         -
/// All operations that this crate can perform.
         127  +
/// /* ClientRustModule.kt:121 */All operations that this crate can perform.
  122    128   
pub mod operation;
  123    129   
  124    130   
pub(crate) mod protocol_serde;
  125    131   
         132  +
/* RustModule.kt:172 */
  126    133   
mod sdk_feature_tracker;
  127    134   
         135  +
/* RustModule.kt:172 */
  128    136   
mod serialization_settings;
  129    137   
         138  +
/* RustModule.kt:172 */
  130    139   
mod json_errors;
  131    140   
         141  +
/* FluentClientDecorator.kt:76 */
  132    142   
pub use client::Client;

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/meta.rs

@@ -1,1 +4,5 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
           3  +
/* CrateVersionCustomization.kt:23 */
    3      4   
/// Crate version number.
    4      5   
pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION");

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation.rs

@@ -1,1 +52,52 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Types for the `ContentTypeParameters` operation.
           2  +
/* CodegenDelegator.kt:51 */
           3  +
/// /* CodegenDelegator.kt:51 */Types for the `ContentTypeParameters` operation.
    4      4   
pub mod content_type_parameters;
    5      5   
    6         -
/// Types for the `DatetimeOffsets` operation.
           6  +
/// /* CodegenDelegator.kt:51 */Types for the `DatetimeOffsets` operation.
    7      7   
pub mod datetime_offsets;
    8      8   
    9         -
/// Types for the `EmptyOperation` operation.
           9  +
/// /* CodegenDelegator.kt:51 */Types for the `EmptyOperation` operation.
   10     10   
pub mod empty_operation;
   11     11   
   12         -
/// Types for the `EndpointOperation` operation.
          12  +
/// /* CodegenDelegator.kt:51 */Types for the `EndpointOperation` operation.
   13     13   
pub mod endpoint_operation;
   14     14   
   15         -
/// Types for the `EndpointWithHostLabelOperation` operation.
          15  +
/// /* CodegenDelegator.kt:51 */Types for the `EndpointWithHostLabelOperation` operation.
   16     16   
pub mod endpoint_with_host_label_operation;
   17     17   
   18         -
/// Types for the `FractionalSeconds` operation.
          18  +
/// /* CodegenDelegator.kt:51 */Types for the `FractionalSeconds` operation.
   19     19   
pub mod fractional_seconds;
   20     20   
   21         -
/// Types for the `GreetingWithErrors` operation.
          21  +
/// /* CodegenDelegator.kt:51 */Types for the `GreetingWithErrors` operation.
   22     22   
pub mod greeting_with_errors;
   23     23   
   24         -
/// Types for the `HostWithPathOperation` operation.
          24  +
/// /* CodegenDelegator.kt:51 */Types for the `HostWithPathOperation` operation.
   25     25   
pub mod host_with_path_operation;
   26     26   
   27         -
/// Types for the `JsonEnums` operation.
          27  +
/// /* CodegenDelegator.kt:51 */Types for the `JsonEnums` operation.
   28     28   
pub mod json_enums;
   29     29   
   30         -
/// Types for the `JsonUnions` operation.
          30  +
/// /* CodegenDelegator.kt:51 */Types for the `JsonUnions` operation.
   31     31   
pub mod json_unions;
   32     32   
   33         -
/// Types for the `KitchenSinkOperation` operation.
          33  +
/// /* CodegenDelegator.kt:51 */Types for the `KitchenSinkOperation` operation.
   34     34   
pub mod kitchen_sink_operation;
   35     35   
   36         -
/// Types for the `NullOperation` operation.
          36  +
/// /* CodegenDelegator.kt:51 */Types for the `NullOperation` operation.
   37     37   
pub mod null_operation;
   38     38   
   39         -
/// Types for the `OperationWithOptionalInputOutput` operation.
          39  +
/// /* CodegenDelegator.kt:51 */Types for the `OperationWithOptionalInputOutput` operation.
   40     40   
pub mod operation_with_optional_input_output;
   41     41   
   42         -
/// Types for the `PutAndGetInlineDocuments` operation.
          42  +
/// /* CodegenDelegator.kt:51 */Types for the `PutAndGetInlineDocuments` operation.
   43     43   
pub mod put_and_get_inline_documents;
   44     44   
   45         -
/// Types for the `PutWithContentEncoding` operation.
          45  +
/// /* CodegenDelegator.kt:51 */Types for the `PutWithContentEncoding` operation.
   46     46   
pub mod put_with_content_encoding;
   47     47   
   48         -
/// Types for the `SimpleScalarProperties` operation.
          48  +
/// /* CodegenDelegator.kt:51 */Types for the `SimpleScalarProperties` operation.
   49     49   
pub mod simple_scalar_properties;
   50     50   
   51         -
/// Types for the `SparseNullsOperation` operation.
          51  +
/// /* CodegenDelegator.kt:51 */Types for the `SparseNullsOperation` operation.
   52     52   
pub mod sparse_nulls_operation;

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/content_type_parameters.rs

@@ -1,1 +40,49 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* OperationGenerator.kt:77 */
    2      3   
/// Orchestration and serialization glue logic for `ContentTypeParameters`.
           4  +
/* RustType.kt:516 */
    3      5   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           6  +
/* RustType.kt:516 */
    4      7   
#[non_exhaustive]
           8  +
/* OperationGenerator.kt:84 */
    5      9   
pub struct ContentTypeParameters;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl ContentTypeParameters {
    7         -
    /// Creates a new `ContentTypeParameters`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `ContentTypeParameters`
          13  +
    /* OperationGenerator.kt:87 */
    8     14   
    pub fn new() -> Self {
          15  +
        /* OperationGenerator.kt:88 */
    9     16   
        Self
          17  +
        /* OperationGenerator.kt:87 */
   10     18   
    }
          19  +
    /* OperationGenerator.kt:138 */
   11     20   
    pub(crate) async fn orchestrate(
   12     21   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     22   
        input: crate::operation::content_type_parameters::ContentTypeParametersInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::content_type_parameters::ContentTypeParametersError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +342,413 @@
   83     92   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   84     93   
            }
   85     94   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   86     95   
                config_override,
   87     96   
                client_config.config.clone(),
   88     97   
                &client_config.runtime_components,
   89     98   
            ));
   90     99   
        }
   91    100   
        runtime_plugins
   92    101   
    }
         102  +
    /* OperationGenerator.kt:85 */
   93    103   
}
         104  +
/* OperationRuntimePluginGenerator.kt:55 */
   94    105   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ContentTypeParameters {
   95    106   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   96    107   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ContentTypeParameters");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            ContentTypeParametersRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            ContentTypeParametersResponseDeserializer,
  103    114   
        ));
  104    115   
  105    116   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  106    117   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  107    118   
        ));
  108    119   
  109    120   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  110    121   
            "ContentTypeParameters",
  111    122   
            "Json Protocol",
  112    123   
        ));
  113    124   
  114    125   
        ::std::option::Option::Some(cfg.freeze())
  115    126   
    }
  116    127   
  117    128   
    fn runtime_components(
  118    129   
        &self,
  119    130   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  120    131   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  121    132   
        #[allow(unused_mut)]
  122    133   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ContentTypeParameters")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(ContentTypeParametersEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::content_type_parameters::ContentTypeParametersError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::content_type_parameters::ContentTypeParametersError,
  130    141   
            >::new());
  131    142   
  132    143   
        ::std::borrow::Cow::Owned(rcb)
  133    144   
    }
  134    145   
}
  135    146   
         147  +
/* ResponseDeserializerGenerator.kt:64 */
  136    148   
#[derive(Debug)]
  137    149   
struct ContentTypeParametersResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ContentTypeParametersResponseDeserializer {
  139    151   
    fn deserialize_nonstreaming(
  140    152   
        &self,
  141    153   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  142    154   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  143    155   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  144    156   
        let headers = response.headers();
  145    157   
        let body = response.body().bytes().expect("body loaded");
  146    158   
        #[allow(unused_mut)]
  147    159   
        let mut force_error = false;
  148    160   
  149    161   
        let parse_result = if !success && status != 200 || force_error {
  150    162   
            crate::protocol_serde::shape_content_type_parameters::de_content_type_parameters_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_content_type_parameters::de_content_type_parameters_http_response(status, headers, body)
  153    165   
        };
  154    166   
        crate::protocol_serde::type_erase_result(parse_result)
  155    167   
    }
  156    168   
}
         169  +
/* RequestSerializerGenerator.kt:67 */
  157    170   
#[derive(Debug)]
  158    171   
struct ContentTypeParametersRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ContentTypeParametersRequestSerializer {
  160    173   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  161    174   
    fn serialize_input(
  162    175   
        &self,
  163    176   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  164    177   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  165    178   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  166    179   
        let input = input
  167    180   
            .downcast::<crate::operation::content_type_parameters::ContentTypeParametersInput>()
  168    181   
            .expect("correct type");
  169    182   
        let _header_serialization_settings = _cfg
  170    183   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  171    184   
            .cloned()
  172    185   
            .unwrap_or_default();
  173    186   
        let mut request_builder = {
  174    187   
            fn uri_base(
  175    188   
                _input: &crate::operation::content_type_parameters::ContentTypeParametersInput,
  176    189   
                output: &mut ::std::string::String,
  177    190   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  178    191   
                use ::std::fmt::Write as _;
  179    192   
                ::std::write!(output, "/").expect("formatting should succeed");
  180    193   
                ::std::result::Result::Ok(())
  181    194   
            }
  182    195   
            #[allow(clippy::unnecessary_wraps)]
  183    196   
            fn update_http_builder(
  184    197   
                input: &crate::operation::content_type_parameters::ContentTypeParametersInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  190    203   
            }
  191    204   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  192    205   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  193    206   
            builder = _header_serialization_settings.set_default_header(
  194    207   
                builder,
  195    208   
                ::http::header::HeaderName::from_static("x-amz-target"),
  196    209   
                "JsonProtocol.ContentTypeParameters",
  197    210   
            );
  198    211   
            builder
  199    212   
        };
  200    213   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_content_type_parameters::ser_content_type_parameters_input(
  201    214   
            &input,
  202    215   
        )?);
  203    216   
        if let Some(content_length) = body.content_length() {
  204    217   
            let content_length = content_length.to_string();
  205    218   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  206    219   
        }
  207    220   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  208    221   
    }
  209    222   
}
         223  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  210    224   
#[derive(Debug)]
  211    225   
struct ContentTypeParametersEndpointParamsInterceptor;
  212    226   
  213    227   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ContentTypeParametersEndpointParamsInterceptor {
  214    228   
    fn name(&self) -> &'static str {
  215    229   
        "ContentTypeParametersEndpointParamsInterceptor"
  216    230   
    }
  217    231   
  218    232   
    fn read_before_execution(
  219    233   
        &self,
  220    234   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  221    235   
            '_,
  222    236   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  223    237   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  224    238   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  225    239   
        >,
  226    240   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  227    241   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  228    242   
        let _input = context
  229    243   
            .input()
  230    244   
            .downcast_ref::<ContentTypeParametersInput>()
  231    245   
            .ok_or("failed to downcast to ContentTypeParametersInput")?;
  232    246   
  233    247   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  234    248   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  235    249   
        })?;
  236    250   
        cfg.interceptor_state()
  237    251   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  238    252   
        ::std::result::Result::Ok(())
  239    253   
    }
  240    254   
}
  241    255   
  242    256   
// The get_* functions below are generated from JMESPath expressions in the
  243    257   
// operationContextParams trait. They target the operation's input shape.
  244    258   
         259  +
/* OperationErrorGenerator.kt:79 */
  245    260   
/// Error type for the `ContentTypeParametersError` operation.
         261  +
/* RustType.kt:516 */
  246    262   
#[non_exhaustive]
         263  +
/* RustType.kt:516 */
  247    264   
#[derive(::std::fmt::Debug)]
  248         -
pub enum ContentTypeParametersError {
         265  +
pub /* OperationErrorGenerator.kt:81 */ enum ContentTypeParametersError {
         266  +
    /* OperationErrorGenerator.kt:88 */
  249    267   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  250    268   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  251    269   
    variable wildcard pattern and check `.code()`:
  252    270   
     \
  253    271   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  254    272   
     \
  255    273   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ContentTypeParametersError) for what information is available for the error.")]
  256    274   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         275  +
    /* OperationErrorGenerator.kt:81 */
  257    276   
}
         277  +
/* OperationErrorGenerator.kt:218 */
  258    278   
impl ContentTypeParametersError {
         279  +
    /* OperationErrorGenerator.kt:219 */
  259    280   
    /// Creates the `ContentTypeParametersError::Unhandled` variant from any error type.
  260    281   
    pub fn unhandled(
  261    282   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  262    283   
    ) -> Self {
  263    284   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  264    285   
            source: err.into(),
  265    286   
            meta: ::std::default::Default::default(),
  266    287   
        })
  267    288   
    }
  268    289   
  269    290   
    /// Creates the `ContentTypeParametersError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  270    291   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  271    292   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  272    293   
            source: err.clone().into(),
  273    294   
            meta: err,
  274    295   
        })
  275    296   
    }
  276         -
    ///
         297  +
    /// /* OperationErrorGenerator.kt:236 */
  277    298   
    /// Returns error metadata, which includes the error code, message,
  278    299   
    /// request ID, and potentially additional information.
  279    300   
    ///
         301  +
    /* OperationErrorGenerator.kt:242 */
  280    302   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         303  +
        /* OperationErrorGenerator.kt:243 */
  281    304   
        match self {
  282         -
            Self::Unhandled(e) => &e.meta,
         305  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         306  +
            /* OperationErrorGenerator.kt:243 */
  283    307   
        }
         308  +
        /* OperationErrorGenerator.kt:242 */
  284    309   
    }
         310  +
    /* OperationErrorGenerator.kt:218 */
  285    311   
}
         312  +
/* OperationErrorGenerator.kt:269 */
  286    313   
impl ::std::error::Error for ContentTypeParametersError {
         314  +
    /* OperationErrorGenerator.kt:270 */
  287    315   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         316  +
        /* OperationErrorGenerator.kt:318 */
  288    317   
        match self {
  289         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         318  +
            /* OperationErrorGenerator.kt:326 */
         319  +
            Self::Unhandled(_inner) => {
         320  +
                /* OperationErrorGenerator.kt:279 */
         321  +
                ::std::option::Option::Some(&*_inner.source)
         322  +
                /* OperationErrorGenerator.kt:326 */
         323  +
            } /* OperationErrorGenerator.kt:318 */
  290    324   
        }
         325  +
        /* OperationErrorGenerator.kt:270 */
  291    326   
    }
         327  +
    /* OperationErrorGenerator.kt:269 */
  292    328   
}
         329  +
/* OperationErrorGenerator.kt:133 */
  293    330   
impl ::std::fmt::Display for ContentTypeParametersError {
         331  +
    /* OperationErrorGenerator.kt:134 */
  294    332   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         333  +
        /* OperationErrorGenerator.kt:318 */
  295    334   
        match self {
         335  +
            /* OperationErrorGenerator.kt:326 */
  296    336   
            Self::Unhandled(_inner) => {
         337  +
                /* OperationErrorGenerator.kt:139 */
  297    338   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  298    339   
                    write!(f, "unhandled error ({code})")
  299    340   
                } else {
  300    341   
                    f.write_str("unhandled error")
  301    342   
                }
  302         -
            }
         343  +
                /* OperationErrorGenerator.kt:326 */
         344  +
            } /* OperationErrorGenerator.kt:318 */
  303    345   
        }
         346  +
        /* OperationErrorGenerator.kt:134 */
  304    347   
    }
         348  +
    /* OperationErrorGenerator.kt:133 */
  305    349   
}
         350  +
/* OperationErrorGenerator.kt:182 */
  306    351   
impl ::aws_smithy_types::retry::ProvideErrorKind for ContentTypeParametersError {
         352  +
    /* OperationErrorGenerator.kt:186 */
  307    353   
    fn code(&self) -> ::std::option::Option<&str> {
         354  +
        /* OperationErrorGenerator.kt:187 */
  308    355   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         356  +
        /* OperationErrorGenerator.kt:186 */
  309    357   
    }
         358  +
    /* OperationErrorGenerator.kt:190 */
  310    359   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         360  +
        /* OperationErrorGenerator.kt:197 */
  311    361   
        ::std::option::Option::None
         362  +
        /* OperationErrorGenerator.kt:190 */
  312    363   
    }
         364  +
    /* OperationErrorGenerator.kt:182 */
  313    365   
}
         366  +
/* OperationErrorGenerator.kt:163 */
  314    367   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ContentTypeParametersError {
         368  +
    /* OperationErrorGenerator.kt:164 */
  315    369   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         370  +
        /* OperationErrorGenerator.kt:318 */
  316    371   
        match self {
  317         -
            Self::Unhandled(_inner) => &_inner.meta,
         372  +
            /* OperationErrorGenerator.kt:326 */
         373  +
            Self::Unhandled(_inner) => {
         374  +
                /* OperationErrorGenerator.kt:168 */
         375  +
                &_inner.meta
         376  +
                /* OperationErrorGenerator.kt:326 */
         377  +
            } /* OperationErrorGenerator.kt:318 */
  318    378   
        }
         379  +
        /* OperationErrorGenerator.kt:164 */
  319    380   
    }
         381  +
    /* OperationErrorGenerator.kt:163 */
  320    382   
}
         383  +
/* OperationErrorGenerator.kt:109 */
  321    384   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ContentTypeParametersError {
         385  +
    /* OperationErrorGenerator.kt:110 */
  322    386   
    fn create_unhandled_error(
  323    387   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  324    388   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  325    389   
    ) -> Self {
         390  +
        /* OperationErrorGenerator.kt:121 */
  326    391   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  327    392   
            source,
  328    393   
            meta: meta.unwrap_or_default(),
  329    394   
        })
         395  +
        /* OperationErrorGenerator.kt:110 */
  330    396   
    }
         397  +
    /* OperationErrorGenerator.kt:109 */
  331    398   
}
  332    399   
         400  +
/* CodegenDelegator.kt:255 */
  333    401   
pub use crate::operation::content_type_parameters::_content_type_parameters_output::ContentTypeParametersOutput;
  334    402   
         403  +
/* CodegenDelegator.kt:255 */
  335    404   
pub use crate::operation::content_type_parameters::_content_type_parameters_input::ContentTypeParametersInput;
  336    405   
         406  +
/* RustModule.kt:172 */
  337    407   
mod _content_type_parameters_input;
  338    408   
         409  +
/* RustModule.kt:172 */
  339    410   
mod _content_type_parameters_output;
  340    411   
  341         -
/// Builders
         412  +
/// /* CodegenDelegator.kt:51 */Builders
  342    413   
pub mod builders;

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/content_type_parameters/_content_type_parameters_input.rs

@@ -1,1 +50,94 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct ContentTypeParametersInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct ContentTypeParametersInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub value: ::std::option::Option<i32>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl ContentTypeParametersInput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn value(&self) -> ::std::option::Option<i32> {
          20  +
        /* StructureGenerator.kt:168 */
   12     21   
        self.value
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl ContentTypeParametersInput {
   16         -
    /// Creates a new builder-style object to manufacture [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct ContentTypeParametersInputBuilder {
   26         -
    pub(crate) value: ::std::option::Option<i32>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) value: ::std::option::Option<i32>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl ContentTypeParametersInputBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* BuilderGenerator.kt:291 */
   30     53   
    pub fn value(mut self, input: i32) -> Self {
          54  +
        /* BuilderGenerator.kt:292 */
   31     55   
        self.value = ::std::option::Option::Some(input);
          56  +
        /* BuilderGenerator.kt:293 */
   32     57   
        self
          58  +
        /* BuilderGenerator.kt:291 */
   33     59   
    }
          60  +
    /* BuilderGenerator.kt:312 */
   34     61   
    #[allow(missing_docs)] // documentation missing in model
          62  +
                           /* BuilderGenerator.kt:314 */
   35     63   
    pub fn set_value(mut self, input: ::std::option::Option<i32>) -> Self {
          64  +
        /* BuilderGenerator.kt:315 */
   36     65   
        self.value = input;
   37     66   
        self
          67  +
        /* BuilderGenerator.kt:314 */
   38     68   
    }
          69  +
    /* BuilderGenerator.kt:334 */
   39     70   
    #[allow(missing_docs)] // documentation missing in model
          71  +
                           /* BuilderGenerator.kt:336 */
   40     72   
    pub fn get_value(&self) -> &::std::option::Option<i32> {
          73  +
        /* BuilderGenerator.kt:337 */
   41     74   
        &self.value
          75  +
        /* BuilderGenerator.kt:336 */
   42     76   
    }
   43         -
    /// Consumes the builder and constructs a [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(
   45     80   
        self,
   46     81   
    ) -> ::std::result::Result<crate::operation::content_type_parameters::ContentTypeParametersInput, ::aws_smithy_types::error::operation::BuildError>
   47     82   
    {
   48         -
        ::std::result::Result::Ok(crate::operation::content_type_parameters::ContentTypeParametersInput { value: self.value })
          83  +
        /* BuilderGenerator.kt:254 */
          84  +
        ::std::result::Result::Ok(
          85  +
            /* BuilderGenerator.kt:477 */
          86  +
            crate::operation::content_type_parameters::ContentTypeParametersInput {
          87  +
                /* BuilderGenerator.kt:481 */ value: self.value,
          88  +
                /* BuilderGenerator.kt:477 */
          89  +
            }, /* BuilderGenerator.kt:254 */
          90  +
        )
          91  +
        /* BuilderGenerator.kt:253 */
   49     92   
    }
          93  +
    /* BuilderGenerator.kt:355 */
   50     94   
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/content_type_parameters/_content_type_parameters_output.rs

@@ -1,1 +22,39 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct ContentTypeParametersOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct ContentTypeParametersOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl ContentTypeParametersOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct ContentTypeParametersOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct ContentTypeParametersOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl ContentTypeParametersOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::content_type_parameters::ContentTypeParametersOutput {
   20         -
        crate::operation::content_type_parameters::ContentTypeParametersOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/content_type_parameters/builders.rs

@@ -1,1 +125,143 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::content_type_parameters::_content_type_parameters_output::ContentTypeParametersOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::content_type_parameters::_content_type_parameters_input::ContentTypeParametersInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
    7     10   
    /// Sends a request with this input using the given client.
    8     11   
    pub async fn send_with(
    9     12   
        self,
   10     13   
        client: &crate::Client,
   11     14   
    ) -> ::std::result::Result<
   12     15   
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::content_type_parameters::ContentTypeParametersError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.content_type_parameters();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `ContentTypeParameters`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `ContentTypeParameters`.
   24     27   
///
   25         -
/// The example tests how servers must support requests containing a `Content-Type` header with parameters.
          28  +
/// /* FluentBuilderGenerator.kt:130 */The example tests how servers must support requests containing a `Content-Type` header with parameters.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct ContentTypeParametersFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder,
   30     35   
    config_override: ::std::option::Option<crate::config::Builder>,
   31     36   
}
          37  +
/* FluentBuilderGenerator.kt:381 */
   32     38   
impl
   33     39   
    crate::client::customize::internal::CustomizableSend<
   34     40   
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
   35     41   
        crate::operation::content_type_parameters::ContentTypeParametersError,
   36     42   
    > for ContentTypeParametersFluentBuilder
   37     43   
{
   38     44   
    fn send(
   39     45   
        self,
   40     46   
        config_override: crate::config::Builder,
   41     47   
    ) -> crate::client::customize::internal::BoxFuture<
   42     48   
        crate::client::customize::internal::SendResult<
   43     49   
            crate::operation::content_type_parameters::ContentTypeParametersOutput,
   44     50   
            crate::operation::content_type_parameters::ContentTypeParametersError,
   45     51   
        >,
   46     52   
    > {
   47     53   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   48     54   
    }
   49     55   
}
          56  +
/* FluentBuilderGenerator.kt:282 */
   50     57   
impl ContentTypeParametersFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `ContentTypeParametersFluentBuilder`.
   52     60   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   53     61   
        Self {
   54     62   
            handle,
   55     63   
            inner: ::std::default::Default::default(),
   56     64   
            config_override: ::std::option::Option::None,
   57     65   
        }
   58     66   
    }
          67  +
    /* FluentBuilderGenerator.kt:301 */
   59     68   
    /// Access the ContentTypeParameters as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
   61     70   
        &self.inner
   62     71   
    }
          72  +
    /* FluentBuilderGenerator.kt:145 */
   63     73   
    /// Sends the request and returns the response.
   64     74   
    ///
   65     75   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   66     76   
    /// can be matched against.
   67     77   
    ///
   68     78   
    /// By default, any retryable failures will be retried twice. Retry behavior
   69     79   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   70     80   
    /// set when configuring the client.
   71     81   
    pub async fn send(
   72     82   
        self,
   73     83   
    ) -> ::std::result::Result<
   74     84   
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::content_type_parameters::ContentTypeParametersError,
   77     87   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   78     88   
        >,
   79     89   
    > {
   80     90   
        let input = self
   81     91   
            .inner
   82     92   
            .build()
   83     93   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   84     94   
        let runtime_plugins = crate::operation::content_type_parameters::ContentTypeParameters::operation_runtime_plugins(
   85     95   
            self.handle.runtime_plugins.clone(),
   86     96   
            &self.handle.conf,
   87     97   
            self.config_override,
   88     98   
        );
   89     99   
        crate::operation::content_type_parameters::ContentTypeParameters::orchestrate(&runtime_plugins, input).await
   90    100   
    }
   91    101   
   92    102   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   93    103   
    pub fn customize(
   94    104   
        self,
   95    105   
    ) -> crate::client::customize::CustomizableOperation<
   96    106   
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
   97    107   
        crate::operation::content_type_parameters::ContentTypeParametersError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
         122  +
    /* FluentBuilderGenerator.kt:498 */
  111    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* FluentBuilderGenerator.kt:500 */
  112    125   
    pub fn value(mut self, input: i32) -> Self {
  113    126   
        self.inner = self.inner.value(input);
  114    127   
        self
  115    128   
    }
         129  +
    /* FluentBuilderGenerator.kt:498 */
  116    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* FluentBuilderGenerator.kt:500 */
  117    132   
    pub fn set_value(mut self, input: ::std::option::Option<i32>) -> Self {
  118    133   
        self.inner = self.inner.set_value(input);
  119    134   
        self
  120    135   
    }
         136  +
    /* FluentBuilderGenerator.kt:518 */
  121    137   
    #[allow(missing_docs)] // documentation missing in model
         138  +
                           /* FluentBuilderGenerator.kt:520 */
  122    139   
    pub fn get_value(&self) -> &::std::option::Option<i32> {
  123    140   
        self.inner.get_value()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:282 */
  125    143   
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/datetime_offsets.rs

@@ -1,1 +40,49 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* OperationGenerator.kt:77 */
    2      3   
/// Orchestration and serialization glue logic for `DatetimeOffsets`.
           4  +
/* RustType.kt:516 */
    3      5   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           6  +
/* RustType.kt:516 */
    4      7   
#[non_exhaustive]
           8  +
/* OperationGenerator.kt:84 */
    5      9   
pub struct DatetimeOffsets;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl DatetimeOffsets {
    7         -
    /// Creates a new `DatetimeOffsets`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `DatetimeOffsets`
          13  +
    /* OperationGenerator.kt:87 */
    8     14   
    pub fn new() -> Self {
          15  +
        /* OperationGenerator.kt:88 */
    9     16   
        Self
          17  +
        /* OperationGenerator.kt:87 */
   10     18   
    }
          19  +
    /* OperationGenerator.kt:138 */
   11     20   
    pub(crate) async fn orchestrate(
   12     21   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     22   
        input: crate::operation::datetime_offsets::DatetimeOffsetsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::datetime_offsets::DatetimeOffsetsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::datetime_offsets::DatetimeOffsetsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +265,282 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for DatetimeOffsets {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("DatetimeOffsets");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            DatetimeOffsetsRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            DatetimeOffsetsResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "DatetimeOffsets",
  105    116   
            "Json Protocol",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("DatetimeOffsets")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(DatetimeOffsetsEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::datetime_offsets::DatetimeOffsetsError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::datetime_offsets::DatetimeOffsetsError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct DatetimeOffsetsResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DatetimeOffsetsResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_datetime_offsets::de_datetime_offsets_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_datetime_offsets::de_datetime_offsets_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct DatetimeOffsetsRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DatetimeOffsetsRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input
  161    174   
            .downcast::<crate::operation::datetime_offsets::DatetimeOffsetsInput>()
  162    175   
            .expect("correct type");
  163    176   
        let _header_serialization_settings = _cfg
  164    177   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  165    178   
            .cloned()
  166    179   
            .unwrap_or_default();
  167    180   
        let mut request_builder = {
  168    181   
            fn uri_base(
  169    182   
                _input: &crate::operation::datetime_offsets::DatetimeOffsetsInput,
  170    183   
                output: &mut ::std::string::String,
  171    184   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                use ::std::fmt::Write as _;
  173    186   
                ::std::write!(output, "/").expect("formatting should succeed");
  174    187   
                ::std::result::Result::Ok(())
  175    188   
            }
  176    189   
            #[allow(clippy::unnecessary_wraps)]
  177    190   
            fn update_http_builder(
  178    191   
                input: &crate::operation::datetime_offsets::DatetimeOffsetsInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  187    200   
            builder = _header_serialization_settings.set_default_header(
  188    201   
                builder,
  189    202   
                ::http::header::HeaderName::from_static("x-amz-target"),
  190    203   
                "JsonProtocol.DatetimeOffsets",
  191    204   
            );
  192    205   
            builder
  193    206   
        };
  194    207   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_datetime_offsets::ser_datetime_offsets_input(&input)?);
  195    208   
  196    209   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  197    210   
    }
  198    211   
}
         212  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  199    213   
#[derive(Debug)]
  200    214   
struct DatetimeOffsetsEndpointParamsInterceptor;
  201    215   
  202    216   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DatetimeOffsetsEndpointParamsInterceptor {
  203    217   
    fn name(&self) -> &'static str {
  204    218   
        "DatetimeOffsetsEndpointParamsInterceptor"
  205    219   
    }
  206    220   
  207    221   
    fn read_before_execution(
  208    222   
        &self,
  209    223   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  210    224   
            '_,
  211    225   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  212    226   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  213    227   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  214    228   
        >,
  215    229   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  216    230   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  217    231   
        let _input = context
  218    232   
            .input()
  219    233   
            .downcast_ref::<DatetimeOffsetsInput>()
  220    234   
            .ok_or("failed to downcast to DatetimeOffsetsInput")?;
  221    235   
  222    236   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  223    237   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  224    238   
        })?;
  225    239   
        cfg.interceptor_state()
  226    240   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  227    241   
        ::std::result::Result::Ok(())
  228    242   
    }
  229    243   
}
  230    244   
  231    245   
// The get_* functions below are generated from JMESPath expressions in the
  232    246   
// operationContextParams trait. They target the operation's input shape.
  233    247   
         248  +
/* RustType.kt:516 */
  234    249   
#[allow(unreachable_code, unused_variables)]
         250  +
/* RustType.kt:516 */
  235    251   
#[cfg(test)]
         252  +
/* ProtocolTestGenerator.kt:98 */
  236    253   
mod datetime_offsets_test {
  237    254   
  238    255   
    /// Ensures that clients can correctly parse datetime (timestamps) with offsets
  239    256   
    /// Test ID: AwsJson11DateTimeWithNegativeOffset
  240    257   
    #[::tokio::test]
  241    258   
    #[::tracing_test::traced_test]
  242    259   
    async fn aws_json11_date_time_with_negative_offset_response() {
  243    260   
        let expected_output = crate::operation::datetime_offsets::DatetimeOffsetsOutput::builder()
  244    261   
            .set_datetime(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  245    262   
                1576540098, 0_f64,
@@ -299,316 +428,504 @@
  319    336   
                )))
  320    337   
            });
  321    338   
            de.deserialize_nonstreaming(&http_response)
  322    339   
        });
  323    340   
        let parsed = parsed
  324    341   
            .expect("should be successful response")
  325    342   
            .downcast::<crate::operation::datetime_offsets::DatetimeOffsetsOutput>()
  326    343   
            .unwrap();
  327    344   
        ::pretty_assertions::assert_eq!(parsed.datetime, expected_output.datetime, "Unexpected value for `datetime`");
  328    345   
    }
         346  +
         347  +
    /* ProtocolTestGenerator.kt:98 */
  329    348   
}
  330    349   
         350  +
/* OperationErrorGenerator.kt:79 */
  331    351   
/// Error type for the `DatetimeOffsetsError` operation.
         352  +
/* RustType.kt:516 */
  332    353   
#[non_exhaustive]
         354  +
/* RustType.kt:516 */
  333    355   
#[derive(::std::fmt::Debug)]
  334         -
pub enum DatetimeOffsetsError {
         356  +
pub /* OperationErrorGenerator.kt:81 */ enum DatetimeOffsetsError {
         357  +
    /* OperationErrorGenerator.kt:88 */
  335    358   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  336    359   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  337    360   
    variable wildcard pattern and check `.code()`:
  338    361   
     \
  339    362   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  340    363   
     \
  341    364   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DatetimeOffsetsError) for what information is available for the error.")]
  342    365   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         366  +
    /* OperationErrorGenerator.kt:81 */
  343    367   
}
         368  +
/* OperationErrorGenerator.kt:218 */
  344    369   
impl DatetimeOffsetsError {
         370  +
    /* OperationErrorGenerator.kt:219 */
  345    371   
    /// Creates the `DatetimeOffsetsError::Unhandled` variant from any error type.
  346    372   
    pub fn unhandled(
  347    373   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  348    374   
    ) -> Self {
  349    375   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  350    376   
            source: err.into(),
  351    377   
            meta: ::std::default::Default::default(),
  352    378   
        })
  353    379   
    }
  354    380   
  355    381   
    /// Creates the `DatetimeOffsetsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  356    382   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  357    383   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  358    384   
            source: err.clone().into(),
  359    385   
            meta: err,
  360    386   
        })
  361    387   
    }
  362         -
    ///
         388  +
    /// /* OperationErrorGenerator.kt:236 */
  363    389   
    /// Returns error metadata, which includes the error code, message,
  364    390   
    /// request ID, and potentially additional information.
  365    391   
    ///
         392  +
    /* OperationErrorGenerator.kt:242 */
  366    393   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         394  +
        /* OperationErrorGenerator.kt:243 */
  367    395   
        match self {
  368         -
            Self::Unhandled(e) => &e.meta,
         396  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         397  +
            /* OperationErrorGenerator.kt:243 */
  369    398   
        }
         399  +
        /* OperationErrorGenerator.kt:242 */
  370    400   
    }
         401  +
    /* OperationErrorGenerator.kt:218 */
  371    402   
}
         403  +
/* OperationErrorGenerator.kt:269 */
  372    404   
impl ::std::error::Error for DatetimeOffsetsError {
         405  +
    /* OperationErrorGenerator.kt:270 */
  373    406   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         407  +
        /* OperationErrorGenerator.kt:318 */
  374    408   
        match self {
  375         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         409  +
            /* OperationErrorGenerator.kt:326 */
         410  +
            Self::Unhandled(_inner) => {
         411  +
                /* OperationErrorGenerator.kt:279 */
         412  +
                ::std::option::Option::Some(&*_inner.source)
         413  +
                /* OperationErrorGenerator.kt:326 */
         414  +
            } /* OperationErrorGenerator.kt:318 */
  376    415   
        }
         416  +
        /* OperationErrorGenerator.kt:270 */
  377    417   
    }
         418  +
    /* OperationErrorGenerator.kt:269 */
  378    419   
}
         420  +
/* OperationErrorGenerator.kt:133 */
  379    421   
impl ::std::fmt::Display for DatetimeOffsetsError {
         422  +
    /* OperationErrorGenerator.kt:134 */
  380    423   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         424  +
        /* OperationErrorGenerator.kt:318 */
  381    425   
        match self {
         426  +
            /* OperationErrorGenerator.kt:326 */
  382    427   
            Self::Unhandled(_inner) => {
         428  +
                /* OperationErrorGenerator.kt:139 */
  383    429   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  384    430   
                    write!(f, "unhandled error ({code})")
  385    431   
                } else {
  386    432   
                    f.write_str("unhandled error")
  387    433   
                }
  388         -
            }
         434  +
                /* OperationErrorGenerator.kt:326 */
         435  +
            } /* OperationErrorGenerator.kt:318 */
  389    436   
        }
         437  +
        /* OperationErrorGenerator.kt:134 */
  390    438   
    }
         439  +
    /* OperationErrorGenerator.kt:133 */
  391    440   
}
         441  +
/* OperationErrorGenerator.kt:182 */
  392    442   
impl ::aws_smithy_types::retry::ProvideErrorKind for DatetimeOffsetsError {
         443  +
    /* OperationErrorGenerator.kt:186 */
  393    444   
    fn code(&self) -> ::std::option::Option<&str> {
         445  +
        /* OperationErrorGenerator.kt:187 */
  394    446   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         447  +
        /* OperationErrorGenerator.kt:186 */
  395    448   
    }
         449  +
    /* OperationErrorGenerator.kt:190 */
  396    450   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         451  +
        /* OperationErrorGenerator.kt:197 */
  397    452   
        ::std::option::Option::None
         453  +
        /* OperationErrorGenerator.kt:190 */
  398    454   
    }
         455  +
    /* OperationErrorGenerator.kt:182 */
  399    456   
}
         457  +
/* OperationErrorGenerator.kt:163 */
  400    458   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DatetimeOffsetsError {
         459  +
    /* OperationErrorGenerator.kt:164 */
  401    460   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         461  +
        /* OperationErrorGenerator.kt:318 */
  402    462   
        match self {
  403         -
            Self::Unhandled(_inner) => &_inner.meta,
         463  +
            /* OperationErrorGenerator.kt:326 */
         464  +
            Self::Unhandled(_inner) => {
         465  +
                /* OperationErrorGenerator.kt:168 */
         466  +
                &_inner.meta
         467  +
                /* OperationErrorGenerator.kt:326 */
         468  +
            } /* OperationErrorGenerator.kt:318 */
  404    469   
        }
         470  +
        /* OperationErrorGenerator.kt:164 */
  405    471   
    }
         472  +
    /* OperationErrorGenerator.kt:163 */
  406    473   
}
         474  +
/* OperationErrorGenerator.kt:109 */
  407    475   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for DatetimeOffsetsError {
         476  +
    /* OperationErrorGenerator.kt:110 */
  408    477   
    fn create_unhandled_error(
  409    478   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  410    479   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  411    480   
    ) -> Self {
         481  +
        /* OperationErrorGenerator.kt:121 */
  412    482   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  413    483   
            source,
  414    484   
            meta: meta.unwrap_or_default(),
  415    485   
        })
         486  +
        /* OperationErrorGenerator.kt:110 */
  416    487   
    }
         488  +
    /* OperationErrorGenerator.kt:109 */
  417    489   
}
  418    490   
         491  +
/* CodegenDelegator.kt:255 */
  419    492   
pub use crate::operation::datetime_offsets::_datetime_offsets_output::DatetimeOffsetsOutput;
  420    493   
         494  +
/* CodegenDelegator.kt:255 */
  421    495   
pub use crate::operation::datetime_offsets::_datetime_offsets_input::DatetimeOffsetsInput;
  422    496   
         497  +
/* RustModule.kt:172 */
  423    498   
mod _datetime_offsets_input;
  424    499   
         500  +
/* RustModule.kt:172 */
  425    501   
mod _datetime_offsets_output;
  426    502   
  427         -
/// Builders
         503  +
/// /* CodegenDelegator.kt:51 */Builders
  428    504   
pub mod builders;