Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

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

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

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

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

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

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

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

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

@@ -1,1 +230,369 @@
    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         -
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
           8  +
pub /* ServiceErrorGenerator.kt:257 */ enum Error {
           9  +
    /// /* ServiceErrorGenerator.kt:264 */An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
          10  +
    /* ServiceErrorGenerator.kt:320 */
    7     11   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
    8     12   
    variable wildcard pattern and check `.code()`:
    9     13   
     \
   10     14   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
   11     15   
     \
   12     16   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
   13         -
    Unhandled(crate::error::sealed_unhandled::Unhandled),
          17  +
    /* ServiceErrorGenerator.kt:266 */
          18  +
    Unhandled(crate::error::sealed_unhandled::Unhandled), /* ServiceErrorGenerator.kt:257 */
   14     19   
}
          20  +
/* ServiceErrorGenerator.kt:131 */
   15     21   
impl ::std::fmt::Display for Error {
          22  +
    /* ServiceErrorGenerator.kt:132 */
   16     23   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          24  +
        /* ServiceErrorGenerator.kt:133 */
   17     25   
        match self {
          26  +
            /* ServiceErrorGenerator.kt:137 */
   18     27   
            Error::Unhandled(_) => {
   19     28   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
   20     29   
                    write!(f, "unhandled error ({code})")
   21     30   
                } else {
   22     31   
                    f.write_str("unhandled error")
   23     32   
                }
   24         -
            }
          33  +
            } /* ServiceErrorGenerator.kt:133 */
   25     34   
        }
          35  +
        /* ServiceErrorGenerator.kt:132 */
   26     36   
    }
          37  +
    /* ServiceErrorGenerator.kt:131 */
   27     38   
}
          39  +
/* ServiceErrorGenerator.kt:154 */
   28     40   
impl From<::aws_smithy_types::error::operation::BuildError> for Error {
   29     41   
    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
   30     42   
        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   31     43   
            source: value.into(),
   32     44   
            meta: ::std::default::Default::default(),
   33     45   
        })
   34     46   
    }
   35     47   
}
          48  +
/* ServiceErrorGenerator.kt:223 */
   36     49   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
   37     50   
    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
   38     51   
        match self {
   39     52   
            Self::Unhandled(inner) => &inner.meta,
   40     53   
        }
   41     54   
    }
   42     55   
}
          56  +
/* ServiceErrorGenerator.kt:174 */
   43     57   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::attribute_party::AttributePartyError, R>> for Error
   44     58   
where
   45     59   
    R: Send + Sync + std::fmt::Debug + 'static,
   46     60   
{
          61  +
    /* ServiceErrorGenerator.kt:179 */
   47     62   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::attribute_party::AttributePartyError, R>) -> Self {
          63  +
        /* ServiceErrorGenerator.kt:184 */
   48     64   
        match err {
          65  +
            /* ServiceErrorGenerator.kt:185 */
   49     66   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
          67  +
            /* ServiceErrorGenerator.kt:186 */
   50     68   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   51     69   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
   52     70   
                source: err.into(),
   53     71   
            }),
          72  +
            /* ServiceErrorGenerator.kt:184 */
   54     73   
        }
          74  +
        /* ServiceErrorGenerator.kt:179 */
   55     75   
    }
          76  +
    /* ServiceErrorGenerator.kt:174 */
   56     77   
}
          78  +
/* ServiceErrorGenerator.kt:202 */
   57     79   
impl From<crate::operation::attribute_party::AttributePartyError> for Error {
          80  +
    /* ServiceErrorGenerator.kt:203 */
   58     81   
    fn from(err: crate::operation::attribute_party::AttributePartyError) -> Self {
          82  +
        /* ServiceErrorGenerator.kt:204 */
   59     83   
        match err {
          84  +
            /* ServiceErrorGenerator.kt:212 */
   60     85   
            crate::operation::attribute_party::AttributePartyError::Unhandled(inner) => Error::Unhandled(inner),
          86  +
            /* ServiceErrorGenerator.kt:204 */
   61     87   
        }
          88  +
        /* ServiceErrorGenerator.kt:203 */
   62     89   
    }
          90  +
    /* ServiceErrorGenerator.kt:202 */
   63     91   
}
          92  +
/* ServiceErrorGenerator.kt:174 */
   64     93   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::checksum_required::ChecksumRequiredError, R>> for Error
   65     94   
where
   66     95   
    R: Send + Sync + std::fmt::Debug + 'static,
   67     96   
{
          97  +
    /* ServiceErrorGenerator.kt:179 */
   68     98   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::checksum_required::ChecksumRequiredError, R>) -> Self {
          99  +
        /* ServiceErrorGenerator.kt:184 */
   69    100   
        match err {
         101  +
            /* ServiceErrorGenerator.kt:185 */
   70    102   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         103  +
            /* ServiceErrorGenerator.kt:186 */
   71    104   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   72    105   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
   73    106   
                source: err.into(),
   74    107   
            }),
         108  +
            /* ServiceErrorGenerator.kt:184 */
   75    109   
        }
         110  +
        /* ServiceErrorGenerator.kt:179 */
   76    111   
    }
         112  +
    /* ServiceErrorGenerator.kt:174 */
   77    113   
}
         114  +
/* ServiceErrorGenerator.kt:202 */
   78    115   
impl From<crate::operation::checksum_required::ChecksumRequiredError> for Error {
         116  +
    /* ServiceErrorGenerator.kt:203 */
   79    117   
    fn from(err: crate::operation::checksum_required::ChecksumRequiredError) -> Self {
         118  +
        /* ServiceErrorGenerator.kt:204 */
   80    119   
        match err {
         120  +
            /* ServiceErrorGenerator.kt:212 */
   81    121   
            crate::operation::checksum_required::ChecksumRequiredError::Unhandled(inner) => Error::Unhandled(inner),
         122  +
            /* ServiceErrorGenerator.kt:204 */
   82    123   
        }
         124  +
        /* ServiceErrorGenerator.kt:203 */
   83    125   
    }
         126  +
    /* ServiceErrorGenerator.kt:202 */
   84    127   
}
         128  +
/* ServiceErrorGenerator.kt:174 */
   85    129   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_foo::CreateFooError, R>> for Error
   86    130   
where
   87    131   
    R: Send + Sync + std::fmt::Debug + 'static,
   88    132   
{
         133  +
    /* ServiceErrorGenerator.kt:179 */
   89    134   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_foo::CreateFooError, R>) -> Self {
         135  +
        /* ServiceErrorGenerator.kt:184 */
   90    136   
        match err {
         137  +
            /* ServiceErrorGenerator.kt:185 */
   91    138   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         139  +
            /* ServiceErrorGenerator.kt:186 */
   92    140   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   93    141   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
   94    142   
                source: err.into(),
   95    143   
            }),
         144  +
            /* ServiceErrorGenerator.kt:184 */
   96    145   
        }
         146  +
        /* ServiceErrorGenerator.kt:179 */
   97    147   
    }
         148  +
    /* ServiceErrorGenerator.kt:174 */
   98    149   
}
         150  +
/* ServiceErrorGenerator.kt:202 */
   99    151   
impl From<crate::operation::create_foo::CreateFooError> for Error {
         152  +
    /* ServiceErrorGenerator.kt:203 */
  100    153   
    fn from(err: crate::operation::create_foo::CreateFooError) -> Self {
         154  +
        /* ServiceErrorGenerator.kt:204 */
  101    155   
        match err {
         156  +
            /* ServiceErrorGenerator.kt:212 */
  102    157   
            crate::operation::create_foo::CreateFooError::Unhandled(inner) => Error::Unhandled(inner),
         158  +
            /* ServiceErrorGenerator.kt:204 */
  103    159   
        }
         160  +
        /* ServiceErrorGenerator.kt:203 */
  104    161   
    }
         162  +
    /* ServiceErrorGenerator.kt:202 */
  105    163   
}
         164  +
/* ServiceErrorGenerator.kt:174 */
  106    165   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enum_keys::EnumKeysError, R>> for Error
  107    166   
