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