Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

@@ -1,1 +19,19 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Types for the `CompleteSnapshot` operation.
           2  +
/* CodegenDelegator.kt:51 */
           3  +
/// /* CodegenDelegator.kt:51 */Types for the `CompleteSnapshot` operation.
    4      4   
pub mod complete_snapshot;
    5      5   
    6         -
/// Types for the `GetSnapshotBlock` operation.
           6  +
/// /* CodegenDelegator.kt:51 */Types for the `GetSnapshotBlock` operation.
    7      7   
pub mod get_snapshot_block;
    8      8   
    9         -
/// Types for the `ListChangedBlocks` operation.
           9  +
/// /* CodegenDelegator.kt:51 */Types for the `ListChangedBlocks` operation.
   10     10   
pub mod list_changed_blocks;
   11     11   
   12         -
/// Types for the `ListSnapshotBlocks` operation.
          12  +
/// /* CodegenDelegator.kt:51 */Types for the `ListSnapshotBlocks` operation.
   13     13   
pub mod list_snapshot_blocks;
   14     14   
   15         -
/// Types for the `PutSnapshotBlock` operation.
          15  +
/// /* CodegenDelegator.kt:51 */Types for the `PutSnapshotBlock` operation.
   16     16   
pub mod put_snapshot_block;
   17     17   
   18         -
/// Types for the `StartSnapshot` operation.
          18  +
/// /* CodegenDelegator.kt:51 */Types for the `StartSnapshot` operation.
   19     19   
pub mod start_snapshot;

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/operation/complete_snapshot.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 `CompleteSnapshot`.
           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 CompleteSnapshot;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl CompleteSnapshot {
    7         -
    /// Creates a new `CompleteSnapshot`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `CompleteSnapshot`
          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::complete_snapshot::CompleteSnapshotInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::complete_snapshot::CompleteSnapshotOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::complete_snapshot::CompleteSnapshotError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +394,608 @@
   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 CompleteSnapshot {
   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("CompleteSnapshot");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            CompleteSnapshotRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            CompleteSnapshotResponseDeserializer,
   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("CompleteSnapshot", "EBS"));
  104    115   
  105    116   
        ::std::option::Option::Some(cfg.freeze())
  106    117   
    }
  107    118   
  108    119   
    fn runtime_components(
  109    120   
        &self,
  110    121   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  111    122   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  112    123   
        #[allow(unused_mut)]
  113    124   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CompleteSnapshot")
  114    125   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  115    126   
            .with_interceptor(CompleteSnapshotEndpointParamsInterceptor)
  116    127   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  117    128   
                crate::operation::complete_snapshot::CompleteSnapshotError,
  118    129   
            >::new())
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  120    131   
                crate::operation::complete_snapshot::CompleteSnapshotError,
  121    132   
            >::new());
  122    133   
  123    134   
        ::std::borrow::Cow::Owned(rcb)
  124    135   
    }
  125    136   
}
  126    137   
         138  +
/* ResponseDeserializerGenerator.kt:64 */
  127    139   
#[derive(Debug)]
  128    140   
struct CompleteSnapshotResponseDeserializer;
  129    141   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CompleteSnapshotResponseDeserializer {
  130    142   
    fn deserialize_nonstreaming(
  131    143   
        &self,
  132    144   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  133    145   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  134    146   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  135    147   
        let headers = response.headers();
  136    148   
        let body = response.body().bytes().expect("body loaded");
  137    149   
        #[allow(unused_mut)]
  138    150   
        let mut force_error = false;
  139    151   
  140    152   
        let parse_result = if !success && status != 202 || force_error {
  141    153   
            crate::protocol_serde::shape_complete_snapshot::de_complete_snapshot_http_error(status, headers, body)
  142    154   
        } else {
  143    155   
            crate::protocol_serde::shape_complete_snapshot::de_complete_snapshot_http_response(status, headers, body)
  144    156   
        };
  145    157   
        crate::protocol_serde::type_erase_result(parse_result)
  146    158   
    }
  147    159   
}
         160  +
/* RequestSerializerGenerator.kt:67 */
  148    161   
#[derive(Debug)]
  149    162   
struct CompleteSnapshotRequestSerializer;
  150    163   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CompleteSnapshotRequestSerializer {
  151    164   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  152    165   
    fn serialize_input(
  153    166   
        &self,
  154    167   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  155    168   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  156    169   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  157    170   
        let input = input
  158    171   
            .downcast::<crate::operation::complete_snapshot::CompleteSnapshotInput>()
  159    172   
            .expect("correct type");
  160    173   
        let _header_serialization_settings = _cfg
  161    174   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  162    175   
            .cloned()
  163    176   
            .unwrap_or_default();
  164    177   
        let mut request_builder = {
  165    178   
            fn uri_base(
  166    179   
                _input: &crate::operation::complete_snapshot::CompleteSnapshotInput,
  167    180   
                output: &mut ::std::string::String,
  168    181   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  169    182   
                use ::std::fmt::Write as _;
  170    183   
                let input_1 = &_input.snapshot_id;
  171    184   
                let input_1 = input_1
  172    185   
                    .as_ref()
  173    186   
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("snapshot_id", "cannot be empty or unset"))?;
  174    187   
                let snapshot_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  175    188   
                if snapshot_id.is_empty() {
  176    189   
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  177    190   
                        "snapshot_id",
  178    191   
                        "cannot be empty or unset",
  179    192   
                    ));
  180    193   
                }
  181    194   
                ::std::write!(output, "/snapshots/completion/{SnapshotId}", SnapshotId = snapshot_id).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::complete_snapshot::CompleteSnapshotInput,
  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   
                let builder = crate::protocol_serde::shape_complete_snapshot::ser_complete_snapshot_headers(input, builder)?;
  192    205   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  193    206   
            }
  194    207   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  195    208   
            builder
  196    209   
        };
  197    210   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  198    211   
  199    212   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  200    213   
    }
  201    214   
}
         215  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  202    216   
#[derive(Debug)]
  203    217   
struct CompleteSnapshotEndpointParamsInterceptor;
  204    218   
  205    219   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CompleteSnapshotEndpointParamsInterceptor {
  206    220   
    fn name(&self) -> &'static str {
  207    221   
        "CompleteSnapshotEndpointParamsInterceptor"
  208    222   
    }
  209    223   
  210    224   
    fn read_before_execution(
  211    225   
        &self,
  212    226   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  213    227   
            '_,
  214    228   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  215    229   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  216    230   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  217    231   
        >,
  218    232   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  219    233   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  220    234   
        let _input = context
  221    235   
            .input()
  222    236   
            .downcast_ref::<CompleteSnapshotInput>()
  223    237   
            .ok_or("failed to downcast to CompleteSnapshotInput")?;
  224    238   
  225    239   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  226    240   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  227    241   
        })?;
  228    242   
        cfg.interceptor_state()
  229    243   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  230    244   
        ::std::result::Result::Ok(())
  231    245   
    }
  232    246   
}
  233    247   
  234    248   
// The get_* functions below are generated from JMESPath expressions in the
  235    249   
// operationContextParams trait. They target the operation's input shape.
  236    250   
         251  +
/* OperationErrorGenerator.kt:79 */
  237    252   
/// Error type for the `CompleteSnapshotError` operation.
         253  +
/* RustType.kt:516 */
  238    254   
#[non_exhaustive]
         255  +
/* RustType.kt:516 */
  239    256   
#[derive(::std::fmt::Debug)]
  240         -
pub enum CompleteSnapshotError {
  241         -
    /// <p>You do not have sufficient access to perform this action.</p>
         257  +
pub /* OperationErrorGenerator.kt:81 */ enum CompleteSnapshotError {
         258  +
    /// /* OperationErrorGenerator.kt:83 */<p>You do not have sufficient access to perform this action.</p>
         259  +
    /* OperationErrorGenerator.kt:86 */
  242    260   
    AccessDeniedError(crate::types::error::AccessDeniedError),
  243         -
    /// <p>An internal error has occurred.</p>
         261  +
    /// /* OperationErrorGenerator.kt:83 */<p>An internal error has occurred.</p>
         262  +
    /* OperationErrorGenerator.kt:86 */
  244    263   
    InternalServerError(crate::types::error::InternalServerError),
  245         -
    /// <p>The number of API requests has exceed the maximum allowed API request throttling limit.</p>
         264  +
    /// /* OperationErrorGenerator.kt:83 */<p>The number of API requests has exceed the maximum allowed API request throttling limit.</p>
         265  +
    /* OperationErrorGenerator.kt:86 */
  246    266   
    RequestThrottledError(crate::types::error::RequestThrottledError),
  247         -
    /// <p>The specified resource does not exist.</p>
         267  +
    /// /* OperationErrorGenerator.kt:83 */<p>The specified resource does not exist.</p>
         268  +
    /* OperationErrorGenerator.kt:86 */
  248    269   
    ResourceNotFoundError(crate::types::error::ResourceNotFoundError),
  249         -
    /// <p>Your current service quotas do not allow you to perform this action.</p>
         270  +
    /// /* OperationErrorGenerator.kt:83 */<p>Your current service quotas do not allow you to perform this action.</p>
         271  +
    /* OperationErrorGenerator.kt:86 */
  250    272   
    ServiceQuotaExceededError(crate::types::error::ServiceQuotaExceededError),
  251         -
    /// <p>The input fails to satisfy the constraints of the EBS direct APIs.</p>
         273  +
    /// /* OperationErrorGenerator.kt:83 */<p>The input fails to satisfy the constraints of the EBS direct APIs.</p>
         274  +
    /* OperationErrorGenerator.kt:86 */
  252    275   
    ValidationError(crate::types::error::ValidationError),
         276  +
    /* OperationErrorGenerator.kt:88 */
  253    277   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  254    278   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  255    279   
    variable wildcard pattern and check `.code()`:
  256    280   
     \
  257    281   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  258    282   
     \
  259    283   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CompleteSnapshotError) for what information is available for the error.")]
  260    284   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         285  +
    /* OperationErrorGenerator.kt:81 */
  261    286   
}
         287  +
/* OperationErrorGenerator.kt:218 */
  262    288   
impl CompleteSnapshotError {
         289  +
    /* OperationErrorGenerator.kt:219 */
  263    290   
    /// Creates the `CompleteSnapshotError::Unhandled` variant from any error type.
  264    291   
    pub fn unhandled(
  265    292   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  266    293   
    ) -> Self {
  267    294   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  268    295   
            source: err.into(),
  269    296   
            meta: ::std::default::Default::default(),
  270    297   
        })
  271    298   
    }
  272    299   
  273    300   
    /// Creates the `CompleteSnapshotError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  274    301   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  275    302   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  276    303   
            source: err.clone().into(),
  277    304   
            meta: err,
  278    305   
        })
  279    306   
    }
  280         -
    ///
         307  +
    /// /* OperationErrorGenerator.kt:236 */
  281    308   
    /// Returns error metadata, which includes the error code, message,
  282    309   
    /// request ID, and potentially additional information.
  283    310   
    ///
         311  +
    /* OperationErrorGenerator.kt:242 */
  284    312   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         313  +
        /* OperationErrorGenerator.kt:243 */
  285    314   
        match self {
         315  +
            /* OperationErrorGenerator.kt:246 */
  286    316   
            Self::AccessDeniedError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         317  +
            /* OperationErrorGenerator.kt:246 */
  287    318   
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         319  +
            /* OperationErrorGenerator.kt:246 */
  288    320   
            Self::RequestThrottledError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         321  +
            /* OperationErrorGenerator.kt:246 */
  289    322   
            Self::ResourceNotFoundError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         323  +
            /* OperationErrorGenerator.kt:246 */
  290    324   
            Self::ServiceQuotaExceededError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  291         -
            Self::ValidationError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  292         -
            Self::Unhandled(e) => &e.meta,
         325  +
            /* OperationErrorGenerator.kt:246 */ Self::ValidationError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         326  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         327  +
            /* OperationErrorGenerator.kt:243 */
  293    328   
        }
         329  +
        /* OperationErrorGenerator.kt:242 */
  294    330   
    }
         331  +
    /* OperationErrorGenerator.kt:257 */
  295    332   
    /// Returns `true` if the error kind is `CompleteSnapshotError::AccessDeniedError`.
         333  +
    /* OperationErrorGenerator.kt:258 */
  296    334   
    pub fn is_access_denied_error(&self) -> bool {
         335  +
        /* OperationErrorGenerator.kt:259 */
  297    336   
        matches!(self, Self::AccessDeniedError(_))
         337  +
        /* OperationErrorGenerator.kt:258 */
  298    338   
    }
         339  +
    /* OperationErrorGenerator.kt:257 */
  299    340   
    /// Returns `true` if the error kind is `CompleteSnapshotError::InternalServerError`.
         341  +
    /* OperationErrorGenerator.kt:258 */
  300    342   
    pub fn is_internal_server_error(&self) -> bool {
         343  +
        /* OperationErrorGenerator.kt:259 */
  301    344   
        matches!(self, Self::InternalServerError(_))
         345  +
        /* OperationErrorGenerator.kt:258 */
  302    346   
    }
         347  +
    /* OperationErrorGenerator.kt:257 */
  303    348   
    /// Returns `true` if the error kind is `CompleteSnapshotError::RequestThrottledError`.
         349  +
    /* OperationErrorGenerator.kt:258 */
  304    350   
    pub fn is_request_throttled_error(&self) -> bool {
         351  +
        /* OperationErrorGenerator.kt:259 */
  305    352   
        matches!(self, Self::RequestThrottledError(_))
         353  +
        /* OperationErrorGenerator.kt:258 */
  306    354   
    }
         355  +
    /* OperationErrorGenerator.kt:257 */
  307    356   
    /// Returns `true` if the error kind is `CompleteSnapshotError::ResourceNotFoundError`.
         357  +
    /* OperationErrorGenerator.kt:258 */
  308    358   
    pub fn is_resource_not_found_error(&self) -> bool {
         359  +
        /* OperationErrorGenerator.kt:259 */
  309    360   
        matches!(self, Self::ResourceNotFoundError(_))
         361  +
        /* OperationErrorGenerator.kt:258 */
  310    362   
    }
         363  +
    /* OperationErrorGenerator.kt:257 */
  311    364   
    /// Returns `true` if the error kind is `CompleteSnapshotError::ServiceQuotaExceededError`.
         365  +
    /* OperationErrorGenerator.kt:258 */
  312    366   
    pub fn is_service_quota_exceeded_error(&self) -> bool {
         367  +
        /* OperationErrorGenerator.kt:259 */
  313    368   
        matches!(self, Self::ServiceQuotaExceededError(_))
         369  +
        /* OperationErrorGenerator.kt:258 */
  314    370   
    }
         371  +
    /* OperationErrorGenerator.kt:257 */
  315    372   
    /// Returns `true` if the error kind is `CompleteSnapshotError::ValidationError`.
         373  +
    /* OperationErrorGenerator.kt:258 */
  316    374   
    pub fn is_validation_error(&self) -> bool {
         375  +
        /* OperationErrorGenerator.kt:259 */
  317    376   
        matches!(self, Self::ValidationError(_))
         377  +
        /* OperationErrorGenerator.kt:258 */
  318    378   
    }
         379  +
    /* OperationErrorGenerator.kt:218 */
  319    380   
}
         381  +