where
  108    167   
    R: Send + Sync + std::fmt::Debug + 'static,
  109    168   
{
         169  +
    /* ServiceErrorGenerator.kt:179 */
  110    170   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enum_keys::EnumKeysError, R>) -> Self {
         171  +
        /* ServiceErrorGenerator.kt:184 */
  111    172   
        match err {
         173  +
            /* ServiceErrorGenerator.kt:185 */
  112    174   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         175  +
            /* ServiceErrorGenerator.kt:186 */
  113    176   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  114    177   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  115    178   
                source: err.into(),
  116    179   
            }),
         180  +
            /* ServiceErrorGenerator.kt:184 */
  117    181   
        }
         182  +
        /* ServiceErrorGenerator.kt:179 */
  118    183   
    }
         184  +
    /* ServiceErrorGenerator.kt:174 */
  119    185   
}
         186  +
/* ServiceErrorGenerator.kt:202 */
  120    187   
impl From<crate::operation::enum_keys::EnumKeysError> for Error {
         188  +
    /* ServiceErrorGenerator.kt:203 */
  121    189   
    fn from(err: crate::operation::enum_keys::EnumKeysError) -> Self {
         190  +
        /* ServiceErrorGenerator.kt:204 */
  122    191   
        match err {
         192  +
            /* ServiceErrorGenerator.kt:212 */
  123    193   
            crate::operation::enum_keys::EnumKeysError::Unhandled(inner) => Error::Unhandled(inner),
         194  +
            /* ServiceErrorGenerator.kt:204 */
  124    195   
        }
         196  +
        /* ServiceErrorGenerator.kt:203 */
  125    197   
    }
         198  +
    /* ServiceErrorGenerator.kt:202 */
  126    199   
}
         200  +
/* ServiceErrorGenerator.kt:174 */
  127    201   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::primitive_int_op_xml::PrimitiveIntOpXmlError, R>> for Error
  128    202   
where
  129    203   
    R: Send + Sync + std::fmt::Debug + 'static,
  130    204   
{
         205  +
    /* ServiceErrorGenerator.kt:179 */
  131    206   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::primitive_int_op_xml::PrimitiveIntOpXmlError, R>) -> Self {
         207  +
        /* ServiceErrorGenerator.kt:184 */
  132    208   
        match err {
         209  +
            /* ServiceErrorGenerator.kt:185 */
  133    210   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         211  +
            /* ServiceErrorGenerator.kt:186 */
  134    212   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  135    213   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  136    214   
                source: err.into(),
  137    215   
            }),
         216  +
            /* ServiceErrorGenerator.kt:184 */
  138    217   
        }
         218  +
        /* ServiceErrorGenerator.kt:179 */
  139    219   
    }
         220  +
    /* ServiceErrorGenerator.kt:174 */
  140    221   
}
         222  +
/* ServiceErrorGenerator.kt:202 */
  141    223   
impl From<crate::operation::primitive_int_op_xml::PrimitiveIntOpXmlError> for Error {
         224  +
    /* ServiceErrorGenerator.kt:203 */
  142    225   
    fn from(err: crate::operation::primitive_int_op_xml::PrimitiveIntOpXmlError) -> Self {
         226  +
        /* ServiceErrorGenerator.kt:204 */
  143    227   
        match err {
         228  +
            /* ServiceErrorGenerator.kt:212 */
  144    229   
            crate::operation::primitive_int_op_xml::PrimitiveIntOpXmlError::Unhandled(inner) => Error::Unhandled(inner),
         230  +
            /* ServiceErrorGenerator.kt:204 */
  145    231   
        }
         232  +
        /* ServiceErrorGenerator.kt:203 */
  146    233   
    }
         234  +
    /* ServiceErrorGenerator.kt:202 */
  147    235   
}
         236  +
/* ServiceErrorGenerator.kt:174 */
  148    237   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::required_member::RequiredMemberError, R>> for Error
  149    238   
where
  150    239   
    R: Send + Sync + std::fmt::Debug + 'static,
  151    240   
{
         241  +
    /* ServiceErrorGenerator.kt:179 */
  152    242   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::required_member::RequiredMemberError, R>) -> Self {
         243  +
        /* ServiceErrorGenerator.kt:184 */
  153    244   
        match err {
         245  +
            /* ServiceErrorGenerator.kt:185 */
  154    246   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         247  +
            /* ServiceErrorGenerator.kt:186 */
  155    248   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  156    249   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  157    250   
                source: err.into(),
  158    251   
            }),
         252  +
            /* ServiceErrorGenerator.kt:184 */
  159    253   
        }
         254  +
        /* ServiceErrorGenerator.kt:179 */
  160    255   
    }
         256  +
    /* ServiceErrorGenerator.kt:174 */
  161    257   
}
         258  +
/* ServiceErrorGenerator.kt:202 */
  162    259   
impl From<crate::operation::required_member::RequiredMemberError> for Error {
         260  +
    /* ServiceErrorGenerator.kt:203 */
  163    261   
    fn from(err: crate::operation::required_member::RequiredMemberError) -> Self {
         262  +
        /* ServiceErrorGenerator.kt:204 */
  164    263   
        match err {
         264  +
            /* ServiceErrorGenerator.kt:212 */
  165    265   
            crate::operation::required_member::RequiredMemberError::Unhandled(inner) => Error::Unhandled(inner),
         266  +
            /* ServiceErrorGenerator.kt:204 */
  166    267   
        }
         268  +
        /* ServiceErrorGenerator.kt:203 */
  167    269   
    }
         270  +
    /* ServiceErrorGenerator.kt:202 */
  168    271   
}
         272  +
/* ServiceErrorGenerator.kt:174 */
  169    273   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::string_header::StringHeaderError, R>> for Error
  170    274   
where
  171    275   
    R: Send + Sync + std::fmt::Debug + 'static,
  172    276   
{
         277  +
    /* ServiceErrorGenerator.kt:179 */
  173    278   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::string_header::StringHeaderError, R>) -> Self {
         279  +
        /* ServiceErrorGenerator.kt:184 */
  174    280   
        match err {
         281  +
            /* ServiceErrorGenerator.kt:185 */
  175    282   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         283  +
            /* ServiceErrorGenerator.kt:186 */
  176    284   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  177    285   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  178    286   
                source: err.into(),
  179    287   
            }),
         288  +
            /* ServiceErrorGenerator.kt:184 */
  180    289   
        }
         290  +
        /* ServiceErrorGenerator.kt:179 */
  181    291   
    }
         292  +
    /* ServiceErrorGenerator.kt:174 */
  182    293   
}
         294  +
/* ServiceErrorGenerator.kt:202 */
  183    295   
impl From<crate::operation::string_header::StringHeaderError> for Error {
         296  +
    /* ServiceErrorGenerator.kt:203 */
  184    297   
    fn from(err: crate::operation::string_header::StringHeaderError) -> Self {
         298  +
        /* ServiceErrorGenerator.kt:204 */
  185    299   
        match err {
         300  +
            /* ServiceErrorGenerator.kt:212 */
  186    301   
            crate::operation::string_header::StringHeaderError::Unhandled(inner) => Error::Unhandled(inner),
         302  +
            /* ServiceErrorGenerator.kt:204 */
  187    303   
        }
         304  +
        /* ServiceErrorGenerator.kt:203 */
  188    305   
    }
         306  +
    /* ServiceErrorGenerator.kt:202 */
  189    307   
}
         308  +
/* ServiceErrorGenerator.kt:174 */
  190    309   
impl<R>
  191    310   
    From<
  192    311   
        ::aws_smithy_runtime_api::client::result::SdkError<
  193    312   
            crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceError,
  194    313   
            R,
  195    314   
        >,
  196    315   
    > for Error
  197    316   
where
  198    317   
    R: Send + Sync + std::fmt::Debug + 'static,
  199    318   
{
         319  +
    /* ServiceErrorGenerator.kt:179 */
  200    320   
    fn from(
  201    321   
        err: ::aws_smithy_runtime_api::client::result::SdkError<
  202    322   
            crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceError,
  203    323   
            R,
  204    324   
        >,
  205    325   
    ) -> Self {
         326  +
        /* ServiceErrorGenerator.kt:184 */
  206    327   
        match err {
         328  +
            /* ServiceErrorGenerator.kt:185 */
  207    329   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         330  +
            /* ServiceErrorGenerator.kt:186 */
  208    331   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  209    332   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  210    333   
                source: err.into(),
  211    334   
            }),
         335  +
            /* ServiceErrorGenerator.kt:184 */
  212    336   
        }
         337  +
        /* ServiceErrorGenerator.kt:179 */
  213    338   
    }
         339  +
    /* ServiceErrorGenerator.kt:174 */
  214    340   
}
         341  +
