171 171 | }
|
172 172 | #[derive(Debug)]
|
173 173 | struct CancelReservedInstancesListingRequestSerializer;
|
174 174 | impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CancelReservedInstancesListingRequestSerializer {
|
175 175 | #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
|
176 176 | fn serialize_input(
|
177 177 | &self,
|
178 178 | input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
179 179 | _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
180 180 | ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
|
181 181 | let input = input
|
182 182 | .downcast::<crate::operation::cancel_reserved_instances_listing::CancelReservedInstancesListingInput>()
|
183 183 | .expect("correct type");
|
184 184 | let _header_serialization_settings = _cfg
|
185 185 | .load::<crate::serialization_settings::HeaderSerializationSettings>()
|
186 186 | .cloned()
|
187 187 | .unwrap_or_default();
|
188 188 | let mut request_builder = {
|
189 189 | #[allow(clippy::uninlined_format_args)]
|
190 190 | fn uri_base(
|
191 191 | _input: &crate::operation::cancel_reserved_instances_listing::CancelReservedInstancesListingInput,
|
192 192 | output: &mut ::std::string::String,
|
193 193 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
194 194 | use ::std::fmt::Write as _;
|
195 195 | ::std::write!(output, "/").expect("formatting should succeed");
|
196 196 | ::std::result::Result::Ok(())
|
197 197 | }
|
198 198 | #[allow(clippy::unnecessary_wraps)]
|
199 199 | fn update_http_builder(
|
200 200 | input: &crate::operation::cancel_reserved_instances_listing::CancelReservedInstancesListingInput,
|
201 - | builder: ::http::request::Builder,
|
202 - | ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
201 + | builder: ::http_1x::request::Builder,
|
202 + | ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
203 203 | let mut uri = ::std::string::String::new();
|
204 204 | uri_base(input, &mut uri)?;
|
205 205 | ::std::result::Result::Ok(builder.method("POST").uri(uri))
|
206 206 | }
|
207 - | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
208 - | builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
|
207 + | let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
|
208 + | builder =
|
209 + | _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
|
209 210 | builder
|
210 211 | };
|
211 212 | let body = ::aws_smithy_types::body::SdkBody::from(
|
212 213 | crate::protocol_serde::shape_cancel_reserved_instances_listing_input::ser_cancel_reserved_instances_listing_input_input_input(&input)?,
|
213 214 | );
|
214 215 | if let Some(content_length) = body.content_length() {
|
215 216 | let content_length = content_length.to_string();
|
216 - | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
|
217 + | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
|
217 218 | }
|
218 219 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
219 220 | }
|
220 221 | }
|
221 222 | #[derive(Debug)]
|
222 223 | struct CancelReservedInstancesListingEndpointParamsInterceptor;
|
223 224 |
|
224 225 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CancelReservedInstancesListingEndpointParamsInterceptor {
|
225 226 | fn name(&self) -> &'static str {
|
226 227 | "CancelReservedInstancesListingEndpointParamsInterceptor"
|
227 228 | }
|
228 229 |
|
229 230 | fn read_before_execution(
|
230 231 | &self,
|
231 232 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
232 233 | '_,
|
233 234 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
234 235 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
235 236 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
236 237 | >,
|
237 238 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
238 239 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
239 240 | let _input = context
|
240 241 | .input()
|
241 242 | .downcast_ref::<CancelReservedInstancesListingInput>()
|
242 243 | .ok_or("failed to downcast to CancelReservedInstancesListingInput")?;
|
243 244 |
|
244 245 | let params = crate::config::endpoint::Params::builder()
|
245 246 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
246 247 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|