/* OperationErrorGenerator.kt:269 */
  320    382   
impl ::std::error::Error for CompleteSnapshotError {
         383  +
    /* OperationErrorGenerator.kt:270 */
  321    384   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         385  +
        /* OperationErrorGenerator.kt:318 */
  322    386   
        match self {
  323         -
            Self::AccessDeniedError(_inner) => ::std::option::Option::Some(_inner),
  324         -
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
  325         -
            Self::RequestThrottledError(_inner) => ::std::option::Option::Some(_inner),
  326         -
            Self::ResourceNotFoundError(_inner) => ::std::option::Option::Some(_inner),
  327         -
            Self::ServiceQuotaExceededError(_inner) => ::std::option::Option::Some(_inner),
  328         -
            Self::ValidationError(_inner) => ::std::option::Option::Some(_inner),
  329         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         387  +
            /* OperationErrorGenerator.kt:321 */
         388  +
            Self::AccessDeniedError(_inner) =>
         389  +
            /* OperationErrorGenerator.kt:283 */
         390  +
            {
         391  +
                ::std::option::Option::Some(_inner)
         392  +
            }
         393  +
            ,
         394  +
            /* OperationErrorGenerator.kt:321 */
         395  +
            Self::InternalServerError(_inner) =>
         396  +
            /* OperationErrorGenerator.kt:283 */
         397  +
            {
         398  +
                ::std::option::Option::Some(_inner)
         399  +
            }
         400  +
            ,
         401  +
            /* OperationErrorGenerator.kt:321 */
         402  +
            Self::RequestThrottledError(_inner) =>
         403  +
            /* OperationErrorGenerator.kt:283 */
         404  +
            {
         405  +
                ::std::option::Option::Some(_inner)
         406  +
            }
         407  +
            ,
         408  +
            /* OperationErrorGenerator.kt:321 */
         409  +
            Self::ResourceNotFoundError(_inner) =>
         410  +
            /* OperationErrorGenerator.kt:283 */
         411  +
            {
         412  +
                ::std::option::Option::Some(_inner)
         413  +
            }
         414  +
            ,
         415  +
            /* OperationErrorGenerator.kt:321 */
         416  +
            Self::ServiceQuotaExceededError(_inner) =>
         417  +
            /* OperationErrorGenerator.kt:283 */
         418  +
            {
         419  +
                ::std::option::Option::Some(_inner)
         420  +
            }
         421  +
            ,
         422  +
            /* OperationErrorGenerator.kt:321 */
         423  +
            Self::ValidationError(_inner) =>
         424  +
            /* OperationErrorGenerator.kt:283 */
         425  +
            {
         426  +
                ::std::option::Option::Some(_inner)
         427  +
            }
         428  +
            ,
         429  +
            /* OperationErrorGenerator.kt:326 */
         430  +
            Self::Unhandled(_inner) => {
         431  +
                /* OperationErrorGenerator.kt:279 */
         432  +
                ::std::option::Option::Some(&*_inner.source)
         433  +
                /* OperationErrorGenerator.kt:326 */
         434  +
            } /* OperationErrorGenerator.kt:318 */
  330    435   
        }
         436  +
        /* OperationErrorGenerator.kt:270 */
  331    437   
    }
         438  +
    /* OperationErrorGenerator.kt:269 */
  332    439   
}
         440  +
/* OperationErrorGenerator.kt:133 */
  333    441   
impl ::std::fmt::Display for CompleteSnapshotError {
         442  +
    /* OperationErrorGenerator.kt:134 */
  334    443   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         444  +
        /* OperationErrorGenerator.kt:318 */
  335    445   
        match self {
  336         -
            Self::AccessDeniedError(_inner) => _inner.fmt(f),
  337         -
            Self::InternalServerError(_inner) => _inner.fmt(f),
  338         -
            Self::RequestThrottledError(_inner) => _inner.fmt(f),
  339         -
            Self::ResourceNotFoundError(_inner) => _inner.fmt(f),
  340         -
            Self::ServiceQuotaExceededError(_inner) => _inner.fmt(f),
  341         -
            Self::ValidationError(_inner) => _inner.fmt(f),
         446  +
            /* OperationErrorGenerator.kt:321 */
         447  +
            Self::AccessDeniedError(_inner) =>
         448  +
            /* OperationErrorGenerator.kt:151 */
         449  +
            {
         450  +
                _inner.fmt(f)
         451  +
            }
         452  +
            ,
         453  +
            /* OperationErrorGenerator.kt:321 */
         454  +
            Self::InternalServerError(_inner) =>
         455  +
            /* OperationErrorGenerator.kt:151 */
         456  +
            {
         457  +
                _inner.fmt(f)
         458  +
            }
         459  +
            ,
         460  +
            /* OperationErrorGenerator.kt:321 */
         461  +
            Self::RequestThrottledError(_inner) =>
         462  +
            /* OperationErrorGenerator.kt:151 */
         463  +
            {
         464  +
                _inner.fmt(f)
         465  +
            }
         466  +
            ,
         467  +
            /* OperationErrorGenerator.kt:321 */
         468  +
            Self::ResourceNotFoundError(_inner) =>
         469  +
            /* OperationErrorGenerator.kt:151 */
         470  +
            {
         471  +
                _inner.fmt(f)
         472  +
            }
         473  +
            ,
         474  +
            /* OperationErrorGenerator.kt:321 */
         475  +
            Self::ServiceQuotaExceededError(_inner) =>
         476  +
            /* OperationErrorGenerator.kt:151 */
         477  +
            {
         478  +
                _inner.fmt(f)
         479  +
            }
         480  +
            ,
         481  +
            /* OperationErrorGenerator.kt:321 */
         482  +
            Self::ValidationError(_inner) =>
         483  +
            /* OperationErrorGenerator.kt:151 */
         484  +
            {
         485  +
                _inner.fmt(f)
         486  +
            }
         487  +
            ,
         488  +
            /* OperationErrorGenerator.kt:326 */
  342    489   
            Self::Unhandled(_inner) => {
         490  +
                /* OperationErrorGenerator.kt:139 */
  343    491   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  344    492   
                    write!(f, "unhandled error ({code})")
  345    493   
                } else {
  346    494   
                    f.write_str("unhandled error")
  347    495   
                }
         496  +
                /* OperationErrorGenerator.kt:326 */
         497  +
            } /* OperationErrorGenerator.kt:318 */
  348    498   
        }
         499  +
        /* OperationErrorGenerator.kt:134 */
  349    500   
    }
  350         -
    }
         501  +
    /* OperationErrorGenerator.kt:133 */
  351    502   
}
         503  +
/* OperationErrorGenerator.kt:182 */
  352    504   
impl ::aws_smithy_types::retry::ProvideErrorKind for CompleteSnapshotError {
         505  +
    /* OperationErrorGenerator.kt:186 */
  353    506   
    fn code(&self) -> ::std::option::Option<&str> {
         507  +
        /* OperationErrorGenerator.kt:187 */
  354    508   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         509  +
        /* OperationErrorGenerator.kt:186 */
  355    510   
    }
         511  +
    /* OperationErrorGenerator.kt:190 */
  356    512   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         513  +
        /* OperationErrorGenerator.kt:197 */
  357    514   
        ::std::option::Option::None
         515  +
        /* OperationErrorGenerator.kt:190 */
  358    516   
    }
         517  +
    /* OperationErrorGenerator.kt:182 */
  359    518   
}
         519  +
/* OperationErrorGenerator.kt:163 */
  360    520   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CompleteSnapshotError {
         521  +
    /* OperationErrorGenerator.kt:164 */
  361    522   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         523  +
        /* OperationErrorGenerator.kt:318 */
  362    524   
        match self {
  363         -
            Self::AccessDeniedError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  364         -
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  365         -
            Self::RequestThrottledError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  366         -
            Self::ResourceNotFoundError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  367         -
            Self::ServiceQuotaExceededError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  368         -
            Self::ValidationError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  369         -
            Self::Unhandled(_inner) => &_inner.meta,
         525  +
            /* OperationErrorGenerator.kt:321 */
         526  +
            Self::AccessDeniedError(_inner) =>
         527  +
            /* OperationErrorGenerator.kt:169 */
         528  +
            {
         529  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         530  +
            }
         531  +
            ,
         532  +
            /* OperationErrorGenerator.kt:321 */
         533  +
            Self::InternalServerError(_inner) =>
         534  +
            /* OperationErrorGenerator.kt:169 */
         535  +
            {
         536  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         537  +
            }
         538  +
            ,
         539  +
            /* OperationErrorGenerator.kt:321 */
         540  +
            Self::RequestThrottledError(_inner) =>
         541  +
            /* OperationErrorGenerator.kt:169 */
         542  +
            {
         543  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         544  +
            }
         545  +
            ,
         546  +
            /* OperationErrorGenerator.kt:321 */
         547  +
            Self::ResourceNotFoundError(_inner) =>
         548  +
            /* OperationErrorGenerator.kt:169 */
         549  +
            {
         550  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         551  +
            }
         552  +
            ,
         553  +
            /* OperationErrorGenerator.kt:321 */
         554  +
            Self::ServiceQuotaExceededError(_inner) =>
         555  +
            /* OperationErrorGenerator.kt:169 */
         556  +
            {
         557  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         558  +
            }
         559  +
            ,
         560  +
            /* OperationErrorGenerator.kt:321 */
         561  +
            Self::ValidationError(_inner) =>
         562  +
            /* OperationErrorGenerator.kt:169 */
         563  +
            {
         564  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         565  +
            }
         566  +
            ,
         567  +
            /* OperationErrorGenerator.kt:326 */
         568  +
            Self::Unhandled(_inner) => {
         569  +
                /* OperationErrorGenerator.kt:168 */
         570  +
                &_inner.meta
         571  +
                /* OperationErrorGenerator.kt:326 */
         572  +
            } /* OperationErrorGenerator.kt:318 */
  370    573   
        }
         574  +
        /* OperationErrorGenerator.kt:164 */
  371    575   
    }
         576  +
    /* OperationErrorGenerator.kt:163 */
  372    577   
}
         578  +
/* OperationErrorGenerator.kt:109 */
  373    579   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CompleteSnapshotError {
         580  +
    /* OperationErrorGenerator.kt:110 */
  374    581   
    fn create_unhandled_error(
  375    582   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  376    583   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  377    584   
    ) -> Self {
         585  +
        /* OperationErrorGenerator.kt:121 */
  378    586   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  379    587   
            source,
  380    588   
            meta: meta.unwrap_or_default(),
  381    589   
        })
         590  +
        /* OperationErrorGenerator.kt:110 */
  382    591   
    }
         592  +
    /* OperationErrorGenerator.kt:109 */
  383    593   
}
  384    594   
         595  +
/* CodegenDelegator.kt:255 */
  385    596   
pub use crate::operation::complete_snapshot::_complete_snapshot_output::CompleteSnapshotOutput;
  386    597   
         598  +
/* CodegenDelegator.kt:255 */
  387    599   
pub use crate::operation::complete_snapshot::_complete_snapshot_input::CompleteSnapshotInput;
  388    600   
         601  +
/* RustModule.kt:172 */
  389    602   
mod _complete_snapshot_input;
  390    603   
         604  +
/* RustModule.kt:172 */
  391    605   
mod _complete_snapshot_output;
  392    606   
  393         -
/// Builders
         607  +
/// /* CodegenDelegator.kt:51 */Builders
  394    608   
pub mod builders;

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/operation/complete_snapshot/_complete_snapshot_input.rs

@@ -1,1 +146,239 @@
    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 CompleteSnapshotInput {
    6         -
    /// <p>The number of blocks that were written to the snapshot.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct CompleteSnapshotInput {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The number of blocks that were written to the snapshot.</p>
    7     10   
    pub changed_blocks_count: ::std::option::Option<i32>,
    8         -
    /// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
    9     12   
    pub checksum_aggregation_method: ::std::option::Option<crate::types::ChecksumAggregationMethod>,
   10         -
    /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
          13  +
    /// /* StructureGenerator.kt:231 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
   11     14   
    pub checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
   12         -
    /// <p>The ID of the snapshot.</p>
          15  +
    /// /* StructureGenerator.kt:231 */<p>The ID of the snapshot.</p>
   13     16   
    pub snapshot_id: ::std::option::Option<::std::string::String>,
   14         -
    /// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
          17  +
    /// /* StructureGenerator.kt:231 */<p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
   15     18   
    /// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
   16     19   
    pub checksum: ::std::option::Option<::std::string::String>,
          20  +
    /* StructureGenerator.kt:201 */
   17     21   
}
          22  +
