Client Test

Client Test

rev. 645b1734ce74ebbc529fecda676baac60fe4d581 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/reserved_words_as_members.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::<ReservedWordsAsMembersInput>()
  226    226   
            .ok_or("failed to downcast to ReservedWordsAsMembersInput")?;
  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 reserved_words_as_members_test {

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/result.rs

@@ -180,180 +241,243 @@
  200    200   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  201    201   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  202    202   
        >,
  203    203   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  204    204   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  205    205   
        let _input = context.input().downcast_ref::<ResultInput>().ok_or("failed to downcast to ResultInput")?;
  206    206   
  207    207   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  208    208   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  209    209   
        })?;
         210  +
  210    211   
        cfg.interceptor_state()
  211    212   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         213  +
  212    214   
        ::std::result::Result::Ok(())
  213    215   
    }
  214    216   
}
  215    217   
  216    218   
// The get_* functions below are generated from JMESPath expressions in the
  217    219   
// operationContextParams trait. They target the operation's input shape.
  218    220   
  219    221   
/// Error type for the `ResultError` operation.
  220    222   
#[non_exhaustive]
  221    223   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/rpc_echo.rs

@@ -187,187 +248,250 @@
  207    207   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  208    208   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  209    209   
        let _input = context
  210    210   
            .input()
  211    211   
            .downcast_ref::<RpcEchoInput>()
  212    212   
            .ok_or("failed to downcast to RpcEchoInput")?;
  213    213   
  214    214   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  215    215   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  216    216   
        })?;
         217  +
  217    218   
        cfg.interceptor_state()
  218    219   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         220  +
  219    221   
        ::std::result::Result::Ok(())
  220    222   
    }
  221    223   
}
  222    224   
  223    225   
// The get_* functions below are generated from JMESPath expressions in the
  224    226   
// operationContextParams trait. They target the operation's input shape.
  225    227   
  226    228   
/// Error type for the `RPCEchoError` operation.
  227    229   
#[non_exhaustive]
  228    230   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/structure_name_punning.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::<StructureNamePunningInput>()
  226    226   
            .ok_or("failed to downcast to StructureNamePunningInput")?;
  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 structure_name_punning_test {

tmp-codegen-diff/codegen-client-test/naming_test_structs/rust-client-codegen/src/operation/structs.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::<StructsInput>()
  224    224   
            .ok_or("failed to downcast to StructsInput")?;
  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   
/// Error type for the `StructsError` operation.
  239    241   
#[non_exhaustive]
  240    242   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/operation/capture_pokemon.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::<CapturePokemonInput>()
  244    244   
            .ok_or("failed to downcast to CapturePokemonInput")?;
  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   
/// Error type for the `CapturePokemonError` operation.
  259    261   
#[non_exhaustive]
  260    262   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/operation/check_health.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::<CheckHealthInput>()
  221    221   
            .ok_or("failed to downcast to CheckHealthInput")?;
  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   
/// Error type for the `CheckHealthError` operation.
  236    238   
#[non_exhaustive]
  237    239   
#[derive(::std::fmt::Debug)]

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

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/operation/get_server_statistics.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::<GetServerStatisticsInput>()
  229    229   
            .ok_or("failed to downcast to GetServerStatisticsInput")?;
  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   
/// Error type for the `GetServerStatisticsError` operation.
  244    246   
#[non_exhaustive]
  245    247   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/capture_pokemon.rs

@@ -225,225 +286,288 @@
  245    245   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  246    246   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  247    247   
        let _input = context
  248    248   
            .input()
  249    249   
            .downcast_ref::<CapturePokemonInput>()
  250    250   
            .ok_or("failed to downcast to CapturePokemonInput")?;
  251    251   
  252    252   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  253    253   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  254    254   
        })?;
         255  +
  255    256   
        cfg.interceptor_state()
  256    257   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         258  +
  257    259   
        ::std::result::Result::Ok(())
  258    260   
    }
  259    261   
}
  260    262   
  261    263   
// The get_* functions below are generated from JMESPath expressions in the
  262    264   
// operationContextParams trait. They target the operation's input shape.
  263    265   
  264    266   
/// Error type for the `CapturePokemonError` operation.
  265    267   
#[non_exhaustive]
  266    268   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/check_health.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::<CheckHealthInput>()
  215    215   
            .ok_or("failed to downcast to CheckHealthInput")?;
  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   
/// Error type for the `CheckHealthError` operation.
  230    232   
#[non_exhaustive]
  231    233   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/do_nothing.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::<DoNothingInput>()
  213    213   
            .ok_or("failed to downcast to DoNothingInput")?;
  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   
/// Error type for the `DoNothingError` operation.
  228    230   
#[non_exhaustive]
  229    231   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_pokemon_species.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::<GetPokemonSpeciesInput>()
  226    226   
            .ok_or("failed to downcast to GetPokemonSpeciesInput")?;
  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 `GetPokemonSpeciesError` operation.
  241    243   
#[non_exhaustive]
  242    244   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_server_statistics.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::<GetServerStatisticsInput>()
  221    221   
            .ok_or("failed to downcast to GetServerStatisticsInput")?;
  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   
/// Error type for the `GetServerStatisticsError` operation.
  236    238   
#[non_exhaustive]
  237    239   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_storage.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::<GetStorageInput>()
  225    225   
            .ok_or("failed to downcast to GetStorageInput")?;
  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   
/// Error type for the `GetStorageError` operation.
  240    242   
#[non_exhaustive]
  241    243   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/stream_pokemon_radio.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::<StreamPokemonRadioInput>()
  226    226   
            .ok_or("failed to downcast to StreamPokemonRadioInput")?;
  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 `StreamPokemonRadioError` operation.
  241    243   
#[non_exhaustive]
  242    244   
#[derive(::std::fmt::Debug)]