157 157 | }
|
158 158 | #[derive(Debug)]
|
159 159 | struct PutWithContentEncodingRequestSerializer;
|
160 160 | impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutWithContentEncodingRequestSerializer {
|
161 161 | #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
|
162 162 | fn serialize_input(
|
163 163 | &self,
|
164 164 | input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
165 165 | _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
166 166 | ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
|
167 167 | let input = input
|
168 168 | .downcast::<crate::operation::put_with_content_encoding::PutWithContentEncodingInput>()
|
169 169 | .expect("correct type");
|
170 170 | let _header_serialization_settings = _cfg
|
171 171 | .load::<crate::serialization_settings::HeaderSerializationSettings>()
|
172 172 | .cloned()
|
173 173 | .unwrap_or_default();
|
174 174 | let mut request_builder = {
|
175 175 | #[allow(clippy::uninlined_format_args)]
|
176 176 | fn uri_base(
|
177 177 | _input: &crate::operation::put_with_content_encoding::PutWithContentEncodingInput,
|
178 178 | output: &mut ::std::string::String,
|
179 179 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
180 180 | use ::std::fmt::Write as _;
|
181 181 | ::std::write!(output, "/requestcompression/putcontentwithencoding").expect("formatting should succeed");
|
182 182 | ::std::result::Result::Ok(())
|
183 183 | }
|
184 184 | #[allow(clippy::unnecessary_wraps)]
|
185 185 | fn update_http_builder(
|
186 186 | input: &crate::operation::put_with_content_encoding::PutWithContentEncodingInput,
|
187 - | builder: ::http::request::Builder,
|
188 - | ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
187 + | builder: ::http_1x::request::Builder,
|
188 + | ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
189 189 | let mut uri = ::std::string::String::new();
|
190 190 | uri_base(input, &mut uri)?;
|
191 191 | let builder = crate::protocol_serde::shape_put_with_content_encoding::ser_put_with_content_encoding_headers(input, builder)?;
|
192 192 | ::std::result::Result::Ok(builder.method("POST").uri(uri))
|
193 193 | }
|
194 - | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
195 - | builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
|
194 + | let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
|
195 + | builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/xml");
|
196 196 | builder
|
197 197 | };
|
198 198 | let body = ::aws_smithy_types::body::SdkBody::from(
|
199 199 | crate::protocol_serde::shape_put_with_content_encoding::ser_put_with_content_encoding_op_input(&input)?,
|
200 200 | );
|
201 201 | if let Some(content_length) = body.content_length() {
|
202 202 | let content_length = content_length.to_string();
|
203 - | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
|
203 + | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
|
204 204 | }
|
205 205 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
206 206 | }
|
207 207 | }
|
208 208 | #[derive(Debug)]
|
209 209 | struct PutWithContentEncodingEndpointParamsInterceptor;
|
210 210 |
|
211 211 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutWithContentEncodingEndpointParamsInterceptor {
|
212 212 | fn name(&self) -> &'static str {
|
213 213 | "PutWithContentEncodingEndpointParamsInterceptor"
|
214 214 | }
|
215 215 |
|
216 216 | fn read_before_execution(
|
217 217 | &self,
|
218 218 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
219 219 | '_,
|
220 220 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
221 221 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
222 222 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
223 223 | >,
|
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::<PutWithContentEncodingInput>()
|
229 229 | .ok_or("failed to downcast to PutWithContentEncodingInput")?;
|
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 | })?;
|