/* StructureGenerator.kt:135 */
   18     23   
impl CompleteSnapshotInput {
   19         -
    /// <p>The number of blocks that were written to the snapshot.</p>
          24  +
    /// /* StructureGenerator.kt:231 */<p>The number of blocks that were written to the snapshot.</p>
          25  +
    /* StructureGenerator.kt:166 */
   20     26   
    pub fn changed_blocks_count(&self) -> ::std::option::Option<i32> {
          27  +
        /* StructureGenerator.kt:168 */
   21     28   
        self.changed_blocks_count
          29  +
        /* StructureGenerator.kt:166 */
   22     30   
    }
   23         -
    /// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
          31  +
    /// /* StructureGenerator.kt:231 */<p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
          32  +
    /* StructureGenerator.kt:166 */
   24     33   
    pub fn checksum_aggregation_method(&self) -> ::std::option::Option<&crate::types::ChecksumAggregationMethod> {
          34  +
        /* StructureGenerator.kt:170 */
   25     35   
        self.checksum_aggregation_method.as_ref()
          36  +
        /* StructureGenerator.kt:166 */
   26     37   
    }
   27         -
    /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
          38  +
    /// /* StructureGenerator.kt:231 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
          39  +
    /* StructureGenerator.kt:166 */
   28     40   
    pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::types::ChecksumAlgorithm> {
          41  +
        /* StructureGenerator.kt:170 */
   29     42   
        self.checksum_algorithm.as_ref()
          43  +
        /* StructureGenerator.kt:166 */
   30     44   
    }
   31         -
    /// <p>The ID of the snapshot.</p>
          45  +
    /// /* StructureGenerator.kt:231 */<p>The ID of the snapshot.</p>
          46  +
    /* StructureGenerator.kt:166 */
   32     47   
    pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
          48  +
        /* StructureGenerator.kt:169 */
   33     49   
        self.snapshot_id.as_deref()
          50  +
        /* StructureGenerator.kt:166 */
   34     51   
    }
   35         -
    /// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
          52  +
    /// /* StructureGenerator.kt:231 */<p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
   36     53   
    /// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
          54  +
    /* StructureGenerator.kt:166 */
   37     55   
    pub fn checksum(&self) -> ::std::option::Option<&str> {
          56  +
        /* StructureGenerator.kt:169 */
   38     57   
        self.checksum.as_deref()
          58  +
        /* StructureGenerator.kt:166 */
   39     59   
    }
          60  +
    /* StructureGenerator.kt:135 */
   40     61   
}
          62  +
/* ClientCodegenVisitor.kt:237 */
   41     63   
impl CompleteSnapshotInput {
   42         -
    /// Creates a new builder-style object to manufacture [`CompleteSnapshotInput`](crate::operation::complete_snapshot::CompleteSnapshotInput).
          64  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`CompleteSnapshotInput`](crate::operation::complete_snapshot::CompleteSnapshotInput).
          65  +
    /* BuilderGenerator.kt:175 */
   43     66   
    pub fn builder() -> crate::operation::complete_snapshot::builders::CompleteSnapshotInputBuilder {
          67  +
        /* BuilderGenerator.kt:176 */
   44     68   
        crate::operation::complete_snapshot::builders::CompleteSnapshotInputBuilder::default()
          69  +
        /* BuilderGenerator.kt:175 */
   45     70   
    }
          71  +
    /* ClientCodegenVisitor.kt:237 */
   46     72   
}
   47     73   
   48         -
/// A builder for [`CompleteSnapshotInput`](crate::operation::complete_snapshot::CompleteSnapshotInput).
          74  +
/// /* BuilderGenerator.kt:342 */A builder for [`CompleteSnapshotInput`](crate::operation::complete_snapshot::CompleteSnapshotInput).
          75  +
/* RustType.kt:516 */
   49     76   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          77  +
/* RustType.kt:516 */
   50     78   
#[non_exhaustive]
          79  +
/* BuilderGenerator.kt:345 */
   51     80   
pub struct CompleteSnapshotInputBuilder {
   52         -
    pub(crate) changed_blocks_count: ::std::option::Option<i32>,
   53         -
    pub(crate) checksum_aggregation_method: ::std::option::Option<crate::types::ChecksumAggregationMethod>,
   54         -
    pub(crate) checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
   55         -
    pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
   56         -
    pub(crate) checksum: ::std::option::Option<::std::string::String>,
          81  +
    /* BuilderGenerator.kt:275 */ pub(crate) changed_blocks_count: ::std::option::Option<i32>,
          82  +
    /* BuilderGenerator.kt:275 */ pub(crate) checksum_aggregation_method: ::std::option::Option<crate::types::ChecksumAggregationMethod>,
          83  +
    /* BuilderGenerator.kt:275 */ pub(crate) checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
          84  +
    /* BuilderGenerator.kt:275 */ pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
          85  +
    /* BuilderGenerator.kt:275 */ pub(crate) checksum: ::std::option::Option<::std::string::String>,
          86  +
    /* BuilderGenerator.kt:345 */
   57     87   
}
          88  +
/* BuilderGenerator.kt:355 */
   58     89   
impl CompleteSnapshotInputBuilder {
   59         -
    /// <p>The number of blocks that were written to the snapshot.</p>
   60         -
    /// This field is required.
          90  +
    /// /* BuilderGenerator.kt:286 */<p>The number of blocks that were written to the snapshot.</p>
          91  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          92  +
    /* BuilderGenerator.kt:291 */
   61     93   
    pub fn changed_blocks_count(mut self, input: i32) -> Self {
          94  +
        /* BuilderGenerator.kt:292 */
   62     95   
        self.changed_blocks_count = ::std::option::Option::Some(input);
          96  +
        /* BuilderGenerator.kt:293 */
   63     97   
        self
          98  +
        /* BuilderGenerator.kt:291 */
   64     99   
    }
   65         -
    /// <p>The number of blocks that were written to the snapshot.</p>
         100  +
    /// /* BuilderGenerator.kt:312 */<p>The number of blocks that were written to the snapshot.</p>
         101  +
    /* BuilderGenerator.kt:314 */
   66    102   
    pub fn set_changed_blocks_count(mut self, input: ::std::option::Option<i32>) -> Self {
         103  +
        /* BuilderGenerator.kt:315 */
   67    104   
        self.changed_blocks_count = input;
   68    105   
        self
         106  +
        /* BuilderGenerator.kt:314 */
   69    107   
    }
   70         -
    /// <p>The number of blocks that were written to the snapshot.</p>
         108  +
    /// /* BuilderGenerator.kt:334 */<p>The number of blocks that were written to the snapshot.</p>
         109  +
    /* BuilderGenerator.kt:336 */
   71    110   
    pub fn get_changed_blocks_count(&self) -> &::std::option::Option<i32> {
         111  +
        /* BuilderGenerator.kt:337 */
   72    112   
        &self.changed_blocks_count
         113  +
        /* BuilderGenerator.kt:336 */
   73    114   
    }
   74         -
    /// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
         115  +
    /// /* BuilderGenerator.kt:286 */<p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
         116  +
    /* BuilderGenerator.kt:291 */
   75    117   
    pub fn checksum_aggregation_method(mut self, input: crate::types::ChecksumAggregationMethod) -> Self {
         118  +
        /* BuilderGenerator.kt:292 */
   76    119   
        self.checksum_aggregation_method = ::std::option::Option::Some(input);
         120  +
        /* BuilderGenerator.kt:293 */
   77    121   
        self
         122  +
        /* BuilderGenerator.kt:291 */
   78    123   
    }
   79         -
    /// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
         124  +
    /// /* BuilderGenerator.kt:312 */<p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
         125  +
    /* BuilderGenerator.kt:314 */
   80    126   
    pub fn set_checksum_aggregation_method(mut self, input: ::std::option::Option<crate::types::ChecksumAggregationMethod>) -> Self {
         127  +
        /* BuilderGenerator.kt:315 */
   81    128   
        self.checksum_aggregation_method = input;
   82    129   
        self
         130  +
        /* BuilderGenerator.kt:314 */
   83    131   
    }
   84         -
    /// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
         132  +
    /// /* BuilderGenerator.kt:334 */<p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
         133  +
    /* BuilderGenerator.kt:336 */
   85    134   
    pub fn get_checksum_aggregation_method(&self) -> &::std::option::Option<crate::types::ChecksumAggregationMethod> {
         135  +
        /* BuilderGenerator.kt:337 */
   86    136   
        &self.checksum_aggregation_method
         137  +
        /* BuilderGenerator.kt:336 */
   87    138   
    }
   88         -
    /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
         139  +
    /// /* BuilderGenerator.kt:286 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
         140  +
    /* BuilderGenerator.kt:291 */
   89    141   
    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
         142  +
        /* BuilderGenerator.kt:292 */
   90    143   
        self.checksum_algorithm = ::std::option::Option::Some(input);
         144  +
        /* BuilderGenerator.kt:293 */
   91    145   
        self
         146  +
        /* BuilderGenerator.kt:291 */
   92    147   
    }
   93         -
    /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
         148  +
    /// /* BuilderGenerator.kt:312 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
         149  +
    /* BuilderGenerator.kt:314 */
   94    150   
    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
         151  +
        /* BuilderGenerator.kt:315 */
   95    152   
        self.checksum_algorithm = input;
   96    153   
        self
         154  +
        /* BuilderGenerator.kt:314 */
   97    155   
    }
   98         -
    /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
         156  +
    /// /* BuilderGenerator.kt:334 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
         157  +
    /* BuilderGenerator.kt:336 */
   99    158   
    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
         159  +
        /* BuilderGenerator.kt:337 */
  100    160   
        &self.checksum_algorithm
         161  +
        /* BuilderGenerator.kt:336 */
  101    162   
    }
  102         -
    /// <p>The ID of the snapshot.</p>
  103         -
    /// This field is required.
         163  +
    /// /* BuilderGenerator.kt:286 */<p>The ID of the snapshot.</p>
         164  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         165  +
    /* BuilderGenerator.kt:291 */
  104    166   
    pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         167  +
        /* BuilderGenerator.kt:292 */
  105    168   
        self.snapshot_id = ::std::option::Option::Some(input.into());
         169  +
        /* BuilderGenerator.kt:293 */
  106    170   
        self
         171  +
        /* BuilderGenerator.kt:291 */
  107    172   
    }
  108         -
    /// <p>The ID of the snapshot.</p>
         173  +
    /// /* BuilderGenerator.kt:312 */<p>The ID of the snapshot.</p>
         174  +
    /* BuilderGenerator.kt:314 */
  109    175   
    pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         176  +
        /* BuilderGenerator.kt:315 */
  110    177   
        self.snapshot_id = input;
  111    178   
        self
         179  +
        /* BuilderGenerator.kt:314 */
  112    180   
    }
  113         -
    /// <p>The ID of the snapshot.</p>
         181  +
    /// /* BuilderGenerator.kt:334 */<p>The ID of the snapshot.</p>
         182  +
    /* BuilderGenerator.kt:336 */
  114    183   
    pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
         184  +
        /* BuilderGenerator.kt:337 */
  115    185   
        &self.snapshot_id
         186  +
        /* BuilderGenerator.kt:336 */
  116    187   
    }
  117         -
    /// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
         188  +
    /// /* BuilderGenerator.kt:286 */<p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
  118    189   
    /// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
         190  +
    /* BuilderGenerator.kt:291 */
  119    191   
    pub fn checksum(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         192  +
        /* BuilderGenerator.kt:292 */
  120    193   
        self.checksum = ::std::option::Option::Some(input.into());
         194  +
        /* BuilderGenerator.kt:293 */
  121    195   
        self
         196  +
        /* BuilderGenerator.kt:291 */
  122    197   
    }
  123         -
    /// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
         198  +
    /// /* BuilderGenerator.kt:312 */<p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
  124    199   
    /// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
         200  +
    /* BuilderGenerator.kt:314 */
  125    201   
    pub fn set_checksum(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         202  +
        /* BuilderGenerator.kt:315 */
  126    203   
        self.checksum = input;
  127    204   
        self
         205  +
        /* BuilderGenerator.kt:314 */
  128    206   
    }
  129         -
    /// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
         207  +
    /// /* BuilderGenerator.kt:334 */<p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
  130    208   
    /// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
         209  +
    /* BuilderGenerator.kt:336 */
  131    210   
    pub fn get_checksum(&self) -> &::std::option::Option<::std::string::String> {
         211  +
        /* BuilderGenerator.kt:337 */
  132    212   
        &self.checksum
         213  +
        /* BuilderGenerator.kt:336 */
  133    214   
    }
  134         -
    /// Consumes the builder and constructs a [`CompleteSnapshotInput`](crate::operation::complete_snapshot::CompleteSnapshotInput).
         215  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`CompleteSnapshotInput`](crate::operation::complete_snapshot::CompleteSnapshotInput).
         216  +
    /* BuilderGenerator.kt:253 */
  135    217   
    pub fn build(
  136    218   
        self,
  137    219   
    ) -> ::std::result::Result<crate::operation::complete_snapshot::CompleteSnapshotInput, ::aws_smithy_types::error::operation::BuildError> {
  138         -
        ::std::result::Result::Ok(crate::operation::complete_snapshot::CompleteSnapshotInput {
  139         -
            changed_blocks_count: self.changed_blocks_count,
         220  +
        /* BuilderGenerator.kt:254 */
         221  +
        ::std::result::Result::Ok(
         222  +
            /* BuilderGenerator.kt:477 */
         223  +
            crate::operation::complete_snapshot::CompleteSnapshotInput {
         224  +
                /* BuilderGenerator.kt:481 */ changed_blocks_count: self.changed_blocks_count,
         225  +
                /* BuilderGenerator.kt:481 */
  140    226   
                checksum_aggregation_method: self.checksum_aggregation_method,
         227  +
                /* BuilderGenerator.kt:481 */
  141    228   
                checksum_algorithm: self.checksum_algorithm,
         229  +
                /* BuilderGenerator.kt:481 */
  142    230   
                snapshot_id: self.snapshot_id,
         231  +
                /* BuilderGenerator.kt:481 */
  143    232   
                checksum: self.checksum,
  144         -
        })
         233  +
                /* BuilderGenerator.kt:477 */
         234  +
            }, /* BuilderGenerator.kt:254 */
         235  +
        )
         236  +
        /* BuilderGenerator.kt:253 */
  145    237   
    }
         238  +
    /* BuilderGenerator.kt:355 */
  146    239   
}

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/operation/complete_snapshot/_complete_snapshot_output.rs