/* ServiceErrorGenerator.kt:202 */
  215    342   
impl From<crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceError> for Error {
         343  +
    /* ServiceErrorGenerator.kt:203 */
  216    344   
    fn from(err: crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceError) -> Self {
         345  +
        /* ServiceErrorGenerator.kt:204 */
  217    346   
        match err {
         347  +
            /* ServiceErrorGenerator.kt:212 */
  218    348   
            crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceError::Unhandled(inner) => {
  219    349   
                Error::Unhandled(inner)
  220    350   
            }
         351  +
            /* ServiceErrorGenerator.kt:204 */
  221    352   
        }
         353  +
        /* ServiceErrorGenerator.kt:203 */
  222    354   
    }
         355  +
    /* ServiceErrorGenerator.kt:202 */
  223    356   
}
         357  +
/* ServiceErrorGenerator.kt:115 */
  224    358   
impl ::std::error::Error for Error {
         359  +
    /* ServiceErrorGenerator.kt:116 */
  225    360   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         361  +
        /* ServiceErrorGenerator.kt:117 */
  226    362   
        match self {
  227         -
            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
         363  +
            /* ServiceErrorGenerator.kt:121 */
         364  +
            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source), /* ServiceErrorGenerator.kt:117 */
  228    365   
        }
         366  +
        /* ServiceErrorGenerator.kt:116 */
  229    367   
    }
         368  +
    /* ServiceErrorGenerator.kt:115 */
  230    369   
}

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

@@ -18,18 +134,144 @@
   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 the service.
          56  +
/// /* FluentClientDocs.kt:24 */Client for calling the 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 = rest_xml_extras::Config::builder()
   72     75   
///     .endpoint_url("http://localhost:1234")
   73     76   
///     .build();
   74     77   
/// let client = rest_xml_extras::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 [`ChecksumRequired`](crate::operation::checksum_required) operation has
   84     87   
/// a [`Client::checksum_required`], 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.checksum_required()
   90     93   
///     .field("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 the service.
         103  +
/// /* ClientRustModule.kt:121 */Configuration for the 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_http_checksum_required;
  120    125   
  121         -
/// All operations that this crate can perform.
         126  +
/// /* ClientRustModule.kt:121 */All operations that this crate can perform.
  122    127   
pub mod operation;
  123    128   
  124    129   
pub(crate) mod protocol_serde;
  125    130   
         131  +
/* RustModule.kt:172 */
  126    132   
mod sdk_feature_tracker;
  127    133   
         134  +
/* RustModule.kt:172 */
  128    135   
mod serialization_settings;
  129    136   
         137  +
/* RustModule.kt:172 */
  130    138   
mod serde_util;
  131    139   
         140  +
/* RustModule.kt:172 */
  132    141   
mod rest_xml_wrapped_errors;
  133    142   
         143  +
/* FluentClientDecorator.kt:76 */
  134    144   
pub use client::Client;

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

@@ -1,1 +25,25 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Types for the `AttributeParty` operation.
           2  +
/* CodegenDelegator.kt:51 */
           3  +
/// /* CodegenDelegator.kt:51 */Types for the `AttributeParty` operation.
    4      4   
pub mod attribute_party;
    5      5   
    6         -
/// Types for the `ChecksumRequired` operation.
           6  +
/// /* CodegenDelegator.kt:51 */Types for the `ChecksumRequired` operation.
    7      7   
pub mod checksum_required;
    8      8   
    9         -
/// Types for the `CreateFoo` operation.
           9  +
/// /* CodegenDelegator.kt:51 */Types for the `CreateFoo` operation.
   10     10   
pub mod create_foo;
   11     11   
   12         -
/// Types for the `EnumKeys` operation.
          12  +
/// /* CodegenDelegator.kt:51 */Types for the `EnumKeys` operation.
   13     13   
pub mod enum_keys;
   14     14   
   15         -
/// Types for the `PrimitiveIntOpXml` operation.
          15  +
/// /* CodegenDelegator.kt:51 */Types for the `PrimitiveIntOpXml` operation.
   16     16   
pub mod primitive_int_op_xml;
   17     17   
   18         -
/// Types for the `RequiredMember` operation.
          18  +
/// /* CodegenDelegator.kt:51 */Types for the `RequiredMember` operation.
   19     19   
pub mod required_member;
   20     20   
   21         -
/// Types for the `StringHeader` operation.
          21  +
/// /* CodegenDelegator.kt:51 */Types for the `StringHeader` operation.
   22     22   
pub mod string_header;
   23     23   
   24         -
/// Types for the `XmlMapsFlattenedNestedXmlNamespace` operation.
          24  +
/// /* CodegenDelegator.kt:51 */Types for the `XmlMapsFlattenedNestedXmlNamespace` operation.
   25     25   
pub mod xml_maps_flattened_nested_xml_namespace;

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/attribute_party.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 `AttributeParty`.
           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 AttributeParty;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl AttributeParty {
    7         -
    /// Creates a new `AttributeParty`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `AttributeParty`
          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::attribute_party::AttributePartyInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::attribute_party::AttributePartyOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::attribute_party::AttributePartyError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +382,458 @@
   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 AttributeParty {
   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("AttributeParty");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            AttributePartyRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            AttributePartyResponseDeserializer,
   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   
            "AttributeParty",
  105    116   
            "Rest XML 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("AttributeParty")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(AttributePartyEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::attribute_party::AttributePartyError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::attribute_party::AttributePartyError,
  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 AttributePartyResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for AttributePartyResponseDeserializer {
  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_attribute_party::de_attribute_party_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_attribute_party::de_attribute_party_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 AttributePartyRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for AttributePartyRequestSerializer {
  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::attribute_party::AttributePartyInput>()
  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::attribute_party::AttributePartyInput,
  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, "/AttributeParty").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::attribute_party::AttributePartyInput,
  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
  187    200   
        };
  188    201   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  189    202   
  190    203   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  191    204   
    }
  192    205   
}
         206  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  193    207   
#[derive(Debug)]
  194    208   
struct AttributePartyEndpointParamsInterceptor;
  195    209   
  196    210   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for AttributePartyEndpointParamsInterceptor {
  197    211   
    fn name(&self) -> &'static str {
  198    212   
        "AttributePartyEndpointParamsInterceptor"
  199    213   
    }
  200    214   
  201    215   
    fn read_before_execution(
  202    216   
        &self,
  203    217   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  204    218   
            '_,
  205    219   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  206    220   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  207    221   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  208    222   
        >,
  209    223   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  210    224   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  211    225   
        let _input = context
  212    226   
            .input()
  213    227   
            .downcast_ref::<AttributePartyInput>()
  214    228   
            .ok_or("failed to downcast to AttributePartyInput")?;
  215    229   
  216    230   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  217    231   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  218    232   
        })?;
  219    233   
        cfg.interceptor_state()
  220    234   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  221    235   
        ::std::result::Result::Ok(())
  222    236   
    }
  223    237   
}
  224    238   
  225    239   
// The get_* functions below are generated from JMESPath expressions in the
  226    240   
// operationContextParams trait. They target the operation's input shape.
  227    241   
         242  +
/* RustType.kt:516 */
  228    243   
#[allow(unreachable_code, unused_variables)]
         244  +
/* RustType.kt:516 */
  229    245   
#[cfg(test)]
         246  +
/* ProtocolTestGenerator.kt:98 */
  230    247   
