Client Test

Client Test

rev. 27102829f69b2cfe3a9ca9e69ae64d1ea40f9865 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_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::<XmlMapsInput>()
  213    213   
            .ok_or("failed to downcast to XmlMapsInput")?;
  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 xml_maps_test {

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_maps_xml_name.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::<XmlMapsXmlNameInput>()
  219    219   
            .ok_or("failed to downcast to XmlMapsXmlNameInput")?;
  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 xml_maps_xml_name_test {

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_namespaces.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::<XmlNamespacesInput>()
  219    219   
            .ok_or("failed to downcast to XmlNamespacesInput")?;
  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 xml_namespaces_test {

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_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::<XmlTimestampsInput>()
  219    219   
            .ok_or("failed to downcast to XmlTimestampsInput")?;
  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 xml_timestamps_test {

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_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::<XmlUnionsInput>()
  217    217   
            .ok_or("failed to downcast to XmlUnionsInput")?;
  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 xml_unions_test {

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/attribute_party.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/checksum_required.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::<ChecksumRequiredInput>()
  225    225   
            .ok_or("failed to downcast to ChecksumRequiredInput")?;
  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 checksum_required_test {

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/create_foo.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::<CreateFooInput>()
  217    217   
            .ok_or("failed to downcast to CreateFooInput")?;
  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   
/// Error type for the `CreateFooError` operation.
  232    234   
#[non_exhaustive]
  233    235   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/enum_keys.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::<EnumKeysInput>()
  213    213   
            .ok_or("failed to downcast to EnumKeysInput")?;
  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 enum_keys_test {

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/primitive_int_op_xml.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::<PrimitiveIntOpXmlInput>()
  227    227   
            .ok_or("failed to downcast to PrimitiveIntOpXmlInput")?;
  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 primitive_int_op_xml_test {

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

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/string_header.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/xml_maps_flattened_nested_xml_namespace.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::<XmlMapsFlattenedNestedXmlNamespaceInput>()
  231    231   
            .ok_or("failed to downcast to XmlMapsFlattenedNestedXmlNamespaceInput")?;
  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   
#[allow(unreachable_code, unused_variables)]
  246    248   
#[cfg(test)]
  247    249   
mod xml_maps_flattened_nested_xml_namespace_test {

tmp-codegen-diff/codegen-client-test/rest_xml_extras_unwrapped/rust-client-codegen/src/operation/greeting_with_unwrapped_errors.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::<GreetingWithUnwrappedErrorsInput>()
  221    221   
            .ok_or("failed to downcast to GreetingWithUnwrappedErrorsInput")?;
  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 greeting_with_unwrapped_errors_test {

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

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

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/empty_input_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::<EmptyInputOutputInput>()
  223    223   
            .ok_or("failed to downcast to EmptyInputOutputInput")?;
  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 empty_input_output_test {