Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

@@ -1,1 +622,1020 @@
    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),
    8         -
    /// This error is thrown when an invalid greeting value is provided.
          12  +
    /// /* ServiceErrorGenerator.kt:259 */This error is thrown when an invalid greeting value is provided.
          13  +
    /* ServiceErrorGenerator.kt:262 */
    9     14   
    InvalidGreeting(crate::types::error::InvalidGreeting),
   10         -
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
          15  +
    /// /* ServiceErrorGenerator.kt:264 */An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
          16  +
    /* ServiceErrorGenerator.kt:320 */
   11     17   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
   12     18   
    variable wildcard pattern and check `.code()`:
   13     19   
     \
   14     20   
       `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
   15     21   
     \
   16     22   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
   17         -
    Unhandled(crate::error::sealed_unhandled::Unhandled),
          23  +
    /* ServiceErrorGenerator.kt:266 */
          24  +
    Unhandled(crate::error::sealed_unhandled::Unhandled), /* ServiceErrorGenerator.kt:257 */
   18     25   
}
          26  +
/* ServiceErrorGenerator.kt:131 */
   19     27   
impl ::std::fmt::Display for Error {
          28  +
    /* ServiceErrorGenerator.kt:132 */
   20     29   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          30  +
        /* ServiceErrorGenerator.kt:133 */
   21     31   
        match self {
   22         -
            Error::ComplexError(inner) => inner.fmt(f),
   23         -
            Error::InvalidGreeting(inner) => inner.fmt(f),
          32  +
            /* ServiceErrorGenerator.kt:135 */ Error::ComplexError(inner) => inner.fmt(f),
          33  +
            /* ServiceErrorGenerator.kt:135 */ Error::InvalidGreeting(inner) => inner.fmt(f),
          34  +
            /* ServiceErrorGenerator.kt:137 */
   24     35   
            Error::Unhandled(_) => {
   25     36   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
   26     37   
                    write!(f, "unhandled error ({code})")
   27     38   
                } else {
   28     39   
                    f.write_str("unhandled error")
   29     40   
                }
   30         -
            }
          41  +
            } /* ServiceErrorGenerator.kt:133 */
   31     42   
        }
          43  +
        /* ServiceErrorGenerator.kt:132 */
   32     44   
    }
          45  +
    /* ServiceErrorGenerator.kt:131 */
   33     46   
}
          47  +
/* ServiceErrorGenerator.kt:154 */
   34     48   
impl From<::aws_smithy_types::error::operation::BuildError> for Error {
   35     49   
    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
   36     50   
        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   37     51   
            source: value.into(),
   38     52   
            meta: ::std::default::Default::default(),
   39     53   
        })
   40     54   
    }
   41     55   
}
          56  +
/* ServiceErrorGenerator.kt:223 */
   42     57   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
   43     58   
    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
   44     59   
        match self {
   45     60   
            Self::ComplexError(inner) => inner.meta(),
   46     61   
            Self::InvalidGreeting(inner) => inner.meta(),
   47     62   
            Self::Unhandled(inner) => &inner.meta,
   48     63   
        }
   49     64   
    }
   50     65   
}
          66  +
/* ServiceErrorGenerator.kt:174 */
   51     67   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::datetime_offsets::DatetimeOffsetsError, R>> for Error
   52     68   
where
   53     69   
    R: Send + Sync + std::fmt::Debug + 'static,
   54     70   
{
          71  +
    /* ServiceErrorGenerator.kt:179 */
   55     72   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::datetime_offsets::DatetimeOffsetsError, R>) -> Self {
          73  +
        /* ServiceErrorGenerator.kt:184 */
   56     74   
        match err {
          75  +
            /* ServiceErrorGenerator.kt:185 */
   57     76   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
          77  +
            /* ServiceErrorGenerator.kt:186 */
   58     78   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   59     79   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
   60     80   
                source: err.into(),
   61     81   
            }),
          82  +
            /* ServiceErrorGenerator.kt:184 */
   62     83   
        }
          84  +
        /* ServiceErrorGenerator.kt:179 */
   63     85   
    }
          86  +
    /* ServiceErrorGenerator.kt:174 */
   64     87   
}
          88  +
/* ServiceErrorGenerator.kt:202 */
   65     89   
impl From<crate::operation::datetime_offsets::DatetimeOffsetsError> for Error {
          90  +
    /* ServiceErrorGenerator.kt:203 */
   66     91   
    fn from(err: crate::operation::datetime_offsets::DatetimeOffsetsError) -> Self {
          92  +
        /* ServiceErrorGenerator.kt:204 */
   67     93   
        match err {
          94  +
            /* ServiceErrorGenerator.kt:212 */
   68     95   
            crate::operation::datetime_offsets::DatetimeOffsetsError::Unhandled(inner) => Error::Unhandled(inner),
          96  +
            /* ServiceErrorGenerator.kt:204 */
   69     97   
        }
          98  +
        /* ServiceErrorGenerator.kt:203 */
   70     99   
    }
         100  +
    /* ServiceErrorGenerator.kt:202 */
   71    101   
}
         102  +
/* ServiceErrorGenerator.kt:174 */
   72    103   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError, R>>
   73    104   
    for Error
   74    105   
where
   75    106   
    R: Send + Sync + std::fmt::Debug + 'static,
   76    107   
{
         108  +
    /* ServiceErrorGenerator.kt:179 */
   77    109   
    fn from(
   78    110   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError, R>,
   79    111   
    ) -> Self {
         112  +
        /* ServiceErrorGenerator.kt:184 */
   80    113   
        match err {
         114  +
            /* ServiceErrorGenerator.kt:185 */
   81    115   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         116  +
            /* ServiceErrorGenerator.kt:186 */
   82    117   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   83    118   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
   84    119   
                source: err.into(),
   85    120   
            }),
         121  +
            /* ServiceErrorGenerator.kt:184 */
   86    122   
        }
         123  +
        /* ServiceErrorGenerator.kt:179 */
   87    124   
    }
         125  +
    /* ServiceErrorGenerator.kt:174 */
   88    126   
}
         127  +
/* ServiceErrorGenerator.kt:202 */
   89    128   
impl From<crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError> for Error {
         129  +
    /* ServiceErrorGenerator.kt:203 */
   90    130   
    fn from(err: crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError) -> Self {
         131  +
        /* ServiceErrorGenerator.kt:204 */
   91    132   
        match err {
         133  +
            /* ServiceErrorGenerator.kt:212 */
   92    134   
            crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError::Unhandled(inner) => Error::Unhandled(inner),
         135  +
            /* ServiceErrorGenerator.kt:204 */
   93    136   
        }
         137  +
        /* ServiceErrorGenerator.kt:203 */
   94    138   
    }
         139  +
    /* ServiceErrorGenerator.kt:202 */
   95    140   
}
         141  +
/* ServiceErrorGenerator.kt:174 */
   96    142   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::endpoint_operation::EndpointOperationError, R>> for Error
   97    143   
where
   98    144   
    R: Send + Sync + std::fmt::Debug + 'static,
   99    145   
{
         146  +
    /* ServiceErrorGenerator.kt:179 */
  100    147   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::endpoint_operation::EndpointOperationError, R>) -> Self {
         148  +
        /* ServiceErrorGenerator.kt:184 */
  101    149   
        match err {
         150  +
            /* ServiceErrorGenerator.kt:185 */
  102    151   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         152  +
            /* ServiceErrorGenerator.kt:186 */
  103    153   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  104    154   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  105    155   
                source: err.into(),
  106    156   
            }),
         157  +
            /* ServiceErrorGenerator.kt:184 */
  107    158   
        }
         159  +
        /* ServiceErrorGenerator.kt:179 */
  108    160   
    }
         161  +
    /* ServiceErrorGenerator.kt:174 */
  109    162   
}
         163  +
/* ServiceErrorGenerator.kt:202 */
  110    164   
impl From<crate::operation::endpoint_operation::EndpointOperationError> for Error {
         165  +
    /* ServiceErrorGenerator.kt:203 */
  111    166   
    fn from(err: crate::operation::endpoint_operation::EndpointOperationError) -> Self {
         167  +
        /* ServiceErrorGenerator.kt:204 */
  112    168   
        match err {
         169  +
            /* ServiceErrorGenerator.kt:212 */
  113    170   
            crate::operation::endpoint_operation::EndpointOperationError::Unhandled(inner) => Error::Unhandled(inner),
         171  +
            /* ServiceErrorGenerator.kt:204 */
  114    172   
        }
         173  +
        /* ServiceErrorGenerator.kt:203 */
  115    174   
    }
         175  +
    /* ServiceErrorGenerator.kt:202 */
  116    176   
}
         177  +
/* ServiceErrorGenerator.kt:174 */
  117    178   
impl<R>
  118    179   
    From<
  119    180   
        ::aws_smithy_runtime_api::client::result::SdkError<
  120    181   
            crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError,
  121    182   
            R,
  122    183   
        >,
  123    184   
    > for Error
  124    185   
where
  125    186   
    R: Send + Sync + std::fmt::Debug + 'static,
  126    187   
{
         188  +
    /* ServiceErrorGenerator.kt:179 */
  127    189   
    fn from(
  128    190   
        err: ::aws_smithy_runtime_api::client::result::SdkError<
  129    191   
            crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError,
  130    192   
            R,
  131    193   
        >,
  132    194   
    ) -> Self {
         195  +
        /* ServiceErrorGenerator.kt:184 */
  133    196   
        match err {
         197  +
            /* ServiceErrorGenerator.kt:185 */
  134    198   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         199  +
            /* ServiceErrorGenerator.kt:186 */
  135    200   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  136    201   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  137    202   
                source: err.into(),
  138    203   
            }),
         204  +
            /* ServiceErrorGenerator.kt:184 */
  139    205   
        }
         206  +
        /* ServiceErrorGenerator.kt:179 */
  140    207   
    }
         208  +
    /* ServiceErrorGenerator.kt:174 */
  141    209   
}
         210  +
/* ServiceErrorGenerator.kt:202 */
  142    211   
impl From<crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError> for Error {
         212  +
    /* ServiceErrorGenerator.kt:203 */
  143    213   
    fn from(err: crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError) -> Self {
         214  +
        /* ServiceErrorGenerator.kt:204 */
  144    215   
        match err {
         216  +
            /* ServiceErrorGenerator.kt:212 */
  145    217   
            crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError::Unhandled(inner) => Error::Unhandled(inner),
         218  +
            /* ServiceErrorGenerator.kt:204 */
  146    219   
        }
         220  +
        /* ServiceErrorGenerator.kt:203 */
  147    221   
    }
         222  +
    /* ServiceErrorGenerator.kt:202 */
  148    223   
}
         224  +
/* ServiceErrorGenerator.kt:174 */
  149    225   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::fractional_seconds::FractionalSecondsError, R>> for Error
  150    226   
where
  151    227   
    R: Send + Sync + std::fmt::Debug + 'static,
  152    228   
{
         229  +
    /* ServiceErrorGenerator.kt:179 */
  153    230   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::fractional_seconds::FractionalSecondsError, R>) -> Self {
         231  +
        /* ServiceErrorGenerator.kt:184 */
  154    232   
        match err {
         233  +
            /* ServiceErrorGenerator.kt:185 */
  155    234   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         235  +
            /* ServiceErrorGenerator.kt:186 */
  156    236   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  157    237   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  158    238   
                source: err.into(),
  159    239   
            }),
         240  +
            /* ServiceErrorGenerator.kt:184 */
  160    241   
        }
         242  +
        /* ServiceErrorGenerator.kt:179 */
  161    243   
    }
         244  +
    /* ServiceErrorGenerator.kt:174 */
  162    245   
}
         246  +
/* ServiceErrorGenerator.kt:202 */
  163    247   
impl From<crate::operation::fractional_seconds::FractionalSecondsError> for Error {
         248  +
    /* ServiceErrorGenerator.kt:203 */
  164    249   
    fn from(err: crate::operation::fractional_seconds::FractionalSecondsError) -> Self {
         250  +
        /* ServiceErrorGenerator.kt:204 */
  165    251   
        match err {
         252  +
            /* ServiceErrorGenerator.kt:212 */
  166    253   
            crate::operation::fractional_seconds::FractionalSecondsError::Unhandled(inner) => Error::Unhandled(inner),
         254  +
            /* ServiceErrorGenerator.kt:204 */
  167    255   
        }
         256  +
        /* ServiceErrorGenerator.kt:203 */
  168    257   
    }
         258  +
    /* ServiceErrorGenerator.kt:202 */
  169    259   
}
         260  +
/* ServiceErrorGenerator.kt:174 */
  170    261   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::greeting_with_errors::GreetingWithErrorsError, R>> for Error
  171    262   
where
  172    263   
    R: Send + Sync + std::fmt::Debug + 'static,
  173    264   
{
         265  +
    /* ServiceErrorGenerator.kt:179 */
  174    266   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::greeting_with_errors::GreetingWithErrorsError, R>) -> Self {
         267  +
        /* ServiceErrorGenerator.kt:184 */
  175    268   
        match err {
         269  +
            /* ServiceErrorGenerator.kt:185 */
  176    270   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         271  +
            /* ServiceErrorGenerator.kt:186 */
  177    272   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  178    273   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  179    274   
                source: err.into(),
  180    275   
            }),
         276  +
            /* ServiceErrorGenerator.kt:184 */
  181    277   
        }
         278  +
        /* ServiceErrorGenerator.kt:179 */
  182    279   
    }
         280  +
    /* ServiceErrorGenerator.kt:174 */
  183    281   
}
         282  +
/* ServiceErrorGenerator.kt:202 */
  184    283   
impl From<crate::operation::greeting_with_errors::GreetingWithErrorsError> for Error {
         284  +
    /* ServiceErrorGenerator.kt:203 */
  185    285   
    fn from(err: crate::operation::greeting_with_errors::GreetingWithErrorsError) -> Self {
         286  +
        /* ServiceErrorGenerator.kt:204 */
  186    287   
        match err {
         288  +
            /* ServiceErrorGenerator.kt:207 */
  187    289   
            crate::operation::greeting_with_errors::GreetingWithErrorsError::InvalidGreeting(inner) => Error::InvalidGreeting(inner),
         290  +
            /* ServiceErrorGenerator.kt:207 */
  188    291   
            crate::operation::greeting_with_errors::GreetingWithErrorsError::ComplexError(inner) => Error::ComplexError(inner),
         292  +
            /* ServiceErrorGenerator.kt:212 */
  189    293   
            crate::operation::greeting_with_errors::GreetingWithErrorsError::Unhandled(inner) => Error::Unhandled(inner),
         294  +
            /* ServiceErrorGenerator.kt:204 */
  190    295   
        }
         296  +
        /* ServiceErrorGenerator.kt:203 */
  191    297   
    }
         298  +
    /* ServiceErrorGenerator.kt:202 */
  192    299   
}
         300  +
/* ServiceErrorGenerator.kt:174 */
  193    301   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::host_with_path_operation::HostWithPathOperationError, R>> for Error
  194    302   
where
  195    303   
    R: Send + Sync + std::fmt::Debug + 'static,
  196    304   
{
         305  +
    /* ServiceErrorGenerator.kt:179 */
  197    306   
    fn from(
  198    307   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::host_with_path_operation::HostWithPathOperationError, R>,
  199    308   
    ) -> Self {
         309  +
        /* ServiceErrorGenerator.kt:184 */
  200    310   
        match err {
         311  +
            /* ServiceErrorGenerator.kt:185 */
  201    312   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         313  +
            /* ServiceErrorGenerator.kt:186 */
  202    314   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  203    315   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  204    316   
                source: err.into(),
  205    317   
            }),
         318  +
            /* ServiceErrorGenerator.kt:184 */
  206    319   
        }
         320  +
        /* ServiceErrorGenerator.kt:179 */
  207    321   
    }
         322  +
    /* ServiceErrorGenerator.kt:174 */
  208    323   
}
         324  +
/* ServiceErrorGenerator.kt:202 */
  209    325   
impl From<crate::operation::host_with_path_operation::HostWithPathOperationError> for Error {
         326  +
    /* ServiceErrorGenerator.kt:203 */
  210    327   
    fn from(err: crate::operation::host_with_path_operation::HostWithPathOperationError) -> Self {
         328  +
        /* ServiceErrorGenerator.kt:204 */
  211    329   
        match err {
         330  +
            /* ServiceErrorGenerator.kt:212 */
  212    331   
            crate::operation::host_with_path_operation::HostWithPathOperationError::Unhandled(inner) => Error::Unhandled(inner),
         332  +
            /* ServiceErrorGenerator.kt:204 */
  213    333   
        }
         334  +
        /* ServiceErrorGenerator.kt:203 */
  214    335   
    }
         336  +
    /* ServiceErrorGenerator.kt:202 */
  215    337   
}
         338  +
/* ServiceErrorGenerator.kt:174 */
  216    339   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError, R>>
  217    340   
    for Error
  218    341   
where
  219    342   
    R: Send + Sync + std::fmt::Debug + 'static,
  220    343   
{
         344  +
    /* ServiceErrorGenerator.kt:179 */
  221    345   
    fn from(
  222    346   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError, R>,
  223    347   
    ) -> Self {
         348  +
        /* ServiceErrorGenerator.kt:184 */
  224    349   
        match err {
         350  +
            /* ServiceErrorGenerator.kt:185 */
  225    351   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         352  +
            /* ServiceErrorGenerator.kt:186 */
  226    353   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  227    354   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  228    355   
                source: err.into(),
  229    356   
            }),
         357  +
            /* ServiceErrorGenerator.kt:184 */
  230    358   
        }
         359  +
        /* ServiceErrorGenerator.kt:179 */
  231    360   
    }
         361  +
    /* ServiceErrorGenerator.kt:174 */
  232    362   
}
         363  +
/* ServiceErrorGenerator.kt:202 */
  233    364   
impl From<crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError> for Error {
         365  +
    /* ServiceErrorGenerator.kt:203 */
  234    366   
    fn from(err: crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError) -> Self {
         367  +
        /* ServiceErrorGenerator.kt:204 */
  235    368   
        match err {
         369  +
            /* ServiceErrorGenerator.kt:212 */
  236    370   
            crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError::Unhandled(inner) => Error::Unhandled(inner),
         371  +
            /* ServiceErrorGenerator.kt:204 */
  237    372   
        }
         373  +
        /* ServiceErrorGenerator.kt:203 */
  238    374   
    }
         375  +
    /* ServiceErrorGenerator.kt:202 */
  239    376   
}
         377  +
/* ServiceErrorGenerator.kt:174 */
  240    378   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::nested_structures::NestedStructuresError, R>> for Error
  241    379   
where
  242    380   
    R: Send + Sync + std::fmt::Debug + 'static,
  243    381   
{
         382  +
    /* ServiceErrorGenerator.kt:179 */
  244    383   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::nested_structures::NestedStructuresError, R>) -> Self {
         384  +
        /* ServiceErrorGenerator.kt:184 */
  245    385   
        match err {
         386  +
            /* ServiceErrorGenerator.kt:185 */
  246    387   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         388  +
            /* ServiceErrorGenerator.kt:186 */
  247    389   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  248    390   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  249    391   
                source: err.into(),
  250    392   
            }),
         393  +
            /* ServiceErrorGenerator.kt:184 */
  251    394   
        }
         395  +
        /* ServiceErrorGenerator.kt:179 */
  252    396   
    }
         397  +
    /* ServiceErrorGenerator.kt:174 */
  253    398   
}
         399  +
/* ServiceErrorGenerator.kt:202 */
  254    400   
impl From<crate::operation::nested_structures::NestedStructuresError> for Error {
         401  +
    /* ServiceErrorGenerator.kt:203 */
  255    402   
    fn from(err: crate::operation::nested_structures::NestedStructuresError) -> Self {
         403  +
        /* ServiceErrorGenerator.kt:204 */
  256    404   
        match err {
         405  +
            /* ServiceErrorGenerator.kt:212 */
  257    406   
            crate::operation::nested_structures::NestedStructuresError::Unhandled(inner) => Error::Unhandled(inner),
         407  +
            /* ServiceErrorGenerator.kt:204 */
  258    408   
        }
         409  +
        /* ServiceErrorGenerator.kt:203 */
  259    410   
    }
         411  +
    /* ServiceErrorGenerator.kt:202 */
  260    412   
}
         413  +
/* ServiceErrorGenerator.kt:174 */
  261    414   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::no_input_and_output::NoInputAndOutputError, R>> for Error
  262    415   
where
  263    416   
    R: Send + Sync + std::fmt::Debug + 'static,
  264    417   
{
         418  +
    /* ServiceErrorGenerator.kt:179 */
  265    419   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::no_input_and_output::NoInputAndOutputError, R>) -> Self {
         420  +
        /* ServiceErrorGenerator.kt:184 */
  266    421   
        match err {
         422  +
            /* ServiceErrorGenerator.kt:185 */
  267    423   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         424  +
            /* ServiceErrorGenerator.kt:186 */
  268    425   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  269    426   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  270    427   
                source: err.into(),
  271    428   
            }),
         429  +
            /* ServiceErrorGenerator.kt:184 */
  272    430   
        }
         431  +
        /* ServiceErrorGenerator.kt:179 */
  273    432   
    }
         433  +
    /* ServiceErrorGenerator.kt:174 */
  274    434   
}
         435  +
/* ServiceErrorGenerator.kt:202 */
  275    436   
impl From<crate::operation::no_input_and_output::NoInputAndOutputError> for Error {
         437  +
    /* ServiceErrorGenerator.kt:203 */
  276    438   
    fn from(err: crate::operation::no_input_and_output::NoInputAndOutputError) -> Self {
         439  +
        /* ServiceErrorGenerator.kt:204 */
  277    440   
        match err {
         441  +
            /* ServiceErrorGenerator.kt:212 */
  278    442   
            crate::operation::no_input_and_output::NoInputAndOutputError::Unhandled(inner) => Error::Unhandled(inner),
         443  +
            /* ServiceErrorGenerator.kt:204 */
  279    444   
        }
         445  +
        /* ServiceErrorGenerator.kt:203 */
  280    446   
    }
         447  +
    /* ServiceErrorGenerator.kt:202 */
  281    448   
}
         449  +
/* ServiceErrorGenerator.kt:174 */
  282    450   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_with_content_encoding::PutWithContentEncodingError, R>>
  283    451   
    for Error
  284    452   
where
  285    453   
    R: Send + Sync + std::fmt::Debug + 'static,
  286    454   
{
         455  +
    /* ServiceErrorGenerator.kt:179 */
  287    456   
    fn from(
  288    457   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_with_content_encoding::PutWithContentEncodingError, R>,
  289    458   
    ) -> Self {
         459  +
        /* ServiceErrorGenerator.kt:184 */
  290    460   
        match err {
         461  +
            /* ServiceErrorGenerator.kt:185 */
  291    462   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         463  +
            /* ServiceErrorGenerator.kt:186 */
  292    464   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  293    465   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  294    466   
                source: err.into(),
  295    467   
            }),
         468  +
            /* ServiceErrorGenerator.kt:184 */
  296    469   
        }
         470  +
        /* ServiceErrorGenerator.kt:179 */
  297    471   
    }
         472  +
    /* ServiceErrorGenerator.kt:174 */
  298    473   
}
         474  +
/* ServiceErrorGenerator.kt:202 */
  299    475   
impl From<crate::operation::put_with_content_encoding::PutWithContentEncodingError> for Error {
         476  +
    /* ServiceErrorGenerator.kt:203 */
  300    477   
    fn from(err: crate::operation::put_with_content_encoding::PutWithContentEncodingError) -> Self {
         478  +
        /* ServiceErrorGenerator.kt:204 */
  301    479   
        match err {
         480  +
            /* ServiceErrorGenerator.kt:212 */
  302    481   
            crate::operation::put_with_content_encoding::PutWithContentEncodingError::Unhandled(inner) => Error::Unhandled(inner),
         482  +
            /* ServiceErrorGenerator.kt:204 */
  303    483   
        }
         484  +
        /* ServiceErrorGenerator.kt:203 */
  304    485   
    }
         486  +
    /* ServiceErrorGenerator.kt:202 */
  305    487   
}
         488  +
/* ServiceErrorGenerator.kt:174 */
  306    489   
impl<R>
  307    490   
    From<
  308    491   
        ::aws_smithy_runtime_api::client::result::SdkError<
  309    492   
            crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError,
  310    493   
            R,
  311    494   
        >,
  312    495   
    > for Error
  313    496   
where
  314    497   
    R: Send + Sync + std::fmt::Debug + 'static,
  315    498   
{
         499  +
    /* ServiceErrorGenerator.kt:179 */
  316    500   
    fn from(
  317    501   
        err: ::aws_smithy_runtime_api::client::result::SdkError<
  318    502   
            crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError,
  319    503   
            R,
  320    504   
        >,
  321    505   
    ) -> Self {
         506  +
        /* ServiceErrorGenerator.kt:184 */
  322    507   
        match err {
         508  +
            /* ServiceErrorGenerator.kt:185 */
  323    509   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         510  +
            /* ServiceErrorGenerator.kt:186 */
  324    511   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  325    512   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  326    513   
                source: err.into(),
  327    514   
            }),
         515  +
            /* ServiceErrorGenerator.kt:184 */
  328    516   
        }
         517  +
        /* ServiceErrorGenerator.kt:179 */
  329    518   
    }
         519  +
    /* ServiceErrorGenerator.kt:174 */
  330    520   
}
         521  +
/* ServiceErrorGenerator.kt:202 */
  331    522   
impl From<crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError> for Error {
         523  +
    /* ServiceErrorGenerator.kt:203 */
  332    524   
    fn from(err: crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError) -> Self {
         525  +
        /* ServiceErrorGenerator.kt:204 */
  333    526   
        match err {
         527  +
            /* ServiceErrorGenerator.kt:212 */
  334    528   
            crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError::Unhandled(inner) => Error::Unhandled(inner),
         529  +
            /* ServiceErrorGenerator.kt:204 */
  335    530   
        }
         531  +
        /* ServiceErrorGenerator.kt:203 */
  336    532   
    }
         533  +
    /* ServiceErrorGenerator.kt:202 */
  337    534   
}
         535  +
/* ServiceErrorGenerator.kt:174 */
  338    536   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::query_lists::QueryListsError, R>> for Error
  339    537   
where
  340    538   
    R: Send + Sync + std::fmt::Debug + 'static,
  341    539   
{
         540  +
    /* ServiceErrorGenerator.kt:179 */
  342    541   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::query_lists::QueryListsError, R>) -> Self {
         542  +
        /* ServiceErrorGenerator.kt:184 */
  343    543   
        match err {
         544  +
            /* ServiceErrorGenerator.kt:185 */
  344    545   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         546  +
            /* ServiceErrorGenerator.kt:186 */
  345    547   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  346    548   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  347    549   
                source: err.into(),
  348    550   
            }),
         551  +
            /* ServiceErrorGenerator.kt:184 */
  349    552   
        }
         553  +
        /* ServiceErrorGenerator.kt:179 */
  350    554   
    }
         555  +
    /* ServiceErrorGenerator.kt:174 */
  351    556   
}
         557  +
/* ServiceErrorGenerator.kt:202 */
  352    558   
impl From<crate::operation::query_lists::QueryListsError> for Error {
         559  +
    /* ServiceErrorGenerator.kt:203 */
  353    560   
    fn from(err: crate::operation::query_lists::QueryListsError) -> Self {
         561  +
        /* ServiceErrorGenerator.kt:204 */
  354    562   
        match err {
         563  +
            /* ServiceErrorGenerator.kt:212 */
  355    564   
            crate::operation::query_lists::QueryListsError::Unhandled(inner) => Error::Unhandled(inner),
         565  +
            /* ServiceErrorGenerator.kt:204 */
  356    566   
        }
         567  +
        /* ServiceErrorGenerator.kt:203 */
  357    568   
    }
         569  +
    /* ServiceErrorGenerator.kt:202 */
  358    570   
}
         571  +
/* ServiceErrorGenerator.kt:174 */
  359    572   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::query_timestamps::QueryTimestampsError, R>> for Error
  360    573   
where
  361    574   
    R: Send + Sync + std::fmt::Debug + 'static,
  362    575   
{
         576  +
    /* ServiceErrorGenerator.kt:179 */
  363    577   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::query_timestamps::QueryTimestampsError, R>) -> Self {
         578  +
        /* ServiceErrorGenerator.kt:184 */
  364    579   
        match err {
         580  +
            /* ServiceErrorGenerator.kt:185 */
  365    581   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         582  +
            /* ServiceErrorGenerator.kt:186 */
  366    583   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  367    584   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  368    585   
                source: err.into(),
  369    586   
            }),
         587  +
            /* ServiceErrorGenerator.kt:184 */
  370    588   
        }
         589  +
        /* ServiceErrorGenerator.kt:179 */
  371    590   
    }
         591  +
    /* ServiceErrorGenerator.kt:174 */
  372    592   
}
         593  +
/* ServiceErrorGenerator.kt:202 */
  373    594   
impl From<crate::operation::query_timestamps::QueryTimestampsError> for Error {
         595  +
    /* ServiceErrorGenerator.kt:203 */
  374    596   
    fn from(err: crate::operation::query_timestamps::QueryTimestampsError) -> Self {
         597  +
        /* ServiceErrorGenerator.kt:204 */
  375    598   
        match err {
         599  +
            /* ServiceErrorGenerator.kt:212 */
  376    600   
            crate::operation::query_timestamps::QueryTimestampsError::Unhandled(inner) => Error::Unhandled(inner),
         601  +
            /* ServiceErrorGenerator.kt:204 */
  377    602   
        }
         603  +
        /* ServiceErrorGenerator.kt:203 */
  378    604   
    }
         605  +
    /* ServiceErrorGenerator.kt:202 */
  379    606   
}
         607  +
/* ServiceErrorGenerator.kt:174 */
  380    608   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::recursive_xml_shapes::RecursiveXmlShapesError, R>> for Error
  381    609   
where
  382    610   
    R: Send + Sync + std::fmt::Debug + 'static,
  383    611   
{
         612  +
    /* ServiceErrorGenerator.kt:179 */
  384    613   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::recursive_xml_shapes::RecursiveXmlShapesError, R>) -> Self {
         614  +
        /* ServiceErrorGenerator.kt:184 */
  385    615   
        match err {
         616  +
            /* ServiceErrorGenerator.kt:185 */
  386    617   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         618  +
            /* ServiceErrorGenerator.kt:186 */
  387    619   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  388    620   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  389    621   
                source: err.into(),
  390    622   
            }),
         623  +
            /* ServiceErrorGenerator.kt:184 */
  391    624   
        }
         625  +
        /* ServiceErrorGenerator.kt:179 */
  392    626   
    }
         627  +
    /* ServiceErrorGenerator.kt:174 */
  393    628   
}
         629  +
/* ServiceErrorGenerator.kt:202 */
  394    630   
impl From<crate::operation::recursive_xml_shapes::RecursiveXmlShapesError> for Error {
         631  +
    /* ServiceErrorGenerator.kt:203 */
  395    632   
    fn from(err: crate::operation::recursive_xml_shapes::RecursiveXmlShapesError) -> Self {
         633  +
        /* ServiceErrorGenerator.kt:204 */
  396    634   
        match err {
         635  +
            /* ServiceErrorGenerator.kt:212 */
  397    636   
            crate::operation::recursive_xml_shapes::RecursiveXmlShapesError::Unhandled(inner) => Error::Unhandled(inner),
         637  +
            /* ServiceErrorGenerator.kt:204 */
  398    638   
        }
         639  +
        /* ServiceErrorGenerator.kt:203 */
  399    640   
    }
         641  +
    /* ServiceErrorGenerator.kt:202 */
  400    642   
}
         643  +
/* ServiceErrorGenerator.kt:174 */
  401    644   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::simple_input_params::SimpleInputParamsError, R>> for Error
  402    645   
where
  403    646   
    R: Send + Sync + std::fmt::Debug + 'static,
  404    647   
{
         648  +
    /* ServiceErrorGenerator.kt:179 */
  405    649   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::simple_input_params::SimpleInputParamsError, R>) -> Self {
         650  +
        /* ServiceErrorGenerator.kt:184 */
  406    651   
        match err {
         652  +
            /* ServiceErrorGenerator.kt:185 */
  407    653   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         654  +
            /* ServiceErrorGenerator.kt:186 */
  408    655   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  409    656   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  410    657   
                source: err.into(),
  411    658   
            }),
         659  +
            /* ServiceErrorGenerator.kt:184 */
  412    660   
        }
         661  +
        /* ServiceErrorGenerator.kt:179 */
  413    662   
    }
         663  +
    /* ServiceErrorGenerator.kt:174 */
  414    664   
}
         665  +
/* ServiceErrorGenerator.kt:202 */
  415    666   
impl From<crate::operation::simple_input_params::SimpleInputParamsError> for Error {
         667  +
    /* ServiceErrorGenerator.kt:203 */
  416    668   
    fn from(err: crate::operation::simple_input_params::SimpleInputParamsError) -> Self {
         669  +
        /* ServiceErrorGenerator.kt:204 */
  417    670   
        match err {
         671  +
            /* ServiceErrorGenerator.kt:212 */
  418    672   
            crate::operation::simple_input_params::SimpleInputParamsError::Unhandled(inner) => Error::Unhandled(inner),
         673  +
            /* ServiceErrorGenerator.kt:204 */
  419    674   
        }
         675  +
        /* ServiceErrorGenerator.kt:203 */
  420    676   
    }
         677  +
    /* ServiceErrorGenerator.kt:202 */
  421    678   
}
         679  +
/* ServiceErrorGenerator.kt:174 */
  422    680   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::simple_scalar_xml_properties::SimpleScalarXmlPropertiesError, R>>
  423    681   
    for Error
  424    682   
where
  425    683   
    R: Send + Sync + std::fmt::Debug + 'static,
  426    684   
{
         685  +
    /* ServiceErrorGenerator.kt:179 */
  427    686   
    fn from(
  428    687   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::simple_scalar_xml_properties::SimpleScalarXmlPropertiesError, R>,
  429    688   
    ) -> Self {
         689  +
        /* ServiceErrorGenerator.kt:184 */
  430    690   
        match err {
         691  +
            /* ServiceErrorGenerator.kt:185 */
  431    692   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         693  +
            /* ServiceErrorGenerator.kt:186 */
  432    694   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  433    695   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  434    696   
                source: err.into(),
  435    697   
            }),
         698  +
            /* ServiceErrorGenerator.kt:184 */
  436    699   
        }
         700  +
        /* ServiceErrorGenerator.kt:179 */
  437    701   
    }
         702  +
    /* ServiceErrorGenerator.kt:174 */
  438    703   
}
         704  +
/* ServiceErrorGenerator.kt:202 */
  439    705   
impl From<crate::operation::simple_scalar_xml_properties::SimpleScalarXmlPropertiesError> for Error {
         706  +
    /* ServiceErrorGenerator.kt:203 */
  440    707   
    fn from(err: crate::operation::simple_scalar_xml_properties::SimpleScalarXmlPropertiesError) -> Self {
         708  +
        /* ServiceErrorGenerator.kt:204 */
  441    709   
        match err {
         710  +
            /* ServiceErrorGenerator.kt:212 */
  442    711   
            crate::operation::simple_scalar_xml_properties::SimpleScalarXmlPropertiesError::Unhandled(inner) => Error::Unhandled(inner),
         712  +
            /* ServiceErrorGenerator.kt:204 */
  443    713   
        }
         714  +
        /* ServiceErrorGenerator.kt:203 */
  444    715   
    }
         716  +
    /* ServiceErrorGenerator.kt:202 */
  445    717   
}
         718  +
/* ServiceErrorGenerator.kt:174 */
  446    719   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_blobs::XmlBlobsError, R>> for Error
  447    720   
where
  448    721   
    R: Send + Sync + std::fmt::Debug + 'static,
  449    722   
{
         723  +
    /* ServiceErrorGenerator.kt:179 */
  450    724   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_blobs::XmlBlobsError, R>) -> Self {
         725  +
        /* ServiceErrorGenerator.kt:184 */
  451    726   
        match err {
         727  +
            /* ServiceErrorGenerator.kt:185 */
  452    728   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         729  +
            /* ServiceErrorGenerator.kt:186 */
  453    730   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  454    731   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  455    732   
                source: err.into(),
  456    733   
            }),
         734  +
            /* ServiceErrorGenerator.kt:184 */
  457    735   
        }
         736  +
        /* ServiceErrorGenerator.kt:179 */
  458    737   
    }
         738  +
    /* ServiceErrorGenerator.kt:174 */
  459    739   
}
         740  +
/* ServiceErrorGenerator.kt:202 */
  460    741   
impl From<crate::operation::xml_blobs::XmlBlobsError> for Error {
         742  +
    /* ServiceErrorGenerator.kt:203 */
  461    743   
    fn from(err: crate::operation::xml_blobs::XmlBlobsError) -> Self {
         744  +
        /* ServiceErrorGenerator.kt:204 */
  462    745   
        match err {
         746  +
            /* ServiceErrorGenerator.kt:212 */
  463    747   
            crate::operation::xml_blobs::XmlBlobsError::Unhandled(inner) => Error::Unhandled(inner),
         748  +
            /* ServiceErrorGenerator.kt:204 */
  464    749   
        }
         750  +
        /* ServiceErrorGenerator.kt:203 */
  465    751   
    }
         752  +
    /* ServiceErrorGenerator.kt:202 */
  466    753   
}
         754  +
/* ServiceErrorGenerator.kt:174 */
  467    755   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_empty_blobs::XmlEmptyBlobsError, R>> for Error
  468    756   
where
  469    757   
    R: Send + Sync + std::fmt::Debug + 'static,
  470    758   
{
         759  +
    /* ServiceErrorGenerator.kt:179 */
  471    760   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_empty_blobs::XmlEmptyBlobsError, R>) -> Self {
         761  +
        /* ServiceErrorGenerator.kt:184 */
  472    762   
        match err {
         763  +
            /* ServiceErrorGenerator.kt:185 */
  473    764   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         765  +
            /* ServiceErrorGenerator.kt:186 */
  474    766   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  475    767   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  476    768   
                source: err.into(),
  477    769   
            }),
         770  +
            /* ServiceErrorGenerator.kt:184 */
  478    771   
        }
         772  +
        /* ServiceErrorGenerator.kt:179 */
  479    773   
    }
         774  +
    /* ServiceErrorGenerator.kt:174 */
  480    775   
}
         776  +
/* ServiceErrorGenerator.kt:202 */
  481    777   
impl From<crate::operation::xml_empty_blobs::XmlEmptyBlobsError> for Error {
         778  +
    /* ServiceErrorGenerator.kt:203 */
  482    779   
    fn from(err: crate::operation::xml_empty_blobs::XmlEmptyBlobsError) -> Self {
         780  +
        /* ServiceErrorGenerator.kt:204 */
  483    781   
        match err {
         782  +
            /* ServiceErrorGenerator.kt:212 */
  484    783   
            crate::operation::xml_empty_blobs::XmlEmptyBlobsError::Unhandled(inner) => Error::Unhandled(inner),
         784  +
            /* ServiceErrorGenerator.kt:204 */
  485    785   
        }
         786  +
        /* ServiceErrorGenerator.kt:203 */
  486    787   
    }
         788  +
    /* ServiceErrorGenerator.kt:202 */
  487    789   
}
         790  +
/* ServiceErrorGenerator.kt:174 */
  488    791   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_empty_lists::XmlEmptyListsError, R>> for Error
  489    792   
where
  490    793   
    R: Send + Sync + std::fmt::Debug + 'static,
  491    794   
{
         795  +
    /* ServiceErrorGenerator.kt:179 */
  492    796   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_empty_lists::XmlEmptyListsError, R>) -> Self {
         797  +
        /* ServiceErrorGenerator.kt:184 */
  493    798   
        match err {
         799  +
            /* ServiceErrorGenerator.kt:185 */
  494    800   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         801  +
            /* ServiceErrorGenerator.kt:186 */
  495    802   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  496    803   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  497    804   
                source: err.into(),
  498    805   
            }),
         806  +
            /* ServiceErrorGenerator.kt:184 */
  499    807   
        }
         808  +
        /* ServiceErrorGenerator.kt:179 */
  500    809   
    }
         810  +
    /* ServiceErrorGenerator.kt:174 */
  501    811   
}
         812  +
/* ServiceErrorGenerator.kt:202 */
  502    813   
impl From<crate::operation::xml_empty_lists::XmlEmptyListsError> for Error {
         814  +
    /* ServiceErrorGenerator.kt:203 */
  503    815   
    fn from(err: crate::operation::xml_empty_lists::XmlEmptyListsError) -> Self {
         816  +
        /* ServiceErrorGenerator.kt:204 */
  504    817   
        match err {
         818  +
            /* ServiceErrorGenerator.kt:212 */
  505    819   
            crate::operation::xml_empty_lists::XmlEmptyListsError::Unhandled(inner) => Error::Unhandled(inner),
         820  +
            /* ServiceErrorGenerator.kt:204 */
  506    821   
        }
         822  +
        /* ServiceErrorGenerator.kt:203 */
  507    823   
    }
         824  +
    /* ServiceErrorGenerator.kt:202 */
  508    825   
}
         826  +
/* ServiceErrorGenerator.kt:174 */
  509    827   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_enums::XmlEnumsError, R>> for Error
  510    828   
where
  511    829   
    R: Send + Sync + std::fmt::Debug + 'static,
  512    830   
{
         831  +
    /* ServiceErrorGenerator.kt:179 */
  513    832   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_enums::XmlEnumsError, R>) -> Self {
         833  +
        /* ServiceErrorGenerator.kt:184 */
  514    834   
        match err {
         835  +
            /* ServiceErrorGenerator.kt:185 */
  515    836   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         837  +
            /* ServiceErrorGenerator.kt:186 */
  516    838   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  517    839   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  518    840   
                source: err.into(),
  519    841   
            }),
         842  +
            /* ServiceErrorGenerator.kt:184 */
  520    843   
        }
         844  +
        /* ServiceErrorGenerator.kt:179 */
  521    845   
    }
         846  +
    /* ServiceErrorGenerator.kt:174 */
  522    847   
}
         848  +
/* ServiceErrorGenerator.kt:202 */
  523    849   
impl From<crate::operation::xml_enums::XmlEnumsError> for Error {
         850  +
    /* ServiceErrorGenerator.kt:203 */
  524    851   
    fn from(err: crate::operation::xml_enums::XmlEnumsError) -> Self {
         852  +
        /* ServiceErrorGenerator.kt:204 */
  525    853   
        match err {
         854  +
            /* ServiceErrorGenerator.kt:212 */
  526    855   
            crate::operation::xml_enums::XmlEnumsError::Unhandled(inner) => Error::Unhandled(inner),
         856  +
            /* ServiceErrorGenerator.kt:204 */
  527    857   
        }
         858  +
        /* ServiceErrorGenerator.kt:203 */
  528    859   
    }
         860  +
    /* ServiceErrorGenerator.kt:202 */
  529    861   
}
         862  +
/* ServiceErrorGenerator.kt:174 */
  530    863   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_int_enums::XmlIntEnumsError, R>> for Error
  531    864   
where
  532    865   
    R: Send + Sync + std::fmt::Debug + 'static,
  533    866   
{
         867  +
    /* ServiceErrorGenerator.kt:179 */
  534    868   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_int_enums::XmlIntEnumsError, R>) -> Self {
         869  +
        /* ServiceErrorGenerator.kt:184 */
  535    870   
        match err {
         871  +
            /* ServiceErrorGenerator.kt:185 */
  536    872   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         873  +
            /* ServiceErrorGenerator.kt:186 */
  537    874   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  538    875   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  539    876   
                source: err.into(),
  540    877   
            }),
         878  +
            /* ServiceErrorGenerator.kt:184 */
  541    879   
        }
         880  +
        /* ServiceErrorGenerator.kt:179 */
  542    881   
    }
         882  +
    /* ServiceErrorGenerator.kt:174 */
  543    883   
}
         884  +
/* ServiceErrorGenerator.kt:202 */
  544    885   
impl From<crate::operation::xml_int_enums::XmlIntEnumsError> for Error {
         886  +
    /* ServiceErrorGenerator.kt:203 */
  545    887   
    fn from(err: crate::operation::xml_int_enums::XmlIntEnumsError) -> Self {
         888  +
        /* ServiceErrorGenerator.kt:204 */
  546    889   
        match err {
         890  +
            /* ServiceErrorGenerator.kt:212 */
  547    891   
            crate::operation::xml_int_enums::XmlIntEnumsError::Unhandled(inner) => Error::Unhandled(inner),
         892  +
            /* ServiceErrorGenerator.kt:204 */
  548    893   
        }
         894  +
        /* ServiceErrorGenerator.kt:203 */
  549    895   
    }
         896  +
    /* ServiceErrorGenerator.kt:202 */
  550    897   
}
         898  +
/* ServiceErrorGenerator.kt:174 */
  551    899   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_lists::XmlListsError, R>> for Error
  552    900   
where
  553    901   
    R: Send + Sync + std::fmt::Debug + 'static,
  554    902   
{
         903  +
    /* ServiceErrorGenerator.kt:179 */
  555    904   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_lists::XmlListsError, R>) -> Self {
         905  +
        /* ServiceErrorGenerator.kt:184 */
  556    906   
        match err {
         907  +
            /* ServiceErrorGenerator.kt:185 */
  557    908   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         909  +
            /* ServiceErrorGenerator.kt:186 */
  558    910   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  559    911   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  560    912   
                source: err.into(),
  561    913   
            }),
         914  +
            /* ServiceErrorGenerator.kt:184 */
  562    915   
        }
         916  +
        /* ServiceErrorGenerator.kt:179 */
  563    917   
    }
         918  +
    /* ServiceErrorGenerator.kt:174 */
  564    919   
}
         920  +
/* ServiceErrorGenerator.kt:202 */
  565    921   
impl From<crate::operation::xml_lists::XmlListsError> for Error {
         922  +
    /* ServiceErrorGenerator.kt:203 */
  566    923   
    fn from(err: crate::operation::xml_lists::XmlListsError) -> Self {
         924  +
        /* ServiceErrorGenerator.kt:204 */
  567    925   
        match err {
         926  +
            /* ServiceErrorGenerator.kt:212 */
  568    927   
            crate::operation::xml_lists::XmlListsError::Unhandled(inner) => Error::Unhandled(inner),
         928  +
            /* ServiceErrorGenerator.kt:204 */
  569    929   
        }
         930  +
        /* ServiceErrorGenerator.kt:203 */
  570    931   
    }
         932  +
    /* ServiceErrorGenerator.kt:202 */
  571    933   
}
         934  +
/* ServiceErrorGenerator.kt:174 */
  572    935   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_namespaces::XmlNamespacesError, R>> for Error
  573    936   
where
  574    937   
    R: Send + Sync + std::fmt::Debug + 'static,
  575    938   
{
         939  +
    /* ServiceErrorGenerator.kt:179 */
  576    940   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_namespaces::XmlNamespacesError, R>) -> Self {
         941  +
        /* ServiceErrorGenerator.kt:184 */
  577    942   
        match err {
         943  +
            /* ServiceErrorGenerator.kt:185 */
  578    944   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         945  +
            /* ServiceErrorGenerator.kt:186 */
  579    946   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  580    947   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  581    948   
                source: err.into(),
  582    949   
            }),
         950  +
            /* ServiceErrorGenerator.kt:184 */
  583    951   
        }
         952  +
        /* ServiceErrorGenerator.kt:179 */
  584    953   
    }
         954  +
    /* ServiceErrorGenerator.kt:174 */
  585    955   
}
         956  +
/* ServiceErrorGenerator.kt:202 */
  586    957   
impl From<crate::operation::xml_namespaces::XmlNamespacesError> for Error {
         958  +
    /* ServiceErrorGenerator.kt:203 */
  587    959   
    fn from(err: crate::operation::xml_namespaces::XmlNamespacesError) -> Self {
         960  +
        /* ServiceErrorGenerator.kt:204 */
  588    961   
        match err {
         962  +
            /* ServiceErrorGenerator.kt:212 */
  589    963   
            crate::operation::xml_namespaces::XmlNamespacesError::Unhandled(inner) => Error::Unhandled(inner),
         964  +
            /* ServiceErrorGenerator.kt:204 */
  590    965   
        }
         966  +
        /* ServiceErrorGenerator.kt:203 */
  591    967   
    }
         968  +
    /* ServiceErrorGenerator.kt:202 */
  592    969   
}
         970  +
/* ServiceErrorGenerator.kt:174 */
  593    971   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_timestamps::XmlTimestampsError, R>> for Error
  594    972   
where
  595    973   
    R: Send + Sync + std::fmt::Debug + 'static,
  596    974   
{
         975  +
    /* ServiceErrorGenerator.kt:179 */
  597    976   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::xml_timestamps::XmlTimestampsError, R>) -> Self {
         977  +
        /* ServiceErrorGenerator.kt:184 */
  598    978   
        match err {
         979  +
            /* ServiceErrorGenerator.kt:185 */
  599    980   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         981  +
            /* ServiceErrorGenerator.kt:186 */
  600    982   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  601    983   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  602    984   
                source: err.into(),
  603    985   
            }),
         986  +
            /* ServiceErrorGenerator.kt:184 */
  604    987   
        }
         988  +
        /* ServiceErrorGenerator.kt:179 */
  605    989   
    }
         990  +
    /* ServiceErrorGenerator.kt:174 */
  606    991   
}
         992  +
/* ServiceErrorGenerator.kt:202 */
  607    993   
impl From<crate::operation::xml_timestamps::XmlTimestampsError> for Error {
         994  +
    /* ServiceErrorGenerator.kt:203 */
  608    995   
    fn from(err: crate::operation::xml_timestamps::XmlTimestampsError) -> Self {
         996  +
        /* ServiceErrorGenerator.kt:204 */
  609    997   
        match err {
         998  +
            /* ServiceErrorGenerator.kt:212 */
  610    999   
            crate::operation::xml_timestamps::XmlTimestampsError::Unhandled(inner) => Error::Unhandled(inner),
        1000  +
            /* ServiceErrorGenerator.kt:204 */
  611   1001   
        }
        1002  +
        /* ServiceErrorGenerator.kt:203 */
  612   1003   
    }
        1004  +
    /* ServiceErrorGenerator.kt:202 */
  613   1005   
}
        1006  +
/* ServiceErrorGenerator.kt:115 */
  614   1007   
impl ::std::error::Error for Error {
        1008  +
    /* ServiceErrorGenerator.kt:116 */
  615   1009   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
        1010  +
        /* ServiceErrorGenerator.kt:117 */
  616   1011   
        match self {
  617         -
            Error::ComplexError(inner) => inner.source(),
  618         -
            Error::InvalidGreeting(inner) => inner.source(),
  619         -
            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
        1012  +
            /* ServiceErrorGenerator.kt:119 */ Error::ComplexError(inner) => inner.source(),
        1013  +
            /* ServiceErrorGenerator.kt:119 */ Error::InvalidGreeting(inner) => inner.source(),
        1014  +
            /* ServiceErrorGenerator.kt:121 */
        1015  +
            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source), /* ServiceErrorGenerator.kt:117 */
  620   1016   
        }
        1017  +
        /* ServiceErrorGenerator.kt:116 */
  621   1018   
    }
        1019  +
    /* ServiceErrorGenerator.kt:115 */
  622   1020   
}

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

@@ -18,18 +136,147 @@
   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 Ec2 Protocol Service.
          56  +
/// /* FluentClientDocs.kt:24 */Client for calling Sample Ec2 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 = ec2_query::Config::builder()
   72     75   
///     .endpoint_url("http://localhost:1234")
   73     76   
///     .build();
   74     77   
/// let client = ec2_query::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 Ec2 Protocol Service.
         103  +
/// /* ClientRustModule.kt:121 */Configuration for Sample Ec2 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   
  119    124   
pub(crate) mod client_idempotency_token;
  120    125   
         126  +
/* RustModule.kt:172 */
  121    127   
mod client_request_compression;
  122    128   
         129  +
/* RustModule.kt:172 */
  123    130   
mod idempotency_token;
  124    131   
  125         -
/// All operations that this crate can perform.
         132  +
/// /* ClientRustModule.kt:121 */All operations that this crate can perform.
  126    133   
pub mod operation;
  127    134   
  128    135   
pub(crate) mod protocol_serde;
  129    136   
         137  +
/* RustModule.kt:172 */
  130    138   
mod sdk_feature_tracker;
  131    139   
         140  +
/* RustModule.kt:172 */
  132    141   
mod serialization_settings;
  133    142   
         143  +
/* RustModule.kt:172 */
  134    144   
mod ec2_query_errors;
  135    145   
         146  +
/* FluentClientDecorator.kt:76 */
  136    147   
pub use client::Client;

tmp-codegen-diff/codegen-client-test/ec2_query/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/ec2_query/rust-client-codegen/src/operation.rs

@@ -1,1 +76,76 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Types for the `DatetimeOffsets` operation.
           2  +
/* CodegenDelegator.kt:51 */
           3  +
/// /* CodegenDelegator.kt:51 */Types for the `DatetimeOffsets` operation.
    4      4   
pub mod datetime_offsets;
    5      5   
    6         -
/// Types for the `EmptyInputAndEmptyOutput` operation.
           6  +
/// /* CodegenDelegator.kt:51 */Types for the `EmptyInputAndEmptyOutput` operation.
    7      7   
pub mod empty_input_and_empty_output;
    8      8   
    9         -
/// Types for the `EndpointOperation` operation.
           9  +
/// /* CodegenDelegator.kt:51 */Types for the `EndpointOperation` operation.
   10     10   
pub mod endpoint_operation;
   11     11   
   12         -
/// Types for the `EndpointWithHostLabelOperation` operation.
          12  +
/// /* CodegenDelegator.kt:51 */Types for the `EndpointWithHostLabelOperation` operation.
   13     13   
pub mod endpoint_with_host_label_operation;
   14     14   
   15         -
/// Types for the `FractionalSeconds` operation.
          15  +
/// /* CodegenDelegator.kt:51 */Types for the `FractionalSeconds` operation.
   16     16   
pub mod fractional_seconds;
   17     17   
   18         -
/// Types for the `GreetingWithErrors` operation.
          18  +
/// /* CodegenDelegator.kt:51 */Types for the `GreetingWithErrors` operation.
   19     19   
pub mod greeting_with_errors;
   20     20   
   21         -
/// Types for the `HostWithPathOperation` operation.
          21  +
/// /* CodegenDelegator.kt:51 */Types for the `HostWithPathOperation` operation.
   22     22   
pub mod host_with_path_operation;
   23     23   
   24         -
/// Types for the `IgnoresWrappingXmlName` operation.
          24  +
/// /* CodegenDelegator.kt:51 */Types for the `IgnoresWrappingXmlName` operation.
   25     25   
pub mod ignores_wrapping_xml_name;
   26     26   
   27         -
/// Types for the `NestedStructures` operation.
          27  +
/// /* CodegenDelegator.kt:51 */Types for the `NestedStructures` operation.
   28     28   
pub mod nested_structures;
   29     29   
   30         -
/// Types for the `NoInputAndOutput` operation.
          30  +
/// /* CodegenDelegator.kt:51 */Types for the `NoInputAndOutput` operation.
   31     31   
pub mod no_input_and_output;
   32     32   
   33         -
/// Types for the `PutWithContentEncoding` operation.
          33  +
/// /* CodegenDelegator.kt:51 */Types for the `PutWithContentEncoding` operation.
   34     34   
pub mod put_with_content_encoding;
   35     35   
   36         -
/// Types for the `QueryIdempotencyTokenAutoFill` operation.
          36  +
/// /* CodegenDelegator.kt:51 */Types for the `QueryIdempotencyTokenAutoFill` operation.
   37     37   
pub mod query_idempotency_token_auto_fill;
   38     38   
   39         -
/// Types for the `QueryLists` operation.
          39  +
/// /* CodegenDelegator.kt:51 */Types for the `QueryLists` operation.
   40     40   
pub mod query_lists;
   41     41   
   42         -
/// Types for the `QueryTimestamps` operation.
          42  +
/// /* CodegenDelegator.kt:51 */Types for the `QueryTimestamps` operation.
   43     43   
pub mod query_timestamps;
   44     44   
   45         -
/// Types for the `RecursiveXmlShapes` operation.
          45  +
/// /* CodegenDelegator.kt:51 */Types for the `RecursiveXmlShapes` operation.
   46     46   
pub mod recursive_xml_shapes;
   47     47   
   48         -
/// Types for the `SimpleInputParams` operation.
          48  +
/// /* CodegenDelegator.kt:51 */Types for the `SimpleInputParams` operation.
   49     49   
pub mod simple_input_params;
   50     50   
   51         -
/// Types for the `SimpleScalarXmlProperties` operation.
          51  +
/// /* CodegenDelegator.kt:51 */Types for the `SimpleScalarXmlProperties` operation.
   52     52   
pub mod simple_scalar_xml_properties;
   53     53   
   54         -
/// Types for the `XmlBlobs` operation.
          54  +
/// /* CodegenDelegator.kt:51 */Types for the `XmlBlobs` operation.
   55     55   
pub mod xml_blobs;
   56     56   
   57         -
/// Types for the `XmlEmptyBlobs` operation.
          57  +
/// /* CodegenDelegator.kt:51 */Types for the `XmlEmptyBlobs` operation.
   58     58   
pub mod xml_empty_blobs;
   59     59   
   60         -
/// Types for the `XmlEmptyLists` operation.
          60  +
/// /* CodegenDelegator.kt:51 */Types for the `XmlEmptyLists` operation.
   61     61   
pub mod xml_empty_lists;
   62     62   
   63         -
/// Types for the `XmlEnums` operation.
          63  +
/// /* CodegenDelegator.kt:51 */Types for the `XmlEnums` operation.
   64     64   
pub mod xml_enums;
   65     65   
   66         -
/// Types for the `XmlIntEnums` operation.
          66  +
/// /* CodegenDelegator.kt:51 */Types for the `XmlIntEnums` operation.
   67     67   
pub mod xml_int_enums;
   68     68   
   69         -
/// Types for the `XmlLists` operation.
          69  +
/// /* CodegenDelegator.kt:51 */Types for the `XmlLists` operation.
   70     70   
pub mod xml_lists;
   71     71   
   72         -
/// Types for the `XmlNamespaces` operation.
          72  +
/// /* CodegenDelegator.kt:51 */Types for the `XmlNamespaces` operation.
   73     73   
pub mod xml_namespaces;
   74     74   
   75         -
/// Types for the `XmlTimestamps` operation.
          75  +
/// /* CodegenDelegator.kt:51 */Types for the `XmlTimestamps` operation.
   76     76   
pub mod xml_timestamps;

tmp-codegen-diff/codegen-client-test/ec2_query/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 +262,279 @@
   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   
            "EC2 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-www-form-urlencoded");
  187    200   
            builder
  188    201   
        };
  189    202   
        let body = ::aws_smithy_types::body::SdkBody::from(
  190    203   
            crate::protocol_serde::shape_datetime_offsets_input::ser_datetime_offsets_input_input_input(&input)?,
  191    204   
        );
  192    205   
  193    206   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  194    207   
    }
  195    208   
}
         209  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  196    210   
#[derive(Debug)]
  197    211   
struct DatetimeOffsetsEndpointParamsInterceptor;
  198    212   
  199    213   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DatetimeOffsetsEndpointParamsInterceptor {
  200    214   
    fn name(&self) -> &'static str {
  201    215   
        "DatetimeOffsetsEndpointParamsInterceptor"
  202    216   
    }
  203    217   
  204    218   
    fn read_before_execution(
  205    219   
        &self,
  206    220   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  207    221   
            '_,
  208    222   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  209    223   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  210    224   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  211    225   
        >,
  212    226   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  213    227   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  214    228   
        let _input = context
  215    229   
            .input()
  216    230   
            .downcast_ref::<DatetimeOffsetsInput>()
  217    231   
            .ok_or("failed to downcast to DatetimeOffsetsInput")?;
  218    232   
  219    233   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  220    234   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  221    235   
        })?;
  222    236   
        cfg.interceptor_state()
  223    237   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  224    238   
        ::std::result::Result::Ok(())
  225    239   
    }
  226    240   
}
  227    241   
  228    242   
// The get_* functions below are generated from JMESPath expressions in the
  229    243   
// operationContextParams trait. They target the operation's input shape.
  230    244   
         245  +
/* RustType.kt:516 */
  231    246   
#[allow(unreachable_code, unused_variables)]
         247  +
/* RustType.kt:516 */
  232    248   
#[cfg(test)]
         249  +
/* ProtocolTestGenerator.kt:98 */
  233    250   
mod datetime_offsets_test {
  234    251   
  235    252   
    /// Ensures that clients can correctly parse datetime (timestamps) with offsets
  236    253   
    /// Test ID: Ec2QueryDateTimeWithNegativeOffset
  237    254   
    #[::tokio::test]
  238    255   
    #[::tracing_test::traced_test]
  239    256   
    async fn ec2_query_date_time_with_negative_offset_response() {
  240    257   
        let expected_output = crate::operation::datetime_offsets::DatetimeOffsetsOutput::builder()
  241    258   
            .set_datetime(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  242    259   
                1576540098, 0_f64,
@@ -288,305 +417,493 @@
  308    325   
                )))
  309    326   
            });
  310    327   
            de.deserialize_nonstreaming(&http_response)
  311    328   
        });
  312    329   
        let parsed = parsed
  313    330   
            .expect("should be successful response")
  314    331   
            .downcast::<crate::operation::datetime_offsets::DatetimeOffsetsOutput>()
  315    332   
            .unwrap();
  316    333   
        ::pretty_assertions::assert_eq!(parsed.datetime, expected_output.datetime, "Unexpected value for `datetime`");
  317    334   
    }
         335  +
         336  +
    /* ProtocolTestGenerator.kt:98 */
  318    337   
}
  319    338   
         339  +
/* OperationErrorGenerator.kt:79 */
  320    340   
/// Error type for the `DatetimeOffsetsError` operation.
         341  +
/* RustType.kt:516 */
  321    342   
#[non_exhaustive]
         343  +
/* RustType.kt:516 */
  322    344   
#[derive(::std::fmt::Debug)]
  323         -
pub enum DatetimeOffsetsError {
         345  +
pub /* OperationErrorGenerator.kt:81 */ enum DatetimeOffsetsError {
         346  +
    /* OperationErrorGenerator.kt:88 */
  324    347   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  325    348   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  326    349   
    variable wildcard pattern and check `.code()`:
  327    350   
     \
  328    351   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  329    352   
     \
  330    353   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DatetimeOffsetsError) for what information is available for the error.")]
  331    354   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         355  +
    /* OperationErrorGenerator.kt:81 */
  332    356   
}
         357  +
/* OperationErrorGenerator.kt:218 */
  333    358   
impl DatetimeOffsetsError {
         359  +
    /* OperationErrorGenerator.kt:219 */
  334    360   
    /// Creates the `DatetimeOffsetsError::Unhandled` variant from any error type.
  335    361   
    pub fn unhandled(
  336    362   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  337    363   
    ) -> Self {
  338    364   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  339    365   
            source: err.into(),
  340    366   
            meta: ::std::default::Default::default(),
  341    367   
        })
  342    368   
    }
  343    369   
  344    370   
    /// Creates the `DatetimeOffsetsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  345    371   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  346    372   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  347    373   
            source: err.clone().into(),
  348    374   
            meta: err,
  349    375   
        })
  350    376   
    }
  351         -
    ///
         377  +
    /// /* OperationErrorGenerator.kt:236 */
  352    378   
    /// Returns error metadata, which includes the error code, message,
  353    379   
    /// request ID, and potentially additional information.
  354    380   
    ///
         381  +
    /* OperationErrorGenerator.kt:242 */
  355    382   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         383  +
        /* OperationErrorGenerator.kt:243 */
  356    384   
        match self {
  357         -
            Self::Unhandled(e) => &e.meta,
         385  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         386  +
            /* OperationErrorGenerator.kt:243 */
  358    387   
        }
         388  +
        /* OperationErrorGenerator.kt:242 */
  359    389   
    }
         390  +
    /* OperationErrorGenerator.kt:218 */
  360    391   
}
         392  +