mod attribute_party_test {
  231    248   
  232    249   
    /// Test ID: DeserAttributes
  233    250   
    #[::tokio::test]
  234    251   
    #[::tracing_test::traced_test]
  235    252   
    async fn deser_attributes_response() {
  236    253   
        let expected_output = crate::operation::attribute_party::AttributePartyOutput::builder()
  237    254   
            .set_enum(::std::option::Option::Some(
  238    255   
                "enumvalue".parse::<crate::types::StringEnum>().expect("static value validated to member"),
  239    256   
            ))
  240    257   
            .set_number(::std::option::Option::Some(5))
  241    258   
            .set_ts(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  242    259   
                482196050, 0_f64,
  243    260   
            )))
  244    261   
            .set_bool(::std::option::Option::Some(true))
  245    262   
            .build();
  246    263   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
  247    264   
            ::http::response::Builder::new()
  248    265   
                .status(200)
  249    266   
                .body(::aws_smithy_types::body::SdkBody::from(
  250    267   
                    "<AttributePartyInputOutput enum=\"enumvalue\" prefix:anumber=\"5\" ts=\"1985-04-12T23:20:50.00Z\" bool=\"true\"/>",
  251    268   
                ))
  252    269   
                .unwrap(),
  253    270   
        )
  254    271   
        .unwrap();
  255    272   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  256    273   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  257    274   
  258    275   
        let op = crate::operation::attribute_party::AttributeParty::new();
  259    276   
        let config = op.config().expect("the operation has config");
  260    277   
        let de = config
  261    278   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  262    279   
            .expect("the config must have a deserializer");
  263    280   
  264    281   
        let parsed = de.deserialize_streaming(&mut http_response);
  265    282   
        let parsed = parsed.unwrap_or_else(|| {
  266    283   
            let http_response = http_response.map(|body| {
  267    284   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  268    285   
                    body.bytes().unwrap(),
  269    286   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
  270    287   
                )))
  271    288   
            });
  272    289   
            de.deserialize_nonstreaming(&http_response)
  273    290   
        });
  274    291   
        let parsed = parsed
  275    292   
            .expect("should be successful response")
  276    293   
            .downcast::<crate::operation::attribute_party::AttributePartyOutput>()
  277    294   
            .unwrap();
  278    295   
        ::pretty_assertions::assert_eq!(parsed.r#enum, expected_output.r#enum, "Unexpected value for `r#enum`");
  279    296   
        ::pretty_assertions::assert_eq!(parsed.number, expected_output.number, "Unexpected value for `number`");
  280    297   
        ::pretty_assertions::assert_eq!(parsed.ts, expected_output.ts, "Unexpected value for `ts`");
  281    298   
        ::pretty_assertions::assert_eq!(parsed.bool, expected_output.bool, "Unexpected value for `bool`");
  282    299   
    }
         300  +
         301  +
    /* ProtocolTestGenerator.kt:98 */
  283    302   
}
  284    303   
         304  +
/* OperationErrorGenerator.kt:79 */
  285    305   
/// Error type for the `AttributePartyError` operation.
         306  +
/* RustType.kt:516 */
  286    307   
#[non_exhaustive]
         308  +
/* RustType.kt:516 */
  287    309   
#[derive(::std::fmt::Debug)]
  288         -
pub enum AttributePartyError {
         310  +
pub /* OperationErrorGenerator.kt:81 */ enum AttributePartyError {
         311  +
    /* OperationErrorGenerator.kt:88 */
  289    312   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  290    313   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  291    314   
    variable wildcard pattern and check `.code()`:
  292    315   
     \
  293    316   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  294    317   
     \
  295    318   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-AttributePartyError) for what information is available for the error.")]
  296    319   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         320  +
    /* OperationErrorGenerator.kt:81 */
  297    321   
}
         322  +
/* OperationErrorGenerator.kt:218 */
  298    323   
impl AttributePartyError {
         324  +
    /* OperationErrorGenerator.kt:219 */
  299    325   
    /// Creates the `AttributePartyError::Unhandled` variant from any error type.
  300    326   
    pub fn unhandled(
  301    327   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  302    328   
    ) -> Self {
  303    329   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  304    330   
            source: err.into(),
  305    331   
            meta: ::std::default::Default::default(),
  306    332   
        })
  307    333   
    }
  308    334   
  309    335   
    /// Creates the `AttributePartyError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  310    336   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  311    337   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  312    338   
            source: err.clone().into(),
  313    339   
            meta: err,
  314    340   
        })
  315    341   
    }
  316         -
    ///
         342  +
    /// /* OperationErrorGenerator.kt:236 */
  317    343   
    /// Returns error metadata, which includes the error code, message,
  318    344   
    /// request ID, and potentially additional information.
  319    345   
    ///
         346  +
    /* OperationErrorGenerator.kt:242 */
  320    347   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         348  +
        /* OperationErrorGenerator.kt:243 */
  321    349   
        match self {
  322         -
            Self::Unhandled(e) => &e.meta,
         350  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         351  +
            /* OperationErrorGenerator.kt:243 */
  323    352   
        }
         353  +
        /* OperationErrorGenerator.kt:242 */
  324    354   
    }
         355  +
    /* OperationErrorGenerator.kt:218 */
  325    356   
}
         357  +
/* OperationErrorGenerator.kt:269 */
  326    358   
impl ::std::error::Error for AttributePartyError {
         359  +
    /* OperationErrorGenerator.kt:270 */
  327    360   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         361  +
        /* OperationErrorGenerator.kt:318 */
  328    362   
        match self {
  329         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         363  +
            /* OperationErrorGenerator.kt:326 */
         364  +
            Self::Unhandled(_inner) => {
         365  +
                /* OperationErrorGenerator.kt:279 */
         366  +
                ::std::option::Option::Some(&*_inner.source)
         367  +
                /* OperationErrorGenerator.kt:326 */
         368  +
            } /* OperationErrorGenerator.kt:318 */
  330    369   
        }
         370  +
        /* OperationErrorGenerator.kt:270 */
  331    371   
    }
         372  +
    /* OperationErrorGenerator.kt:269 */
  332    373   
}
         374  +
/* OperationErrorGenerator.kt:133 */
  333    375   
impl ::std::fmt::Display for AttributePartyError {
         376  +
    /* OperationErrorGenerator.kt:134 */
  334    377   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         378  +
        /* OperationErrorGenerator.kt:318 */
  335    379   
        match self {
         380  +
            /* OperationErrorGenerator.kt:326 */
  336    381   
            Self::Unhandled(_inner) => {
         382  +
                /* OperationErrorGenerator.kt:139 */
  337    383   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  338    384   
                    write!(f, "unhandled error ({code})")
  339    385   
                } else {
  340    386   
                    f.write_str("unhandled error")
  341    387   
                }
  342         -
            }
         388  +
                /* OperationErrorGenerator.kt:326 */
         389  +
            } /* OperationErrorGenerator.kt:318 */
  343    390   
        }
         391  +
        /* OperationErrorGenerator.kt:134 */
  344    392   
    }
         393  +
    /* OperationErrorGenerator.kt:133 */
  345    394   
}
         395  +
/* OperationErrorGenerator.kt:182 */
  346    396   
impl ::aws_smithy_types::retry::ProvideErrorKind for AttributePartyError {
         397  +
    /* OperationErrorGenerator.kt:186 */
  347    398   
    fn code(&self) -> ::std::option::Option<&str> {
         399  +
        /* OperationErrorGenerator.kt:187 */
  348    400   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         401  +
        /* OperationErrorGenerator.kt:186 */
  349    402   
    }
         403  +
    /* OperationErrorGenerator.kt:190 */
  350    404   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         405  +
        /* OperationErrorGenerator.kt:197 */
  351    406   
        ::std::option::Option::None
         407  +
        /* OperationErrorGenerator.kt:190 */
  352    408   
    }
         409  +
    /* OperationErrorGenerator.kt:182 */
  353    410   
}
         411  +
/* OperationErrorGenerator.kt:163 */
  354    412   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for AttributePartyError {
         413  +
    /* OperationErrorGenerator.kt:164 */
  355    414   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         415  +
        /* OperationErrorGenerator.kt:318 */
  356    416   
        match self {
  357         -
            Self::Unhandled(_inner) => &_inner.meta,
         417  +
            /* OperationErrorGenerator.kt:326 */
         418  +
            Self::Unhandled(_inner) => {
         419  +
                /* OperationErrorGenerator.kt:168 */
         420  +
                &_inner.meta
         421  +
                /* OperationErrorGenerator.kt:326 */
         422  +
            } /* OperationErrorGenerator.kt:318 */
  358    423   
        }
         424  +
        /* OperationErrorGenerator.kt:164 */
  359    425   
    }
         426  +
    /* OperationErrorGenerator.kt:163 */
  360    427   
}
         428  +
