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