Client Test

Client Test

rev. 645b1734ce74ebbc529fecda676baac60fe4d581

Files changed:

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

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

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/test_get_no_input_no_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::<TestGetNoInputNoPayloadInput>()
  221    221   
            .ok_or("failed to downcast to TestGetNoInputNoPayloadInput")?;
  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 test_get_no_input_no_payload_test {

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/test_get_no_payload.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::<TestGetNoPayloadInput>()
  222    222   
            .ok_or("failed to downcast to TestGetNoPayloadInput")?;
  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 test_get_no_payload_test {

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/test_payload_structure.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::<TestPayloadStructureInput>()
  228    228   
            .ok_or("failed to downcast to TestPayloadStructureInput")?;
  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 test_payload_structure_test {

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/test_post_no_input_no_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::<TestPostNoInputNoPayloadInput>()
  221    221   
            .ok_or("failed to downcast to TestPostNoInputNoPayloadInput")?;
  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 test_post_no_input_no_payload_test {

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/test_post_no_payload.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::<TestPostNoPayloadInput>()
  222    222   
            .ok_or("failed to downcast to TestPostNoPayloadInput")?;
  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 test_post_no_payload_test {

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/timestamp_format_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::<TimestampFormatHeadersInput>()
  222    222   
            .ok_or("failed to downcast to TimestampFormatHeadersInput")?;
  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 timestamp_format_headers_test {

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/unit_input_and_output.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::<UnitInputAndOutputInput>()
  221    221   
            .ok_or("failed to downcast to UnitInputAndOutputInput")?;
  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 unit_input_and_output_test {

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/operation/case_insensitive_error_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::<CaseInsensitiveErrorOperationInput>()
  221    221   
            .ok_or("failed to downcast to CaseInsensitiveErrorOperationInput")?;
  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 case_insensitive_error_operation_test {

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/operation/empty_struct_with_content_on_wire_op.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::<EmptyStructWithContentOnWireOpInput>()
  225    225   
            .ok_or("failed to downcast to EmptyStructWithContentOnWireOpInput")?;
  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 empty_struct_with_content_on_wire_op_test {

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/operation/enum_query.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::<EnumQueryInput>()
  224    224   
            .ok_or("failed to downcast to EnumQueryInput")?;
  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 enum_query_test {

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/operation/escaped_string_values.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::<EscapedStringValuesInput>()
  227    227   
            .ok_or("failed to downcast to EscapedStringValuesInput")?;
  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 escaped_string_values_test {

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

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

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/operation/null_in_non_sparse.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::<NullInNonSparseInput>()
  221    221   
            .ok_or("failed to downcast to NullInNonSparseInput")?;
  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 null_in_non_sparse_test {