151 151 | }
|
152 152 | #[derive(Debug)]
|
153 153 | struct BatchExecuteStatementRequestSerializer;
|
154 154 | impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for BatchExecuteStatementRequestSerializer {
|
155 155 | #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
|
156 156 | fn serialize_input(
|
157 157 | &self,
|
158 158 | input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
159 159 | _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
160 160 | ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
|
161 161 | let input = input
|
162 162 | .downcast::<crate::operation::batch_execute_statement::BatchExecuteStatementInput>()
|
163 163 | .expect("correct type");
|
164 164 | let _header_serialization_settings = _cfg
|
165 165 | .load::<crate::serialization_settings::HeaderSerializationSettings>()
|
166 166 | .cloned()
|
167 167 | .unwrap_or_default();
|
168 168 | let mut request_builder = {
|
169 169 | #[allow(clippy::uninlined_format_args)]
|
170 170 | fn uri_base(
|
171 171 | _input: &crate::operation::batch_execute_statement::BatchExecuteStatementInput,
|
172 172 | output: &mut ::std::string::String,
|
173 173 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
174 174 | use ::std::fmt::Write as _;
|
175 175 | ::std::write!(output, "/").expect("formatting should succeed");
|
176 176 | ::std::result::Result::Ok(())
|
177 177 | }
|
178 178 | #[allow(clippy::unnecessary_wraps)]
|
179 179 | fn update_http_builder(
|
180 180 | input: &crate::operation::batch_execute_statement::BatchExecuteStatementInput,
|
181 - | builder: ::http::request::Builder,
|
182 - | ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
181 + | builder: ::http_1x::request::Builder,
|
182 + | ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
183 183 | let mut uri = ::std::string::String::new();
|
184 184 | uri_base(input, &mut uri)?;
|
185 185 | ::std::result::Result::Ok(builder.method("POST").uri(uri))
|
186 186 | }
|
187 - | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
188 - | builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.0");
|
187 + | let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
|
188 + | builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
|
189 189 | builder = _header_serialization_settings.set_default_header(
|
190 190 | builder,
|
191 - | ::http::header::HeaderName::from_static("x-amz-target"),
|
191 + | ::http_1x::header::HeaderName::from_static("x-amz-target"),
|
192 192 | "DynamoDB_20120810.BatchExecuteStatement",
|
193 193 | );
|
194 194 | builder
|
195 195 | };
|
196 196 | let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_batch_execute_statement::ser_batch_execute_statement_input(
|
197 197 | &input,
|
198 198 | )?);
|
199 199 | if let Some(content_length) = body.content_length() {
|
200 200 | let content_length = content_length.to_string();
|
201 - | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
|
201 + | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
|
202 202 | }
|
203 203 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
204 204 | }
|
205 205 | }
|
206 206 | #[derive(Debug)]
|
207 207 | struct BatchExecuteStatementEndpointParamsInterceptor;
|
208 208 |
|
209 209 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for BatchExecuteStatementEndpointParamsInterceptor {
|
210 210 | fn name(&self) -> &'static str {
|
211 211 | "BatchExecuteStatementEndpointParamsInterceptor"
|
212 212 | }
|
213 213 |
|
214 214 | fn read_before_execution(
|
215 215 | &self,
|
216 216 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
217 217 | '_,
|
218 218 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
219 219 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
220 220 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
221 221 | >,
|
222 222 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
223 223 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
224 224 | let _input = context
|
225 225 | .input()
|
226 226 | .downcast_ref::<BatchExecuteStatementInput>()
|
227 227 | .ok_or("failed to downcast to BatchExecuteStatementInput")?;
|
228 228 |
|
229 229 | let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
|
230 230 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
231 231 | })?;
|