/* OperationErrorGenerator.kt:269 */
  361    393   
impl ::std::error::Error for DatetimeOffsetsError {
         394  +
    /* OperationErrorGenerator.kt:270 */
  362    395   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         396  +
        /* OperationErrorGenerator.kt:318 */
  363    397   
        match self {
  364         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         398  +
            /* OperationErrorGenerator.kt:326 */
         399  +
            Self::Unhandled(_inner) => {
         400  +
                /* OperationErrorGenerator.kt:279 */
         401  +
                ::std::option::Option::Some(&*_inner.source)
         402  +
                /* OperationErrorGenerator.kt:326 */
         403  +
            } /* OperationErrorGenerator.kt:318 */
  365    404   
        }
         405  +
        /* OperationErrorGenerator.kt:270 */
  366    406   
    }
         407  +
    /* OperationErrorGenerator.kt:269 */
  367    408   
}
         409  +
/* OperationErrorGenerator.kt:133 */
  368    410   
impl ::std::fmt::Display for DatetimeOffsetsError {
         411  +
    /* OperationErrorGenerator.kt:134 */
  369    412   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         413  +
        /* OperationErrorGenerator.kt:318 */
  370    414   
        match self {
         415  +
            /* OperationErrorGenerator.kt:326 */
  371    416   
            Self::Unhandled(_inner) => {
         417  +
                /* OperationErrorGenerator.kt:139 */
  372    418   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  373    419   
                    write!(f, "unhandled error ({code})")
  374    420   
                } else {
  375    421   
                    f.write_str("unhandled error")
  376    422   
                }
  377         -
            }
         423  +
                /* OperationErrorGenerator.kt:326 */
         424  +
            } /* OperationErrorGenerator.kt:318 */
  378    425   
        }
         426  +
        /* OperationErrorGenerator.kt:134 */
  379    427   
    }
         428  +
    /* OperationErrorGenerator.kt:133 */
  380    429   
}
         430  +
