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