@@ -1,1 +47,83 @@
    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 CompleteSnapshotOutput {
    6         -
    /// <p>The status of the snapshot.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct CompleteSnapshotOutput {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The status of the snapshot.</p>
    7     10   
    pub status: ::std::option::Option<crate::types::Status>,
          11  +
    /* StructureGenerator.kt:201 */
    8     12   
}
          13  +
/* StructureGenerator.kt:135 */
    9     14   
impl CompleteSnapshotOutput {
   10         -
    /// <p>The status of the snapshot.</p>
          15  +
    /// /* StructureGenerator.kt:231 */<p>The status of the snapshot.</p>
          16  +
    /* StructureGenerator.kt:166 */
   11     17   
    pub fn status(&self) -> ::std::option::Option<&crate::types::Status> {
          18  +
        /* StructureGenerator.kt:170 */
   12     19   
        self.status.as_ref()
          20  +
        /* StructureGenerator.kt:166 */
   13     21   
    }
          22  +
    /* StructureGenerator.kt:135 */
   14     23   
}
          24  +
/* ClientCodegenVisitor.kt:237 */
   15     25   
impl CompleteSnapshotOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`CompleteSnapshotOutput`](crate::operation::complete_snapshot::CompleteSnapshotOutput).
          26  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`CompleteSnapshotOutput`](crate::operation::complete_snapshot::CompleteSnapshotOutput).
          27  +
    /* BuilderGenerator.kt:175 */
   17     28   
    pub fn builder() -> crate::operation::complete_snapshot::builders::CompleteSnapshotOutputBuilder {
          29  +
        /* BuilderGenerator.kt:176 */
   18     30   
        crate::operation::complete_snapshot::builders::CompleteSnapshotOutputBuilder::default()
          31  +
        /* BuilderGenerator.kt:175 */
   19     32   
    }
          33  +
    /* ClientCodegenVisitor.kt:237 */
   20     34   
}
   21     35   
   22         -
/// A builder for [`CompleteSnapshotOutput`](crate::operation::complete_snapshot::CompleteSnapshotOutput).
          36  +
/// /* BuilderGenerator.kt:342 */A builder for [`CompleteSnapshotOutput`](crate::operation::complete_snapshot::CompleteSnapshotOutput).
          37  +
/* RustType.kt:516 */
   23     38   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          39  +
/* RustType.kt:516 */
   24     40   
#[non_exhaustive]
          41  +
/* BuilderGenerator.kt:345 */
   25     42   
pub struct CompleteSnapshotOutputBuilder {
   26         -
    pub(crate) status: ::std::option::Option<crate::types::Status>,
          43  +
    /* BuilderGenerator.kt:275 */ pub(crate) status: ::std::option::Option<crate::types::Status>,
          44  +
    /* BuilderGenerator.kt:345 */
   27     45   
}
          46  +
/* BuilderGenerator.kt:355 */
   28     47   
impl CompleteSnapshotOutputBuilder {
   29         -
    /// <p>The status of the snapshot.</p>
          48  +
    /// /* BuilderGenerator.kt:286 */<p>The status of the snapshot.</p>
          49  +
    /* BuilderGenerator.kt:291 */
   30     50   
    pub fn status(mut self, input: crate::types::Status) -> Self {
          51  +
        /* BuilderGenerator.kt:292 */
   31     52   
        self.status = ::std::option::Option::Some(input);
          53  +
        /* BuilderGenerator.kt:293 */
   32     54   
        self
          55  +
        /* BuilderGenerator.kt:291 */
   33     56   
    }
   34         -
    /// <p>The status of the snapshot.</p>
          57  +
    /// /* BuilderGenerator.kt:312 */<p>The status of the snapshot.</p>
          58  +
    /* BuilderGenerator.kt:314 */
   35     59   
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::Status>) -> Self {
          60  +
        /* BuilderGenerator.kt:315 */
   36     61   
        self.status = input;
   37     62   
        self
          63  +
        /* BuilderGenerator.kt:314 */
   38     64   
    }
   39         -
    /// <p>The status of the snapshot.</p>
          65  +
    /// /* BuilderGenerator.kt:334 */<p>The status of the snapshot.</p>
          66  +
    /* BuilderGenerator.kt:336 */
   40     67   
    pub fn get_status(&self) -> &::std::option::Option<crate::types::Status> {
          68  +
        /* BuilderGenerator.kt:337 */
   41     69   
        &self.status
          70  +
        /* BuilderGenerator.kt:336 */
   42     71   
    }
   43         -
    /// Consumes the builder and constructs a [`CompleteSnapshotOutput`](crate::operation::complete_snapshot::CompleteSnapshotOutput).
          72  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`CompleteSnapshotOutput`](crate::operation::complete_snapshot::CompleteSnapshotOutput).
          73  +
    /* BuilderGenerator.kt:253 */
   44     74   
    pub fn build(self) -> crate::operation::complete_snapshot::CompleteSnapshotOutput {
   45         -
        crate::operation::complete_snapshot::CompleteSnapshotOutput { status: self.status }
          75  +
        /* BuilderGenerator.kt:477 */
          76  +
        crate::operation::complete_snapshot::CompleteSnapshotOutput {
          77  +
            /* BuilderGenerator.kt:481 */ status: self.status,
          78  +
            /* BuilderGenerator.kt:477 */
   46     79   
        }
          80  +
        /* BuilderGenerator.kt:253 */
          81  +
    }
          82  +
    /* BuilderGenerator.kt:355 */
   47     83   
}

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/operation/complete_snapshot/builders.rs

@@ -1,1 +184,211 @@
    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::complete_snapshot::_complete_snapshot_output::CompleteSnapshotOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::complete_snapshot::_complete_snapshot_input::CompleteSnapshotInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::complete_snapshot::builders::CompleteSnapshotInputBuilder {
    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::complete_snapshot::CompleteSnapshotOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::complete_snapshot::CompleteSnapshotError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.complete_snapshot();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `CompleteSnapshot`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `CompleteSnapshot`.
   24     27   
///
   25         -
/// <p>Seals and completes the snapshot after all of the required blocks of data have been written to it. Completing the snapshot changes the status to <code>completed</code>. You cannot write new blocks to a snapshot after it has been completed.</p>
          28  +
/// /* FluentBuilderGenerator.kt:130 */<p>Seals and completes the snapshot after all of the required blocks of data have been written to it. Completing the snapshot changes the status to <code>completed</code>. You cannot write new blocks to a snapshot after it has been completed.</p>
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct CompleteSnapshotFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::complete_snapshot::builders::CompleteSnapshotInputBuilder,
   30     35   
    config_override: ::std::option::Option<crate::config::Builder>,
   31     36   
}
          37  +
/* FluentBuilderGenerator.kt:381 */
   32     38   
impl
   33     39   
    crate::client::customize::internal::CustomizableSend<
   34     40   
        crate::operation::complete_snapshot::CompleteSnapshotOutput,
   35     41   
        crate::operation::complete_snapshot::CompleteSnapshotError,
   36     42   
    > for CompleteSnapshotFluentBuilder
   37     43   
{
   38     44   
    fn send(
   39     45   
        self,
   40     46   
        config_override: crate::config::Builder,
   41     47   
    ) -> crate::client::customize::internal::BoxFuture<
   42     48   
        crate::client::customize::internal::SendResult<
   43     49   
            crate::operation::complete_snapshot::CompleteSnapshotOutput,
   44     50   
            crate::operation::complete_snapshot::CompleteSnapshotError,
   45     51   
        >,
   46     52   
    > {
   47     53   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   48     54   
    }
   49     55   
}
          56  +
/* FluentBuilderGenerator.kt:282 */
   50     57   
impl CompleteSnapshotFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `CompleteSnapshotFluentBuilder`.
   52     60   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   53     61   
        Self {
   54     62   
            handle,
   55     63   
            inner: ::std::default::Default::default(),
   56     64   
            config_override: ::std::option::Option::None,
   57     65   
        }
   58     66   
    }
          67  +
    /* FluentBuilderGenerator.kt:301 */
   59     68   
    /// Access the CompleteSnapshot as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::complete_snapshot::builders::CompleteSnapshotInputBuilder {
   61     70   
        &self.inner
   62     71   
    }
          72  +
    /* FluentBuilderGenerator.kt:145 */
   63     73   
    /// Sends the request and returns the response.
   64     74   
    ///
   65     75   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   66     76   
    /// can be matched against.
   67     77   
    ///
   68     78   
    /// By default, any retryable failures will be retried twice. Retry behavior
   69     79   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   70     80   
    /// set when configuring the client.
   71     81   
    pub async fn send(
   72     82   
        self,
   73     83   
    ) -> ::std::result::Result<
   74     84   
        crate::operation::complete_snapshot::CompleteSnapshotOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::complete_snapshot::CompleteSnapshotError,
   77     87   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   78     88   
        >,
   79     89   
    > {
   80     90   
        let input = self
   81     91   
            .inner
   82     92   
            .build()
   83     93   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   84     94   
        let runtime_plugins = crate::operation::complete_snapshot::CompleteSnapshot::operation_runtime_plugins(
   85     95   
            self.handle.runtime_plugins.clone(),
   86     96   
            &self.handle.conf,
   87     97   
            self.config_override,
   88     98   
        );
   89     99   
        crate::operation::complete_snapshot::CompleteSnapshot::orchestrate(&runtime_plugins, input).await
   90    100   
    }
   91    101   
   92    102   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   93    103   
    pub fn customize(
   94    104   
        self,
   95    105   
    ) -> crate::client::customize::CustomizableOperation<
   96    106   
        crate::operation::complete_snapshot::CompleteSnapshotOutput,
   97    107   
        crate::operation::complete_snapshot::CompleteSnapshotError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
  111         -
    /// <p>The number of blocks that were written to the snapshot.</p>
         122  +
    /// /* FluentBuilderGenerator.kt:498 */<p>The number of blocks that were written to the snapshot.</p>
         123  +
    /* FluentBuilderGenerator.kt:500 */
  112    124   
    pub fn changed_blocks_count(mut self, input: i32) -> Self {
  113    125   
        self.inner = self.inner.changed_blocks_count(input);
  114    126   
        self
  115    127   
    }
  116         -
    /// <p>The number of blocks that were written to the snapshot.</p>
         128  +
    /// /* FluentBuilderGenerator.kt:498 */<p>The number of blocks that were written to the snapshot.</p>
         129  +
    /* FluentBuilderGenerator.kt:500 */
  117    130   
    pub fn set_changed_blocks_count(mut self, input: ::std::option::Option<i32>) -> Self {
  118    131   
        self.inner = self.inner.set_changed_blocks_count(input);
  119    132   
        self
  120    133   
    }
  121         -
    /// <p>The number of blocks that were written to the snapshot.</p>
         134  +
    /// /* FluentBuilderGenerator.kt:518 */<p>The number of blocks that were written to the snapshot.</p>
         135  +
    /* FluentBuilderGenerator.kt:520 */
  122    136   
    pub fn get_changed_blocks_count(&self) -> &::std::option::Option<i32> {
  123    137   
        self.inner.get_changed_blocks_count()
  124    138   
    }
  125         -
    /// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
         139  +
    /// /* FluentBuilderGenerator.kt:498 */<p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
         140  +
    /* FluentBuilderGenerator.kt:500 */
  126    141   
    pub fn checksum_aggregation_method(mut self, input: crate::types::ChecksumAggregationMethod) -> Self {
  127    142   
        self.inner = self.inner.checksum_aggregation_method(input);
  128    143   
        self
  129    144   
    }
  130         -
    /// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
         145  +
    /// /* FluentBuilderGenerator.kt:498 */<p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
         146  +
    /* FluentBuilderGenerator.kt:500 */
  131    147   
    pub fn set_checksum_aggregation_method(mut self, input: ::std::option::Option<crate::types::ChecksumAggregationMethod>) -> Self {
  132    148   
        self.inner = self.inner.set_checksum_aggregation_method(input);
  133    149   
        self
  134    150   
    }
  135         -
    /// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
         151  +
    /// /* FluentBuilderGenerator.kt:518 */<p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
         152  +
    /* FluentBuilderGenerator.kt:520 */
  136    153   
    pub fn get_checksum_aggregation_method(&self) -> &::std::option::Option<crate::types::ChecksumAggregationMethod> {
  137    154   
        self.inner.get_checksum_aggregation_method()
  138    155   
    }
  139         -
    /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
         156  +
    /// /* FluentBuilderGenerator.kt:498 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
         157  +
    /* FluentBuilderGenerator.kt:500 */
  140    158   
    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
  141    159   
        self.inner = self.inner.checksum_algorithm(input);
  142    160   
        self
  143    161   
    }
  144         -
    /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
         162  +
    /// /* FluentBuilderGenerator.kt:498 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
         163  +
    /* FluentBuilderGenerator.kt:500 */
  145    164   
    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
  146    165   
        self.inner = self.inner.set_checksum_algorithm(input);
  147    166   
        self
  148    167   
    }
  149         -
    /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
         168  +
    /// /* FluentBuilderGenerator.kt:518 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
         169  +
    /* FluentBuilderGenerator.kt:520 */
  150    170   
    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
  151    171   
        self.inner.get_checksum_algorithm()
  152    172   
    }
  153         -
    /// <p>The ID of the snapshot.</p>
         173  +
    /// /* FluentBuilderGenerator.kt:498 */<p>The ID of the snapshot.</p>
         174  +
    /* FluentBuilderGenerator.kt:500 */
  154    175   
    pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  155    176   
        self.inner = self.inner.snapshot_id(input.into());
  156    177   
        self
  157    178   
    }
  158         -
    /// <p>The ID of the snapshot.</p>
         179  +
    /// /* FluentBuilderGenerator.kt:498 */<p>The ID of the snapshot.</p>
         180  +
    /* FluentBuilderGenerator.kt:500 */
  159    181   
    pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  160    182   
        self.inner = self.inner.set_snapshot_id(input);
  161    183   
        self
  162    184   
    }
  163         -
    /// <p>The ID of the snapshot.</p>
         185  +
    /// /* FluentBuilderGenerator.kt:518 */<p>The ID of the snapshot.</p>
         186  +
    /* FluentBuilderGenerator.kt:520 */
  164    187   
    pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
  165    188   
        self.inner.get_snapshot_id()
  166    189   
    }
  167         -
    /// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
         190  +
    /// /* FluentBuilderGenerator.kt:498 */<p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
  168    191   
    /// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
         192  +
    /* FluentBuilderGenerator.kt:500 */
  169    193   
    pub fn checksum(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  170    194   
        self.inner = self.inner.checksum(input.into());
  171    195   
        self
  172    196   
    }
  173         -
    /// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
         197  +
    /// /* FluentBuilderGenerator.kt:498 */<p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
  174    198   
    /// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
         199  +
    /* FluentBuilderGenerator.kt:500 */
  175    200   
    pub fn set_checksum(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  176    201   
        self.inner = self.inner.set_checksum(input);
  177    202   
        self
  178    203   
    }
  179         -
    /// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
         204  +
    /// /* FluentBuilderGenerator.kt:518 */<p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
  180    205   
    /// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
         206  +
    /* FluentBuilderGenerator.kt:520 */
  181    207   
    pub fn get_checksum(&self) -> &::std::option::Option<::std::string::String> {
  182    208   
        self.inner.get_checksum()
  183    209   
    }
         210  +
    /* FluentBuilderGenerator.kt:282 */
  184    211   
}

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/operation/get_snapshot_block.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 `GetSnapshotBlock`.
           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 GetSnapshotBlock;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl GetSnapshotBlock {
    7         -
    /// Creates a new `GetSnapshotBlock`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `GetSnapshotBlock`
          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::get_snapshot_block::GetSnapshotBlockInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::get_snapshot_block::GetSnapshotBlockOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::get_snapshot_block::GetSnapshotBlockError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +189,202 @@
   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 GetSnapshotBlock {
   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("GetSnapshotBlock");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            GetSnapshotBlockRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            GetSnapshotBlockResponseDeserializer,
   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::SensitiveOutput);
  104    115   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("GetSnapshotBlock", "EBS"));
  105    116   
  106    117   
        ::std::option::Option::Some(cfg.freeze())
  107    118   
    }
  108    119   
  109    120   
    fn runtime_components(
  110    121   
        &self,
  111    122   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  112    123   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  113    124   
        #[allow(unused_mut)]
  114    125   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetSnapshotBlock")
  115    126   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  116    127   
            .with_interceptor(GetSnapshotBlockEndpointParamsInterceptor)
  117    128   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  118    129   
                crate::operation::get_snapshot_block::GetSnapshotBlockError,
  119    130   
            >::new())
  120    131   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  121    132   
                crate::operation::get_snapshot_block::GetSnapshotBlockError,
  122    133   
            >::new());
  123    134   
  124    135   
        ::std::borrow::Cow::Owned(rcb)
  125    136   
    }
  126    137   
}
  127    138   
         139  +