/* OperationErrorGenerator.kt:182 */
  381    431   
impl ::aws_smithy_types::retry::ProvideErrorKind for DatetimeOffsetsError {
         432  +
    /* OperationErrorGenerator.kt:186 */
  382    433   
    fn code(&self) -> ::std::option::Option<&str> {
         434  +
        /* OperationErrorGenerator.kt:187 */
  383    435   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         436  +
        /* OperationErrorGenerator.kt:186 */
  384    437   
    }
         438  +
    /* OperationErrorGenerator.kt:190 */
  385    439   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         440  +
        /* OperationErrorGenerator.kt:197 */
  386    441   
        ::std::option::Option::None
         442  +
        /* OperationErrorGenerator.kt:190 */
  387    443   
    }
         444  +
    /* OperationErrorGenerator.kt:182 */
  388    445   
}
         446  +
/* OperationErrorGenerator.kt:163 */
  389    447   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DatetimeOffsetsError {
         448  +
    /* OperationErrorGenerator.kt:164 */
  390    449   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         450  +
        /* OperationErrorGenerator.kt:318 */
  391    451   
        match self {
  392         -
            Self::Unhandled(_inner) => &_inner.meta,
         452  +
            /* OperationErrorGenerator.kt:326 */
         453  +
            Self::Unhandled(_inner) => {
         454  +
                /* OperationErrorGenerator.kt:168 */
         455  +
                &_inner.meta
         456  +
                /* OperationErrorGenerator.kt:326 */
         457  +
            } /* OperationErrorGenerator.kt:318 */
  393    458   
        }
         459  +
        /* OperationErrorGenerator.kt:164 */
  394    460   
    }
         461  +
    /* OperationErrorGenerator.kt:163 */
  395    462   
}
         463  +