/* OperationErrorGenerator.kt:109 */
  361    429   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for AttributePartyError {
         430  +
    /* OperationErrorGenerator.kt:110 */
  362    431   
    fn create_unhandled_error(
  363    432   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  364    433   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  365    434   
    ) -> Self {
         435  +
        /* OperationErrorGenerator.kt:121 */
  366    436   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  367    437   
            source,
  368    438   
            meta: meta.unwrap_or_default(),
  369    439   
        })
         440  +
        /* OperationErrorGenerator.kt:110 */
  370    441   
    }
         442  +
    /* OperationErrorGenerator.kt:109 */
  371    443   
}
  372    444   
         445  +
/* CodegenDelegator.kt:255 */
  373    446   
pub use crate::operation::attribute_party::_attribute_party_output::AttributePartyOutput;
  374    447   
         448  +
/* CodegenDelegator.kt:255 */
  375    449   
pub use crate::operation::attribute_party::_attribute_party_input::AttributePartyInput;
  376    450   
         451  +
/* RustModule.kt:172 */
  377    452   
mod _attribute_party_input;
  378    453   
         454  +
/* RustModule.kt:172 */
  379    455   
mod _attribute_party_output;
  380    456   
  381         -
/// Builders
         457  +
/// /* CodegenDelegator.kt:51 */Builders
  382    458   
pub mod builders;

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

@@ -1,1 +115,210 @@
    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 AttributePartyOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct AttributePartyOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub r#enum: ::std::option::Option<crate::types::StringEnum>,
    8         -
    #[allow(missing_docs)] // documentation missing in model
          12  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    9     13   
    pub number: ::std::option::Option<i32>,
          14  +
    /* StructureGenerator.kt:231 */
   10     15   
    #[allow(missing_docs)] // documentation missing in model
   11     16   
    pub ts: ::std::option::Option<::aws_smithy_types::DateTime>,
          17  +
    /* StructureGenerator.kt:231 */
   12     18   
    #[allow(missing_docs)] // documentation missing in model
   13     19   
    pub bool: ::std::option::Option<bool>,
          20  +
    /* StructureGenerator.kt:201 */
   14     21   
}
          22  +
/* StructureGenerator.kt:135 */
   15     23   
impl AttributePartyOutput {
          24  +
    /* StructureGenerator.kt:231 */
   16     25   
    #[allow(missing_docs)] // documentation missing in model
          26  +
                           /* StructureGenerator.kt:166 */
   17     27   
    pub fn r#enum(&self) -> ::std::option::Option<&crate::types::StringEnum> {
          28  +
        /* StructureGenerator.kt:170 */
   18     29   
        self.r#enum.as_ref()
          30  +
        /* StructureGenerator.kt:166 */
   19     31   
    }
          32  +
    /* StructureGenerator.kt:231 */
   20     33   
    #[allow(missing_docs)] // documentation missing in model
          34  +
                           /* StructureGenerator.kt:166 */
   21     35   
    pub fn number(&self) -> ::std::option::Option<i32> {
          36  +
        /* StructureGenerator.kt:168 */
   22     37   
        self.number
          38  +
        /* StructureGenerator.kt:166 */
   23     39   
    }
          40  +
    /* StructureGenerator.kt:231 */
   24     41   
    #[allow(missing_docs)] // documentation missing in model
          42  +
                           /* StructureGenerator.kt:166 */
   25     43   
    pub fn ts(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          44  +
        /* StructureGenerator.kt:170 */
   26     45   
        self.ts.as_ref()
          46  +
        /* StructureGenerator.kt:166 */
   27     47   
    }
          48  +
    /* StructureGenerator.kt:231 */
   28     49   
    #[allow(missing_docs)] // documentation missing in model
          50  +
                           /* StructureGenerator.kt:166 */
   29     51   
    pub fn bool(&self) -> ::std::option::Option<bool> {
          52  +
        /* StructureGenerator.kt:168 */
   30     53   
        self.bool
          54  +
        /* StructureGenerator.kt:166 */
   31     55   
    }
          56  +
    /* StructureGenerator.kt:135 */
   32     57   
}
          58  +
/* ClientCodegenVisitor.kt:237 */
   33     59   
impl AttributePartyOutput {
   34         -
    /// Creates a new builder-style object to manufacture [`AttributePartyOutput`](crate::operation::attribute_party::AttributePartyOutput).
          60  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`AttributePartyOutput`](crate::operation::attribute_party::AttributePartyOutput).
          61  +
    /* BuilderGenerator.kt:175 */
   35     62   
    pub fn builder() -> crate::operation::attribute_party::builders::AttributePartyOutputBuilder {
          63  +
        /* BuilderGenerator.kt:176 */
   36     64   
        crate::operation::attribute_party::builders::AttributePartyOutputBuilder::default()
          65  +
        /* BuilderGenerator.kt:175 */
   37     66   
    }
          67  +
    /* ClientCodegenVisitor.kt:237 */
   38     68   
}
   39     69   
   40         -
/// A builder for [`AttributePartyOutput`](crate::operation::attribute_party::AttributePartyOutput).
          70  +
/// /* BuilderGenerator.kt:342 */A builder for [`AttributePartyOutput`](crate::operation::attribute_party::AttributePartyOutput).
          71  +
/* RustType.kt:516 */
   41     72   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          73  +
/* RustType.kt:516 */
   42     74   
#[non_exhaustive]
          75  +
/* BuilderGenerator.kt:345 */
   43     76   
pub struct AttributePartyOutputBuilder {
   44         -
    pub(crate) r#enum: ::std::option::Option<crate::types::StringEnum>,
   45         -
    pub(crate) number: ::std::option::Option<i32>,
   46         -
    pub(crate) ts: ::std::option::Option<::aws_smithy_types::DateTime>,
   47         -
    pub(crate) bool: ::std::option::Option<bool>,
          77  +
    /* BuilderGenerator.kt:275 */ pub(crate) r#enum: ::std::option::Option<crate::types::StringEnum>,
          78  +
    /* BuilderGenerator.kt:275 */ pub(crate) number: ::std::option::Option<i32>,
          79  +
    /* BuilderGenerator.kt:275 */ pub(crate) ts: ::std::option::Option<::aws_smithy_types::DateTime>,
          80  +
    /* BuilderGenerator.kt:275 */ pub(crate) bool: ::std::option::Option<bool>,
          81  +
    /* BuilderGenerator.kt:345 */
   48     82   
}
          83  +
/* BuilderGenerator.kt:355 */
   49     84   
