182 182 |
|
183 183 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
184 184 | }
|
185 185 | }
|
186 186 | #[derive(Debug)]
|
187 187 | struct XmlListsEndpointParamsInterceptor;
|
188 188 |
|
189 189 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for XmlListsEndpointParamsInterceptor {
|
190 190 | fn name(&self) -> &'static str {
|
191 191 | "XmlListsEndpointParamsInterceptor"
|
192 192 | }
|
193 193 |
|
194 194 | fn read_before_execution(
|
195 195 | &self,
|
196 196 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
197 197 | '_,
|
198 198 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
199 199 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
200 200 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
201 201 | >,
|
202 202 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
203 203 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
204 204 | let _input = context
|
205 205 | .input()
|
206 206 | .downcast_ref::<XmlListsInput>()
|
207 207 | .ok_or("failed to downcast to XmlListsInput")?;
|
208 208 |
|
209 209 | let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
|
210 210 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
211 211 | })?;
|
212 + |
|
212 213 | cfg.interceptor_state()
|
213 214 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
215 + |
|
214 216 | ::std::result::Result::Ok(())
|
215 217 | }
|
216 218 | }
|
217 219 |
|
218 220 | // The get_* functions below are generated from JMESPath expressions in the
|
219 221 | // operationContextParams trait. They target the operation's input shape.
|
220 222 |
|
221 223 | #[allow(unreachable_code, unused_variables)]
|
222 224 | #[cfg(test)]
|
223 225 | mod xml_lists_test {
|
224 226 |
|
225 227 | /// Tests for XML list serialization
|
226 228 | /// Test ID: Ec2XmlLists
|
227 229 | #[::tokio::test]
|
228 230 | #[::tracing_test::traced_test]
|
229 231 | async fn ec2_xml_lists_response() {
|
230 232 | let expected_output = crate::operation::xml_lists::XmlListsOutput::builder()
|
231 233 | .set_string_list(::std::option::Option::Some(vec!["foo".to_owned(), "bar".to_owned()]))
|
232 234 | .set_string_set(::std::option::Option::Some(vec!["foo".to_owned(), "bar".to_owned()]))
|
233 235 | .set_integer_list(::std::option::Option::Some(vec![1, 2]))
|
234 236 | .set_boolean_list(::std::option::Option::Some(vec![true, false]))
|
235 237 | .set_timestamp_list(::std::option::Option::Some(vec![
|
236 238 | ::aws_smithy_types::DateTime::from_fractional_secs(1398796238, 0_f64),
|
237 239 | ::aws_smithy_types::DateTime::from_fractional_secs(1398796238, 0_f64),
|
238 240 | ]))
|
239 241 | .set_enum_list(::std::option::Option::Some(vec![
|
240 242 | "Foo".parse::<crate::types::FooEnum>().expect("static value validated to member"),
|
241 243 | "0".parse::<crate::types::FooEnum>().expect("static value validated to member"),
|
242 244 | ]))
|
243 245 | .set_int_enum_list(::std::option::Option::Some(vec![1, 2]))
|