/* OperationErrorGenerator.kt:109 */
  396    464   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for DatetimeOffsetsError {
         465  +
    /* OperationErrorGenerator.kt:110 */
  397    466   
    fn create_unhandled_error(
  398    467   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  399    468   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  400    469   
    ) -> Self {
         470  +
        /* OperationErrorGenerator.kt:121 */
  401    471   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  402    472   
            source,
  403    473   
            meta: meta.unwrap_or_default(),
  404    474   
        })
         475  +
        /* OperationErrorGenerator.kt:110 */
  405    476   
    }
         477  +
    /* OperationErrorGenerator.kt:109 */
  406    478   
}
  407    479   
         480  +
/* CodegenDelegator.kt:255 */
  408    481   
pub use crate::operation::datetime_offsets::_datetime_offsets_output::DatetimeOffsetsOutput;
  409    482   
         483  +
/* CodegenDelegator.kt:255 */
  410    484   
pub use crate::operation::datetime_offsets::_datetime_offsets_input::DatetimeOffsetsInput;
  411    485   
         486  +
/* RustModule.kt:172 */
  412    487   
mod _datetime_offsets_input;
  413    488   
         489  +
/* RustModule.kt:172 */
  414    490   
mod _datetime_offsets_output;
  415    491   
  416         -