impl AttributePartyOutputBuilder {
          85  +
    /* BuilderGenerator.kt:286 */
   50     86   
    #[allow(missing_docs)] // documentation missing in model
          87  +
                           /* BuilderGenerator.kt:291 */
   51     88   
    pub fn r#enum(mut self, input: crate::types::StringEnum) -> Self {
          89  +
        /* BuilderGenerator.kt:292 */
   52     90   
        self.r#enum = ::std::option::Option::Some(input);
          91  +
        /* BuilderGenerator.kt:293 */
   53     92   
        self
          93  +
        /* BuilderGenerator.kt:291 */
   54     94   
    }
          95  +
    /* BuilderGenerator.kt:312 */
   55     96   
    #[allow(missing_docs)] // documentation missing in model
          97  +
                           /* BuilderGenerator.kt:314 */
   56     98   
    pub fn set_enum(mut self, input: ::std::option::Option<crate::types::StringEnum>) -> Self {
          99  +
        /* BuilderGenerator.kt:315 */
   57    100   
        self.r#enum = input;
   58    101   
        self
         102  +
        /* BuilderGenerator.kt:314 */
   59    103   
    }
         104  +
    /* BuilderGenerator.kt:334 */
   60    105   
    #[allow(missing_docs)] // documentation missing in model
         106  +
                           /* BuilderGenerator.kt:336 */
   61    107   
    pub fn get_enum(&self) -> &::std::option::Option<crate::types::StringEnum> {
         108  +
        /* BuilderGenerator.kt:337 */
   62    109   
        &self.r#enum
         110  +
        /* BuilderGenerator.kt:336 */
   63    111   
    }
         112  +
    /* BuilderGenerator.kt:286 */
   64    113   
    #[allow(missing_docs)] // documentation missing in model
         114  +
                           /* BuilderGenerator.kt:291 */
   65    115   
    pub fn number(mut self, input: i32) -> Self {
         116  +
        /* BuilderGenerator.kt:292 */
   66    117   
        self.number = ::std::option::Option::Some(input);
         118  +
        /* BuilderGenerator.kt:293 */
   67    119   
        self
         120  +
        /* BuilderGenerator.kt:291 */
   68    121   
    }
         122  +
    /* BuilderGenerator.kt:312 */
   69    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* BuilderGenerator.kt:314 */
   70    125   
    pub fn set_number(mut self, input: ::std::option::Option<i32>) -> Self {
         126  +
        /* BuilderGenerator.kt:315 */
   71    127   
        self.number = input;
   72    128   
        self
         129  +
        /* BuilderGenerator.kt:314 */
   73    130   
    }
         131  +
    /* BuilderGenerator.kt:334 */
   74    132   
    #[allow(missing_docs)] // documentation missing in model
         133  +
                           /* BuilderGenerator.kt:336 */
   75    134   
    pub fn get_number(&self) -> &::std::option::Option<i32> {
         135  +
        /* BuilderGenerator.kt:337 */
   76    136   
        &self.number
         137  +
        /* BuilderGenerator.kt:336 */
   77    138   
    }
         139  +
    /* BuilderGenerator.kt:286 */
   78    140   
    #[allow(missing_docs)] // documentation missing in model
         141  +
                           /* BuilderGenerator.kt:291 */
   79    142   
    pub fn ts(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         143  +
        /* BuilderGenerator.kt:292 */
   80    144   
        self.ts = ::std::option::Option::Some(input);
         145  +
        /* BuilderGenerator.kt:293 */
   81    146   
        self
         147  +
        /* BuilderGenerator.kt:291 */
   82    148   
    }
         149  +
    /* BuilderGenerator.kt:312 */
   83    150   
    #[allow(missing_docs)] // documentation missing in model
         151  +
                           /* BuilderGenerator.kt:314 */
   84    152   
    pub fn set_ts(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         153  +
        /* BuilderGenerator.kt:315 */
   85    154   
        self.ts = input;
   86    155   
        self
         156  +
        /* BuilderGenerator.kt:314 */
   87    157   
    }
         158  +
    /* BuilderGenerator.kt:334 */
   88    159   
    #[allow(missing_docs)] // documentation missing in model
         160  +
                           /* BuilderGenerator.kt:336 */
   89    161   
    pub fn get_ts(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         162  +
        /* BuilderGenerator.kt:337 */
   90    163   
        &self.ts
         164  +
        /* BuilderGenerator.kt:336 */
   91    165   
    }
         166  +
    /* BuilderGenerator.kt:286 */
   92    167   
    #[allow(missing_docs)] // documentation missing in model
         168  +
                           /* BuilderGenerator.kt:291 */
   93    169   
    pub fn bool(mut self, input: bool) -> Self {
         170  +
        /* BuilderGenerator.kt:292 */
   94    171   
        self.bool = ::std::option::Option::Some(input);
         172  +
        /* BuilderGenerator.kt:293 */
   95    173   
        self
         174  +
        /* BuilderGenerator.kt:291 */
   96    175   
    }
         176  +
    /* BuilderGenerator.kt:312 */
   97    177   
    #[allow(missing_docs)] // documentation missing in model
         178  +
                           /* BuilderGenerator.kt:314 */
   98    179   
    pub fn set_bool(mut self, input: ::std::option::Option<bool>) -> Self {
         180  +
        /* BuilderGenerator.kt:315 */
   99    181   
        self.bool = input;
  100    182   
        self
         183  +
        /* BuilderGenerator.kt:314 */
  101    184   
    }
         185  +
    /* BuilderGenerator.kt:334 */
  102    186   
    #[allow(missing_docs)] // documentation missing in model
         187  +
                           /* BuilderGenerator.kt:336 */
  103    188   
    pub fn get_bool(&self) -> &::std::option::Option<bool> {
         189  +
        /* BuilderGenerator.kt:337 */
  104    190   
        &self.bool
         191  +
        /* BuilderGenerator.kt:336 */
  105    192   
    }
  106         -
    /// Consumes the builder and constructs a [`AttributePartyOutput`](crate::operation::attribute_party::AttributePartyOutput).
         193  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`AttributePartyOutput`](crate::operation::attribute_party::AttributePartyOutput).
         194  +
    /* BuilderGenerator.kt:253 */
  107    195   
    pub fn build(self) -> crate::operation::attribute_party::AttributePartyOutput {
         196  +
        /* BuilderGenerator.kt:477 */
  108    197   
        crate::operation::attribute_party::AttributePartyOutput {
  109         -
            r#enum: self.r#enum,
         198  +
            /* BuilderGenerator.kt:481 */ r#enum: self.r#enum,
         199  +
            /* BuilderGenerator.kt:481 */
  110    200   
            number: self.number,
         201  +
            /* BuilderGenerator.kt:481 */
  111    202   
            ts: self.ts,
         203  +
            /* BuilderGenerator.kt:481 */
  112    204   
            bool: self.bool,
         205  +
            /* BuilderGenerator.kt:477 */
  113    206   
        }
         207  +
        /* BuilderGenerator.kt:253 */
  114    208   
    }
         209  +
    /* BuilderGenerator.kt:355 */
  115    210   
}

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/attribute_party/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::attribute_party::_attribute_party_output::AttributePartyOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::attribute_party::_attribute_party_input::AttributePartyInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::attribute_party::builders::AttributePartyInputBuilder {
    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::attribute_party::AttributePartyOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::attribute_party::AttributePartyError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.attribute_party();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `AttributeParty`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `AttributeParty`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct AttributePartyFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::attribute_party::builders::AttributePartyInputBuilder,
   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::attribute_party::AttributePartyOutput,
   34     40   
        crate::operation::attribute_party::AttributePartyError,
   35     41   
    > for AttributePartyFluentBuilder
   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::attribute_party::AttributePartyOutput,
   43     49   
            crate::operation::attribute_party::AttributePartyError,
   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 AttributePartyFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `AttributePartyFluentBuilder`.
   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 AttributeParty as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::attribute_party::builders::AttributePartyInputBuilder {
   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::attribute_party::AttributePartyOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::attribute_party::AttributePartyError,
   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::attribute_party::AttributeParty::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::attribute_party::AttributeParty::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::attribute_party::AttributePartyOutput,
   96    106   
        crate::operation::attribute_party::AttributePartyError,
   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/rest_xml_extras/rust-client-codegen/src/operation/checksum_required.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 `ChecksumRequired`.
           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 ChecksumRequired;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl ChecksumRequired {
    7         -
    /// Creates a new `ChecksumRequired`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `ChecksumRequired`
          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::checksum_required::ChecksumRequiredInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::checksum_required::ChecksumRequiredOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::checksum_required::ChecksumRequiredError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -65,74 +370,446 @@
   85     94   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   86     95   
            }
   87     96   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   88     97   
                config_override,
   89     98   
                client_config.config.clone(),
   90     99   
                &client_config.runtime_components,
   91    100   
            ));
   92    101   
        }
   93    102   
        runtime_plugins
   94    103   
    }
         104  +
    /* OperationGenerator.kt:85 */
   95    105   
}
         106  +