/* ResponseDeserializerGenerator.kt:64 */
  128    140   
#[derive(Debug)]
  129    141   
struct GetSnapshotBlockResponseDeserializer;
  130    142   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetSnapshotBlockResponseDeserializer {
  131    143   
    fn deserialize_streaming(
  132    144   
        &self,
  133    145   
        response: &mut ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  134    146   
    ) -> ::std::option::Option<::aws_smithy_runtime_api::client::interceptors::context::OutputOrError> {
  135    147   
        #[allow(unused_mut)]
  136    148   
        let mut force_error = false;
  137    149   
  138    150   
        // If this is an error, defer to the non-streaming parser
  139    151   
        if (!response.status().is_success() && response.status().as_u16() != 200) || force_error {
  140    152   
            return ::std::option::Option::None;
  141    153   
        }
  142    154   
        ::std::option::Option::Some(crate::protocol_serde::type_erase_result(
  143    155   
            crate::protocol_serde::shape_get_snapshot_block::de_get_snapshot_block_http_response(response),
  144    156   
        ))
  145    157   
    }
  146    158   
  147    159   
    fn deserialize_nonstreaming(
  148    160   
        &self,
  149    161   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  150    162   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  151    163   
        // For streaming operations, we only hit this case if its an error
  152    164   
        let body = response.body().bytes().expect("body loaded");
  153    165   
        crate::protocol_serde::type_erase_result(crate::protocol_serde::shape_get_snapshot_block::de_get_snapshot_block_http_error(
  154    166   
            response.status().as_u16(),
  155    167   
            response.headers(),
  156    168   
            body,
  157    169   
        ))
  158    170   
    }
  159    171   
}
         172  +
/* RequestSerializerGenerator.kt:67 */
  160    173   
#[derive(Debug)]
  161    174   
struct GetSnapshotBlockRequestSerializer;
  162    175   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetSnapshotBlockRequestSerializer {
  163    176   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  164    177   
    fn serialize_input(
  165    178   
        &self,
  166    179   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  167    180   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  168    181   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  169    182   
        let input = input
@@ -220,233 +442,656 @@
  240    253   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  241    254   
            }
  242    255   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  243    256   
            builder
  244    257   
        };
  245    258   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  246    259   
  247    260   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  248    261   
    }
  249    262   
}
         263  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  250    264   
#[derive(Debug)]
  251    265   
struct GetSnapshotBlockEndpointParamsInterceptor;
  252    266   
  253    267   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetSnapshotBlockEndpointParamsInterceptor {
  254    268   
    fn name(&self) -> &'static str {
  255    269   
        "GetSnapshotBlockEndpointParamsInterceptor"
  256    270   
    }
  257    271   
  258    272   
    fn read_before_execution(
  259    273   
        &self,
  260    274   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  261    275   
            '_,
  262    276   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  263    277   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  264    278   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  265    279   
        >,
  266    280   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  267    281   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  268    282   
        let _input = context
  269    283   
            .input()
  270    284   
            .downcast_ref::<GetSnapshotBlockInput>()
  271    285   
            .ok_or("failed to downcast to GetSnapshotBlockInput")?;
  272    286   
  273    287   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  274    288   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  275    289   
        })?;
  276    290   
        cfg.interceptor_state()
  277    291   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  278    292   
        ::std::result::Result::Ok(())
  279    293   
    }
  280    294   
}
  281    295   
  282    296   
// The get_* functions below are generated from JMESPath expressions in the
  283    297   
// operationContextParams trait. They target the operation's input shape.
  284    298   
         299  +
/* OperationErrorGenerator.kt:79 */
  285    300   
/// Error type for the `GetSnapshotBlockError` operation.
         301  +
/* RustType.kt:516 */
  286    302   
#[non_exhaustive]
         303  +
/* RustType.kt:516 */
  287    304   
#[derive(::std::fmt::Debug)]
  288         -
pub enum GetSnapshotBlockError {
  289         -
    /// <p>You do not have sufficient access to perform this action.</p>
         305  +
pub /* OperationErrorGenerator.kt:81 */ enum GetSnapshotBlockError {
         306  +
    /// /* OperationErrorGenerator.kt:83 */<p>You do not have sufficient access to perform this action.</p>
         307  +
    /* OperationErrorGenerator.kt:86 */
  290    308   
    AccessDeniedError(crate::types::error::AccessDeniedError),
  291         -
    /// <p>An internal error has occurred.</p>
         309  +
    /// /* OperationErrorGenerator.kt:83 */<p>An internal error has occurred.</p>
         310  +
    /* OperationErrorGenerator.kt:86 */
  292    311   
    InternalServerError(crate::types::error::InternalServerError),
  293         -
    /// <p>The number of API requests has exceed the maximum allowed API request throttling limit.</p>
         312  +
    /// /* OperationErrorGenerator.kt:83 */<p>The number of API requests has exceed the maximum allowed API request throttling limit.</p>
         313  +
    /* OperationErrorGenerator.kt:86 */
  294    314   
    RequestThrottledError(crate::types::error::RequestThrottledError),
  295         -
    /// <p>The specified resource does not exist.</p>
         315  +
    /// /* OperationErrorGenerator.kt:83 */<p>The specified resource does not exist.</p>
         316  +
    /* OperationErrorGenerator.kt:86 */
  296    317   
    ResourceNotFoundError(crate::types::error::ResourceNotFoundError),
  297         -
    /// <p>Your current service quotas do not allow you to perform this action.</p>
         318  +
    /// /* OperationErrorGenerator.kt:83 */<p>Your current service quotas do not allow you to perform this action.</p>
         319  +
    /* OperationErrorGenerator.kt:86 */
  298    320   
    ServiceQuotaExceededError(crate::types::error::ServiceQuotaExceededError),
  299         -
    /// <p>The input fails to satisfy the constraints of the EBS direct APIs.</p>
         321  +
    /// /* OperationErrorGenerator.kt:83 */<p>The input fails to satisfy the constraints of the EBS direct APIs.</p>
         322  +
    /* OperationErrorGenerator.kt:86 */
  300    323   
    ValidationError(crate::types::error::ValidationError),
         324  +
    /* OperationErrorGenerator.kt:88 */
  301    325   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  302    326   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  303    327   
    variable wildcard pattern and check `.code()`:
  304    328   
     \
  305    329   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  306    330   
     \
  307    331   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetSnapshotBlockError) for what information is available for the error.")]
  308    332   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         333  +
    /* OperationErrorGenerator.kt:81 */
  309    334   
}
         335  +
/* OperationErrorGenerator.kt:218 */
  310    336   
impl GetSnapshotBlockError {
         337  +
    /* OperationErrorGenerator.kt:219 */
  311    338   
    /// Creates the `GetSnapshotBlockError::Unhandled` variant from any error type.
  312    339   
    pub fn unhandled(
  313    340   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  314    341   
    ) -> Self {
  315    342   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  316    343   
            source: err.into(),
  317    344   
            meta: ::std::default::Default::default(),
  318    345   
        })
  319    346   
    }
  320    347   
  321    348   
    /// Creates the `GetSnapshotBlockError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  322    349   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  323    350   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  324    351   
            source: err.clone().into(),
  325    352   
            meta: err,
  326    353   
        })
  327    354   
    }
  328         -
    ///
         355  +
    /// /* OperationErrorGenerator.kt:236 */
  329    356   
    /// Returns error metadata, which includes the error code, message,
  330    357   
    /// request ID, and potentially additional information.
  331    358   
    ///
         359  +
    /* OperationErrorGenerator.kt:242 */
  332    360   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         361  +
        /* OperationErrorGenerator.kt:243 */
  333    362   
        match self {
         363  +
            /* OperationErrorGenerator.kt:246 */
  334    364   
            Self::AccessDeniedError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         365  +
            /* OperationErrorGenerator.kt:246 */
  335    366   
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         367  +
            /* OperationErrorGenerator.kt:246 */
  336    368   
            Self::RequestThrottledError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         369  +
            /* OperationErrorGenerator.kt:246 */
  337    370   
            Self::ResourceNotFoundError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         371  +
            /* OperationErrorGenerator.kt:246 */
  338    372   
            Self::ServiceQuotaExceededError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  339         -
            Self::ValidationError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  340         -
            Self::Unhandled(e) => &e.meta,
         373  +
            /* OperationErrorGenerator.kt:246 */ Self::ValidationError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         374  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         375  +
            /* OperationErrorGenerator.kt:243 */
  341    376   
        }
         377  +
        /* OperationErrorGenerator.kt:242 */
  342    378   
    }
         379  +
    /* OperationErrorGenerator.kt:257 */
  343    380   
    /// Returns `true` if the error kind is `GetSnapshotBlockError::AccessDeniedError`.
         381  +
    /* OperationErrorGenerator.kt:258 */
  344    382   
    pub fn is_access_denied_error(&self) -> bool {
         383  +
        /* OperationErrorGenerator.kt:259 */
  345    384   
        matches!(self, Self::AccessDeniedError(_))
         385  +
        /* OperationErrorGenerator.kt:258 */
  346    386   
    }
         387  +
    /* OperationErrorGenerator.kt:257 */
  347    388   
    /// Returns `true` if the error kind is `GetSnapshotBlockError::InternalServerError`.
         389  +
    /* OperationErrorGenerator.kt:258 */
  348    390   
    pub fn is_internal_server_error(&self) -> bool {
         391  +
        /* OperationErrorGenerator.kt:259 */
  349    392   
        matches!(self, Self::InternalServerError(_))
         393  +
        /* OperationErrorGenerator.kt:258 */
  350    394   
    }
         395  +
    /* OperationErrorGenerator.kt:257 */
  351    396   
    /// Returns `true` if the error kind is `GetSnapshotBlockError::RequestThrottledError`.
         397  +
    /* OperationErrorGenerator.kt:258 */
  352    398   
    pub fn is_request_throttled_error(&self) -> bool {
         399  +
        /* OperationErrorGenerator.kt:259 */
  353    400   
        matches!(self, Self::RequestThrottledError(_))
         401  +
        /* OperationErrorGenerator.kt:258 */
  354    402   
    }
         403  +
    /* OperationErrorGenerator.kt:257 */
  355    404   
    /// Returns `true` if the error kind is `GetSnapshotBlockError::ResourceNotFoundError`.
         405  +
    /* OperationErrorGenerator.kt:258 */
  356    406   
    pub fn is_resource_not_found_error(&self) -> bool {
         407  +
        /* OperationErrorGenerator.kt:259 */
  357    408   
        matches!(self, Self::ResourceNotFoundError(_))
         409  +
        /* OperationErrorGenerator.kt:258 */
  358    410   
    }
         411  +
    /* OperationErrorGenerator.kt:257 */
  359    412   
    /// Returns `true` if the error kind is `GetSnapshotBlockError::ServiceQuotaExceededError`.
         413  +
    /* OperationErrorGenerator.kt:258 */
  360    414   
    pub fn is_service_quota_exceeded_error(&self) -> bool {
         415  +
        /* OperationErrorGenerator.kt:259 */
  361    416   
        matches!(self, Self::ServiceQuotaExceededError(_))
         417  +
        /* OperationErrorGenerator.kt:258 */
  362    418   
    }
         419  +
    /* OperationErrorGenerator.kt:257 */
  363    420   
    /// Returns `true` if the error kind is `GetSnapshotBlockError::ValidationError`.
         421  +
    /* OperationErrorGenerator.kt:258 */
  364    422   
    pub fn is_validation_error(&self) -> bool {
         423  +
        /* OperationErrorGenerator.kt:259 */
  365    424   
        matches!(self, Self::ValidationError(_))
         425  +
        /* OperationErrorGenerator.kt:258 */
  366    426   
    }
         427  +
    /* OperationErrorGenerator.kt:218 */
  367    428   
}
         429  +