/// Builders
         492  +
/// /* CodegenDelegator.kt:51 */Builders
  417    493   
pub mod builders;

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

@@ -1,1 +24,44 @@
    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 DatetimeOffsetsInput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct DatetimeOffsetsInput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl DatetimeOffsetsInput {
    7         -
    /// Creates a new builder-style object to manufacture [`DatetimeOffsetsInput`](crate::operation::datetime_offsets::DatetimeOffsetsInput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`DatetimeOffsetsInput`](crate::operation::datetime_offsets::DatetimeOffsetsInput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::datetime_offsets::builders::DatetimeOffsetsInputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::datetime_offsets::builders::DatetimeOffsetsInputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`DatetimeOffsetsInput`](crate::operation::datetime_offsets::DatetimeOffsetsInput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`DatetimeOffsetsInput`](crate::operation::datetime_offsets::DatetimeOffsetsInput).
          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 DatetimeOffsetsInputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct DatetimeOffsetsInputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl DatetimeOffsetsInputBuilder {
   18         -
    /// Consumes the builder and constructs a [`DatetimeOffsetsInput`](crate::operation::datetime_offsets::DatetimeOffsetsInput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`DatetimeOffsetsInput`](crate::operation::datetime_offsets::DatetimeOffsetsInput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(
   20     33   
        self,
   21     34   
    ) -> ::std::result::Result<crate::operation::datetime_offsets::DatetimeOffsetsInput, ::aws_smithy_types::error::operation::BuildError> {
   22         -
        ::std::result::Result::Ok(crate::operation::datetime_offsets::DatetimeOffsetsInput {})
          35  +
        /* BuilderGenerator.kt:254 */
          36  +
        ::std::result::Result::Ok(
          37  +
            /* BuilderGenerator.kt:477 */
          38  +
            crate::operation::datetime_offsets::DatetimeOffsetsInput {
          39  +
            /* BuilderGenerator.kt:477 */}, /* BuilderGenerator.kt:254 */
          40  +
        )
          41  +
        /* BuilderGenerator.kt:253 */
   23     42   
    }
          43  +
    /* BuilderGenerator.kt:355 */
   24     44   
}

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

