Client Test

Client Test

rev. 27102829f69b2cfe3a9ca9e69ae64d1ea40f9865 (ignoring whitespace)

Files changed:

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

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/operation/primitive_int_op.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::<PrimitiveIntOpInput>()
  219    219   
            .ok_or("failed to downcast to PrimitiveIntOpInput")?;
  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 primitive_int_op_test {

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

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

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/operation/status_response.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::<StatusResponseInput>()
  215    215   
            .ok_or("failed to downcast to StatusResponseInput")?;
  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 status_response_test {

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/all_query_string_types.rs

@@ -359,359 +420,422 @@
  379    379   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  380    380   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  381    381   
        let _input = context
  382    382   
            .input()
  383    383   
            .downcast_ref::<AllQueryStringTypesInput>()
  384    384   
            .ok_or("failed to downcast to AllQueryStringTypesInput")?;
  385    385   
  386    386   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  387    387   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  388    388   
        })?;
         389  +
  389    390   
        cfg.interceptor_state()
  390    391   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         392  +
  391    393   
        ::std::result::Result::Ok(())
  392    394   
    }
  393    395   
}
  394    396   
  395    397   
// The get_* functions below are generated from JMESPath expressions in the
  396    398   
// operationContextParams trait. They target the operation's input shape.
  397    399   
  398    400   
#[allow(unreachable_code, unused_variables)]
  399    401   
#[cfg(test)]
  400    402   
mod all_query_string_types_test {

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/constant_and_variable_query_string.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/constant_query_string.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/content_type_parameters.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::<ContentTypeParametersInput>()
  227    227   
            .ok_or("failed to downcast to ContentTypeParametersInput")?;
  228    228   
  229    229   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  230    230   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  231    231   
        })?;
         232  +
  232    233   
        cfg.interceptor_state()
  233    234   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         235  +
  234    236   
        ::std::result::Result::Ok(())
  235    237   
    }
  236    238   
}
  237    239   
  238    240   
// The get_* functions below are generated from JMESPath expressions in the
  239    241   
// operationContextParams trait. They target the operation's input shape.
  240    242   
  241    243   
/// Error type for the `ContentTypeParametersError` operation.
  242    244   
#[non_exhaustive]
  243    245   
#[derive(::std::fmt::Debug)]

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/empty_input_and_empty_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::<EmptyInputAndEmptyOutputInput>()
  221    221   
            .ok_or("failed to downcast to EmptyInputAndEmptyOutputInput")?;
  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_input_and_empty_output_test {

tmp-codegen-diff/codegen-client-test/rest_xml/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/rest_xml/rust-client-codegen/src/operation/endpoint_with_host_label_header_operation.rs

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

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

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

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