/* OperationErrorGenerator.kt:269 */
  368    430   
impl ::std::error::Error for GetSnapshotBlockError {
         431  +
    /* OperationErrorGenerator.kt:270 */
  369    432   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         433  +
        /* OperationErrorGenerator.kt:318 */
  370    434   
        match self {
  371         -
            Self::AccessDeniedError(_inner) => ::std::option::Option::Some(_inner),
  372         -
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
  373         -
            Self::RequestThrottledError(_inner) => ::std::option::Option::Some(_inner),
  374         -
            Self::ResourceNotFoundError(_inner) => ::std::option::Option::Some(_inner),
  375         -
            Self::ServiceQuotaExceededError(_inner) => ::std::option::Option::Some(_inner),
  376         -
            Self::ValidationError(_inner) => ::std::option::Option::Some(_inner),
  377         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         435  +
            /* OperationErrorGenerator.kt:321 */
         436  +
            Self::AccessDeniedError(_inner) =>
         437  +
            /* OperationErrorGenerator.kt:283 */
         438  +
            {
         439  +
                ::std::option::Option::Some(_inner)
         440  +
            }
         441  +
            ,
         442  +
            /* OperationErrorGenerator.kt:321 */
         443  +
            Self::InternalServerError(_inner) =>
         444  +
            /* OperationErrorGenerator.kt:283 */
         445  +
            {
         446  +
                ::std::option::Option::Some(_inner)
         447  +
            }
         448  +
            ,
         449  +
            /* OperationErrorGenerator.kt:321 */
         450  +
            Self::RequestThrottledError(_inner) =>
         451  +
            /* OperationErrorGenerator.kt:283 */
         452  +
            {
         453  +
                ::std::option::Option::Some(_inner)
         454  +
            }
         455  +
            ,
         456  +
            /* OperationErrorGenerator.kt:321 */
         457  +
            Self::ResourceNotFoundError(_inner) =>
         458  +
            /* OperationErrorGenerator.kt:283 */
         459  +
            {
         460  +
                ::std::option::Option::Some(_inner)
         461  +
            }
         462  +
            ,
         463  +
            /* OperationErrorGenerator.kt:321 */
         464  +
            Self::ServiceQuotaExceededError(_inner) =>
         465  +
            /* OperationErrorGenerator.kt:283 */
         466  +
            {
         467  +
                ::std::option::Option::Some(_inner)
         468  +
            }
         469  +
            ,
         470  +
            /* OperationErrorGenerator.kt:321 */
         471  +
            Self::ValidationError(_inner) =>
         472  +
            /* OperationErrorGenerator.kt:283 */
         473  +
            {
         474  +
                ::std::option::Option::Some(_inner)
         475  +
            }
         476  +
            ,
         477  +
            /* OperationErrorGenerator.kt:326 */
         478  +
            Self::Unhandled(_inner) => {
         479  +
                /* OperationErrorGenerator.kt:279 */
         480  +
                ::std::option::Option::Some(&*_inner.source)
         481  +
                /* OperationErrorGenerator.kt:326 */
         482  +
            } /* OperationErrorGenerator.kt:318 */
  378    483   
        }
         484  +
        /* OperationErrorGenerator.kt:270 */
  379    485   
    }
         486  +
    /* OperationErrorGenerator.kt:269 */
  380    487   
}
         488  +
/* OperationErrorGenerator.kt:133 */
  381    489   
impl ::std::fmt::Display for GetSnapshotBlockError {
         490  +
    /* OperationErrorGenerator.kt:134 */
  382    491   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         492  +
        /* OperationErrorGenerator.kt:318 */
  383    493   
        match self {
  384         -
            Self::AccessDeniedError(_inner) => _inner.fmt(f),
  385         -
            Self::InternalServerError(_inner) => _inner.fmt(f),
  386         -
            Self::RequestThrottledError(_inner) => _inner.fmt(f),
  387         -
            Self::ResourceNotFoundError(_inner) => _inner.fmt(f),
  388         -
            Self::ServiceQuotaExceededError(_inner) => _inner.fmt(f),
  389         -
            Self::ValidationError(_inner) => _inner.fmt(f),
         494  +
            /* OperationErrorGenerator.kt:321 */
         495  +
            Self::AccessDeniedError(_inner) =>
         496  +
            /* OperationErrorGenerator.kt:151 */
         497  +
            {
         498  +
                _inner.fmt(f)
         499  +
            }
         500  +
            ,
         501  +
            /* OperationErrorGenerator.kt:321 */
         502  +
            Self::InternalServerError(_inner) =>
         503  +
            /* OperationErrorGenerator.kt:151 */
         504  +
            {
         505  +
                _inner.fmt(f)
         506  +
            }
         507  +
            ,
         508  +
            /* OperationErrorGenerator.kt:321 */
         509  +
            Self::RequestThrottledError(_inner) =>
         510  +
            /* OperationErrorGenerator.kt:151 */
         511  +
            {
         512  +
                _inner.fmt(f)
         513  +
            }
         514  +
            ,
         515  +
            /* OperationErrorGenerator.kt:321 */
         516  +
            Self::ResourceNotFoundError(_inner) =>
         517  +
            /* OperationErrorGenerator.kt:151 */
         518  +
            {
         519  +
                _inner.fmt(f)
         520  +
            }
         521  +
            ,
         522  +
            /* OperationErrorGenerator.kt:321 */
         523  +
            Self::ServiceQuotaExceededError(_inner) =>
         524  +
            /* OperationErrorGenerator.kt:151 */
         525  +
            {
         526  +
                _inner.fmt(f)
         527  +
            }
         528  +
            ,
         529  +
            /* OperationErrorGenerator.kt:321 */
         530  +
            Self::ValidationError(_inner) =>
         531  +
            /* OperationErrorGenerator.kt:151 */
         532  +
            {
         533  +
                _inner.fmt(f)
         534  +
            }
         535  +
            ,
         536  +
            /* OperationErrorGenerator.kt:326 */
  390    537   
            Self::Unhandled(_inner) => {
         538  +
                /* OperationErrorGenerator.kt:139 */
  391    539   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  392    540   
                    write!(f, "unhandled error ({code})")
  393    541   
                } else {
  394    542   
                    f.write_str("unhandled error")
  395    543   
                }
         544  +
                /* OperationErrorGenerator.kt:326 */
         545  +
            } /* OperationErrorGenerator.kt:318 */
  396    546   
        }
         547  +
        /* OperationErrorGenerator.kt:134 */
  397    548   
    }
  398         -
    }
         549  +
    /* OperationErrorGenerator.kt:133 */
  399    550   
}
         551  +
/* OperationErrorGenerator.kt:182 */
  400    552   
impl ::aws_smithy_types::retry::ProvideErrorKind for GetSnapshotBlockError {
         553  +
    /* OperationErrorGenerator.kt:186 */
  401    554   
    fn code(&self) -> ::std::option::Option<&str> {
         555  +
        /* OperationErrorGenerator.kt:187 */
  402    556   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         557  +
        /* OperationErrorGenerator.kt:186 */
  403    558   
    }
         559  +
    /* OperationErrorGenerator.kt:190 */
  404    560   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         561  +
        /* OperationErrorGenerator.kt:197 */
  405    562   
        ::std::option::Option::None
         563  +
        /* OperationErrorGenerator.kt:190 */
  406    564   
    }
         565  +
    /* OperationErrorGenerator.kt:182 */
  407    566   
}
         567  +
/* OperationErrorGenerator.kt:163 */
  408    568   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetSnapshotBlockError {
         569  +
    /* OperationErrorGenerator.kt:164 */
  409    570   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         571  +
        /* OperationErrorGenerator.kt:318 */
  410    572   
        match self {
  411         -
            Self::AccessDeniedError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  412         -
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  413         -
            Self::RequestThrottledError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  414         -
            Self::ResourceNotFoundError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  415         -
            Self::ServiceQuotaExceededError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  416         -
            Self::ValidationError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  417         -
            Self::Unhandled(_inner) => &_inner.meta,
         573  +
            /* OperationErrorGenerator.kt:321 */
         574  +
            Self::AccessDeniedError(_inner) =>
         575  +
            /* OperationErrorGenerator.kt:169 */
         576  +
            {
         577  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         578  +
            }
         579  +
            ,
         580  +
            /* OperationErrorGenerator.kt:321 */
         581  +
            Self::InternalServerError(_inner) =>
         582  +
            /* OperationErrorGenerator.kt:169 */
         583  +
            {
         584  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         585  +
            }
         586  +
            ,
         587  +
            /* OperationErrorGenerator.kt:321 */
         588  +
            Self::RequestThrottledError(_inner) =>
         589  +
            /* OperationErrorGenerator.kt:169 */
         590  +
            {
         591  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         592  +
            }
         593  +
            ,
         594  +
            /* OperationErrorGenerator.kt:321 */
         595  +
            Self::ResourceNotFoundError(_inner) =>
         596  +
            /* OperationErrorGenerator.kt:169 */
         597  +
            {
         598  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         599  +
            }
         600  +
            ,
         601  +
            /* OperationErrorGenerator.kt:321 */
         602  +
            Self::ServiceQuotaExceededError(_inner) =>
         603  +
            /* OperationErrorGenerator.kt:169 */
         604  +
            {
         605  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         606  +
            }
         607  +
            ,
         608  +
            /* OperationErrorGenerator.kt:321 */
         609  +
            Self::ValidationError(_inner) =>
         610  +
            /* OperationErrorGenerator.kt:169 */
         611  +
            {
         612  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         613  +
            }
         614  +
            ,
         615  +
            /* OperationErrorGenerator.kt:326 */
         616  +
            Self::Unhandled(_inner) => {
         617  +
                /* OperationErrorGenerator.kt:168 */
         618  +
                &_inner.meta
         619  +
                /* OperationErrorGenerator.kt:326 */
         620  +
            } /* OperationErrorGenerator.kt:318 */
  418    621   
        }
         622  +
        /* OperationErrorGenerator.kt:164 */
  419    623   
    }
         624  +
    /* OperationErrorGenerator.kt:163 */
  420    625   
}
         626  +
/* OperationErrorGenerator.kt:109 */
  421    627   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetSnapshotBlockError {
         628  +
    /* OperationErrorGenerator.kt:110 */
  422    629   
    fn create_unhandled_error(
  423    630   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  424    631   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  425    632   
    ) -> Self {
         633  +
        /* OperationErrorGenerator.kt:121 */
  426    634   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  427    635   
            source,
  428    636   
            meta: meta.unwrap_or_default(),
  429    637   
        })
         638  +
        /* OperationErrorGenerator.kt:110 */
  430    639   
    }
         640  +
    /* OperationErrorGenerator.kt:109 */
  431    641   
}
  432    642   
         643  +
/* CodegenDelegator.kt:255 */
  433    644   
pub use crate::operation::get_snapshot_block::_get_snapshot_block_output::GetSnapshotBlockOutput;
  434    645   
         646  +
/* CodegenDelegator.kt:255 */
  435    647   
pub use crate::operation::get_snapshot_block::_get_snapshot_block_input::GetSnapshotBlockInput;
  436    648   
         649  +
/* RustModule.kt:172 */
  437    650   
mod _get_snapshot_block_input;
  438    651   
         652  +
/* RustModule.kt:172 */
  439    653   
mod _get_snapshot_block_output;
  440    654   
  441         -
/// Builders
         655  +
/// /* CodegenDelegator.kt:51 */Builders
  442    656   
pub mod builders;

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/operation/get_snapshot_block/_get_snapshot_block_input.rs

