Client Test

Client Test

rev. 27102829f69b2cfe3a9ca9e69ae64d1ea40f9865

Files changed:

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

@@ -182,182 +243,245 @@
  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
  205    205   
            .input()
  206    206   
            .downcast_ref::<XmlListsInput>()
  207    207   
            .ok_or("failed to downcast to XmlListsInput")?;
  208    208   
  209    209   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  210    210   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  211    211   
        })?;
         212  +
  212    213   
        cfg.interceptor_state()
  213    214   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         215  +
  214    216   
        ::std::result::Result::Ok(())
  215    217   
    }
  216    218   
}
  217    219   
  218    220   
// The get_* functions below are generated from JMESPath expressions in the
  219    221   
// operationContextParams trait. They target the operation's input shape.
  220    222   
  221    223   
#[allow(unreachable_code, unused_variables)]
  222    224   
#[cfg(test)]
  223    225   
mod xml_lists_test {

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/xml_namespaces.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::<XmlNamespacesInput>()
  218    218   
            .ok_or("failed to downcast to XmlNamespacesInput")?;
  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   
#[allow(unreachable_code, unused_variables)]
  233    235   
#[cfg(test)]
  234    236   
mod xml_namespaces_test {

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/xml_timestamps.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::<XmlTimestampsInput>()
  218    218   
            .ok_or("failed to downcast to XmlTimestampsInput")?;
  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   
#[allow(unreachable_code, unused_variables)]
  233    235   
#[cfg(test)]
  234    236   
mod xml_timestamps_test {

tmp-codegen-diff/codegen-client-test/endpoint-rules/rust-client-codegen/src/operation/test_operation.rs

@@ -202,202 +263,265 @@
  222    222   
            .input()
  223    223   
            .downcast_ref::<TestOperationInput>()
  224    224   
            .ok_or("failed to downcast to TestOperationInput")?;
  225    225   
  226    226   
        let params = crate::config::endpoint::Params::builder()
  227    227   
            .set_bucket(_input.bucket.clone())
  228    228   
            .build()
  229    229   
            .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 `TestOperationError` operation.
  242    244   
#[non_exhaustive]
  243    245   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/content_type_parameters.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::<ContentTypeParametersInput>()
  226    226   
            .ok_or("failed to downcast to ContentTypeParametersInput")?;
  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   
/// Error type for the `ContentTypeParametersError` operation.
  241    243   
#[non_exhaustive]
  242    244   
#[derive(::std::fmt::Debug)]

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

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

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

@@ -201,201 +262,264 @@
  221    221   
            .ok_or("failed to downcast to EndpointOperationInput")?;
  222    222   
  223    223   
        let endpoint_prefix = ::aws_smithy_runtime_api::client::endpoint::EndpointPrefix::new("foo.").map_err(|err| {
  224    224   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint prefix could not be built", err)
  225    225   
        })?;
  226    226   
        cfg.interceptor_state().store_put(endpoint_prefix);
  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 endpoint_operation_test {

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

@@ -224,224 +285,287 @@
  244    244   
                );
  245    245   
            }
  246    246   
            ::aws_smithy_runtime_api::client::endpoint::EndpointPrefix::new(format!("foo.{label}.", label = label))
  247    247   
        }
  248    248   
        .map_err(|err| ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint prefix could not be built", err))?;
  249    249   
        cfg.interceptor_state().store_put(endpoint_prefix);
  250    250   
  251    251   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  252    252   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  253    253   
        })?;
         254  +
  254    255   
        cfg.interceptor_state()
  255    256   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         257  +
  256    258   
        ::std::result::Result::Ok(())
  257    259   
    }
  258    260   
}
  259    261   
  260    262   
// The get_* functions below are generated from JMESPath expressions in the
  261    263   
// operationContextParams trait. They target the operation's input shape.
  262    264   
  263    265   
#[allow(unreachable_code, unused_variables)]
  264    266   
#[cfg(test)]
  265    267   
mod endpoint_with_host_label_operation_test {

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/greeting_with_errors.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::<GreetingWithErrorsInput>()
  225    225   
            .ok_or("failed to downcast to GreetingWithErrorsInput")?;
  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 greeting_with_errors_test {

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

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

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/json_unions.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::<JsonUnionsInput>()
  219    219   
            .ok_or("failed to downcast to JsonUnionsInput")?;
  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_unions_test {

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

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

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/no_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::<NoInputAndOutputInput>()
  221    221   
            .ok_or("failed to downcast to NoInputAndOutputInput")?;
  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 no_input_and_output_test {

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

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

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

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