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 + | /* ProtocolParserGenerator.kt:99 */
|
3 5 | pub fn de_input_and_output_with_headers_http_error(
|
4 6 | _response_status: u16,
|
5 7 | _response_headers: &::aws_smithy_runtime_api::http::Headers,
|
6 8 | _response_body: &[u8],
|
7 9 | ) -> std::result::Result<
|
8 10 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput,
|
9 11 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError,
|
10 12 | > {
|
13 + | /* RustType.kt:516 */
|
11 14 | #[allow(unused_mut)]
|
15 + | /* ProtocolParserGenerator.kt:106 */
|
12 16 | let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
|
13 17 | .map_err(crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled)?;
|
18 + | /* ProtocolParserGenerator.kt:120 */
|
14 19 | let generic = generic_builder.build();
|
20 + | /* ProtocolParserGenerator.kt:185 */
|
15 21 | Err(crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::generic(
|
16 22 | generic,
|
17 23 | ))
|
24 + | /* ProtocolParserGenerator.kt:99 */
|
18 25 | }
|
19 26 |
|
27 + | /* RustType.kt:516 */
|
20 28 | #[allow(clippy::unnecessary_wraps)]
|
29 + | /* ProtocolParserGenerator.kt:71 */
|
21 30 | pub fn de_input_and_output_with_headers_http_response(
|
22 31 | _response_status: u16,
|
23 32 | _response_headers: &::aws_smithy_runtime_api::http::Headers,
|
24 33 | _response_body: &[u8],
|
25 34 | ) -> std::result::Result<
|
26 35 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput,
|
27 36 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError,
|
28 37 | > {
|
38 + | /* ProtocolParserGenerator.kt:77 */
|
29 39 | Ok({
|
40 + | /* RustType.kt:516 */
|
30 41 | #[allow(unused_mut)]
|
42 + | /* ProtocolParserGenerator.kt:240 */
|
31 43 | let mut output = crate::operation::input_and_output_with_headers::builders::InputAndOutputWithHeadersOutputBuilder::default();
|
44 + | /* ProtocolParserGenerator.kt:267 */
|
32 45 | output = output.set_header_boolean_list(
|
46 + | /* ProtocolParserGenerator.kt:302 */
|
33 47 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_boolean_list_header(_response_headers).map_err(|_| {
|
34 48 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
35 49 | "Failed to parse headerBooleanList from header `X-BooleanList",
|
36 50 | )
|
37 - | })?,
|
51 + | })?, /* ProtocolParserGenerator.kt:267 */
|
38 52 | );
|
53 + | /* ProtocolParserGenerator.kt:267 */
|
39 54 | output = output.set_header_byte(
|
55 + | /* ProtocolParserGenerator.kt:302 */
|
40 56 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_byte_header(_response_headers).map_err(|_| {
|
41 57 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
42 58 | "Failed to parse headerByte from header `X-Byte",
|
43 59 | )
|
44 - | })?,
|
60 + | })?, /* ProtocolParserGenerator.kt:267 */
|
45 61 | );
|
62 + | /* ProtocolParserGenerator.kt:267 */
|
46 63 | output = output.set_header_double(
|
64 + | /* ProtocolParserGenerator.kt:302 */
|
47 65 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_double_header(_response_headers).map_err(|_| {
|
48 66 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
49 67 | "Failed to parse headerDouble from header `X-Double",
|
50 68 | )
|
51 - | })?,
|
69 + | })?, /* ProtocolParserGenerator.kt:267 */
|
52 70 | );
|
71 + | /* ProtocolParserGenerator.kt:267 */
|
53 72 | output = output.set_header_enum(
|
73 + | /* ProtocolParserGenerator.kt:302 */
|
54 74 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_enum_header(_response_headers).map_err(|_| {
|
55 75 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
56 76 | "Failed to parse headerEnum from header `X-Enum",
|
57 77 | )
|
58 - | })?,
|
78 + | })?, /* ProtocolParserGenerator.kt:267 */
|
59 79 | );
|
80 + | /* ProtocolParserGenerator.kt:267 */
|
60 81 | output = output.set_header_enum_list(
|
82 + | /* ProtocolParserGenerator.kt:302 */
|
61 83 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_enum_list_header(_response_headers).map_err(|_| {
|
62 84 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
63 85 | "Failed to parse headerEnumList from header `X-EnumList",
|
64 86 | )
|
65 - | })?,
|
87 + | })?, /* ProtocolParserGenerator.kt:267 */
|
66 88 | );
|
89 + | /* ProtocolParserGenerator.kt:267 */
|
67 90 | output = output.set_header_false_bool(
|
91 + | /* ProtocolParserGenerator.kt:302 */
|
68 92 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_false_bool_header(_response_headers).map_err(|_| {
|
69 93 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
70 94 | "Failed to parse headerFalseBool from header `X-Boolean2",
|
71 95 | )
|
72 - | })?,
|
96 + | })?, /* ProtocolParserGenerator.kt:267 */
|
73 97 | );
|
98 + | /* ProtocolParserGenerator.kt:267 */
|
74 99 | output = output.set_header_float(
|
100 + | /* ProtocolParserGenerator.kt:302 */
|
75 101 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_float_header(_response_headers).map_err(|_| {
|
76 102 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
77 103 | "Failed to parse headerFloat from header `X-Float",
|
78 104 | )
|
79 - | })?,
|
105 + | })?, /* ProtocolParserGenerator.kt:267 */
|
80 106 | );
|
107 + | /* ProtocolParserGenerator.kt:267 */
|
81 108 | output = output.set_header_integer(
|
109 + | /* ProtocolParserGenerator.kt:302 */
|
82 110 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_integer_header(_response_headers).map_err(|_| {
|
83 111 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
84 112 | "Failed to parse headerInteger from header `X-Integer",
|
85 113 | )
|
86 - | })?,
|
114 + | })?, /* ProtocolParserGenerator.kt:267 */
|
87 115 | );
|
116 + | /* ProtocolParserGenerator.kt:267 */
|
88 117 | output = output.set_header_integer_list(
|
118 + | /* ProtocolParserGenerator.kt:302 */
|
89 119 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_integer_list_header(_response_headers).map_err(|_| {
|
90 120 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
91 121 | "Failed to parse headerIntegerList from header `X-IntegerList",
|
92 122 | )
|
93 - | })?,
|
123 + | })?, /* ProtocolParserGenerator.kt:267 */
|
94 124 | );
|
125 + | /* ProtocolParserGenerator.kt:267 */
|
95 126 | output = output.set_header_long(
|
127 + | /* ProtocolParserGenerator.kt:302 */
|
96 128 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_long_header(_response_headers).map_err(|_| {
|
97 129 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
98 130 | "Failed to parse headerLong from header `X-Long",
|
99 131 | )
|
100 - | })?,
|
132 + | })?, /* ProtocolParserGenerator.kt:267 */
|
101 133 | );
|
134 + | /* ProtocolParserGenerator.kt:267 */
|
102 135 | output = output.set_header_short(
|
136 + | /* ProtocolParserGenerator.kt:302 */
|
103 137 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_short_header(_response_headers).map_err(|_| {
|
104 138 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
105 139 | "Failed to parse headerShort from header `X-Short",
|
106 140 | )
|
107 - | })?,
|
141 + | })?, /* ProtocolParserGenerator.kt:267 */
|
108 142 | );
|
143 + | /* ProtocolParserGenerator.kt:267 */
|
109 144 | output = output.set_header_string(
|
145 + | /* ProtocolParserGenerator.kt:302 */
|
110 146 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_string_header(_response_headers).map_err(|_| {
|
111 147 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
112 148 | "Failed to parse headerString from header `X-String",
|
113 149 | )
|
114 - | })?,
|
150 + | })?, /* ProtocolParserGenerator.kt:267 */
|
115 151 | );
|
152 + | /* ProtocolParserGenerator.kt:267 */
|
116 153 | output = output.set_header_string_list(
|
154 + | /* ProtocolParserGenerator.kt:302 */
|
117 155 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_string_list_header(_response_headers).map_err(|_| {
|
118 156 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
119 157 | "Failed to parse headerStringList from header `X-StringList",
|
120 158 | )
|
121 - | })?,
|
159 + | })?, /* ProtocolParserGenerator.kt:267 */
|
122 160 | );
|
161 + | /* ProtocolParserGenerator.kt:267 */
|
123 162 | output = output.set_header_string_set(
|
163 + | /* ProtocolParserGenerator.kt:302 */
|
124 164 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_string_set_header(_response_headers).map_err(|_| {
|
125 165 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
126 166 | "Failed to parse headerStringSet from header `X-StringSet",
|
127 167 | )
|
128 - | })?,
|
168 + | })?, /* ProtocolParserGenerator.kt:267 */
|
129 169 | );
|
170 + | /* ProtocolParserGenerator.kt:267 */
|
130 171 | output = output.set_header_timestamp_list(
|
172 + | /* ProtocolParserGenerator.kt:302 */
|
131 173 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_timestamp_list_header(_response_headers).map_err(|_| {
|
132 174 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
133 175 | "Failed to parse headerTimestampList from header `X-TimestampList",
|
134 176 | )
|
135 - | })?,
|
177 + | })?, /* ProtocolParserGenerator.kt:267 */
|
136 178 | );
|
179 + | /* ProtocolParserGenerator.kt:267 */
|
137 180 | output = output.set_header_true_bool(
|
181 + | /* ProtocolParserGenerator.kt:302 */
|
138 182 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_true_bool_header(_response_headers).map_err(|_| {
|
139 183 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
140 184 | "Failed to parse headerTrueBool from header `X-Boolean1",
|
141 185 | )
|
142 - | })?,
|
186 + | })?, /* ProtocolParserGenerator.kt:267 */
|
143 187 | );
|
188 + | /* ClientBuilderInstantiator.kt:56 */
|
144 189 | output.build()
|
190 + | /* ProtocolParserGenerator.kt:77 */
|
145 191 | })
|
192 + | /* ProtocolParserGenerator.kt:71 */
|
146 193 | }
|
147 194 |
|
195 + | /* HttpBindingGenerator.kt:542 */
|
148 196 | pub fn ser_input_and_output_with_headers_headers(
|
149 197 | input: &crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersInput,
|
150 198 | mut builder: ::http::request::Builder,
|
151 199 | ) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
200 + | /* HttpBindingGenerator.kt:592 */
|
152 201 | if let ::std::option::Option::Some(inner_1) = &input.header_string {
|
202 + | /* HttpBindingGenerator.kt:704 */
|
153 203 | let formatted_2 = inner_1.as_str();
|
204 + | /* HttpBindingGenerator.kt:706 */
|
154 205 | let header_value = formatted_2;
|
155 206 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
156 207 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
157 208 | "header_string",
|
158 209 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
159 210 | )
|
160 211 | })?;
|
161 212 | builder = builder.header("X-String", header_value);
|
213 + | /* HttpBindingGenerator.kt:592 */
|
162 214 | }
|
215 + | /* HttpBindingGenerator.kt:592 */
|
163 216 | if let ::std::option::Option::Some(inner_3) = &input.header_byte {
|
217 + | /* HttpBindingGenerator.kt:690 */
|
164 218 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_3);
|
219 + | /* HttpBindingGenerator.kt:704 */
|
165 220 | let formatted_4 = encoder.encode();
|
221 + | /* HttpBindingGenerator.kt:706 */
|
166 222 | let header_value = formatted_4;
|
167 223 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
168 224 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
169 225 | "header_byte",
|
170 226 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
171 227 | )
|
172 228 | })?;
|
173 229 | builder = builder.header("X-Byte", header_value);
|
230 + | /* HttpBindingGenerator.kt:592 */
|
174 231 | }
|
232 + | /* HttpBindingGenerator.kt:592 */
|
175 233 | if let ::std::option::Option::Some(inner_5) = &input.header_short {
|
234 + | /* HttpBindingGenerator.kt:690 */
|
176 235 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_5);
|
236 + | /* HttpBindingGenerator.kt:704 */
|
177 237 | let formatted_6 = encoder.encode();
|
238 + | /* HttpBindingGenerator.kt:706 */
|
178 239 | let header_value = formatted_6;
|
179 240 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
180 241 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
181 242 | "header_short",
|
182 243 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
183 244 | )
|
184 245 | })?;
|
185 246 | builder = builder.header("X-Short", header_value);
|
247 + | /* HttpBindingGenerator.kt:592 */
|
186 248 | }
|
249 + | /* HttpBindingGenerator.kt:592 */
|
187 250 | if let ::std::option::Option::Some(inner_7) = &input.header_integer {
|
251 + | /* HttpBindingGenerator.kt:690 */
|
188 252 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_7);
|
253 + | /* HttpBindingGenerator.kt:704 */
|
189 254 | let formatted_8 = encoder.encode();
|
255 + | /* HttpBindingGenerator.kt:706 */
|
190 256 | let header_value = formatted_8;
|
191 257 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
192 258 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
193 259 | "header_integer",
|
194 260 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
195 261 | )
|
196 262 | })?;
|
197 263 | builder = builder.header("X-Integer", header_value);
|
264 + | /* HttpBindingGenerator.kt:592 */
|
198 265 | }
|
266 + | /* HttpBindingGenerator.kt:592 */
|
199 267 | if let ::std::option::Option::Some(inner_9) = &input.header_long {
|
268 + | /* HttpBindingGenerator.kt:690 */
|
200 269 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_9);
|
270 + | /* HttpBindingGenerator.kt:704 */
|
201 271 | let formatted_10 = encoder.encode();
|
272 + | /* HttpBindingGenerator.kt:706 */
|
202 273 | let header_value = formatted_10;
|
203 274 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
204 275 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
205 276 | "header_long",
|
206 277 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
207 278 | )
|
208 279 | })?;
|
209 280 | builder = builder.header("X-Long", header_value);
|
281 + | /* HttpBindingGenerator.kt:592 */
|
210 282 | }
|
283 + | /* HttpBindingGenerator.kt:592 */
|
211 284 | if let ::std::option::Option::Some(inner_11) = &input.header_float {
|
285 + | /* HttpBindingGenerator.kt:690 */
|
212 286 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_11);
|
287 + | /* HttpBindingGenerator.kt:704 */
|
213 288 | let formatted_12 = encoder.encode();
|
289 + | /* HttpBindingGenerator.kt:706 */
|
214 290 | let header_value = formatted_12;
|
215 291 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
216 292 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
217 293 | "header_float",
|
218 294 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
219 295 | )
|
220 296 | })?;
|
221 297 | builder = builder.header("X-Float", header_value);
|
298 + | /* HttpBindingGenerator.kt:592 */
|
222 299 | }
|
300 + | /* HttpBindingGenerator.kt:592 */
|
223 301 | if let ::std::option::Option::Some(inner_13) = &input.header_double {
|
302 + | /* HttpBindingGenerator.kt:690 */
|
224 303 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_13);
|
304 + | /* HttpBindingGenerator.kt:704 */
|
225 305 | let formatted_14 = encoder.encode();
|
306 + | /* HttpBindingGenerator.kt:706 */
|
226 307 | let header_value = formatted_14;
|
227 308 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
228 309 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
229 310 | "header_double",
|
230 311 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
231 312 | )
|
232 313 | })?;
|
233 314 | builder = builder.header("X-Double", header_value);
|
315 + | /* HttpBindingGenerator.kt:592 */
|
234 316 | }
|
317 + | /* HttpBindingGenerator.kt:592 */
|
235 318 | if let ::std::option::Option::Some(inner_15) = &input.header_true_bool {
|
319 + | /* HttpBindingGenerator.kt:690 */
|
236 320 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_15);
|
321 + | /* HttpBindingGenerator.kt:704 */
|
237 322 | let formatted_16 = encoder.encode();
|
323 + | /* HttpBindingGenerator.kt:706 */
|
238 324 | let header_value = formatted_16;
|
239 325 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
240 326 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
241 327 | "header_true_bool",
|
242 328 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
243 329 | )
|
244 330 | })?;
|
245 331 | builder = builder.header("X-Boolean1", header_value);
|
332 + | /* HttpBindingGenerator.kt:592 */
|
246 333 | }
|
334 + | /* HttpBindingGenerator.kt:592 */
|
247 335 | if let ::std::option::Option::Some(inner_17) = &input.header_false_bool {
|
336 + | /* HttpBindingGenerator.kt:690 */
|
248 337 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_17);
|
338 + | /* HttpBindingGenerator.kt:704 */
|
249 339 | let formatted_18 = encoder.encode();
|
340 + | /* HttpBindingGenerator.kt:706 */
|
250 341 | let header_value = formatted_18;
|
251 342 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
252 343 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
253 344 | "header_false_bool",
|
254 345 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
255 346 | )
|
256 347 | })?;
|
257 348 | builder = builder.header("X-Boolean2", header_value);
|
349 + | /* HttpBindingGenerator.kt:592 */
|
258 350 | }
|
351 + | /* HttpBindingGenerator.kt:592 */
|
259 352 | if let ::std::option::Option::Some(inner_19) = &input.header_string_list {
|
260 - | // Empty vec in header is serialized as an empty string
|
353 + | /* HttpBindingGenerator.kt:638 */// Empty vec in header is serialized as an empty string
|
261 354 | if inner_19.is_empty() {
|
262 355 | builder = builder.header("X-StringList", "");
|
263 356 | } else {
|
357 + | /* HttpBindingGenerator.kt:646 */
|
264 358 | for inner_20 in inner_19 {
|
359 + | /* HttpBindingGenerator.kt:704 */
|
265 360 | let formatted_21 = ::aws_smithy_http::header::quote_header_value(inner_20.as_str());
|
361 + | /* HttpBindingGenerator.kt:706 */
|
266 362 | let header_value = formatted_21;
|
267 363 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
268 364 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
269 365 | "header_string_list",
|
270 366 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
271 367 | )
|
272 368 | })?;
|
273 369 | builder = builder.header("X-StringList", header_value);
|
370 + | /* HttpBindingGenerator.kt:646 */
|
274 371 | }
|
372 + | /* HttpBindingGenerator.kt:638 */
|
275 373 | }
|
374 + | /* HttpBindingGenerator.kt:592 */
|
276 375 | }
|
376 + | /* HttpBindingGenerator.kt:592 */
|
277 377 | if let ::std::option::Option::Some(inner_22) = &input.header_string_set {
|
278 - | // Empty vec in header is serialized as an empty string
|
378 + | /* HttpBindingGenerator.kt:638 */// Empty vec in header is serialized as an empty string
|
279 379 | if inner_22.is_empty() {
|
280 380 | builder = builder.header("X-StringSet", "");
|
281 381 | } else {
|
382 + | /* HttpBindingGenerator.kt:646 */
|
282 383 | for inner_23 in inner_22 {
|
384 + | /* HttpBindingGenerator.kt:704 */
|
283 385 | let formatted_24 = ::aws_smithy_http::header::quote_header_value(inner_23.as_str());
|
386 + | /* HttpBindingGenerator.kt:706 */
|
284 387 | let header_value = formatted_24;
|
285 388 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
286 389 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
287 390 | "header_string_set",
|
288 391 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
289 392 | )
|
290 393 | })?;
|
291 394 | builder = builder.header("X-StringSet", header_value);
|
395 + | /* HttpBindingGenerator.kt:646 */
|
292 396 | }
|
397 + | /* HttpBindingGenerator.kt:638 */
|
293 398 | }
|
399 + | /* HttpBindingGenerator.kt:592 */
|
294 400 | }
|
401 + | /* HttpBindingGenerator.kt:592 */
|
295 402 | if let ::std::option::Option::Some(inner_25) = &input.header_integer_list {
|
296 - | // Empty vec in header is serialized as an empty string
|
403 + | /* HttpBindingGenerator.kt:638 */// Empty vec in header is serialized as an empty string
|
297 404 | if inner_25.is_empty() {
|
298 405 | builder = builder.header("X-IntegerList", "");
|
299 406 | } else {
|
407 + | /* HttpBindingGenerator.kt:646 */
|
300 408 | for inner_26 in inner_25 {
|
409 + | /* HttpBindingGenerator.kt:690 */
|
301 410 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_26);
|
411 + | /* HttpBindingGenerator.kt:704 */
|
302 412 | let formatted_27 = encoder.encode();
|
413 + | /* HttpBindingGenerator.kt:706 */
|
303 414 | let header_value = formatted_27;
|
304 415 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
305 416 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
306 417 | "header_integer_list",
|
307 418 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
308 419 | )
|
309 420 | })?;
|
310 421 | builder = builder.header("X-IntegerList", header_value);
|
422 + | /* HttpBindingGenerator.kt:646 */
|
311 423 | }
|
424 + | /* HttpBindingGenerator.kt:638 */
|
312 425 | }
|
426 + | /* HttpBindingGenerator.kt:592 */
|
313 427 | }
|
428 + | /* HttpBindingGenerator.kt:592 */
|
314 429 | if let ::std::option::Option::Some(inner_28) = &input.header_boolean_list {
|
315 - | // Empty vec in header is serialized as an empty string
|
430 + | /* HttpBindingGenerator.kt:638 */// Empty vec in header is serialized as an empty string
|
316 431 | if inner_28.is_empty() {
|
317 432 | builder = builder.header("X-BooleanList", "");
|
318 433 | } else {
|
434 + | /* HttpBindingGenerator.kt:646 */
|
319 435 | for inner_29 in inner_28 {
|
436 + | /* HttpBindingGenerator.kt:690 */
|
320 437 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_29);
|
438 + | /* HttpBindingGenerator.kt:704 */
|
321 439 | let formatted_30 = encoder.encode();
|
440 + | /* HttpBindingGenerator.kt:706 */
|
322 441 | let header_value = formatted_30;
|
323 442 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
324 443 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
325 444 | "header_boolean_list",
|
326 445 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
327 446 | )
|
328 447 | })?;
|
329 448 | builder = builder.header("X-BooleanList", header_value);
|
449 + | /* HttpBindingGenerator.kt:646 */
|
330 450 | }
|
451 + | /* HttpBindingGenerator.kt:638 */
|
331 452 | }
|
453 + | /* HttpBindingGenerator.kt:592 */
|
332 454 | }
|
455 + | /* HttpBindingGenerator.kt:592 */
|
333 456 | if let ::std::option::Option::Some(inner_31) = &input.header_timestamp_list {
|
334 - | // Empty vec in header is serialized as an empty string
|
457 + | /* HttpBindingGenerator.kt:638 */// Empty vec in header is serialized as an empty string
|
335 458 | if inner_31.is_empty() {
|
336 459 | builder = builder.header("X-TimestampList", "");
|
337 460 | } else {
|
461 + | /* HttpBindingGenerator.kt:646 */
|
338 462 | for inner_32 in inner_31 {
|
463 + | /* HttpBindingGenerator.kt:704 */
|
339 464 | let formatted_33 = inner_32.fmt(::aws_smithy_types::date_time::Format::HttpDate)?;
|
465 + | /* HttpBindingGenerator.kt:706 */
|
340 466 | let header_value = formatted_33;
|
341 467 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
342 468 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
343 469 | "header_timestamp_list",
|
344 470 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
345 471 | )
|
346 472 | })?;
|
347 473 | builder = builder.header("X-TimestampList", header_value);
|
474 + | /* HttpBindingGenerator.kt:646 */
|
348 475 | }
|
476 + | /* HttpBindingGenerator.kt:638 */
|
349 477 | }
|
478 + | /* HttpBindingGenerator.kt:592 */
|
350 479 | }
|
480 + | /* HttpBindingGenerator.kt:592 */
|
351 481 | if let ::std::option::Option::Some(inner_34) = &input.header_enum {
|
482 + | /* HttpBindingGenerator.kt:704 */
|
352 483 | let formatted_35 = inner_34.as_str();
|
484 + | /* HttpBindingGenerator.kt:706 */
|
353 485 | let header_value = formatted_35;
|
354 486 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
355 487 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
356 488 | "header_enum",
|
357 489 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
358 490 | )
|
359 491 | })?;
|
360 492 | builder = builder.header("X-Enum", header_value);
|
493 + | /* HttpBindingGenerator.kt:592 */
|
361 494 | }
|
495 + | /* HttpBindingGenerator.kt:592 */
|
362 496 | if let ::std::option::Option::Some(inner_36) = &input.header_enum_list {
|
363 - | // Empty vec in header is serialized as an empty string
|
497 + | /* HttpBindingGenerator.kt:638 */// Empty vec in header is serialized as an empty string
|
364 498 | if inner_36.is_empty() {
|
365 499 | builder = builder.header("X-EnumList", "");
|
366 500 | } else {
|
501 + | /* HttpBindingGenerator.kt:646 */
|
367 502 | for inner_37 in inner_36 {
|
503 + | /* HttpBindingGenerator.kt:704 */
|
368 504 | let formatted_38 = ::aws_smithy_http::header::quote_header_value(inner_37.as_str());
|
505 + | /* HttpBindingGenerator.kt:706 */
|
369 506 | let header_value = formatted_38;
|
370 507 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
371 508 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
372 509 | "header_enum_list",
|
373 510 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
374 511 | )
|
375 512 | })?;
|
376 513 | builder = builder.header("X-EnumList", header_value);
|
514 + | /* HttpBindingGenerator.kt:646 */
|
377 515 | }
|
516 + | /* HttpBindingGenerator.kt:638 */
|
378 517 | }
|
518 + | /* HttpBindingGenerator.kt:592 */
|
379 519 | }
|
520 + | /* HttpBindingGenerator.kt:555 */
|
380 521 | Ok(builder)
|
522 + | /* HttpBindingGenerator.kt:542 */
|
381 523 | }
|