207 207 | let function_name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
|
208 208 | if function_name.is_empty() {
|
209 209 | return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
|
210 210 | "function_name",
|
211 211 | "cannot be empty or unset",
|
212 212 | ));
|
213 213 | }
|
214 214 | ::std::write!(
|
215 215 | output,
|
216 216 | "/2021-11-15/functions/{FunctionName}/response-streaming-invocations",
|
217 217 | FunctionName = function_name
|
218 218 | )
|
219 219 | .expect("formatting should succeed");
|
220 220 | ::std::result::Result::Ok(())
|
221 221 | }
|
222 222 | fn uri_query(
|
223 223 | _input: &crate::operation::invoke_with_response_stream::InvokeWithResponseStreamInput,
|
224 224 | mut output: &mut ::std::string::String,
|
225 225 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
226 226 | let mut query = ::aws_smithy_http::query::Writer::new(output);
|
227 227 | if let ::std::option::Option::Some(inner_2) = &_input.qualifier {
|
228 228 | {
|
229 229 | query.push_kv("Qualifier", &::aws_smithy_http::query::fmt_string(inner_2));
|
230 230 | }
|
231 231 | }
|
232 232 | ::std::result::Result::Ok(())
|
233 233 | }
|
234 234 | #[allow(clippy::unnecessary_wraps)]
|
235 235 | fn update_http_builder(
|
236 236 | input: &crate::operation::invoke_with_response_stream::InvokeWithResponseStreamInput,
|
237 - | builder: ::http::request::Builder,
|
238 - | ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
237 + | builder: ::http_1x::request::Builder,
|
238 + | ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
239 239 | let mut uri = ::std::string::String::new();
|
240 240 | uri_base(input, &mut uri)?;
|
241 241 | uri_query(input, &mut uri)?;
|
242 242 | let builder = crate::protocol_serde::shape_invoke_with_response_stream::ser_invoke_with_response_stream_headers(input, builder)?;
|
243 243 | ::std::result::Result::Ok(builder.method("POST").uri(uri))
|
244 244 | }
|
245 - | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
246 - | builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/octet-stream");
|
245 + | let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
|
246 + | builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/octet-stream");
|
247 247 | builder
|
248 248 | };
|
249 249 | let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_invoke_with_response_stream_input::ser_payload_http_payload(
|
250 250 | input.payload,
|
251 251 | )?);
|
252 252 | if let Some(content_length) = body.content_length() {
|
253 253 | let content_length = content_length.to_string();
|
254 - | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
|
254 + | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
|
255 255 | }
|
256 256 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
257 257 | }
|
258 258 | }
|
259 259 | #[derive(Debug)]
|
260 260 | struct InvokeWithResponseStreamEndpointParamsInterceptor;
|
261 261 |
|
262 262 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InvokeWithResponseStreamEndpointParamsInterceptor {
|
263 263 | fn name(&self) -> &'static str {
|
264 264 | "InvokeWithResponseStreamEndpointParamsInterceptor"
|
265 265 | }
|
266 266 |
|
267 267 | fn read_before_execution(
|
268 268 | &self,
|
269 269 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
270 270 | '_,
|
271 271 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
272 272 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
273 273 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
274 274 | >,
|
275 275 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
276 276 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
277 277 | let _input = context
|
278 278 | .input()
|
279 279 | .downcast_ref::<InvokeWithResponseStreamInput>()
|
280 280 | .ok_or("failed to downcast to InvokeWithResponseStreamInput")?;
|
281 281 |
|
282 282 | let params = crate::config::endpoint::Params::builder()
|
283 283 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
284 284 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|