Client Test

Client Test

rev. 27102829f69b2cfe3a9ca9e69ae64d1ea40f9865

Files changed:

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/operation_with_defaults.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::<OperationWithDefaultsInput>()
  227    227   
            .ok_or("failed to downcast to OperationWithDefaultsInput")?;
  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 operation_with_defaults_test {

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/operation_with_nested_structure.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::<OperationWithNestedStructureInput>()
  227    227   
            .ok_or("failed to downcast to OperationWithNestedStructureInput")?;
  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 operation_with_nested_structure_test {

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/post_player_action.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::<PostPlayerActionInput>()
  225    225   
            .ok_or("failed to downcast to PostPlayerActionInput")?;
  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 post_player_action_test {

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/post_union_with_json_name.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::<PostUnionWithJsonNameInput>()
  227    227   
            .ok_or("failed to downcast to PostUnionWithJsonNameInput")?;
  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 post_union_with_json_name_test {

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/put_with_content_encoding.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::<PutWithContentEncodingInput>()
  228    228   
            .ok_or("failed to downcast to PutWithContentEncodingInput")?;
  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   
#[allow(unreachable_code, unused_variables)]
  243    245   
#[cfg(test)]
  244    246   
mod put_with_content_encoding_test {

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

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

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

@@ -221,221 +282,284 @@
  241    241   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  242    242   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  243    243   
        let _input = context
  244    244   
            .input()
  245    245   
            .downcast_ref::<QueryParamsAsStringListMapInput>()
  246    246   
            .ok_or("failed to downcast to QueryParamsAsStringListMapInput")?;
  247    247   
  248    248   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  249    249   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  250    250   
        })?;
         251  +
  251    252   
        cfg.interceptor_state()
  252    253   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         254  +
  253    255   
        ::std::result::Result::Ok(())
  254    256   
    }
  255    257   
}
  256    258   
  257    259   
// The get_* functions below are generated from JMESPath expressions in the
  258    260   
// operationContextParams trait. They target the operation's input shape.
  259    261   
  260    262   
#[allow(unreachable_code, unused_variables)]
  261    263   
#[cfg(test)]
  262    264   
mod query_params_as_string_list_map_test {

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/recursive_shapes.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::<RecursiveShapesInput>()
  225    225   
            .ok_or("failed to downcast to RecursiveShapesInput")?;
  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 recursive_shapes_test {

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/response_code_http_fallback.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::<ResponseCodeHttpFallbackInput>()
  221    221   
            .ok_or("failed to downcast to ResponseCodeHttpFallbackInput")?;
  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   
/// Error type for the `ResponseCodeHttpFallbackError` operation.
  236    238   
#[non_exhaustive]
  237    239   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/response_code_required.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::<ResponseCodeRequiredInput>()
  221    221   
            .ok_or("failed to downcast to ResponseCodeRequiredInput")?;
  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   
/// Error type for the `ResponseCodeRequiredError` operation.
  236    238   
#[non_exhaustive]
  237    239   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/simple_scalar_properties.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::<SimpleScalarPropertiesInput>()
  228    228   
            .ok_or("failed to downcast to SimpleScalarPropertiesInput")?;
  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   
#[allow(unreachable_code, unused_variables)]
  243    245   
#[cfg(test)]
  244    246   
mod simple_scalar_properties_test {

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/sparse_json_lists.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::<SparseJsonListsInput>()
  225    225   
            .ok_or("failed to downcast to SparseJsonListsInput")?;
  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 sparse_json_lists_test {

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/sparse_json_maps.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::<SparseJsonMapsInput>()
  219    219   
            .ok_or("failed to downcast to SparseJsonMapsInput")?;
  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   
#[allow(unreachable_code, unused_variables)]
  234    236   
#[cfg(test)]
  235    237   
mod sparse_json_maps_test {

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/streaming_traits_require_length.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::<StreamingTraitsRequireLengthInput>()
  227    227   
            .ok_or("failed to downcast to StreamingTraitsRequireLengthInput")?;
  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 streaming_traits_require_length_test {