@@ -1,1 +47,88 @@
    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 DatetimeOffsetsOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct DatetimeOffsetsOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub datetime: ::std::option::Option<::aws_smithy_types::DateTime>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl DatetimeOffsetsOutput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn datetime(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          20  +
        /* StructureGenerator.kt:170 */
   12     21   
        self.datetime.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl DatetimeOffsetsOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`DatetimeOffsetsOutput`](crate::operation::datetime_offsets::DatetimeOffsetsOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`DatetimeOffsetsOutput`](crate::operation::datetime_offsets::DatetimeOffsetsOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::datetime_offsets::builders::DatetimeOffsetsOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::datetime_offsets::builders::DatetimeOffsetsOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`DatetimeOffsetsOutput`](crate::operation::datetime_offsets::DatetimeOffsetsOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`DatetimeOffsetsOutput`](crate::operation::datetime_offsets::DatetimeOffsetsOutput).
          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 DatetimeOffsetsOutputBuilder {
   26         -
    pub(crate) datetime: ::std::option::Option<::aws_smithy_types::DateTime>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) datetime: ::std::option::Option<::aws_smithy_types::DateTime>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl DatetimeOffsetsOutputBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* BuilderGenerator.kt:291 */
   30     53   
    pub fn datetime(mut self, input: ::aws_smithy_types::DateTime) -> Self {
          54  +
        /* BuilderGenerator.kt:292 */
   31     55   
        self.datetime = ::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_datetime(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
          64  +
        /* BuilderGenerator.kt:315 */
   36     65   
        self.datetime = 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_datetime(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
          73  +
        /* BuilderGenerator.kt:337 */
   41     74   
        &self.datetime
          75  +
        /* BuilderGenerator.kt:336 */
   42     76   
    }
   43         -
    /// Consumes the builder and constructs a [`DatetimeOffsetsOutput`](crate::operation::datetime_offsets::DatetimeOffsetsOutput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`DatetimeOffsetsOutput`](crate::operation::datetime_offsets::DatetimeOffsetsOutput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(self) -> crate::operation::datetime_offsets::DatetimeOffsetsOutput {
   45         -
        crate::operation::datetime_offsets::DatetimeOffsetsOutput { datetime: self.datetime }
          80  +
        /* BuilderGenerator.kt:477 */
          81  +
        crate::operation::datetime_offsets::DatetimeOffsetsOutput {
          82  +
            /* BuilderGenerator.kt:481 */ datetime: self.datetime,
          83  +
            /* BuilderGenerator.kt:477 */
          84  +
        }
          85  +
        /* BuilderGenerator.kt:253 */
   46     86   
    }
          87  +
    /* BuilderGenerator.kt:355 */
   47     88   
}

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

@@ -1,1 +110,122 @@
    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::datetime_offsets::_datetime_offsets_output::DatetimeOffsetsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::datetime_offsets::_datetime_offsets_input::DatetimeOffsetsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::datetime_offsets::builders::DatetimeOffsetsInputBuilder {
    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::datetime_offsets::DatetimeOffsetsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::datetime_offsets::DatetimeOffsetsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.datetime_offsets();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `DatetimeOffsets`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `DatetimeOffsets`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct DatetimeOffsetsFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::datetime_offsets::builders::DatetimeOffsetsInputBuilder,
   29     34   
    config_override: ::std::option::Option<crate::config::Builder>,
   30     35   
}
          36  +
/* FluentBuilderGenerator.kt:381 */
   31     37   
impl
   32     38   
    crate::client::customize::internal::CustomizableSend<
   33     39   
        crate::operation::datetime_offsets::DatetimeOffsetsOutput,
   34     40   
        crate::operation::datetime_offsets::DatetimeOffsetsError,
   35     41   
    > for DatetimeOffsetsFluentBuilder
   36     42   
{
   37     43   
    fn send(
   38     44   
        self,
   39     45   
        config_override: crate::config::Builder,
   40     46   
    ) -> crate::client::customize::internal::BoxFuture<
   41     47   
        crate::client::customize::internal::SendResult<
   42     48   
            crate::operation::datetime_offsets::DatetimeOffsetsOutput,
   43     49   
            crate::operation::datetime_offsets::DatetimeOffsetsError,
   44     50   
        >,
   45     51   
    > {
   46     52   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   47     53   
    }
   48     54   
}
          55  +
/* FluentBuilderGenerator.kt:282 */
   49     56   
impl DatetimeOffsetsFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `DatetimeOffsetsFluentBuilder`.
   51     59   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   52     60   
        Self {
   53     61   
            handle,
   54     62   
            inner: ::std::default::Default::default(),
   55     63   
            config_override: ::std::option::Option::None,
   56     64   
        }
   57     65   
    }
          66  +
    /* FluentBuilderGenerator.kt:301 */
   58     67   
    /// Access the DatetimeOffsets as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::datetime_offsets::builders::DatetimeOffsetsInputBuilder {
   60     69   
        &self.inner
   61     70   
    }
          71  +
    /* FluentBuilderGenerator.kt:145 */
   62     72   
    /// Sends the request and returns the response.
   63     73   
    ///
   64     74   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   65     75   
    /// can be matched against.
   66     76   
    ///
   67     77   
    /// By default, any retryable failures will be retried twice. Retry behavior
   68     78   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   69     79   
    /// set when configuring the client.
   70     80   
    pub async fn send(
   71     81   
        self,
   72     82   
    ) -> ::std::result::Result<
   73     83   
        crate::operation::datetime_offsets::DatetimeOffsetsOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::datetime_offsets::DatetimeOffsetsError,
   76     86   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   77     87   
        >,
   78     88   
    > {
   79     89   
        let input = self
   80     90   
            .inner
   81     91   
            .build()
   82     92   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   83     93   
        let runtime_plugins = crate::operation::datetime_offsets::DatetimeOffsets::operation_runtime_plugins(
   84     94   
            self.handle.runtime_plugins.clone(),
   85     95   
            &self.handle.conf,
   86     96   
            self.config_override,
   87     97   
        );
   88     98   
        crate::operation::datetime_offsets::DatetimeOffsets::orchestrate(&runtime_plugins, input).await
   89     99   
    }
   90    100   
   91    101   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   92    102   
    pub fn customize(
   93    103   
        self,
   94    104   
    ) -> crate::client::customize::CustomizableOperation<
   95    105   
        crate::operation::datetime_offsets::DatetimeOffsetsOutput,
   96    106   
        crate::operation::datetime_offsets::DatetimeOffsetsError,
   97    107   
        Self,
   98    108   
    > {
   99    109   
        crate::client::customize::CustomizableOperation::new(self)
  100    110   
    }
         111  +
    /* FluentBuilderGenerator.kt:315 */
  101    112   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  102    113   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  103    114   
        self
  104    115   
    }
  105    116   
  106    117   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  107    118   
        self.config_override = config_override;
  108    119   
        self
  109    120   
    }
         121  +
    /* FluentBuilderGenerator.kt:282 */
  110    122   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/empty_input_and_empty_output.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 `EmptyInputAndEmptyOutput`.
           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 EmptyInputAndEmptyOutput;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl EmptyInputAndEmptyOutput {
    7         -
    /// Creates a new `EmptyInputAndEmptyOutput`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `EmptyInputAndEmptyOutput`
          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::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +268,285 @@
   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 EmptyInputAndEmptyOutput {
   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("EmptyInputAndEmptyOutput");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            EmptyInputAndEmptyOutputRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            EmptyInputAndEmptyOutputResponseDeserializer,
  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   
            "EmptyInputAndEmptyOutput",
  111    122   
            "EC2 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("EmptyInputAndEmptyOutput")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(EmptyInputAndEmptyOutputEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError,
  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 EmptyInputAndEmptyOutputResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for EmptyInputAndEmptyOutputResponseDeserializer {
  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_empty_input_and_empty_output::de_empty_input_and_empty_output_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_empty_input_and_empty_output::de_empty_input_and_empty_output_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 EmptyInputAndEmptyOutputRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for EmptyInputAndEmptyOutputRequestSerializer {
  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::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput>()
  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::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput,
  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::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput,
  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-www-form-urlencoded");
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from(
  196    209   
            crate::protocol_serde::shape_empty_input_and_empty_output_input::ser_empty_input_and_empty_output_input_input_input(&input)?,
  197    210   
        );
  198    211   
  199    212   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  200    213   
    }
  201    214   
}
         215  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  202    216   
#[derive(Debug)]
  203    217   
struct EmptyInputAndEmptyOutputEndpointParamsInterceptor;
  204    218   
  205    219   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for EmptyInputAndEmptyOutputEndpointParamsInterceptor {
  206    220   
    fn name(&self) -> &'static str {
  207    221   
        "EmptyInputAndEmptyOutputEndpointParamsInterceptor"
  208    222   
    }
  209    223   
  210    224   
    fn read_before_execution(
  211    225   
        &self,
  212    226   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  213    227   
            '_,
  214    228   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  215    229   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  216    230   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  217    231   
        >,
  218    232   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  219    233   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  220    234   
        let _input = context
  221    235   
            .input()
  222    236   
            .downcast_ref::<EmptyInputAndEmptyOutputInput>()
  223    237   
            .ok_or("failed to downcast to EmptyInputAndEmptyOutputInput")?;
  224    238   
  225    239   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  226    240   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  227    241   
        })?;
  228    242   
        cfg.interceptor_state()
  229    243   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  230    244   
        ::std::result::Result::Ok(())
  231    245   
    }
  232    246   
}
  233    247   
  234    248   
// The get_* functions below are generated from JMESPath expressions in the
  235    249   
// operationContextParams trait. They target the operation's input shape.
  236    250   
         251  +
/* RustType.kt:516 */
  237    252   
#[allow(unreachable_code, unused_variables)]
         253  +
/* RustType.kt:516 */
  238    254   
#[cfg(test)]
         255  +
/* ProtocolTestGenerator.kt:98 */
  239    256   
