1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* RustType.kt:516 */
|
2 3 | #[allow(clippy::unnecessary_wraps)]
|
4 + | /* ServerHttpBoundProtocolGenerator.kt:383 */
|
3 5 | pub async fn de_get_snapshot_block_http_request<B>(
|
4 6 | #[allow(unused_variables)] request: ::http::Request<B>,
|
5 7 | ) -> std::result::Result<
|
6 8 | crate::input::GetSnapshotBlockInput,
|
7 9 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
|
8 10 | >
|
9 11 | where
|
10 12 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
11 13 | B::Data: Send,
|
12 14 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
13 15 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
14 16 | {
|
17 + | /* ServerHttpBoundProtocolGenerator.kt:399 */
|
15 18 | Ok({
|
19 + | /* RustType.kt:516 */
|
16 20 | #[allow(unused_mut)]
|
21 + | /* ServerHttpBoundProtocolGenerator.kt:723 */
|
17 22 | let mut input = crate::input::get_snapshot_block_input_internal::Builder::default();
|
23 + | /* RustType.kt:516 */
|
18 24 | #[allow(unused_variables)]
|
25 + | /* ServerHttpBoundProtocolGenerator.kt:728 */
|
19 26 | let ::aws_smithy_runtime_api::http::RequestParts {
|
20 27 | uri, headers, body, ..
|
21 28 | } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
|
29 + | /* ServerHttpBoundProtocolGenerator.kt:986 */
|
22 30 | let input_string = uri.path();
|
31 + | /* ServerHttpBoundProtocolGenerator.kt:998 */
|
23 32 | let (input_string, (_, m1, _, m3)) =
|
24 33 | ::nom::sequence::tuple::<_, _, ::nom::error::Error<&str>, _>((
|
25 34 | ::nom::sequence::preceded(
|
26 35 | ::nom::bytes::complete::tag("/"),
|
27 36 | ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>("snapshots"),
|
28 37 | ),
|
29 38 | ::nom::sequence::preceded(
|
30 39 | ::nom::bytes::complete::tag("/"),
|
31 40 | ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
|
32 41 | ::nom::bytes::complete::take_until("/"),
|
33 42 | ::nom::combinator::rest,
|
34 43 | )),
|
35 44 | ),
|
36 45 | ::nom::sequence::preceded(
|
37 46 | ::nom::bytes::complete::tag("/"),
|
38 47 | ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>("blocks"),
|
39 48 | ),
|
40 49 | ::nom::sequence::preceded(
|
41 50 | ::nom::bytes::complete::tag("/"),
|
42 51 | ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
|
43 52 | ::nom::bytes::complete::take_until("/"),
|
44 53 | ::nom::combinator::rest,
|
45 54 | )),
|
46 55 | ),
|
47 56 | ))(input_string)?;
|
48 57 | debug_assert_eq!("", input_string);
|
58 + | /* ServerHttpBoundProtocolGenerator.kt:1009 */
|
49 59 | input = input.set_snapshot_id(
|
50 60 | crate::protocol_serde::shape_get_snapshot_block_input::de_snapshot_id(m1)?,
|
51 61 | );
|
62 + | /* ServerHttpBoundProtocolGenerator.kt:1009 */
|
52 63 | input = input.set_block_index(
|
53 64 | crate::protocol_serde::shape_get_snapshot_block_input::de_block_index(m3)?,
|
54 65 | );
|
66 + | /* ServerHttpBoundProtocolGenerator.kt:1073 */
|
55 67 | let query_string = uri.query().unwrap_or("");
|
56 68 | let pairs = ::form_urlencoded::parse(query_string.as_bytes());
|
69 + | /* ServerHttpBoundProtocolGenerator.kt:1099 */
|
57 70 | let mut block_token_seen = false;
|
71 + | /* ServerHttpBoundProtocolGenerator.kt:1105 */
|
58 72 | for (k, v) in pairs {
|
73 + | /* ServerHttpBoundProtocolGenerator.kt:1109 */
|
59 74 | if !block_token_seen && k == "blockToken" {
|
60 75 | input = input.set_block_token(
|
61 76 | crate::protocol_serde::shape_get_snapshot_block_input::de_block_token(&v)?,
|
62 77 | );
|
63 78 | block_token_seen = true;
|
64 79 | }
|
80 + | /* ServerHttpBoundProtocolGenerator.kt:1105 */
|
65 81 | }
|
82 + | /* ServerHttpBoundProtocolGenerator.kt:834 */
|
66 83 | input.build()?
|
84 + | /* ServerHttpBoundProtocolGenerator.kt:399 */
|
67 85 | })
|
86 + | /* ServerHttpBoundProtocolGenerator.kt:383 */
|
68 87 | }
|
69 88 |
|
89 + | /* RustType.kt:516 */
|
70 90 | #[allow(clippy::unnecessary_wraps)]
|
91 + | /* ServerHttpBoundProtocolGenerator.kt:421 */
|
71 92 | pub fn ser_get_snapshot_block_http_response(
|
72 93 | #[allow(unused_variables)] output: crate::output::GetSnapshotBlockOutput,
|
73 94 | ) -> std::result::Result<
|
74 95 | ::aws_smithy_http_server::response::Response,
|
75 96 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
|
76 97 | > {
|
98 + | /* ServerHttpBoundProtocolGenerator.kt:433 */
|
77 99 | Ok({
|
100 + | /* RustType.kt:516 */
|
78 101 | #[allow(unused_mut)]
|
102 + | /* ServerHttpBoundProtocolGenerator.kt:523 */
|
79 103 | let mut builder = ::http::Response::builder();
|
104 + | /* ServerHttpBoundProtocolGenerator.kt:629 */
|
80 105 | builder = crate::protocol_serde::shape_get_snapshot_block::ser_get_snapshot_block_headers(
|
81 106 | &output, builder,
|
82 107 | )?;
|
108 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
83 109 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
84 110 | builder,
|
85 111 | ::http::header::CONTENT_TYPE,
|
86 112 | "application/octet-stream",
|
87 113 | );
|
114 + | /* ServerHttpBoundProtocolGenerator.kt:682 */
|
88 115 | let http_status: u16 = 200;
|
89 116 | builder = builder.status(http_status);
|
117 + | /* ServerHttpBoundProtocolGenerator.kt:543 */
|
90 118 | let body = ::aws_smithy_http_server::body::boxed(::aws_smithy_http_server::body::Body::wrap_stream(
|
91 - | crate::protocol_serde::shape_get_snapshot_block_output::ser_block_data_http_payload( output.block_data)?
|
92 - | ));
|
119 + | /* HttpBoundProtocolPayloadGenerator.kt:350 */crate::protocol_serde::shape_get_snapshot_block_output::ser_block_data_http_payload( output.block_data)?
|
120 + | /* ServerHttpBoundProtocolGenerator.kt:543 */));
|
121 + | /* ServerHttpBoundProtocolGenerator.kt:575 */
|
93 122 | builder.body(body)?
|
123 + | /* ServerHttpBoundProtocolGenerator.kt:433 */
|
94 124 | })
|
125 + | /* ServerHttpBoundProtocolGenerator.kt:421 */
|
95 126 | }
|
96 127 |
|
128 + | /* RustType.kt:516 */
|
97 129 | #[allow(clippy::unnecessary_wraps)]
|
130 + | /* ServerHttpBoundProtocolGenerator.kt:447 */
|
98 131 | pub fn ser_get_snapshot_block_http_error(
|
99 132 | error: &crate::error::GetSnapshotBlockError,
|
100 133 | ) -> std::result::Result<
|
101 134 | ::aws_smithy_http_server::response::Response,
|
102 135 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
|
103 136 | > {
|
137 + | /* ServerHttpBoundProtocolGenerator.kt:452 */
|
104 138 | Ok({
|
139 + | /* ServerHttpBoundProtocolGenerator.kt:468 */
|
105 140 | match error {
|
141 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
106 142 | crate::error::GetSnapshotBlockError::InternalServerException(output) => {
|
143 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
107 144 | let payload = crate::protocol_serde::shape_internal_server_exception::ser_internal_server_exception_error(output)?;
|
145 + | /* RustType.kt:516 */
|
108 146 | #[allow(unused_mut)]
|
147 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
109 148 | let mut builder = ::http::Response::builder();
|
149 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
110 150 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
111 151 | builder,
|
112 152 | ::http::header::CONTENT_TYPE,
|
113 153 | "application/octet-stream",
|
114 154 | );
|
155 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
115 156 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
116 157 | builder,
|
117 158 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
118 159 | "InternalServerException",
|
119 160 | );
|
161 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
120 162 | let content_length = payload.len();
|
121 163 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
122 164 | builder,
|
123 165 | ::http::header::CONTENT_LENGTH,
|
124 166 | content_length,
|
125 167 | );
|
168 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
126 169 | builder
|
127 170 | .status(500)
|
128 171 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
172 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
129 173 | }
|
174 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
130 175 | crate::error::GetSnapshotBlockError::ResourceNotFoundException(output) => {
|
176 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
131 177 | let payload = crate::protocol_serde::shape_resource_not_found_exception::ser_resource_not_found_exception_error(output)?;
|
178 + | /* RustType.kt:516 */
|
132 179 | #[allow(unused_mut)]
|
180 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
133 181 | let mut builder = ::http::Response::builder();
|
182 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
134 183 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
135 184 | builder,
|
136 185 | ::http::header::CONTENT_TYPE,
|
137 186 | "application/octet-stream",
|
138 187 | );
|
188 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
139 189 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
140 190 | builder,
|
141 191 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
142 192 | "ResourceNotFoundException",
|
143 193 | );
|
194 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
144 195 | let content_length = payload.len();
|
145 196 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
146 197 | builder,
|
147 198 | ::http::header::CONTENT_LENGTH,
|
148 199 | content_length,
|
149 200 | );
|
201 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
150 202 | builder
|
151 203 | .status(404)
|
152 204 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
205 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
153 206 | }
|
207 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
154 208 | crate::error::GetSnapshotBlockError::AccessDeniedException(output) => {
|
209 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
155 210 | let payload = crate::protocol_serde::shape_access_denied_exception::ser_access_denied_exception_error(output)?;
|
211 + | /* RustType.kt:516 */
|
156 212 | #[allow(unused_mut)]
|
213 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
157 214 | let mut builder = ::http::Response::builder();
|
215 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
158 216 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
159 217 | builder,
|
160 218 | ::http::header::CONTENT_TYPE,
|
161 219 | "application/octet-stream",
|
162 220 | );
|
221 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
163 222 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
164 223 | builder,
|
165 224 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
166 225 | "AccessDeniedException",
|
167 226 | );
|
227 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
168 228 | let content_length = payload.len();
|
169 229 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
170 230 | builder,
|
171 231 | ::http::header::CONTENT_LENGTH,
|
172 232 | content_length,
|
173 233 | );
|
234 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
174 235 | builder
|
175 236 | .status(403)
|
176 237 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
238 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
177 239 | }
|
240 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
178 241 | crate::error::GetSnapshotBlockError::RequestThrottledException(output) => {
|
242 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
179 243 | let payload = crate::protocol_serde::shape_request_throttled_exception::ser_request_throttled_exception_error(output)?;
|
244 + | /* RustType.kt:516 */
|
180 245 | #[allow(unused_mut)]
|
246 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
181 247 | let mut builder = ::http::Response::builder();
|
248 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
182 249 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
183 250 | builder,
|
184 251 | ::http::header::CONTENT_TYPE,
|
185 252 | "application/octet-stream",
|
186 253 | );
|
254 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
187 255 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
188 256 | builder,
|
189 257 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
190 258 | "RequestThrottledException",
|
191 259 | );
|
260 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
192 261 | let content_length = payload.len();
|
193 262 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
194 263 | builder,
|
195 264 | ::http::header::CONTENT_LENGTH,
|
196 265 | content_length,
|
197 266 | );
|
267 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
198 268 | builder
|
199 269 | .status(400)
|
200 270 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
271 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
201 272 | }
|
273 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
202 274 | crate::error::GetSnapshotBlockError::ServiceQuotaExceededException(output) => {
|
275 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
203 276 | let payload = crate::protocol_serde::shape_service_quota_exceeded_exception::ser_service_quota_exceeded_exception_error(output)?;
|
277 + | /* RustType.kt:516 */
|
204 278 | #[allow(unused_mut)]
|
279 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
205 280 | let mut builder = ::http::Response::builder();
|
281 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
206 282 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
207 283 | builder,
|
208 284 | ::http::header::CONTENT_TYPE,
|
209 285 | "application/octet-stream",
|
210 286 | );
|
287 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
211 288 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
212 289 | builder,
|
213 290 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
214 291 | "ServiceQuotaExceededException",
|
215 292 | );
|
293 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
216 294 | let content_length = payload.len();
|
217 295 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
218 296 | builder,
|
219 297 | ::http::header::CONTENT_LENGTH,
|
220 298 | content_length,
|
221 299 | );
|
300 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
222 301 | builder
|
223 302 | .status(402)
|
224 303 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
304 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
225 305 | }
|
306 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
226 307 | crate::error::GetSnapshotBlockError::ValidationException(output) => {
|
308 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
227 309 | let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
|
310 + | /* RustType.kt:516 */
|
228 311 | #[allow(unused_mut)]
|
312 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
229 313 | let mut builder = ::http::Response::builder();
|
314 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
230 315 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
231 316 | builder,
|
232 317 | ::http::header::CONTENT_TYPE,
|
233 318 | "application/octet-stream",
|
234 319 | );
|
320 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
235 321 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
236 322 | builder,
|
237 323 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
238 324 | "ValidationException",
|
239 325 | );
|
326 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
240 327 | let content_length = payload.len();
|
241 328 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
242 329 | builder,
|
243 330 | ::http::header::CONTENT_LENGTH,
|
244 331 | content_length,
|
245 332 | );
|
333 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
246 334 | builder
|
247 335 | .status(400)
|
248 336 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
337 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
249 338 | }
|
339 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
250 340 | crate::error::GetSnapshotBlockError::InternalServerError(output) => {
|
341 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
251 342 | let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
|
343 + | /* RustType.kt:516 */
|
252 344 | #[allow(unused_mut)]
|
345 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
253 346 | let mut builder = ::http::Response::builder();
|
347 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
254 348 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
255 349 | builder,
|
256 350 | ::http::header::CONTENT_TYPE,
|
257 351 | "application/octet-stream",
|
258 352 | );
|
353 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
259 354 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
260 355 | builder,
|
261 356 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
262 357 | "InternalServerError",
|
263 358 | );
|
359 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
264 360 | let content_length = payload.len();
|
265 361 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
266 362 | builder,
|
267 363 | ::http::header::CONTENT_LENGTH,
|
268 364 | content_length,
|
269 365 | );
|
366 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
270 367 | builder
|
271 368 | .status(500)
|
272 369 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
370 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
371 + | } /* ServerHttpBoundProtocolGenerator.kt:468 */
|
273 372 | }
|
274 - | }
|
373 + | /* ServerHttpBoundProtocolGenerator.kt:452 */
|
275 374 | })
|
375 + | /* ServerHttpBoundProtocolGenerator.kt:447 */
|
276 376 | }
|
277 377 |
|
378 + | /* HttpBindingGenerator.kt:542 */
|
278 379 | pub fn ser_get_snapshot_block_headers(
|
279 380 | input: &crate::output::GetSnapshotBlockOutput,
|
280 381 | mut builder: ::http::response::Builder,
|
281 382 | ) -> std::result::Result<::http::response::Builder, ::aws_smithy_types::error::operation::BuildError>
|
282 383 | {
|
384 + | /* HttpBindingGenerator.kt:592 */
|
283 385 | if let ::std::option::Option::Some(inner_1) = &input.data_length {
|
386 + | /* HttpBindingGenerator.kt:690 */
|
284 387 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_1);
|
388 + | /* HttpBindingGenerator.kt:704 */
|
285 389 | let formatted_2 = encoder.encode();
|
390 + | /* HttpBindingGenerator.kt:705 */
|
286 391 | if !formatted_2.is_empty() {
|
392 + | /* HttpBindingGenerator.kt:706 */
|
287 393 | let header_value = formatted_2;
|
288 394 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
289 395 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
290 396 | "data_length",
|
291 397 | format!(
|
292 398 | "`{}` cannot be used as a header value: {}",
|
293 399 | &header_value, err
|
294 400 | ),
|
295 401 | )
|
296 402 | })?;
|
297 403 | builder = builder.header("x-amz-Data-Length", header_value);
|
404 + | /* HttpBindingGenerator.kt:705 */
|
298 405 | }
|
406 + | /* HttpBindingGenerator.kt:592 */
|
299 407 | }
|
408 + | /* HttpBindingGenerator.kt:592 */
|
300 409 | if let ::std::option::Option::Some(inner_3) = &input.checksum_algorithm {
|
410 + | /* HttpBindingGenerator.kt:704 */
|
301 411 | let formatted_4 = inner_3.as_str();
|
412 + | /* HttpBindingGenerator.kt:705 */
|
302 413 | if !formatted_4.is_empty() {
|
414 + | /* HttpBindingGenerator.kt:706 */
|
303 415 | let header_value = formatted_4;
|
304 416 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
305 417 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
306 418 | "checksum_algorithm",
|
307 419 | format!(
|
308 420 | "`{}` cannot be used as a header value: {}",
|
309 421 | &header_value, err
|
310 422 | ),
|
311 423 | )
|
312 424 | })?;
|
313 425 | builder = builder.header("x-amz-Checksum-Algorithm", header_value);
|
426 + | /* HttpBindingGenerator.kt:705 */
|
314 427 | }
|
428 + | /* HttpBindingGenerator.kt:592 */
|
315 429 | }
|
430 + | /* HttpBindingGenerator.kt:592 */
|
316 431 | if let ::std::option::Option::Some(inner_5) = &input.checksum {
|
432 + | /* HttpBindingGenerator.kt:704 */
|
317 433 | let formatted_6 = inner_5.as_str();
|
434 + | /* HttpBindingGenerator.kt:705 */
|
318 435 | if !formatted_6.is_empty() {
|
436 + | /* HttpBindingGenerator.kt:706 */
|
319 437 | let header_value = formatted_6;
|
320 438 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
321 439 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
322 440 | "checksum",
|
323 441 | format!(
|
324 442 | "`{}` cannot be used as a header value: {}",
|
325 443 | &header_value, err
|
326 444 | ),
|
327 445 | )
|
328 446 | })?;
|
329 447 | builder = builder.header("x-amz-Checksum", header_value);
|
448 + | /* HttpBindingGenerator.kt:705 */
|
330 449 | }
|
450 + | /* HttpBindingGenerator.kt:592 */
|
331 451 | }
|
452 + | /* HttpBindingGenerator.kt:555 */
|
332 453 | Ok(builder)
|
454 + | /* HttpBindingGenerator.kt:542 */
|
333 455 | }
|