Client Test

Client Test

rev. 645b1734ce74ebbc529fecda676baac60fe4d581

Files changed:

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

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

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

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

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/query_incompatible_operation.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::<QueryIncompatibleOperationInput>()
  229    229   
            .ok_or("failed to downcast to QueryIncompatibleOperationInput")?;
  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 query_incompatible_operation_test {

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

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

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/content_type_parameters.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::<ContentTypeParametersInput>()
  232    232   
            .ok_or("failed to downcast to ContentTypeParametersInput")?;
  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   
/// Error type for the `ContentTypeParametersError` operation.
  247    249   
#[non_exhaustive]
  248    250   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/datetime_offsets.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::<DatetimeOffsetsInput>()
  221    221   
            .ok_or("failed to downcast to DatetimeOffsetsInput")?;
  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 datetime_offsets_test {

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/empty_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::<EmptyOperationInput>()
  221    221   
            .ok_or("failed to downcast to EmptyOperationInput")?;
  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 empty_operation_test {

tmp-codegen-diff/codegen-client-test/json_rpc11/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_rpc11/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_rpc11/rust-client-codegen/src/operation/fractional_seconds.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::<FractionalSecondsInput>()
  221    221   
            .ok_or("failed to downcast to FractionalSecondsInput")?;
  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 fractional_seconds_test {

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

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/host_with_path_operation.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::<HostWithPathOperationInput>()
  229    229   
            .ok_or("failed to downcast to HostWithPathOperationInput")?;
  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 host_with_path_operation_test {

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/json_enums.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::<JsonEnumsInput>()
  222    222   
            .ok_or("failed to downcast to JsonEnumsInput")?;
  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 json_enums_test {

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

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

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

@@ -207,207 +268,270 @@
  227    227   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  228    228   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  229    229   
        let _input = context
  230    230   
            .input()
  231    231   
            .downcast_ref::<KitchenSinkOperationInput>()
  232    232   
            .ok_or("failed to downcast to KitchenSinkOperationInput")?;
  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 kitchen_sink_operation_test {