@@ -1,1 +108,173 @@
    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 GetSnapshotBlockInput {
    6         -
    /// <p>The ID of the snapshot containing the block from which to get data.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct GetSnapshotBlockInput {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The ID of the snapshot containing the block from which to get data.</p>
    7     10   
    pub snapshot_id: ::std::option::Option<::std::string::String>,
    8         -
    /// <p>The block token of the block from which to get data.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The block token of the block from which to get data.</p>
    9     12   
    /// <p>Obtain the <code>BlockToken</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
   10     13   
    pub block_token: ::std::option::Option<::std::string::String>,
   11         -
    /// <p>The block index of the block from which to get data.</p>
          14  +
    /// /* StructureGenerator.kt:231 */<p>The block index of the block from which to get data.</p>
   12     15   
    /// <p>Obtain the <code>BlockIndex</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
   13     16   
    pub block_index: ::std::option::Option<i32>,
          17  +
    /* StructureGenerator.kt:201 */
   14     18   
}
          19  +
/* StructureGenerator.kt:135 */
   15     20   
impl GetSnapshotBlockInput {
   16         -
    /// <p>The ID of the snapshot containing the block from which to get data.</p>
          21  +
    /// /* StructureGenerator.kt:231 */<p>The ID of the snapshot containing the block from which to get data.</p>
          22  +
    /* StructureGenerator.kt:166 */
   17     23   
    pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
          24  +
        /* StructureGenerator.kt:169 */
   18     25   
        self.snapshot_id.as_deref()
          26  +
        /* StructureGenerator.kt:166 */
   19     27   
    }
   20         -
    /// <p>The block token of the block from which to get data.</p>
          28  +
    /// /* StructureGenerator.kt:231 */<p>The block token of the block from which to get data.</p>
   21     29   
    /// <p>Obtain the <code>BlockToken</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
          30  +
    /* StructureGenerator.kt:166 */
   22     31   
    pub fn block_token(&self) -> ::std::option::Option<&str> {
          32  +
        /* StructureGenerator.kt:169 */
   23     33   
        self.block_token.as_deref()
          34  +
        /* StructureGenerator.kt:166 */
   24     35   
    }
   25         -
    /// <p>The block index of the block from which to get data.</p>
          36  +
    /// /* StructureGenerator.kt:231 */<p>The block index of the block from which to get data.</p>
   26     37   
    /// <p>Obtain the <code>BlockIndex</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
          38  +
    /* StructureGenerator.kt:166 */
   27     39   
    pub fn block_index(&self) -> ::std::option::Option<i32> {
          40  +
        /* StructureGenerator.kt:168 */
   28     41   
        self.block_index
          42  +
        /* StructureGenerator.kt:166 */
   29     43   
    }
          44  +
    /* StructureGenerator.kt:135 */
   30     45   
}
          46  +
/* ClientCodegenVisitor.kt:237 */
   31     47   
impl GetSnapshotBlockInput {
   32         -
    /// Creates a new builder-style object to manufacture [`GetSnapshotBlockInput`](crate::operation::get_snapshot_block::GetSnapshotBlockInput).
          48  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`GetSnapshotBlockInput`](crate::operation::get_snapshot_block::GetSnapshotBlockInput).
          49  +
    /* BuilderGenerator.kt:175 */
   33     50   
    pub fn builder() -> crate::operation::get_snapshot_block::builders::GetSnapshotBlockInputBuilder {
          51  +
        /* BuilderGenerator.kt:176 */
   34     52   
        crate::operation::get_snapshot_block::builders::GetSnapshotBlockInputBuilder::default()
          53  +
        /* BuilderGenerator.kt:175 */
   35     54   
    }
          55  +
    /* ClientCodegenVisitor.kt:237 */
   36     56   
}
   37     57   
   38         -
/// A builder for [`GetSnapshotBlockInput`](crate::operation::get_snapshot_block::GetSnapshotBlockInput).
          58  +
/// /* BuilderGenerator.kt:342 */A builder for [`GetSnapshotBlockInput`](crate::operation::get_snapshot_block::GetSnapshotBlockInput).
          59  +
/* RustType.kt:516 */
   39     60   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          61  +
/* RustType.kt:516 */
   40     62   
#[non_exhaustive]
          63  +
/* BuilderGenerator.kt:345 */
   41     64   
pub struct GetSnapshotBlockInputBuilder {
   42         -
    pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
   43         -
    pub(crate) block_token: ::std::option::Option<::std::string::String>,
   44         -
    pub(crate) block_index: ::std::option::Option<i32>,
          65  +
    /* BuilderGenerator.kt:275 */ pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
          66  +
    /* BuilderGenerator.kt:275 */ pub(crate) block_token: ::std::option::Option<::std::string::String>,
          67  +
    /* BuilderGenerator.kt:275 */ pub(crate) block_index: ::std::option::Option<i32>,
          68  +
    /* BuilderGenerator.kt:345 */
   45     69   
}
          70  +
/* BuilderGenerator.kt:355 */
   46     71   
impl GetSnapshotBlockInputBuilder {
   47         -
    /// <p>The ID of the snapshot containing the block from which to get data.</p>
   48         -
    /// This field is required.
          72  +
    /// /* BuilderGenerator.kt:286 */<p>The ID of the snapshot containing the block from which to get data.</p>
          73  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          74  +
    /* BuilderGenerator.kt:291 */
   49     75   
    pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          76  +
        /* BuilderGenerator.kt:292 */
   50     77   
        self.snapshot_id = ::std::option::Option::Some(input.into());
          78  +
        /* BuilderGenerator.kt:293 */
   51     79   
        self
          80  +
        /* BuilderGenerator.kt:291 */
   52     81   
    }
   53         -
    /// <p>The ID of the snapshot containing the block from which to get data.</p>
          82  +
    /// /* BuilderGenerator.kt:312 */<p>The ID of the snapshot containing the block from which to get data.</p>
          83  +
    /* BuilderGenerator.kt:314 */
   54     84   
    pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          85  +
        /* BuilderGenerator.kt:315 */
   55     86   
        self.snapshot_id = input;
   56     87   
        self
          88  +
        /* BuilderGenerator.kt:314 */
   57     89   
    }
   58         -
    /// <p>The ID of the snapshot containing the block from which to get data.</p>
          90  +
    /// /* BuilderGenerator.kt:334 */<p>The ID of the snapshot containing the block from which to get data.</p>
          91  +
    /* BuilderGenerator.kt:336 */
   59     92   
    pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
          93  +
        /* BuilderGenerator.kt:337 */
   60     94   
        &self.snapshot_id
          95  +
        /* BuilderGenerator.kt:336 */
   61     96   
    }
   62         -
    /// <p>The block token of the block from which to get data.</p>
          97  +
    /// /* BuilderGenerator.kt:286 */<p>The block token of the block from which to get data.</p>
   63     98   
    /// <p>Obtain the <code>BlockToken</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
   64         -
    /// This field is required.
          99  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         100  +
    /* BuilderGenerator.kt:291 */
   65    101   
    pub fn block_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         102  +
        /* BuilderGenerator.kt:292 */
   66    103   
        self.block_token = ::std::option::Option::Some(input.into());
         104  +
        /* BuilderGenerator.kt:293 */
   67    105   
        self
         106  +
        /* BuilderGenerator.kt:291 */
   68    107   
    }
   69         -
    /// <p>The block token of the block from which to get data.</p>
         108  +
    /// /* BuilderGenerator.kt:312 */<p>The block token of the block from which to get data.</p>
   70    109   
    /// <p>Obtain the <code>BlockToken</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
         110  +
    /* BuilderGenerator.kt:314 */
   71    111   
    pub fn set_block_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         112  +
        /* BuilderGenerator.kt:315 */
   72    113   
        self.block_token = input;
   73    114   
        self
         115  +
        /* BuilderGenerator.kt:314 */
   74    116   
    }
   75         -
    /// <p>The block token of the block from which to get data.</p>
         117  +
    /// /* BuilderGenerator.kt:334 */<p>The block token of the block from which to get data.</p>
   76    118   
    /// <p>Obtain the <code>BlockToken</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
         119  +
    /* BuilderGenerator.kt:336 */
   77    120   
    pub fn get_block_token(&self) -> &::std::option::Option<::std::string::String> {
         121  +
        /* BuilderGenerator.kt:337 */
   78    122   
        &self.block_token
         123  +
        /* BuilderGenerator.kt:336 */
   79    124   
    }
   80         -
    /// <p>The block index of the block from which to get data.</p>
         125  +
    /// /* BuilderGenerator.kt:286 */<p>The block index of the block from which to get data.</p>
   81    126   
    /// <p>Obtain the <code>BlockIndex</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
   82         -
    /// This field is required.
         127  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         128  +
    /* BuilderGenerator.kt:291 */
   83    129   
    pub fn block_index(mut self, input: i32) -> Self {
         130  +
        /* BuilderGenerator.kt:292 */
   84    131   
        self.block_index = ::std::option::Option::Some(input);
         132  +
        /* BuilderGenerator.kt:293 */
   85    133   
        self
         134  +
        /* BuilderGenerator.kt:291 */
   86    135   
    }
   87         -
    /// <p>The block index of the block from which to get data.</p>
         136  +
    /// /* BuilderGenerator.kt:312 */<p>The block index of the block from which to get data.</p>
   88    137   
    /// <p>Obtain the <code>BlockIndex</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
         138  +
    /* BuilderGenerator.kt:314 */
   89    139   
    pub fn set_block_index(mut self, input: ::std::option::Option<i32>) -> Self {
         140  +
        /* BuilderGenerator.kt:315 */
   90    141   
        self.block_index = input;
   91    142   
        self
         143  +
        /* BuilderGenerator.kt:314 */
   92    144   
    }
   93         -
    /// <p>The block index of the block from which to get data.</p>
         145  +
    /// /* BuilderGenerator.kt:334 */<p>The block index of the block from which to get data.</p>
   94    146   
    /// <p>Obtain the <code>BlockIndex</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
         147  +
    /* BuilderGenerator.kt:336 */
   95    148   
    pub fn get_block_index(&self) -> &::std::option::Option<i32> {
         149  +
        /* BuilderGenerator.kt:337 */
   96    150   
        &self.block_index
         151  +
        /* BuilderGenerator.kt:336 */
   97    152   
    }
   98         -
    /// Consumes the builder and constructs a [`GetSnapshotBlockInput`](crate::operation::get_snapshot_block::GetSnapshotBlockInput).
         153  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`GetSnapshotBlockInput`](crate::operation::get_snapshot_block::GetSnapshotBlockInput).
         154  +
    /* BuilderGenerator.kt:253 */
   99    155   
    pub fn build(
  100    156   
        self,
  101    157   
    ) -> ::std::result::Result<crate::operation::get_snapshot_block::GetSnapshotBlockInput, ::aws_smithy_types::error::operation::BuildError> {
  102         -
        ::std::result::Result::Ok(crate::operation::get_snapshot_block::GetSnapshotBlockInput {
  103         -
            snapshot_id: self.snapshot_id,
         158  +
        /* BuilderGenerator.kt:254 */
         159  +
        ::std::result::Result::Ok(
         160  +
            /* BuilderGenerator.kt:477 */
         161  +
            crate::operation::get_snapshot_block::GetSnapshotBlockInput {
         162  +
                /* BuilderGenerator.kt:481 */ snapshot_id: self.snapshot_id,
         163  +
                /* BuilderGenerator.kt:481 */
  104    164   
                block_token: self.block_token,
         165  +
                /* BuilderGenerator.kt:481 */
  105    166   
                block_index: self.block_index,
  106         -
        })
         167  +
                /* BuilderGenerator.kt:477 */
         168  +
            }, /* BuilderGenerator.kt:254 */
         169  +
        )
         170  +
        /* BuilderGenerator.kt:253 */
  107    171   
    }
         172  +
    /* BuilderGenerator.kt:355 */
  108    173   
}

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/operation/get_snapshot_block/_get_snapshot_block_output.rs

@@ -1,1 +134,233 @@
    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]
    4         -
