159 159 | }
|
160 160 | #[derive(Debug)]
|
161 161 | struct HttpPayloadTraitsWithMediaTypeRequestSerializer;
|
162 162 | impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpPayloadTraitsWithMediaTypeRequestSerializer {
|
163 163 | #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
|
164 164 | fn serialize_input(
|
165 165 | &self,
|
166 166 | input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
167 167 | _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
168 168 | ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
|
169 169 | let input = input
|
170 170 | .downcast::<crate::operation::http_payload_traits_with_media_type::HttpPayloadTraitsWithMediaTypeInput>()
|
171 171 | .expect("correct type");
|
172 172 | let _header_serialization_settings = _cfg
|
173 173 | .load::<crate::serialization_settings::HeaderSerializationSettings>()
|
174 174 | .cloned()
|
175 175 | .unwrap_or_default();
|
176 176 | let mut request_builder = {
|
177 177 | #[allow(clippy::uninlined_format_args)]
|
178 178 | fn uri_base(
|
179 179 | _input: &crate::operation::http_payload_traits_with_media_type::HttpPayloadTraitsWithMediaTypeInput,
|
180 180 | output: &mut ::std::string::String,
|
181 181 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
182 182 | use ::std::fmt::Write as _;
|
183 183 | ::std::write!(output, "/HttpPayloadTraitsWithMediaType").expect("formatting should succeed");
|
184 184 | ::std::result::Result::Ok(())
|
185 185 | }
|
186 186 | #[allow(clippy::unnecessary_wraps)]
|
187 187 | fn update_http_builder(
|
188 188 | input: &crate::operation::http_payload_traits_with_media_type::HttpPayloadTraitsWithMediaTypeInput,
|
189 - | builder: ::http::request::Builder,
|
190 - | ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
189 + | builder: ::http_1x::request::Builder,
|
190 + | ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
191 191 | let mut uri = ::std::string::String::new();
|
192 192 | uri_base(input, &mut uri)?;
|
193 193 | let builder = crate::protocol_serde::shape_http_payload_traits_with_media_type::ser_http_payload_traits_with_media_type_headers(
|
194 194 | input, builder,
|
195 195 | )?;
|
196 196 | ::std::result::Result::Ok(builder.method("POST").uri(uri))
|
197 197 | }
|
198 - | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
199 - | builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "text/plain");
|
198 + | let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
|
199 + | builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "text/plain");
|
200 200 | builder
|
201 201 | };
|
202 202 | let body = ::aws_smithy_types::body::SdkBody::from(
|
203 203 | crate::protocol_serde::shape_http_payload_traits_with_media_type_input::ser_blob_http_payload(input.blob)?,
|
204 204 | );
|
205 205 | if let Some(content_length) = body.content_length() {
|
206 206 | let content_length = content_length.to_string();
|
207 - | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
|
207 + | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
|
208 208 | }
|
209 209 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
210 210 | }
|
211 211 | }
|
212 212 | #[derive(Debug)]
|
213 213 | struct HttpPayloadTraitsWithMediaTypeEndpointParamsInterceptor;
|
214 214 |
|
215 215 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpPayloadTraitsWithMediaTypeEndpointParamsInterceptor {
|
216 216 | fn name(&self) -> &'static str {
|
217 217 | "HttpPayloadTraitsWithMediaTypeEndpointParamsInterceptor"
|
218 218 | }
|
219 219 |
|
220 220 | fn read_before_execution(
|
221 221 | &self,
|
222 222 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
223 223 | '_,
|
224 224 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
225 225 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
226 226 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
227 227 | >,
|
228 228 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
229 229 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
230 230 | let _input = context
|
231 231 | .input()
|
232 232 | .downcast_ref::<HttpPayloadTraitsWithMediaTypeInput>()
|
233 233 | .ok_or("failed to downcast to HttpPayloadTraitsWithMediaTypeInput")?;
|
234 234 |
|
235 235 | let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
|
236 236 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
237 237 | })?;
|