/* OperationRuntimePluginGenerator.kt:55 */
   96    107   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ChecksumRequired {
   97    108   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   98    109   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ChecksumRequired");
   99    110   
  100    111   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
  101    112   
            ChecksumRequiredRequestSerializer,
  102    113   
        ));
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  104    115   
            ChecksumRequiredResponseDeserializer,
  105    116   
        ));
  106    117   
  107    118   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  108    119   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  109    120   
        ));
  110    121   
  111    122   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  112    123   
            "ChecksumRequired",
  113    124   
            "Rest XML Protocol",
  114    125   
        ));
  115    126   
  116    127   
        ::std::option::Option::Some(cfg.freeze())
  117    128   
    }
  118    129   
  119    130   
    fn runtime_components(
  120    131   
        &self,
  121    132   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  122    133   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  123    134   
        #[allow(unused_mut)]
  124    135   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ChecksumRequired")
  125    136   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  126    137   
            .with_interceptor(ChecksumRequiredEndpointParamsInterceptor)
  127    138   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  128    139   
                crate::operation::checksum_required::ChecksumRequiredError,
  129    140   
            >::new())
  130    141   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  131    142   
                crate::operation::checksum_required::ChecksumRequiredError,
  132    143   
            >::new());
  133    144   
  134    145   
        ::std::borrow::Cow::Owned(rcb)
  135    146   
    }
  136    147   
}
  137    148   
         149  +
/* ResponseDeserializerGenerator.kt:64 */
  138    150   
#[derive(Debug)]
  139    151   
struct ChecksumRequiredResponseDeserializer;
  140    152   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ChecksumRequiredResponseDeserializer {
  141    153   
    fn deserialize_nonstreaming(
  142    154   
        &self,
  143    155   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  144    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  145    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  146    158   
        let headers = response.headers();
  147    159   
        let body = response.body().bytes().expect("body loaded");
  148    160   
        #[allow(unused_mut)]
  149    161   
        let mut force_error = false;
  150    162   
  151    163   
        let parse_result = if !success && status != 200 || force_error {
  152    164   
            crate::protocol_serde::shape_checksum_required::de_checksum_required_http_error(status, headers, body)
  153    165   
        } else {
  154    166   
            crate::protocol_serde::shape_checksum_required::de_checksum_required_http_response(status, headers, body)
  155    167   
        };
  156    168   
        crate::protocol_serde::type_erase_result(parse_result)
  157    169   
    }
  158    170   
}
         171  +
/* RequestSerializerGenerator.kt:67 */
  159    172   
#[derive(Debug)]
  160    173   
struct ChecksumRequiredRequestSerializer;
  161    174   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ChecksumRequiredRequestSerializer {
  162    175   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  163    176   
    fn serialize_input(
  164    177   
        &self,
  165    178   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  166    179   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  167    180   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  168    181   
        let input = input
  169    182   
            .downcast::<crate::operation::checksum_required::ChecksumRequiredInput>()
  170    183   
            .expect("correct type");
  171    184   
        let _header_serialization_settings = _cfg
  172    185   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  173    186   
            .cloned()
  174    187   
            .unwrap_or_default();
  175    188   
        let mut request_builder = {
  176    189   
            fn uri_base(
  177    190   
                _input: &crate::operation::checksum_required::ChecksumRequiredInput,
  178    191   
                output: &mut ::std::string::String,
  179    192   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180    193   
                use ::std::fmt::Write as _;
  181    194   
                ::std::write!(output, "/ChecksumRequired").expect("formatting should succeed");
  182    195   
                ::std::result::Result::Ok(())
  183    196   
            }
  184    197   
            #[allow(clippy::unnecessary_wraps)]
  185    198   
            fn update_http_builder(
  186    199   
                input: &crate::operation::checksum_required::ChecksumRequiredInput,
  187    200   
                builder: ::http::request::Builder,
  188    201   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  189    202   
                let mut uri = ::std::string::String::new();
  190    203   
                uri_base(input, &mut uri)?;
  191    204   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  192    205   
            }
  193    206   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  194    207   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
  195    208   
            builder
  196    209   
        };
  197    210   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_checksum_required::ser_checksum_required_op_input(&input)?);
  198    211   
        if let Some(content_length) = body.content_length() {
  199    212   
            let content_length = content_length.to_string();
  200    213   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  201    214   
        }
  202    215   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  203    216   
    }
  204    217   
}
         218  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  205    219   
#[derive(Debug)]
  206    220   
struct ChecksumRequiredEndpointParamsInterceptor;
  207    221   
  208    222   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ChecksumRequiredEndpointParamsInterceptor {
  209    223   
    fn name(&self) -> &'static str {
  210    224   
        "ChecksumRequiredEndpointParamsInterceptor"
  211    225   
    }
  212    226   
  213    227   
    fn read_before_execution(
  214    228   
        &self,
  215    229   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  216    230   
            '_,
  217    231   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  218    232   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  219    233   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  220    234   
        >,
  221    235   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  222    236   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  223    237   
        let _input = context
  224    238   
            .input()
  225    239   
            .downcast_ref::<ChecksumRequiredInput>()
  226    240   
            .ok_or("failed to downcast to ChecksumRequiredInput")?;
  227    241   
  228    242   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  229    243   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  230    244   
        })?;
  231    245   
        cfg.interceptor_state()
  232    246   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  233    247   
        ::std::result::Result::Ok(())
  234    248   
    }
  235    249   
}
  236    250   
  237    251   
// The get_* functions below are generated from JMESPath expressions in the
  238    252   
// operationContextParams trait. They target the operation's input shape.
  239    253   
         254  +
/* RustType.kt:516 */
  240    255   
#[allow(unreachable_code, unused_variables)]
         256  +
/* RustType.kt:516 */
  241    257   
#[cfg(test)]
         258  +
/* ProtocolTestGenerator.kt:98 */
  242    259   
mod checksum_required_test {
  243    260   
  244    261   
    /// Test ID: ChecksumRequiredHeader
  245    262   
    #[::tokio::test]
  246    263   
    #[::tracing_test::traced_test]
  247    264   
    async fn checksum_required_header_request() {
  248    265   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  249    266   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  250    267   
  251    268   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  252    269   
        let result = client
  253    270   
            .checksum_required()
  254    271   
            .set_field(::std::option::Option::Some("hello".to_owned()))
  255    272   
            .send()
  256    273   
            .await;
  257    274   
        let _ = dbg!(result);
  258    275   
        let http_request = request_receiver.expect_request();
  259    276   
        let expected_headers = [("Content-Md5", "JAJAqYA61wMhATGeQqRcMQ==")];
  260    277   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  261    278   
        let body = http_request.body().bytes().expect("body should be strict");
  262    279   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  263    280   
            body,
  264    281   
            "<ChecksumRequiredInput><field>hello</field></ChecksumRequiredInput>",
  265    282   
            ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  266    283   
        ));
  267    284   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  268    285   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  269    286   
        ::pretty_assertions::assert_eq!(uri.path(), "/ChecksumRequired", "path was incorrect");
  270    287   
    }
         288  +
         289  +
    /* ProtocolTestGenerator.kt:98 */
  271    290   
}
  272    291   
         292  +
/* OperationErrorGenerator.kt:79 */
  273    293   
/// Error type for the `ChecksumRequiredError` operation.
         294  +
/* RustType.kt:516 */
  274    295   
#[non_exhaustive]
         296  +
/* RustType.kt:516 */
  275    297   
#[derive(::std::fmt::Debug)]
  276         -
pub enum ChecksumRequiredError {
         298  +
pub /* OperationErrorGenerator.kt:81 */ enum ChecksumRequiredError {
         299  +
    /* OperationErrorGenerator.kt:88 */
  277    300   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  278    301   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  279    302   
    variable wildcard pattern and check `.code()`:
  280    303   
     \
  281    304   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  282    305   
     \
  283    306   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ChecksumRequiredError) for what information is available for the error.")]
  284    307   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         308  +
    /* OperationErrorGenerator.kt:81 */
  285    309   
}
         310  +
/* OperationErrorGenerator.kt:218 */
  286    311   
