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_function_concurrency::PutFunctionConcurrencyInput,
|
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 | let input_1 = &_input.function_name;
|
190 190 | let input_1 = input_1
|
191 191 | .as_ref()
|
192 192 | .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("function_name", "cannot be empty or unset"))?;
|
193 193 | let function_name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
|
194 194 | if function_name.is_empty() {
|
195 195 | return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
|
196 196 | "function_name",
|
197 197 | "cannot be empty or unset",
|
198 198 | ));
|
199 199 | }
|
200 200 | ::std::write!(output, "/2017-10-31/functions/{FunctionName}/concurrency", FunctionName = function_name)
|
201 201 | .expect("formatting should succeed");
|
202 202 | ::std::result::Result::Ok(())
|
203 203 | }
|
204 204 | #[allow(clippy::unnecessary_wraps)]
|
205 205 | fn update_http_builder(
|
206 206 | input: &crate::operation::put_function_concurrency::PutFunctionConcurrencyInput,
|
207 - | builder: ::http::request::Builder,
|
208 - | ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
207 + | builder: ::http_1x::request::Builder,
|
208 + | ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
209 209 | let mut uri = ::std::string::String::new();
|
210 210 | uri_base(input, &mut uri)?;
|
211 211 | ::std::result::Result::Ok(builder.method("PUT").uri(uri))
|
212 212 | }
|
213 - | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
214 - | builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
|
213 + | let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
|
214 + | builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
|
215 215 | builder
|
216 216 | };
|
217 217 | let body = ::aws_smithy_types::body::SdkBody::from(
|
218 218 | crate::protocol_serde::shape_put_function_concurrency::ser_put_function_concurrency_input(&input)?,
|
219 219 | );
|
220 220 | if let Some(content_length) = body.content_length() {
|
221 221 | let content_length = content_length.to_string();
|
222 - | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
|
222 + | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
|
223 223 | }
|
224 224 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
225 225 | }
|
226 226 | }
|
227 227 | #[derive(Debug)]
|
228 228 | struct PutFunctionConcurrencyEndpointParamsInterceptor;
|
229 229 |
|
230 230 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutFunctionConcurrencyEndpointParamsInterceptor {
|
231 231 | fn name(&self) -> &'static str {
|
232 232 | "PutFunctionConcurrencyEndpointParamsInterceptor"
|
233 233 | }
|
234 234 |
|
235 235 | fn read_before_execution(
|
236 236 | &self,
|
237 237 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
238 238 | '_,
|
239 239 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
240 240 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
241 241 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
242 242 | >,
|
243 243 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
244 244 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
245 245 | let _input = context
|
246 246 | .input()
|
247 247 | .downcast_ref::<PutFunctionConcurrencyInput>()
|
248 248 | .ok_or("failed to downcast to PutFunctionConcurrencyInput")?;
|
249 249 |
|
250 250 | let params = crate::config::endpoint::Params::builder()
|
251 251 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
252 252 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|