Client Test

Client Test

rev. 27102829f69b2cfe3a9ca9e69ae64d1ea40f9865 (ignoring whitespace)

Files changed:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

tmp-codegen-diff/codegen-client-test/misc/rust-client-codegen/src/operation/required_inner_shape_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::<RequiredInnerShapeOperationInput>()
  227    227   
            .ok_or("failed to downcast to RequiredInnerShapeOperationInput")?;
  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   
/// Error type for the `RequiredInnerShapeOperationError` operation.
  242    244   
#[non_exhaustive]
  243    245   
#[derive(::std::fmt::Debug)]

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

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

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

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

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

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

tmp-codegen-diff/codegen-client-test/misc/rust-client-codegen/src/operation/type_complexity_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::<TypeComplexityOperationInput>()
  227    227   
            .ok_or("failed to downcast to TypeComplexityOperationInput")?;
  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   
/// Error type for the `TypeComplexityOperationError` operation.
  242    244   
#[non_exhaustive]
  243    245   
#[derive(::std::fmt::Debug)]

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

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

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

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

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

@@ -179,179 +240,242 @@
  199    199   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  200    200   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  201    201   
        >,
  202    202   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  203    203   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  204    204   
        let _input = context.input().downcast_ref::<MatchInput>().ok_or("failed to downcast to MatchInput")?;
  205    205   
  206    206   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  207    207   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  208    208   
        })?;
         209  +
  209    210   
        cfg.interceptor_state()
  210    211   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         212  +
  211    213   
        ::std::result::Result::Ok(())
  212    214   
    }
  213    215   
}
  214    216   
  215    217   
// The get_* functions below are generated from JMESPath expressions in the
  216    218   
// operationContextParams trait. They target the operation's input shape.
  217    219   
  218    220   
/// Error type for the `MatchError` operation.
  219    221   
#[non_exhaustive]
  220    222   
#[derive(::std::fmt::Debug)]

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

@@ -180,180 +241,243 @@
  200    200   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  201    201   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  202    202   
        >,
  203    203   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  204    204   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  205    205   
        let _input = context.input().downcast_ref::<OptionInput>().ok_or("failed to downcast to OptionInput")?;
  206    206   
  207    207   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  208    208   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  209    209   
        })?;
         210  +
  210    211   
        cfg.interceptor_state()
  211    212   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         213  +
  212    214   
        ::std::result::Result::Ok(())
  213    215   
    }
  214    216   
}
  215    217   
  216    218   
// The get_* functions below are generated from JMESPath expressions in the
  217    219   
// operationContextParams trait. They target the operation's input shape.
  218    220   
  219    221   
/// Error type for the `OptionError` operation.
  220    222   
#[non_exhaustive]
  221    223   
#[derive(::std::fmt::Debug)]