Client Test

Client Test

rev. 27102829f69b2cfe3a9ca9e69ae64d1ea40f9865 (ignoring whitespace)

Files changed:

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

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

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

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

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/json_int_enums.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::<JsonIntEnumsInput>()
  219    219   
            .ok_or("failed to downcast to JsonIntEnumsInput")?;
  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 json_int_enums_test {

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

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

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/json_timestamps.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::<JsonTimestampsInput>()
  219    219   
            .ok_or("failed to downcast to JsonTimestampsInput")?;
  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 json_timestamps_test {

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

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_accept_with_generic_string.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::<MalformedAcceptWithGenericStringInput>()
  225    225   
            .ok_or("failed to downcast to MalformedAcceptWithGenericStringInput")?;
  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   
/// Error type for the `MalformedAcceptWithGenericStringError` operation.
  240    242   
#[non_exhaustive]
  241    243   
#[derive(::std::fmt::Debug)]

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_blob.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::<MalformedBlobInput>()
  219    219   
            .ok_or("failed to downcast to MalformedBlobInput")?;
  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 `MalformedBlobError` operation.
  234    236   
#[non_exhaustive]
  235    237   
#[derive(::std::fmt::Debug)]

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

@@ -226,226 +287,289 @@
  246    246   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  247    247   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  248    248   
        let _input = context
  249    249   
            .input()
  250    250   
            .downcast_ref::<MalformedBooleanInput>()
  251    251   
            .ok_or("failed to downcast to MalformedBooleanInput")?;
  252    252   
  253    253   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  254    254   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  255    255   
        })?;
         256  +
  256    257   
        cfg.interceptor_state()
  257    258   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         259  +
  258    260   
        ::std::result::Result::Ok(())
  259    261   
    }
  260    262   
}
  261    263   
  262    264   
// The get_* functions below are generated from JMESPath expressions in the
  263    265   
// operationContextParams trait. They target the operation's input shape.
  264    266   
  265    267   
/// Error type for the `MalformedBooleanError` operation.
  266    268   
#[non_exhaustive]
  267    269   
#[derive(::std::fmt::Debug)]

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_content_type_with_body.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::<MalformedContentTypeWithBodyInput>()
  227    227   
            .ok_or("failed to downcast to MalformedContentTypeWithBodyInput")?;
  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 `MalformedContentTypeWithBodyError` operation.
  242    244   
#[non_exhaustive]
  243    245   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_content_type_with_generic_string.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::<MalformedContentTypeWithGenericStringInput>()
  231    231   
            .ok_or("failed to downcast to MalformedContentTypeWithGenericStringInput")?;
  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 `MalformedContentTypeWithGenericStringError` operation.
  246    248   
#[non_exhaustive]
  247    249   
#[derive(::std::fmt::Debug)]