Client Test

Client Test

rev. 27102829f69b2cfe3a9ca9e69ae64d1ea40f9865

Files changed:

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

@@ -206,206 +267,269 @@
  226    226   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  227    227   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  228    228   
        let _input = context
  229    229   
            .input()
  230    230   
            .downcast_ref::<SimpleStructOperationInput>()
  231    231   
            .ok_or("failed to downcast to SimpleStructOperationInput")?;
  232    232   
  233    233   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  234    234   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  235    235   
        })?;
         236  +
  236    237   
        cfg.interceptor_state()
  237    238   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         239  +
  238    240   
        ::std::result::Result::Ok(())
  239    241   
    }
  240    242   
}
  241    243   
  242    244   
// The get_* functions below are generated from JMESPath expressions in the
  243    245   
// operationContextParams trait. They target the operation's input shape.
  244    246   
  245    247   
#[allow(unreachable_code, unused_variables)]
  246    248   
#[cfg(test)]
  247    249   
mod simple_struct_operation_test {

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

@@ -206,206 +267,269 @@
  226    226   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  227    227   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  228    228   
        let _input = context
  229    229   
            .input()
  230    230   
            .downcast_ref::<SingleMemberStructOperationInput>()
  231    231   
            .ok_or("failed to downcast to SingleMemberStructOperationInput")?;
  232    232   
  233    233   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  234    234   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  235    235   
        })?;
         236  +
  236    237   
        cfg.interceptor_state()
  237    238   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         239  +
  238    240   
        ::std::result::Result::Ok(())
  239    241   
    }
  240    242   
}
  241    243   
  242    244   
// The get_* functions below are generated from JMESPath expressions in the
  243    245   
// operationContextParams trait. They target the operation's input shape.
  244    246   
  245    247   
/// Error type for the `SingleMemberStructOperationError` operation.
  246    248   
#[non_exhaustive]
  247    249   
#[derive(::std::fmt::Debug)]

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

@@ -204,204 +265,267 @@
  224    224   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  225    225   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  226    226   
        let _input = context
  227    227   
            .input()
  228    228   
            .downcast_ref::<NonQueryCompatibleOperationInput>()
  229    229   
            .ok_or("failed to downcast to NonQueryCompatibleOperationInput")?;
  230    230   
  231    231   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  232    232   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  233    233   
        })?;
         234  +
  234    235   
        cfg.interceptor_state()
  235    236   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         237  +
  236    238   
        ::std::result::Result::Ok(())
  237    239   
    }
  238    240   
}
  239    241   
  240    242   
// The get_* functions below are generated from JMESPath expressions in the
  241    243   
// operationContextParams trait. They target the operation's input shape.
  242    244   
  243    245   
#[allow(unreachable_code, unused_variables)]
  244    246   
#[cfg(test)]
  245    247   
mod non_query_compatible_operation_test {

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

@@ -202,202 +263,265 @@
  222    222   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  223    223   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  224    224   
        let _input = context
  225    225   
            .input()
  226    226   
            .downcast_ref::<QueryCompatibleOperationInput>()
  227    227   
            .ok_or("failed to downcast to QueryCompatibleOperationInput")?;
  228    228   
  229    229   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  230    230   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  231    231   
        })?;
         232  +
  232    233   
        cfg.interceptor_state()
  233    234   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         235  +
  234    236   
        ::std::result::Result::Ok(())
  235    237   
    }
  236    238   
}
  237    239   
  238    240   
// The get_* functions below are generated from JMESPath expressions in the
  239    241   
// operationContextParams trait. They target the operation's input shape.
  240    242   
  241    243   
#[allow(unreachable_code, unused_variables)]
  242    244   
#[cfg(test)]
  243    245   
mod query_compatible_operation_test {

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

@@ -189,189 +250,252 @@
  209    209   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  210    210   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  211    211   
        let _input = context
  212    212   
            .input()
  213    213   
            .downcast_ref::<OperationInput>()
  214    214   
            .ok_or("failed to downcast to OperationInput")?;
  215    215   
  216    216   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  217    217   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  218    218   
        })?;
         219  +
  219    220   
        cfg.interceptor_state()
  220    221   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         222  +
  221    223   
        ::std::result::Result::Ok(())
  222    224   
    }
  223    225   
}
  224    226   
  225    227   
// The get_* functions below are generated from JMESPath expressions in the
  226    228   
// operationContextParams trait. They target the operation's input shape.
  227    229   
  228    230   
/// Error type for the `OperationError` operation.
  229    231   
#[non_exhaustive]
  230    232   
#[derive(::std::fmt::Debug)]