203 203 | }
|
204 204 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
205 205 | }
|
206 206 | }
|
207 207 | #[derive(Debug)]
|
208 208 | struct SimpleScalarPropertiesEndpointParamsInterceptor;
|
209 209 |
|
210 210 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SimpleScalarPropertiesEndpointParamsInterceptor {
|
211 211 | fn name(&self) -> &'static str {
|
212 212 | "SimpleScalarPropertiesEndpointParamsInterceptor"
|
213 213 | }
|
214 214 |
|
215 215 | fn read_before_execution(
|
216 216 | &self,
|
217 217 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
218 218 | '_,
|
219 219 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
220 220 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
221 221 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
222 222 | >,
|
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 {
|
245 247 | use ::aws_smithy_protocol_test::FloatEquals;
|
246 248 |
|
247 249 | /// Serializes simple scalar properties
|
248 250 | /// Test ID: SimpleScalarProperties
|
249 251 | #[::tokio::test]
|
250 252 | #[::tracing_test::traced_test]
|
251 253 | async fn simple_scalar_properties_request() {
|
252 254 | let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
|
253 255 | let config_builder = crate::config::Config::builder()
|
254 256 | .with_test_defaults()
|
255 257 | .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
|
256 258 | .endpoint_url("https://example.com");
|
257 259 |
|
258 260 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
259 261 | let result = client
|
260 262 | .simple_scalar_properties()
|
261 263 | .set_foo(::std::option::Option::Some("Foo".to_owned()))
|
262 264 | .set_string_value(::std::option::Option::Some("string".to_owned()))
|
263 265 | .set_true_boolean_value(::std::option::Option::Some(true))
|
264 266 | .set_false_boolean_value(::std::option::Option::Some(false))
|