mod empty_input_and_empty_output_test {
  240    257   
  241    258   
    /// Empty input serializes no extra query params
  242    259   
    /// Test ID: Ec2QueryEmptyInputAndEmptyOutput
  243    260   
    #[::tokio::test]
  244    261   
    #[::tracing_test::traced_test]
  245    262   
    async fn ec2_query_empty_input_and_empty_output_request() {
  246    263   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  247    264   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  248    265   
@@ -272,289 +401,477 @@
  292    309   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  293    310   
                )))
  294    311   
            });
  295    312   
            de.deserialize_nonstreaming(&http_response)
  296    313   
        });
  297    314   
        let parsed = parsed
  298    315   
            .expect("should be successful response")
  299    316   
            .downcast::<crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput>()
  300    317   
            .unwrap();
  301    318   
    }
         319  +
         320  +
    /* ProtocolTestGenerator.kt:98 */
  302    321   
}
  303    322   
         323  +
/* OperationErrorGenerator.kt:79 */
  304    324   
/// Error type for the `EmptyInputAndEmptyOutputError` operation.
         325  +
/* RustType.kt:516 */
  305    326   
#[non_exhaustive]
         327  +
/* RustType.kt:516 */
  306    328   
#[derive(::std::fmt::Debug)]
  307         -
pub enum EmptyInputAndEmptyOutputError {
         329  +
pub /* OperationErrorGenerator.kt:81 */ enum EmptyInputAndEmptyOutputError {
         330  +
    /* OperationErrorGenerator.kt:88 */
  308    331   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  309    332   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  310    333   
    variable wildcard pattern and check `.code()`:
  311    334   
     \
  312    335   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  313    336   
     \
  314    337   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-EmptyInputAndEmptyOutputError) for what information is available for the error.")]
  315    338   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         339  +
    /* OperationErrorGenerator.kt:81 */
  316    340   
}
         341  +
/* OperationErrorGenerator.kt:218 */
  317    342   
impl EmptyInputAndEmptyOutputError {
         343  +
    /* OperationErrorGenerator.kt:219 */
  318    344   
    /// Creates the `EmptyInputAndEmptyOutputError::Unhandled` variant from any error type.
  319    345   
    pub fn unhandled(
  320    346   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  321    347   
    ) -> Self {
  322    348   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  323    349   
            source: err.into(),
  324    350   
            meta: ::std::default::Default::default(),
  325    351   
        })
  326    352   
    }
  327    353   
  328    354   
    /// Creates the `EmptyInputAndEmptyOutputError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  329    355   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  330    356   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  331    357   
            source: err.clone().into(),
  332    358   
            meta: err,
  333    359   
        })
  334    360   
    }
  335         -
    ///
         361  +
    /// /* OperationErrorGenerator.kt:236 */
  336    362   
    /// Returns error metadata, which includes the error code, message,
  337    363   
    /// request ID, and potentially additional information.
  338    364   
    ///
         365  +
    /* OperationErrorGenerator.kt:242 */
  339    366   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         367  +
        /* OperationErrorGenerator.kt:243 */
  340    368   
        match self {
  341         -
            Self::Unhandled(e) => &e.meta,
         369  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         370  +
            /* OperationErrorGenerator.kt:243 */
  342    371   
        }
         372  +
        /* OperationErrorGenerator.kt:242 */
  343    373   
    }
         374  +
    /* OperationErrorGenerator.kt:218 */
  344    375   
}
         376  +
/* OperationErrorGenerator.kt:269 */
  345    377   
impl ::std::error::Error for EmptyInputAndEmptyOutputError {
         378  +
    /* OperationErrorGenerator.kt:270 */
  346    379   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         380  +
        /* OperationErrorGenerator.kt:318 */
  347    381   
        match self {
  348         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         382  +
            /* OperationErrorGenerator.kt:326 */
         383  +
            Self::Unhandled(_inner) => {
         384  +
                /* OperationErrorGenerator.kt:279 */
         385  +
                ::std::option::Option::Some(&*_inner.source)
         386  +
                /* OperationErrorGenerator.kt:326 */
         387  +
            } /* OperationErrorGenerator.kt:318 */
  349    388   
        }
         389  +
        /* OperationErrorGenerator.kt:270 */
  350    390   
    }
         391  +
    /* OperationErrorGenerator.kt:269 */
  351    392   
}
         393  +
/* OperationErrorGenerator.kt:133 */
  352    394   
impl ::std::fmt::Display for EmptyInputAndEmptyOutputError {
         395  +
    /* OperationErrorGenerator.kt:134 */
  353    396   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         397  +
        /* OperationErrorGenerator.kt:318 */
  354    398   
        match self {
         399  +
            /* OperationErrorGenerator.kt:326 */
  355    400   
            Self::Unhandled(_inner) => {
         401  +
                /* OperationErrorGenerator.kt:139 */
  356    402   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  357    403   
                    write!(f, "unhandled error ({code})")
  358    404   
                } else {
  359    405   
                    f.write_str("unhandled error")
  360    406   
                }
  361         -
            }
         407  +
                /* OperationErrorGenerator.kt:326 */
         408  +
            } /* OperationErrorGenerator.kt:318 */
  362    409   
        }
         410  +
        /* OperationErrorGenerator.kt:134 */
  363    411   
    }
         412  +
    /* OperationErrorGenerator.kt:133 */
  364    413   
}
         414  +
/* OperationErrorGenerator.kt:182 */
  365    415   
impl ::aws_smithy_types::retry::ProvideErrorKind for EmptyInputAndEmptyOutputError {
         416  +
    /* OperationErrorGenerator.kt:186 */
  366    417   
    fn code(&self) -> ::std::option::Option<&str> {
         418  +
        /* OperationErrorGenerator.kt:187 */
  367    419   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         420  +
        /* OperationErrorGenerator.kt:186 */
  368    421   
    }
         422  +
    /* OperationErrorGenerator.kt:190 */
  369    423   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         424  +
        /* OperationErrorGenerator.kt:197 */
  370    425   
        ::std::option::Option::None
         426  +
        /* OperationErrorGenerator.kt:190 */
  371    427   
    }
         428  +
    /* OperationErrorGenerator.kt:182 */
  372    429   
}
         430  +
/* OperationErrorGenerator.kt:163 */
  373    431   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for EmptyInputAndEmptyOutputError {
         432  +
    /* OperationErrorGenerator.kt:164 */
  374    433   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         434  +
        /* OperationErrorGenerator.kt:318 */
  375    435   
        match self {
  376         -
            Self::Unhandled(_inner) => &_inner.meta,
         436  +
            /* OperationErrorGenerator.kt:326 */
         437  +
            Self::Unhandled(_inner) => {
         438  +
                /* OperationErrorGenerator.kt:168 */
         439  +
                &_inner.meta
         440  +
                /* OperationErrorGenerator.kt:326 */
         441  +
            } /* OperationErrorGenerator.kt:318 */
  377    442   
        }
         443  +
        /* OperationErrorGenerator.kt:164 */
  378    444   
    }
         445  +
    /* OperationErrorGenerator.kt:163 */
  379    446   
}
         447  +
/* OperationErrorGenerator.kt:109 */
  380    448   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for EmptyInputAndEmptyOutputError {
         449  +
    /* OperationErrorGenerator.kt:110 */
  381    450   
    fn create_unhandled_error(
  382    451   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  383    452   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  384    453   
    ) -> Self {
         454  +
        /* OperationErrorGenerator.kt:121 */
  385    455   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  386    456   
            source,
  387    457   
            meta: meta.unwrap_or_default(),
  388    458   
        })
         459  +
        /* OperationErrorGenerator.kt:110 */
  389    460   
    }
         461  +
    /* OperationErrorGenerator.kt:109 */
  390    462   
}
  391    463   
         464  +
/* CodegenDelegator.kt:255 */
  392    465   
pub use crate::operation::empty_input_and_empty_output::_empty_input_and_empty_output_output::EmptyInputAndEmptyOutputOutput;
  393    466   
         467  +
/* CodegenDelegator.kt:255 */
  394    468   
pub use crate::operation::empty_input_and_empty_output::_empty_input_and_empty_output_input::EmptyInputAndEmptyOutputInput;
  395    469   
         470  +
/* RustModule.kt:172 */
  396    471   
mod _empty_input_and_empty_output_input;
  397    472   
         473  +
/* RustModule.kt:172 */
  398    474   
mod _empty_input_and_empty_output_output;
  399    475   
  400         -
/// Builders
         476  +
/// /* CodegenDelegator.kt:51 */Builders
  401    477   
pub mod builders;

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/empty_input_and_empty_output/_empty_input_and_empty_output_input.rs

@@ -1,1 +27,47 @@
    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 EmptyInputAndEmptyOutputInput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct EmptyInputAndEmptyOutputInput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl EmptyInputAndEmptyOutputInput {
    7         -
    /// Creates a new builder-style object to manufacture [`EmptyInputAndEmptyOutputInput`](crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`EmptyInputAndEmptyOutputInput`](crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::empty_input_and_empty_output::builders::EmptyInputAndEmptyOutputInputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::empty_input_and_empty_output::builders::EmptyInputAndEmptyOutputInputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`EmptyInputAndEmptyOutputInput`](crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`EmptyInputAndEmptyOutputInput`](crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput).
          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 EmptyInputAndEmptyOutputInputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct EmptyInputAndEmptyOutputInputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl EmptyInputAndEmptyOutputInputBuilder {
   18         -
    /// Consumes the builder and constructs a [`EmptyInputAndEmptyOutputInput`](crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`EmptyInputAndEmptyOutputInput`](crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(
   20     33   
        self,
   21     34   
    ) -> ::std::result::Result<
   22     35   
        crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput,
   23     36   
        ::aws_smithy_types::error::operation::BuildError,
   24     37   
    > {
   25         -
        ::std::result::Result::Ok(crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput {})
          38  +
        /* BuilderGenerator.kt:254 */
          39  +
        ::std::result::Result::Ok(
          40  +
            /* BuilderGenerator.kt:477 */
          41  +
            crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput {
          42  +
            /* BuilderGenerator.kt:477 */}, /* BuilderGenerator.kt:254 */
          43  +
        )
          44  +
        /* BuilderGenerator.kt:253 */
   26     45   
    }
          46  +
    /* BuilderGenerator.kt:355 */
   27     47   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/empty_input_and_empty_output/_empty_input_and_empty_output_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 EmptyInputAndEmptyOutputOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct EmptyInputAndEmptyOutputOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl EmptyInputAndEmptyOutputOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`EmptyInputAndEmptyOutputOutput`](crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`EmptyInputAndEmptyOutputOutput`](crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::empty_input_and_empty_output::builders::EmptyInputAndEmptyOutputOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::empty_input_and_empty_output::builders::EmptyInputAndEmptyOutputOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`EmptyInputAndEmptyOutputOutput`](crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`EmptyInputAndEmptyOutputOutput`](crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput).
          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 EmptyInputAndEmptyOutputOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct EmptyInputAndEmptyOutputOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl EmptyInputAndEmptyOutputOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`EmptyInputAndEmptyOutputOutput`](crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`EmptyInputAndEmptyOutputOutput`](crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput {
   20         -
        crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/empty_input_and_empty_output/builders.rs

@@ -1,1 +111,123 @@
    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::empty_input_and_empty_output::_empty_input_and_empty_output_output::EmptyInputAndEmptyOutputOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::empty_input_and_empty_output::_empty_input_and_empty_output_input::EmptyInputAndEmptyOutputInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::empty_input_and_empty_output::builders::EmptyInputAndEmptyOutputInputBuilder {
    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::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.empty_input_and_empty_output();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `EmptyInputAndEmptyOutput`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `EmptyInputAndEmptyOutput`.
   24     27   
///
   25         -
/// The example tests how requests and responses are serialized when there's no request or response members. While this should be rare, code generators must support this.
          28  +
/// /* FluentBuilderGenerator.kt:130 */The example tests how requests and responses are serialized when there's no request or response members. While this should be rare, code generators must support this.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct EmptyInputAndEmptyOutputFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::empty_input_and_empty_output::builders::EmptyInputAndEmptyOutputInputBuilder,
   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::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput,
   35     41   
        crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError,
   36     42   
    > for EmptyInputAndEmptyOutputFluentBuilder
   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::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput,
   44     50   
            crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError,
   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 EmptyInputAndEmptyOutputFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `EmptyInputAndEmptyOutputFluentBuilder`.
   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 EmptyInputAndEmptyOutput as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::empty_input_and_empty_output::builders::EmptyInputAndEmptyOutputInputBuilder {
   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::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError,
   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::empty_input_and_empty_output::EmptyInputAndEmptyOutput::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::empty_input_and_empty_output::EmptyInputAndEmptyOutput::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::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput,
   97    107   
        crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError,
   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:282 */
  111    123   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/endpoint_operation.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 `EndpointOperation`.
           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 EndpointOperation;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl EndpointOperation {
    7         -
    /// Creates a new `EndpointOperation`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `EndpointOperation`
          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::endpoint_operation::EndpointOperationInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::endpoint_operation::EndpointOperationOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::endpoint_operation::EndpointOperationError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +365,441 @@
   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 EndpointOperation {
   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("EndpointOperation");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            EndpointOperationRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            EndpointOperationResponseDeserializer,
   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   
            "EndpointOperation",
  105    116   
            "EC2 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("EndpointOperation")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(EndpointOperationEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::endpoint_operation::EndpointOperationError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::endpoint_operation::EndpointOperationError,
  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 EndpointOperationResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for EndpointOperationResponseDeserializer {
  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_endpoint_operation::de_endpoint_operation_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_endpoint_operation::de_endpoint_operation_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 EndpointOperationRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for EndpointOperationRequestSerializer {
  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::endpoint_operation::EndpointOperationInput>()
  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::endpoint_operation::EndpointOperationInput,
  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::endpoint_operation::EndpointOperationInput,
  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-www-form-urlencoded");
  187    200   
            builder
  188    201   
        };
  189    202   
        let body = ::aws_smithy_types::body::SdkBody::from(
  190    203   
            crate::protocol_serde::shape_endpoint_operation_input::ser_endpoint_operation_input_input_input(&input)?,
  191    204   
        );
  192    205   
  193    206   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  194    207   
    }
  195    208   
}
         209  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  196    210   
#[derive(Debug)]
  197    211   
struct EndpointOperationEndpointParamsInterceptor;
  198    212   
  199    213   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for EndpointOperationEndpointParamsInterceptor {
  200    214   
    fn name(&self) -> &'static str {
  201    215   
        "EndpointOperationEndpointParamsInterceptor"
  202    216   
    }
  203    217   
  204    218   
    fn read_before_execution(
  205    219   
        &self,
  206    220   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  207    221   
            '_,
  208    222   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  209    223   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  210    224   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  211    225   
        >,
  212    226   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  213    227   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  214    228   
        let _input = context
  215    229   
            .input()
  216    230   
            .downcast_ref::<EndpointOperationInput>()
  217    231   
            .ok_or("failed to downcast to EndpointOperationInput")?;
  218    232   
  219    233   
        let endpoint_prefix = ::aws_smithy_runtime_api::client::endpoint::EndpointPrefix::new("foo.").map_err(|err| {
  220    234   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint prefix could not be built", err)
  221    235   
        })?;
  222    236   
        cfg.interceptor_state().store_put(endpoint_prefix);
  223    237   
  224    238   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  225    239   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  226    240   
        })?;
  227    241   
        cfg.interceptor_state()
  228    242   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  229    243   
        ::std::result::Result::Ok(())
  230    244   
    }
  231    245   
}
  232    246   
  233    247   
// The get_* functions below are generated from JMESPath expressions in the
  234    248   
// operationContextParams trait. They target the operation's input shape.
  235    249   
         250  +
/* RustType.kt:516 */
  236    251   
#[allow(unreachable_code, unused_variables)]
         252  +
/* RustType.kt:516 */
  237    253   
#[cfg(test)]
         254  +
/* ProtocolTestGenerator.kt:98 */
  238    255   
mod endpoint_operation_test {
  239    256   
  240    257   
    /// Operations can prepend to the given host if they define the
  241    258   
    /// endpoint trait.
  242    259   
    /// Test ID: Ec2QueryEndpointTrait
  243    260   
    #[::tokio::test]
  244    261   
    #[::tracing_test::traced_test]
  245    262   
    async fn ec2_query_endpoint_trait_request() {
  246    263   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  247    264   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  248    265   
  249    266   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  250    267   
        let result = client.endpoint_operation().send().await;
  251    268   
        let _ = dbg!(result);
  252    269   
        let http_request = request_receiver.expect_request();
  253    270   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  254    271   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  255    272   
        let body = http_request.body().bytes().expect("body should be strict");
  256    273   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  257    274   
            body,
  258    275   
            "Action=EndpointOperation&Version=2020-01-08",
  259    276   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  260    277   
        ));
  261    278   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  262    279   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  263    280   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  264    281   
        ::pretty_assertions::assert_eq!(uri.host().expect("host should be set"), "foo.example.com");
  265    282   
    }
         283  +
         284  +
    /* ProtocolTestGenerator.kt:98 */
  266    285   
}
  267    286   
         287  +