impl ChecksumRequiredError {
         312  +
    /* OperationErrorGenerator.kt:219 */
  287    313   
    /// Creates the `ChecksumRequiredError::Unhandled` variant from any error type.
  288    314   
    pub fn unhandled(
  289    315   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  290    316   
    ) -> Self {
  291    317   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  292    318   
            source: err.into(),
  293    319   
            meta: ::std::default::Default::default(),
  294    320   
        })
  295    321   
    }
  296    322   
  297    323   
    /// Creates the `ChecksumRequiredError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  298    324   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  299    325   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  300    326   
            source: err.clone().into(),
  301    327   
            meta: err,
  302    328   
        })
  303    329   
    }
  304         -
    ///
         330  +
    /// /* OperationErrorGenerator.kt:236 */
  305    331   
    /// Returns error metadata, which includes the error code, message,
  306    332   
    /// request ID, and potentially additional information.
  307    333   
    ///
         334  +
    /* OperationErrorGenerator.kt:242 */
  308    335   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         336  +
        /* OperationErrorGenerator.kt:243 */
  309    337   
        match self {
  310         -
            Self::Unhandled(e) => &e.meta,
         338  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         339  +
            /* OperationErrorGenerator.kt:243 */
  311    340   
        }
         341  +
        /* OperationErrorGenerator.kt:242 */
  312    342   
    }
         343  +
    /* OperationErrorGenerator.kt:218 */
  313    344   
}
         345  +
/* OperationErrorGenerator.kt:269 */
  314    346   
impl ::std::error::Error for ChecksumRequiredError {
         347  +
    /* OperationErrorGenerator.kt:270 */
  315    348   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         349  +
        /* OperationErrorGenerator.kt:318 */
  316    350   
        match self {
  317         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         351  +
            /* OperationErrorGenerator.kt:326 */
         352  +
            Self::Unhandled(_inner) => {
         353  +
                /* OperationErrorGenerator.kt:279 */
         354  +
                ::std::option::Option::Some(&*_inner.source)
         355  +
                /* OperationErrorGenerator.kt:326 */
         356  +
            } /* OperationErrorGenerator.kt:318 */
  318    357   
        }
         358  +
        /* OperationErrorGenerator.kt:270 */
  319    359   
    }
         360  +
    /* OperationErrorGenerator.kt:269 */
  320    361   
}
         362  +
/* OperationErrorGenerator.kt:133 */
  321    363   
impl ::std::fmt::Display for ChecksumRequiredError {
         364  +
    /* OperationErrorGenerator.kt:134 */
  322    365   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         366  +
        /* OperationErrorGenerator.kt:318 */
  323    367   
        match self {
         368  +
            /* OperationErrorGenerator.kt:326 */
  324    369   
            Self::Unhandled(_inner) => {
         370  +
                /* OperationErrorGenerator.kt:139 */
  325    371   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  326    372   
                    write!(f, "unhandled error ({code})")
  327    373   
                } else {
  328    374   
                    f.write_str("unhandled error")
  329    375   
                }
  330         -
            }
         376  +
                /* OperationErrorGenerator.kt:326 */
         377  +
            } /* OperationErrorGenerator.kt:318 */
  331    378   
        }
         379  +
        /* OperationErrorGenerator.kt:134 */
  332    380   
    }
         381  +
    /* OperationErrorGenerator.kt:133 */
  333    382   
}
         383  +
/* OperationErrorGenerator.kt:182 */
  334    384   
impl ::aws_smithy_types::retry::ProvideErrorKind for ChecksumRequiredError {
         385  +
    /* OperationErrorGenerator.kt:186 */
  335    386   
    fn code(&self) -> ::std::option::Option<&str> {
         387  +
        /* OperationErrorGenerator.kt:187 */
  336    388   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         389  +
        /* OperationErrorGenerator.kt:186 */
  337    390   
    }
         391  +
    /* OperationErrorGenerator.kt:190 */
  338    392   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         393  +
        /* OperationErrorGenerator.kt:197 */
  339    394   
        ::std::option::Option::None
         395  +
        /* OperationErrorGenerator.kt:190 */
  340    396   
    }
         397  +
    /* OperationErrorGenerator.kt:182 */
  341    398   
}
         399  +
/* OperationErrorGenerator.kt:163 */
  342    400   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ChecksumRequiredError {
         401  +
    /* OperationErrorGenerator.kt:164 */
  343    402   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         403  +
        /* OperationErrorGenerator.kt:318 */
  344    404   
        match self {
  345         -
            Self::Unhandled(_inner) => &_inner.meta,
         405  +
            /* OperationErrorGenerator.kt:326 */
         406  +
            Self::Unhandled(_inner) => {
         407  +
                /* OperationErrorGenerator.kt:168 */
         408  +
                &_inner.meta
         409  +
                /* OperationErrorGenerator.kt:326 */
         410  +
            } /* OperationErrorGenerator.kt:318 */
  346    411   
        }
         412  +
        /* OperationErrorGenerator.kt:164 */
  347    413   
    }
         414  +
    /* OperationErrorGenerator.kt:163 */
  348    415   
}
         416  +
/* OperationErrorGenerator.kt:109 */
  349    417   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ChecksumRequiredError {
         418  +
    /* OperationErrorGenerator.kt:110 */
  350    419   
    fn create_unhandled_error(
  351    420   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  352    421   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  353    422   
    ) -> Self {
         423  +
        /* OperationErrorGenerator.kt:121 */
  354    424   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  355    425   
            source,
  356    426   
            meta: meta.unwrap_or_default(),
  357    427   
        })
         428  +
        /* OperationErrorGenerator.kt:110 */
  358    429   
    }
         430  +
    /* OperationErrorGenerator.kt:109 */
  359    431   
}
  360    432   
         433  +
/* CodegenDelegator.kt:255 */
  361    434   
pub use crate::operation::checksum_required::_checksum_required_output::ChecksumRequiredOutput;
  362    435   
         436  +
/* CodegenDelegator.kt:255 */
  363    437   
pub use crate::operation::checksum_required::_checksum_required_input::ChecksumRequiredInput;
  364    438   
         439  +
/* RustModule.kt:172 */
  365    440   
mod _checksum_required_input;
  366    441   
         442  +
/* RustModule.kt:172 */
  367    443   
mod _checksum_required_output;
  368    444   
  369         -
/// Builders
         445  +
/// /* CodegenDelegator.kt:51 */Builders
  370    446   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/checksum_required/_checksum_required_input.rs

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

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

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/checksum_required/builders.rs

@@ -1,1 +124,142 @@
    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::checksum_required::_checksum_required_output::ChecksumRequiredOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::checksum_required::_checksum_required_input::ChecksumRequiredInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::checksum_required::builders::ChecksumRequiredInputBuilder {
    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::checksum_required::ChecksumRequiredOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::checksum_required::ChecksumRequiredError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.checksum_required();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `ChecksumRequired`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `ChecksumRequired`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct ChecksumRequiredFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::checksum_required::builders::ChecksumRequiredInputBuilder,
   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::checksum_required::ChecksumRequiredOutput,
   34     40   
        crate::operation::checksum_required::ChecksumRequiredError,
   35     41   
    > for ChecksumRequiredFluentBuilder
   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::checksum_required::ChecksumRequiredOutput,
   43     49   
            crate::operation::checksum_required::ChecksumRequiredError,
   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 ChecksumRequiredFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `ChecksumRequiredFluentBuilder`.
   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 ChecksumRequired as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::checksum_required::builders::ChecksumRequiredInputBuilder {
   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::checksum_required::ChecksumRequiredOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::checksum_required::ChecksumRequiredError,
   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::checksum_required::ChecksumRequired::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::checksum_required::ChecksumRequired::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::checksum_required::ChecksumRequiredOutput,
   96    106   
        crate::operation::checksum_required::ChecksumRequiredError,
   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:498 */
  110    122   
    #[allow(missing_docs)] // documentation missing in model
         123  +
                           /* FluentBuilderGenerator.kt:500 */
  111    124   
    pub fn field(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  112    125   
        self.inner = self.inner.field(input.into());
  113    126   
        self
  114    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:498 */
  115    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* FluentBuilderGenerator.kt:500 */
  116    131   
    pub fn set_field(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  117    132   
        self.inner = self.inner.set_field(input);
  118    133   
        self
  119    134   
    }
         135  +
    /* FluentBuilderGenerator.kt:518 */
  120    136   
    #[allow(missing_docs)] // documentation missing in model
         137  +
                           /* FluentBuilderGenerator.kt:520 */
  121    138   
    pub fn get_field(&self) -> &::std::option::Option<::std::string::String> {
  122    139   
        self.inner.get_field()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:282 */
  124    142   
}