157 157 | }
|
158 158 | #[derive(Debug)]
|
159 159 | struct ErrorSerializationOperationRequestSerializer;
|
160 160 | impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ErrorSerializationOperationRequestSerializer {
|
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::error_serialization_operation::ErrorSerializationOperationInput>()
|
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::error_serialization_operation::ErrorSerializationOperationInput,
|
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, "/service/RpcV2CborService/operation/ErrorSerializationOperation").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::error_serialization_operation::ErrorSerializationOperationInput,
|
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 | ::std::result::Result::Ok(builder.method("POST").uri(uri))
|
192 192 | }
|
193 - | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
194 - | builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/cbor");
|
193 + | let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
|
194 + | builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/cbor");
|
195 + | builder = _header_serialization_settings.set_default_header(
|
196 + | builder,
|
197 + | ::http_1x::header::HeaderName::from_static("smithy-protocol"),
|
198 + | "rpc-v2-cbor",
|
199 + | );
|
195 200 | builder =
|
196 - | _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
|
197 - | builder =
|
198 - | _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
|
201 + | _header_serialization_settings.set_default_header(builder, ::http_1x::header::HeaderName::from_static("accept"), "application/cbor");
|
199 202 | builder
|
200 203 | };
|
201 204 | let body = ::aws_smithy_types::body::SdkBody::from(
|
202 205 | crate::protocol_serde::shape_error_serialization_operation::ser_error_serialization_operation_input(&input)?,
|
203 206 | );
|
204 207 | if let Some(content_length) = body.content_length() {
|
205 208 | let content_length = content_length.to_string();
|
206 - | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
|
209 + | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
|
207 210 | }
|
208 211 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
209 212 | }
|
210 213 | }
|
211 214 | #[derive(Debug)]
|
212 215 | struct ErrorSerializationOperationEndpointParamsInterceptor;
|
213 216 |
|
214 217 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ErrorSerializationOperationEndpointParamsInterceptor {
|
215 218 | fn name(&self) -> &'static str {
|
216 219 | "ErrorSerializationOperationEndpointParamsInterceptor"
|
217 220 | }
|
218 221 |
|
219 222 | fn read_before_execution(
|
220 223 | &self,
|
221 224 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
222 225 | '_,
|
223 226 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
224 227 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
225 228 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
226 229 | >,
|
227 230 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
228 231 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
229 232 | let _input = context
|
230 233 | .input()
|
231 234 | .downcast_ref::<ErrorSerializationOperationInput>()
|
232 235 | .ok_or("failed to downcast to ErrorSerializationOperationInput")?;
|
233 236 |
|
234 237 | let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
|
235 238 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
236 239 | })?;
|