207 207 | }
|
208 208 | ::std::write!(
|
209 209 | output,
|
210 210 | "/2019-09-30/functions/{FunctionName}/provisioned-concurrency",
|
211 211 | FunctionName = function_name
|
212 212 | )
|
213 213 | .expect("formatting should succeed");
|
214 214 | ::std::result::Result::Ok(())
|
215 215 | }
|
216 216 | fn uri_query(
|
217 217 | _input: &crate::operation::put_provisioned_concurrency_config::PutProvisionedConcurrencyConfigInput,
|
218 218 | mut output: &mut ::std::string::String,
|
219 219 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
220 220 | let mut query = ::aws_smithy_http::query::Writer::new(output);
|
221 221 | let inner_2 = &_input.qualifier;
|
222 222 | let inner_2 = inner_2
|
223 223 | .as_ref()
|
224 224 | .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("qualifier", "cannot be empty or unset"))?;
|
225 225 | if inner_2.is_empty() {
|
226 226 | return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
|
227 227 | "qualifier",
|
228 228 | "cannot be empty or unset",
|
229 229 | ));
|
230 230 | }
|
231 231 | query.push_kv("Qualifier", &::aws_smithy_http::query::fmt_string(inner_2));
|
232 232 | ::std::result::Result::Ok(())
|
233 233 | }
|
234 234 | #[allow(clippy::unnecessary_wraps)]
|
235 235 | fn update_http_builder(
|
236 236 | input: &crate::operation::put_provisioned_concurrency_config::PutProvisionedConcurrencyConfigInput,
|
237 - | builder: ::http::request::Builder,
|
238 - | ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
237 + | builder: ::http_1x::request::Builder,
|
238 + | ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
239 239 | let mut uri = ::std::string::String::new();
|
240 240 | uri_base(input, &mut uri)?;
|
241 241 | uri_query(input, &mut uri)?;
|
242 242 | ::std::result::Result::Ok(builder.method("PUT").uri(uri))
|
243 243 | }
|
244 - | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
245 - | builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
|
244 + | let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
|
245 + | builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
|
246 246 | builder
|
247 247 | };
|
248 248 | let body = ::aws_smithy_types::body::SdkBody::from(
|
249 249 | crate::protocol_serde::shape_put_provisioned_concurrency_config::ser_put_provisioned_concurrency_config_input(&input)?,
|
250 250 | );
|
251 251 | if let Some(content_length) = body.content_length() {
|
252 252 | let content_length = content_length.to_string();
|
253 - | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
|
253 + | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
|
254 254 | }
|
255 255 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
256 256 | }
|
257 257 | }
|
258 258 | #[derive(Debug)]
|
259 259 | struct PutProvisionedConcurrencyConfigEndpointParamsInterceptor;
|
260 260 |
|
261 261 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutProvisionedConcurrencyConfigEndpointParamsInterceptor {
|
262 262 | fn name(&self) -> &'static str {
|
263 263 | "PutProvisionedConcurrencyConfigEndpointParamsInterceptor"
|
264 264 | }
|
265 265 |
|
266 266 | fn read_before_execution(
|
267 267 | &self,
|
268 268 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
269 269 | '_,
|
270 270 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
271 271 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
272 272 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
273 273 | >,
|
274 274 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
275 275 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
276 276 | let _input = context
|
277 277 | .input()
|
278 278 | .downcast_ref::<PutProvisionedConcurrencyConfigInput>()
|
279 279 | .ok_or("failed to downcast to PutProvisionedConcurrencyConfigInput")?;
|
280 280 |
|
281 281 | let params = crate::config::endpoint::Params::builder()
|
282 282 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
283 283 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|