pub struct GetSnapshotBlockOutput {
    5         -
    /// <p>The size of the data in the block.</p>
           6  +
pub /* StructureGenerator.kt:201 */ struct GetSnapshotBlockOutput {
           7  +
    /// /* StructureGenerator.kt:231 */<p>The size of the data in the block.</p>
    6      8   
    pub data_length: ::std::option::Option<i32>,
    7         -
    /// <p>The algorithm used to generate the checksum for the block, such as SHA256.</p>
           9  +
    /// /* StructureGenerator.kt:231 */<p>The algorithm used to generate the checksum for the block, such as SHA256.</p>
    8     10   
    pub checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
    9         -
    /// <p>The checksum generated for the block, which is Base64 encoded.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The checksum generated for the block, which is Base64 encoded.</p>
   10     12   
    pub checksum: ::std::option::Option<::std::string::String>,
   11         -
    /// <p>The data content of the block.</p>
          13  +
    /// /* StructureGenerator.kt:231 */<p>The data content of the block.</p>
   12     14   
    pub block_data: ::aws_smithy_types::byte_stream::ByteStream,
          15  +
    /* StructureGenerator.kt:201 */
   13     16   
}
          17  +
/* StructureGenerator.kt:135 */
   14     18   
impl GetSnapshotBlockOutput {
   15         -
    /// <p>The size of the data in the block.</p>
          19  +
    /// /* StructureGenerator.kt:231 */<p>The size of the data in the block.</p>
          20  +
    /* StructureGenerator.kt:166 */
   16     21   
    pub fn data_length(&self) -> ::std::option::Option<i32> {
          22  +
        /* StructureGenerator.kt:168 */
   17     23   
        self.data_length
          24  +
        /* StructureGenerator.kt:166 */
   18     25   
    }
   19         -
    /// <p>The algorithm used to generate the checksum for the block, such as SHA256.</p>
          26  +
    /// /* StructureGenerator.kt:231 */<p>The algorithm used to generate the checksum for the block, such as SHA256.</p>
          27  +
    /* StructureGenerator.kt:166 */
   20     28   
    pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::types::ChecksumAlgorithm> {
          29  +
        /* StructureGenerator.kt:170 */
   21     30   
        self.checksum_algorithm.as_ref()
          31  +
        /* StructureGenerator.kt:166 */
   22     32   
    }
   23         -
    /// <p>The checksum generated for the block, which is Base64 encoded.</p>
          33  +
    /// /* StructureGenerator.kt:231 */<p>The checksum generated for the block, which is Base64 encoded.</p>
          34  +
    /* StructureGenerator.kt:166 */
   24     35   
    pub fn checksum(&self) -> ::std::option::Option<&str> {
          36  +
        /* StructureGenerator.kt:169 */
   25     37   
        self.checksum.as_deref()
          38  +
        /* StructureGenerator.kt:166 */
   26     39   
    }
   27         -
    /// <p>The data content of the block.</p>
          40  +
    /// /* StructureGenerator.kt:231 */<p>The data content of the block.</p>
          41  +
    /* StructureGenerator.kt:166 */
   28     42   
    pub fn block_data(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
          43  +
        /* StructureGenerator.kt:172 */
   29     44   
        &self.block_data
          45  +
        /* StructureGenerator.kt:166 */
   30     46   
    }
          47  +
    /* StructureGenerator.kt:135 */
   31     48   
}
          49  +
/* StructureGenerator.kt:101 */
   32     50   
impl ::std::fmt::Debug for GetSnapshotBlockOutput {
          51  +
    /* StructureGenerator.kt:105 */
   33     52   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          53  +
        /* StructureGenerator.kt:106 */
   34     54   
        let mut formatter = f.debug_struct("GetSnapshotBlockOutput");
          55  +
        /* StructureGenerator.kt:121 */
   35     56   
        formatter.field("data_length", &self.data_length);
          57  +
        /* StructureGenerator.kt:121 */
   36     58   
        formatter.field("checksum_algorithm", &self.checksum_algorithm);
          59  +
        /* StructureGenerator.kt:121 */
   37     60   
        formatter.field("checksum", &self.checksum);
          61  +
        /* StructureGenerator.kt:121 */
   38     62   
        formatter.field("block_data", &"*** Sensitive Data Redacted ***");
          63  +
        /* StructureGenerator.kt:126 */
   39     64   
        formatter.finish()
          65  +
        /* StructureGenerator.kt:105 */
   40     66   
    }
          67  +
    /* StructureGenerator.kt:101 */
   41     68   
}
          69  +
/* ClientCodegenVisitor.kt:237 */
   42     70   
impl GetSnapshotBlockOutput {
   43         -
    /// Creates a new builder-style object to manufacture [`GetSnapshotBlockOutput`](crate::operation::get_snapshot_block::GetSnapshotBlockOutput).
          71  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`GetSnapshotBlockOutput`](crate::operation::get_snapshot_block::GetSnapshotBlockOutput).
          72  +
    /* BuilderGenerator.kt:175 */
   44     73   
    pub fn builder() -> crate::operation::get_snapshot_block::builders::GetSnapshotBlockOutputBuilder {
          74  +
        /* BuilderGenerator.kt:176 */
   45     75   
        crate::operation::get_snapshot_block::builders::GetSnapshotBlockOutputBuilder::default()
          76  +
        /* BuilderGenerator.kt:175 */
   46     77   
    }
          78  +
    /* ClientCodegenVisitor.kt:237 */
   47     79   
}
   48     80   
   49         -
/// A builder for [`GetSnapshotBlockOutput`](crate::operation::get_snapshot_block::GetSnapshotBlockOutput).
          81  +
/// /* BuilderGenerator.kt:342 */A builder for [`GetSnapshotBlockOutput`](crate::operation::get_snapshot_block::GetSnapshotBlockOutput).
          82  +
/* RustType.kt:516 */
   50     83   
#[derive(::std::default::Default)]
          84  +
/* RustType.kt:516 */
   51     85   
#[non_exhaustive]
          86  +
/* BuilderGenerator.kt:345 */
   52     87   
pub struct GetSnapshotBlockOutputBuilder {
   53         -
    pub(crate) data_length: ::std::option::Option<i32>,
   54         -
    pub(crate) checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
   55         -
    pub(crate) checksum: ::std::option::Option<::std::string::String>,
          88  +
    /* BuilderGenerator.kt:275 */ pub(crate) data_length: ::std::option::Option<i32>,
          89  +
    /* BuilderGenerator.kt:275 */ pub(crate) checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
          90  +
    /* BuilderGenerator.kt:275 */ pub(crate) checksum: ::std::option::Option<::std::string::String>,
          91  +
    /* BuilderGenerator.kt:275 */
   56     92   
    pub(crate) block_data: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
          93  +
    /* BuilderGenerator.kt:345 */
   57     94   
}
          95  +
/* BuilderGenerator.kt:355 */
   58     96   
impl GetSnapshotBlockOutputBuilder {
   59         -
    /// <p>The size of the data in the block.</p>
          97  +
    /// /* BuilderGenerator.kt:286 */<p>The size of the data in the block.</p>
          98  +
    /* BuilderGenerator.kt:291 */
   60     99   
    pub fn data_length(mut self, input: i32) -> Self {
         100  +
        /* BuilderGenerator.kt:292 */
   61    101   
        self.data_length = ::std::option::Option::Some(input);
         102  +
        /* BuilderGenerator.kt:293 */
   62    103   
        self
         104  +
        /* BuilderGenerator.kt:291 */
   63    105   
    }
   64         -
    /// <p>The size of the data in the block.</p>
         106  +
    /// /* BuilderGenerator.kt:312 */<p>The size of the data in the block.</p>
         107  +
    /* BuilderGenerator.kt:314 */
   65    108   
    pub fn set_data_length(mut self, input: ::std::option::Option<i32>) -> Self {
         109  +
        /* BuilderGenerator.kt:315 */
   66    110   
        self.data_length = input;
   67    111   
        self
         112  +
        /* BuilderGenerator.kt:314 */
   68    113   
    }
   69         -
    /// <p>The size of the data in the block.</p>
         114  +
    /// /* BuilderGenerator.kt:334 */<p>The size of the data in the block.</p>
         115  +
    /* BuilderGenerator.kt:336 */
   70    116   
    pub fn get_data_length(&self) -> &::std::option::Option<i32> {
         117  +
        /* BuilderGenerator.kt:337 */
   71    118   
        &self.data_length
         119  +
        /* BuilderGenerator.kt:336 */
   72    120   
    }
   73         -
    /// <p>The algorithm used to generate the checksum for the block, such as SHA256.</p>
         121  +
    /// /* BuilderGenerator.kt:286 */<p>The algorithm used to generate the checksum for the block, such as SHA256.</p>
         122  +
    /* BuilderGenerator.kt:291 */
   74    123   
    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
         124  +
        /* BuilderGenerator.kt:292 */
   75    125   
        self.checksum_algorithm = ::std::option::Option::Some(input);
         126  +
        /* BuilderGenerator.kt:293 */
   76    127   
        self
         128  +
        /* BuilderGenerator.kt:291 */
   77    129   
    }
   78         -
    /// <p>The algorithm used to generate the checksum for the block, such as SHA256.</p>
         130  +
    /// /* BuilderGenerator.kt:312 */<p>The algorithm used to generate the checksum for the block, such as SHA256.</p>
         131  +
    /* BuilderGenerator.kt:314 */
   79    132   
    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
         133  +
        /* BuilderGenerator.kt:315 */
   80    134   
        self.checksum_algorithm = input;
   81    135   
        self
         136  +
        /* BuilderGenerator.kt:314 */
   82    137   
    }
   83         -
    /// <p>The algorithm used to generate the checksum for the block, such as SHA256.</p>
         138  +
    /// /* BuilderGenerator.kt:334 */<p>The algorithm used to generate the checksum for the block, such as SHA256.</p>
         139  +
    /* BuilderGenerator.kt:336 */
   84    140   
    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
         141  +
        /* BuilderGenerator.kt:337 */
   85    142   
        &self.checksum_algorithm
         143  +
        /* BuilderGenerator.kt:336 */
   86    144   
    }
   87         -
    /// <p>The checksum generated for the block, which is Base64 encoded.</p>
         145  +
    /// /* BuilderGenerator.kt:286 */<p>The checksum generated for the block, which is Base64 encoded.</p>
         146  +
    /* BuilderGenerator.kt:291 */
   88    147   
    pub fn checksum(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         148  +
        /* BuilderGenerator.kt:292 */
   89    149   
        self.checksum = ::std::option::Option::Some(input.into());
         150  +
        /* BuilderGenerator.kt:293 */
   90    151   
        self
         152  +
        /* BuilderGenerator.kt:291 */
   91    153   
    }
   92         -
    /// <p>The checksum generated for the block, which is Base64 encoded.</p>
         154  +
    /// /* BuilderGenerator.kt:312 */<p>The checksum generated for the block, which is Base64 encoded.</p>
         155  +
    /* BuilderGenerator.kt:314 */
   93    156   
    pub fn set_checksum(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         157  +
        /* BuilderGenerator.kt:315 */
   94    158   
        self.checksum = input;
   95    159   
        self
         160  +
        /* BuilderGenerator.kt:314 */
   96    161   
    }
   97         -
    /// <p>The checksum generated for the block, which is Base64 encoded.</p>
         162  +
    /// /* BuilderGenerator.kt:334 */<p>The checksum generated for the block, which is Base64 encoded.</p>
         163  +
    /* BuilderGenerator.kt:336 */
   98    164   
    pub fn get_checksum(&self) -> &::std::option::Option<::std::string::String> {
         165  +
        /* BuilderGenerator.kt:337 */
   99    166   
        &self.checksum
         167  +
        /* BuilderGenerator.kt:336 */
  100    168   
    }
  101         -
    /// <p>The data content of the block.</p>
         169  +
    /// /* BuilderGenerator.kt:286 */<p>The data content of the block.</p>
         170  +
    /* BuilderGenerator.kt:291 */
  102    171   
    pub fn block_data(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
         172  +
        /* BuilderGenerator.kt:292 */
  103    173   
        self.block_data = ::std::option::Option::Some(input);
         174  +
        /* BuilderGenerator.kt:293 */
  104    175   
        self
         176  +
        /* BuilderGenerator.kt:291 */
  105    177   
    }
  106         -
    /// <p>The data content of the block.</p>
         178  +
    /// /* BuilderGenerator.kt:312 */<p>The data content of the block.</p>
         179  +
    /* BuilderGenerator.kt:314 */
  107    180   
    pub fn set_block_data(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
         181  +
        /* BuilderGenerator.kt:315 */
  108    182   
        self.block_data = input;
  109    183   
        self
         184  +
        /* BuilderGenerator.kt:314 */
  110    185   
    }
  111         -
    /// <p>The data content of the block.</p>
         186  +
    /// /* BuilderGenerator.kt:334 */<p>The data content of the block.</p>
         187  +
    /* BuilderGenerator.kt:336 */
  112    188   
    pub fn get_block_data(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
         189  +
        /* BuilderGenerator.kt:337 */
  113    190   
        &self.block_data
         191  +
        /* BuilderGenerator.kt:336 */
  114    192   
    }
  115         -
    /// Consumes the builder and constructs a [`GetSnapshotBlockOutput`](crate::operation::get_snapshot_block::GetSnapshotBlockOutput).
         193  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`GetSnapshotBlockOutput`](crate::operation::get_snapshot_block::GetSnapshotBlockOutput).
         194  +
    /* BuilderGenerator.kt:253 */
  116    195   
    pub fn build(self) -> crate::operation::get_snapshot_block::GetSnapshotBlockOutput {
         196  +
        /* BuilderGenerator.kt:477 */
  117    197   
        crate::operation::get_snapshot_block::GetSnapshotBlockOutput {
  118         -
            data_length: self.data_length,
         198  +
            /* BuilderGenerator.kt:481 */ data_length: self.data_length,
         199  +
            /* BuilderGenerator.kt:481 */
  119    200   
            checksum_algorithm: self.checksum_algorithm,
         201  +
            /* BuilderGenerator.kt:481 */
  120    202   
            checksum: self.checksum,
  121         -
            block_data: self.block_data.unwrap_or_default(),
         203  +
            /* BuilderGenerator.kt:481 */
         204  +
            block_data: self
         205  +
                .block_data
         206  +
                /* BuilderGenerator.kt:487 */
         207  +
                .unwrap_or_default(),
         208  +
            /* BuilderGenerator.kt:477 */
  122    209   
        }
         210  +
        /* BuilderGenerator.kt:253 */
  123    211   
    }
         212  +
    /* BuilderGenerator.kt:355 */
  124    213   
}
         214  +
/* BuilderGenerator.kt:379 */
  125    215   
impl ::std::fmt::Debug for GetSnapshotBlockOutputBuilder {
         216  +
    /* BuilderGenerator.kt:380 */
  126    217   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         218  +
        /* BuilderGenerator.kt:381 */
  127    219   
        let mut formatter = f.debug_struct("GetSnapshotBlockOutputBuilder");
         220  +
        /* BuilderGenerator.kt:395 */
  128    221   
        formatter.field("data_length", &self.data_length);
         222  +
        /* BuilderGenerator.kt:395 */
  129    223   
        formatter.field("checksum_algorithm", &self.checksum_algorithm);
         224  +
        /* BuilderGenerator.kt:395 */
  130    225   
        formatter.field("checksum", &self.checksum);
         226  +
        /* BuilderGenerator.kt:395 */
  131    227   
        formatter.field("block_data", &"*** Sensitive Data Redacted ***");
         228  +
        /* BuilderGenerator.kt:400 */
  132    229   
        formatter.finish()
         230  +
        /* BuilderGenerator.kt:380 */
  133    231   
    }
         232  +
    /* BuilderGenerator.kt:379 */
  134    233   
}