/* OperationErrorGenerator.kt:79 */
  268    288   
/// Error type for the `EndpointOperationError` operation.
         289  +
/* RustType.kt:516 */
  269    290   
#[non_exhaustive]
         291  +
/* RustType.kt:516 */
  270    292   
#[derive(::std::fmt::Debug)]
  271         -
pub enum EndpointOperationError {
         293  +
pub /* OperationErrorGenerator.kt:81 */ enum EndpointOperationError {
         294  +
    /* OperationErrorGenerator.kt:88 */
  272    295   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  273    296   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  274    297   
    variable wildcard pattern and check `.code()`:
  275    298   
     \
  276    299   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  277    300   
     \
  278    301   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-EndpointOperationError) for what information is available for the error.")]
  279    302   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         303  +
    /* OperationErrorGenerator.kt:81 */
  280    304   
}
         305  +
/* OperationErrorGenerator.kt:218 */
  281    306   
impl EndpointOperationError {
         307  +
    /* OperationErrorGenerator.kt:219 */
  282    308   
    /// Creates the `EndpointOperationError::Unhandled` variant from any error type.
  283    309   
    pub fn unhandled(
  284    310   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  285    311   
    ) -> Self {
  286    312   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  287    313   
            source: err.into(),
  288    314   
            meta: ::std::default::Default::default(),
  289    315   
        })
  290    316   
    }
  291    317   
  292    318   
    /// Creates the `EndpointOperationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  293    319   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  294    320   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  295    321   
            source: err.clone().into(),
  296    322   
            meta: err,
  297    323   
        })
  298    324   
    }
  299         -
    ///
         325  +
    /// /* OperationErrorGenerator.kt:236 */
  300    326   
    /// Returns error metadata, which includes the error code, message,
  301    327   
    /// request ID, and potentially additional information.
  302    328   
    ///
         329  +
    /* OperationErrorGenerator.kt:242 */
  303    330   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         331  +
        /* OperationErrorGenerator.kt:243 */
  304    332   
        match self {
  305         -
            Self::Unhandled(e) => &e.meta,
         333  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         334  +
            /* OperationErrorGenerator.kt:243 */
  306    335   
        }
         336  +
        /* OperationErrorGenerator.kt:242 */
  307    337   
    }
         338  +
    /* OperationErrorGenerator.kt:218 */
  308    339   
}
         340  +
/* OperationErrorGenerator.kt:269 */
  309    341   
impl ::std::error::Error for EndpointOperationError {
         342  +
    /* OperationErrorGenerator.kt:270 */
  310    343   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         344  +
        /* OperationErrorGenerator.kt:318 */
  311    345   
        match self {
  312         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         346  +
            /* OperationErrorGenerator.kt:326 */
         347  +
            Self::Unhandled(_inner) => {
         348  +
                /* OperationErrorGenerator.kt:279 */
         349  +
                ::std::option::Option::Some(&*_inner.source)
         350  +
                /* OperationErrorGenerator.kt:326 */
         351  +
            } /* OperationErrorGenerator.kt:318 */
  313    352   
        }
         353  +
        /* OperationErrorGenerator.kt:270 */
  314    354   
    }
         355  +
    /* OperationErrorGenerator.kt:269 */
  315    356   
}
         357  +
/* OperationErrorGenerator.kt:133 */
  316    358   
impl ::std::fmt::Display for EndpointOperationError {
         359  +
    /* OperationErrorGenerator.kt:134 */
  317    360   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         361  +
        /* OperationErrorGenerator.kt:318 */
  318    362   
        match self {
         363  +
            /* OperationErrorGenerator.kt:326 */
  319    364   
            Self::Unhandled(_inner) => {
         365  +
                /* OperationErrorGenerator.kt:139 */
  320    366   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  321    367   
                    write!(f, "unhandled error ({code})")
  322    368   
                } else {
  323    369   
                    f.write_str("unhandled error")
  324    370   
                }
  325         -
            }
         371  +
                /* OperationErrorGenerator.kt:326 */
         372  +
            } /* OperationErrorGenerator.kt:318 */
  326    373   
        }
         374  +
        /* OperationErrorGenerator.kt:134 */
  327    375   
    }
         376  +
    /* OperationErrorGenerator.kt:133 */
  328    377   
}
         378  +
/* OperationErrorGenerator.kt:182 */
  329    379   
impl ::aws_smithy_types::retry::ProvideErrorKind for EndpointOperationError {
         380  +
    /* OperationErrorGenerator.kt:186 */
  330    381   
    fn code(&self) -> ::std::option::Option<&str> {
         382  +
        /* OperationErrorGenerator.kt:187 */
  331    383   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         384  +
        /* OperationErrorGenerator.kt:186 */
  332    385   
    }
         386  +
    /* OperationErrorGenerator.kt:190 */
  333    387   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         388  +
        /* OperationErrorGenerator.kt:197 */
  334    389   
        ::std::option::Option::None
         390  +
        /* OperationErrorGenerator.kt:190 */
  335    391   
    }
         392  +
    /* OperationErrorGenerator.kt:182 */
  336    393   
}
         394  +
/* OperationErrorGenerator.kt:163 */
  337    395   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for EndpointOperationError {
         396  +
    /* OperationErrorGenerator.kt:164 */
  338    397   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         398  +
        /* OperationErrorGenerator.kt:318 */
  339    399   
        match self {
  340         -
            Self::Unhandled(_inner) => &_inner.meta,
         400  +
            /* OperationErrorGenerator.kt:326 */
         401  +
            Self::Unhandled(_inner) => {
         402  +
                /* OperationErrorGenerator.kt:168 */
         403  +
                &_inner.meta
         404  +
                /* OperationErrorGenerator.kt:326 */
         405  +
            } /* OperationErrorGenerator.kt:318 */
  341    406   
        }
         407  +
        /* OperationErrorGenerator.kt:164 */
  342    408   
    }
         409  +
    /* OperationErrorGenerator.kt:163 */
  343    410   
}
         411  +
/* OperationErrorGenerator.kt:109 */
  344    412   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for EndpointOperationError {
         413  +
    /* OperationErrorGenerator.kt:110 */
  345    414   
    fn create_unhandled_error(
  346    415   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  347    416   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  348    417   
    ) -> Self {
         418  +
        /* OperationErrorGenerator.kt:121 */
  349    419   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  350    420   
            source,
  351    421   
            meta: meta.unwrap_or_default(),
  352    422   
        })
         423  +
        /* OperationErrorGenerator.kt:110 */
  353    424   
    }
         425  +
    /* OperationErrorGenerator.kt:109 */
  354    426   
}
  355    427   
         428  +
/* CodegenDelegator.kt:255 */
  356    429   
pub use crate::operation::endpoint_operation::_endpoint_operation_output::EndpointOperationOutput;
  357    430   
         431  +
/* CodegenDelegator.kt:255 */
  358    432   
pub use crate::operation::endpoint_operation::_endpoint_operation_input::EndpointOperationInput;
  359    433   
         434  +
/* RustModule.kt:172 */
  360    435   
mod _endpoint_operation_input;
  361    436   
         437  +
/* RustModule.kt:172 */
  362    438   
mod _endpoint_operation_output;
  363    439   
  364         -
/// Builders
         440  +
/// /* CodegenDelegator.kt:51 */Builders
  365    441   
pub mod builders;

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/endpoint_operation/_endpoint_operation_input.rs

@@ -1,1 +24,44 @@
    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 EndpointOperationInput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct EndpointOperationInput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl EndpointOperationInput {
    7         -
    /// Creates a new builder-style object to manufacture [`EndpointOperationInput`](crate::operation::endpoint_operation::EndpointOperationInput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`EndpointOperationInput`](crate::operation::endpoint_operation::EndpointOperationInput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::endpoint_operation::builders::EndpointOperationInputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::endpoint_operation::builders::EndpointOperationInputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`EndpointOperationInput`](crate::operation::endpoint_operation::EndpointOperationInput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`EndpointOperationInput`](crate::operation::endpoint_operation::EndpointOperationInput).
          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 EndpointOperationInputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct EndpointOperationInputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl EndpointOperationInputBuilder {
   18         -
    /// Consumes the builder and constructs a [`EndpointOperationInput`](crate::operation::endpoint_operation::EndpointOperationInput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`EndpointOperationInput`](crate::operation::endpoint_operation::EndpointOperationInput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(
   20     33   
        self,
   21     34   
    ) -> ::std::result::Result<crate::operation::endpoint_operation::EndpointOperationInput, ::aws_smithy_types::error::operation::BuildError> {
   22         -
        ::std::result::Result::Ok(crate::operation::endpoint_operation::EndpointOperationInput {})
          35  +
        /* BuilderGenerator.kt:254 */
          36  +
        ::std::result::Result::Ok(
          37  +
            /* BuilderGenerator.kt:477 */
          38  +
            crate::operation::endpoint_operation::EndpointOperationInput {
          39  +
            /* BuilderGenerator.kt:477 */}, /* BuilderGenerator.kt:254 */
          40  +
        )
          41  +
        /* BuilderGenerator.kt:253 */
   23     42   
    }
          43  +
    /* BuilderGenerator.kt:355 */
   24     44   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/endpoint_operation/_endpoint_operation_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 EndpointOperationOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct EndpointOperationOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl EndpointOperationOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`EndpointOperationOutput`](crate::operation::endpoint_operation::EndpointOperationOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`EndpointOperationOutput`](crate::operation::endpoint_operation::EndpointOperationOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::endpoint_operation::builders::EndpointOperationOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::endpoint_operation::builders::EndpointOperationOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`EndpointOperationOutput`](crate::operation::endpoint_operation::EndpointOperationOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`EndpointOperationOutput`](crate::operation::endpoint_operation::EndpointOperationOutput).
          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 EndpointOperationOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct EndpointOperationOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl EndpointOperationOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`EndpointOperationOutput`](crate::operation::endpoint_operation::EndpointOperationOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`EndpointOperationOutput`](crate::operation::endpoint_operation::EndpointOperationOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::endpoint_operation::EndpointOperationOutput {
   20         -
        crate::operation::endpoint_operation::EndpointOperationOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::endpoint_operation::EndpointOperationOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}