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