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