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_enum(
|
118 + | /* ProtocolParserGenerator.kt:302 */
|
89 119 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_integer_enum_header(_response_headers).map_err(|_| {
|
90 120 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
91 121 | "Failed to parse headerIntegerEnum from header `X-IntegerEnum",
|
92 122 | )
|
93 - | })?,
|
123 + | })?, /* ProtocolParserGenerator.kt:267 */
|
94 124 | );
|
125 + | /* ProtocolParserGenerator.kt:267 */
|
95 126 | output = output.set_header_integer_enum_list(
|
127 + | /* ProtocolParserGenerator.kt:302 */
|
96 128 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_integer_enum_list_header(_response_headers).map_err(
|
97 129 | |_| {
|
98 130 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
99 131 | "Failed to parse headerIntegerEnumList from header `X-IntegerEnumList",
|
100 132 | )
|
101 133 | },
|
102 - | )?,
|
134 + | )?, /* ProtocolParserGenerator.kt:267 */
|
103 135 | );
|
136 + | /* ProtocolParserGenerator.kt:267 */
|
104 137 | output = output.set_header_integer_list(
|
138 + | /* ProtocolParserGenerator.kt:302 */
|
105 139 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_integer_list_header(_response_headers).map_err(|_| {
|
106 140 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
107 141 | "Failed to parse headerIntegerList from header `X-IntegerList",
|
108 142 | )
|
109 - | })?,
|
143 + | })?, /* ProtocolParserGenerator.kt:267 */
|
110 144 | );
|
145 + | /* ProtocolParserGenerator.kt:267 */
|
111 146 | output = output.set_header_long(
|
147 + | /* ProtocolParserGenerator.kt:302 */
|
112 148 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_long_header(_response_headers).map_err(|_| {
|
113 149 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
114 150 | "Failed to parse headerLong from header `X-Long",
|
115 151 | )
|
116 - | })?,
|
152 + | })?, /* ProtocolParserGenerator.kt:267 */
|
117 153 | );
|
154 + | /* ProtocolParserGenerator.kt:267 */
|
118 155 | output = output.set_header_short(
|
156 + | /* ProtocolParserGenerator.kt:302 */
|
119 157 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_short_header(_response_headers).map_err(|_| {
|
120 158 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
121 159 | "Failed to parse headerShort from header `X-Short",
|
122 160 | )
|
123 - | })?,
|
161 + | })?, /* ProtocolParserGenerator.kt:267 */
|
124 162 | );
|
163 + | /* ProtocolParserGenerator.kt:267 */
|
125 164 | output = output.set_header_string(
|
165 + | /* ProtocolParserGenerator.kt:302 */
|
126 166 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_string_header(_response_headers).map_err(|_| {
|
127 167 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
128 168 | "Failed to parse headerString from header `X-String",
|
129 169 | )
|
130 - | })?,
|
170 + | })?, /* ProtocolParserGenerator.kt:267 */
|
131 171 | );
|
172 + | /* ProtocolParserGenerator.kt:267 */
|
132 173 | output = output.set_header_string_list(
|
174 + | /* ProtocolParserGenerator.kt:302 */
|
133 175 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_string_list_header(_response_headers).map_err(|_| {
|
134 176 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
135 177 | "Failed to parse headerStringList from header `X-StringList",
|
136 178 | )
|
137 - | })?,
|
179 + | })?, /* ProtocolParserGenerator.kt:267 */
|
138 180 | );
|
181 + | /* ProtocolParserGenerator.kt:267 */
|
139 182 | output = output.set_header_string_set(
|
183 + | /* ProtocolParserGenerator.kt:302 */
|
140 184 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_string_set_header(_response_headers).map_err(|_| {
|
141 185 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
142 186 | "Failed to parse headerStringSet from header `X-StringSet",
|
143 187 | )
|
144 - | })?,
|
188 + | })?, /* ProtocolParserGenerator.kt:267 */
|
145 189 | );
|
190 + | /* ProtocolParserGenerator.kt:267 */
|
146 191 | output = output.set_header_timestamp_list(
|
192 + | /* ProtocolParserGenerator.kt:302 */
|
147 193 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_timestamp_list_header(_response_headers).map_err(|_| {
|
148 194 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
149 195 | "Failed to parse headerTimestampList from header `X-TimestampList",
|
150 196 | )
|
151 - | })?,
|
197 + | })?, /* ProtocolParserGenerator.kt:267 */
|
152 198 | );
|
199 + | /* ProtocolParserGenerator.kt:267 */
|
153 200 | output = output.set_header_true_bool(
|
201 + | /* ProtocolParserGenerator.kt:302 */
|
154 202 | crate::protocol_serde::shape_input_and_output_with_headers_output::de_header_true_bool_header(_response_headers).map_err(|_| {
|
155 203 | crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::unhandled(
|
156 204 | "Failed to parse headerTrueBool from header `X-Boolean1",
|
157 205 | )
|
158 - | })?,
|
206 + | })?, /* ProtocolParserGenerator.kt:267 */
|
159 207 | );
|
208 + | /* ClientBuilderInstantiator.kt:56 */
|
160 209 | output.build()
|
210 + | /* ProtocolParserGenerator.kt:77 */
|
161 211 | })
|
212 + | /* ProtocolParserGenerator.kt:71 */
|
162 213 | }
|
163 214 |
|
215 + | /* HttpBindingGenerator.kt:542 */
|
164 216 | pub fn ser_input_and_output_with_headers_headers(
|
165 217 | input: &crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersInput,
|
166 218 | mut builder: ::http::request::Builder,
|
167 219 | ) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
220 + | /* HttpBindingGenerator.kt:592 */
|
168 221 | if let ::std::option::Option::Some(inner_1) = &input.header_string {
|
222 + | /* HttpBindingGenerator.kt:704 */
|
169 223 | let formatted_2 = inner_1.as_str();
|
224 + | /* HttpBindingGenerator.kt:706 */
|
170 225 | let header_value = formatted_2;
|
171 226 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
172 227 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
173 228 | "header_string",
|
174 229 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
175 230 | )
|
176 231 | })?;
|
177 232 | builder = builder.header("X-String", header_value);
|
233 + | /* HttpBindingGenerator.kt:592 */
|
178 234 | }
|
235 + | /* HttpBindingGenerator.kt:592 */
|
179 236 | if let ::std::option::Option::Some(inner_3) = &input.header_byte {
|
237 + | /* HttpBindingGenerator.kt:690 */
|
180 238 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_3);
|
239 + | /* HttpBindingGenerator.kt:704 */
|
181 240 | let formatted_4 = encoder.encode();
|
241 + | /* HttpBindingGenerator.kt:706 */
|
182 242 | let header_value = formatted_4;
|
183 243 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
184 244 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
185 245 | "header_byte",
|
186 246 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
187 247 | )
|
188 248 | })?;
|
189 249 | builder = builder.header("X-Byte", header_value);
|
250 + | /* HttpBindingGenerator.kt:592 */
|
190 251 | }
|
252 + | /* HttpBindingGenerator.kt:592 */
|
191 253 | if let ::std::option::Option::Some(inner_5) = &input.header_short {
|
254 + | /* HttpBindingGenerator.kt:690 */
|
192 255 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_5);
|
256 + | /* HttpBindingGenerator.kt:704 */
|
193 257 | let formatted_6 = encoder.encode();
|
258 + | /* HttpBindingGenerator.kt:706 */
|
194 259 | let header_value = formatted_6;
|
195 260 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
196 261 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
197 262 | "header_short",
|
198 263 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
199 264 | )
|
200 265 | })?;
|
201 266 | builder = builder.header("X-Short", header_value);
|
267 + | /* HttpBindingGenerator.kt:592 */
|
202 268 | }
|
269 + | /* HttpBindingGenerator.kt:592 */
|
203 270 | if let ::std::option::Option::Some(inner_7) = &input.header_integer {
|
271 + | /* HttpBindingGenerator.kt:690 */
|
204 272 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_7);
|
273 + | /* HttpBindingGenerator.kt:704 */
|
205 274 | let formatted_8 = encoder.encode();
|
275 + | /* HttpBindingGenerator.kt:706 */
|
206 276 | let header_value = formatted_8;
|
207 277 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
208 278 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
209 279 | "header_integer",
|
210 280 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
211 281 | )
|
212 282 | })?;
|
213 283 | builder = builder.header("X-Integer", header_value);
|
284 + | /* HttpBindingGenerator.kt:592 */
|
214 285 | }
|
286 + | /* HttpBindingGenerator.kt:592 */
|
215 287 | if let ::std::option::Option::Some(inner_9) = &input.header_long {
|
288 + | /* HttpBindingGenerator.kt:690 */
|
216 289 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_9);
|
290 + | /* HttpBindingGenerator.kt:704 */
|
217 291 | let formatted_10 = encoder.encode();
|
292 + | /* HttpBindingGenerator.kt:706 */
|
218 293 | let header_value = formatted_10;
|
219 294 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
220 295 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
221 296 | "header_long",
|
222 297 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
223 298 | )
|
224 299 | })?;
|
225 300 | builder = builder.header("X-Long", header_value);
|
301 + | /* HttpBindingGenerator.kt:592 */
|
226 302 | }
|
303 + | /* HttpBindingGenerator.kt:592 */
|
227 304 | if let ::std::option::Option::Some(inner_11) = &input.header_float {
|
305 + | /* HttpBindingGenerator.kt:690 */
|
228 306 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_11);
|
307 + | /* HttpBindingGenerator.kt:704 */
|
229 308 | let formatted_12 = encoder.encode();
|
309 + | /* HttpBindingGenerator.kt:706 */
|
230 310 | let header_value = formatted_12;
|
231 311 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
232 312 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
233 313 | "header_float",
|
234 314 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
235 315 | )
|
236 316 | })?;
|
237 317 | builder = builder.header("X-Float", header_value);
|
318 + | /* HttpBindingGenerator.kt:592 */
|
238 319 | }
|
320 + | /* HttpBindingGenerator.kt:592 */
|
239 321 | if let ::std::option::Option::Some(inner_13) = &input.header_double {
|
322 + | /* HttpBindingGenerator.kt:690 */
|
240 323 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_13);
|
324 + | /* HttpBindingGenerator.kt:704 */
|
241 325 | let formatted_14 = encoder.encode();
|
326 + | /* HttpBindingGenerator.kt:706 */
|
242 327 | let header_value = formatted_14;
|
243 328 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
244 329 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
245 330 | "header_double",
|
246 331 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
247 332 | )
|
248 333 | })?;
|
249 334 | builder = builder.header("X-Double", header_value);
|
335 + | /* HttpBindingGenerator.kt:592 */
|
250 336 | }
|
337 + | /* HttpBindingGenerator.kt:592 */
|
251 338 | if let ::std::option::Option::Some(inner_15) = &input.header_true_bool {
|
339 + | /* HttpBindingGenerator.kt:690 */
|
252 340 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_15);
|
341 + | /* HttpBindingGenerator.kt:704 */
|
253 342 | let formatted_16 = encoder.encode();
|
343 + | /* HttpBindingGenerator.kt:706 */
|
254 344 | let header_value = formatted_16;
|
255 345 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
256 346 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
257 347 | "header_true_bool",
|
258 348 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
259 349 | )
|
260 350 | })?;
|
261 351 | builder = builder.header("X-Boolean1", header_value);
|
352 + | /* HttpBindingGenerator.kt:592 */
|
262 353 | }
|
354 + | /* HttpBindingGenerator.kt:592 */
|
263 355 | if let ::std::option::Option::Some(inner_17) = &input.header_false_bool {
|
356 + | /* HttpBindingGenerator.kt:690 */
|
264 357 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_17);
|
358 + | /* HttpBindingGenerator.kt:704 */
|
265 359 | let formatted_18 = encoder.encode();
|
360 + | /* HttpBindingGenerator.kt:706 */
|
266 361 | let header_value = formatted_18;
|
267 362 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
268 363 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
269 364 | "header_false_bool",
|
270 365 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
271 366 | )
|
272 367 | })?;
|
273 368 | builder = builder.header("X-Boolean2", header_value);
|
369 + | /* HttpBindingGenerator.kt:592 */
|
274 370 | }
|
371 + | /* HttpBindingGenerator.kt:592 */
|
275 372 | if let ::std::option::Option::Some(inner_19) = &input.header_string_list {
|
276 - | // Empty vec in header is serialized as an empty string
|
373 + | /* HttpBindingGenerator.kt:638 */// Empty vec in header is serialized as an empty string
|
277 374 | if inner_19.is_empty() {
|
278 375 | builder = builder.header("X-StringList", "");
|
279 376 | } else {
|
377 + | /* HttpBindingGenerator.kt:646 */
|
280 378 | for inner_20 in inner_19 {
|
379 + | /* HttpBindingGenerator.kt:704 */
|
281 380 | let formatted_21 = ::aws_smithy_http::header::quote_header_value(inner_20.as_str());
|
381 + | /* HttpBindingGenerator.kt:706 */
|
282 382 | let header_value = formatted_21;
|
283 383 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
284 384 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
285 385 | "header_string_list",
|
286 386 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
287 387 | )
|
288 388 | })?;
|
289 389 | builder = builder.header("X-StringList", header_value);
|
390 + | /* HttpBindingGenerator.kt:646 */
|
290 391 | }
|
392 + | /* HttpBindingGenerator.kt:638 */
|
291 393 | }
|
394 + | /* HttpBindingGenerator.kt:592 */
|
292 395 | }
|
396 + | /* HttpBindingGenerator.kt:592 */
|
293 397 | if let ::std::option::Option::Some(inner_22) = &input.header_string_set {
|
294 - | // Empty vec in header is serialized as an empty string
|
398 + | /* HttpBindingGenerator.kt:638 */// Empty vec in header is serialized as an empty string
|
295 399 | if inner_22.is_empty() {
|
296 400 | builder = builder.header("X-StringSet", "");
|
297 401 | } else {
|
402 + | /* HttpBindingGenerator.kt:646 */
|
298 403 | for inner_23 in inner_22 {
|
404 + | /* HttpBindingGenerator.kt:704 */
|
299 405 | let formatted_24 = ::aws_smithy_http::header::quote_header_value(inner_23.as_str());
|
406 + | /* HttpBindingGenerator.kt:706 */
|
300 407 | let header_value = formatted_24;
|
301 408 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
302 409 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
303 410 | "header_string_set",
|
304 411 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
305 412 | )
|
306 413 | })?;
|
307 414 | builder = builder.header("X-StringSet", header_value);
|
415 + | /* HttpBindingGenerator.kt:646 */
|
308 416 | }
|
417 + | /* HttpBindingGenerator.kt:638 */
|
309 418 | }
|
419 + | /* HttpBindingGenerator.kt:592 */
|
310 420 | }
|
421 + | /* HttpBindingGenerator.kt:592 */
|
311 422 | if let ::std::option::Option::Some(inner_25) = &input.header_integer_list {
|
312 - | // Empty vec in header is serialized as an empty string
|
423 + | /* HttpBindingGenerator.kt:638 */// Empty vec in header is serialized as an empty string
|
313 424 | if inner_25.is_empty() {
|
314 425 | builder = builder.header("X-IntegerList", "");
|
315 426 | } else {
|
427 + | /* HttpBindingGenerator.kt:646 */
|
316 428 | for inner_26 in inner_25 {
|
429 + | /* HttpBindingGenerator.kt:690 */
|
317 430 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_26);
|
431 + | /* HttpBindingGenerator.kt:704 */
|
318 432 | let formatted_27 = encoder.encode();
|
433 + | /* HttpBindingGenerator.kt:706 */
|
319 434 | let header_value = formatted_27;
|
320 435 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
321 436 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
322 437 | "header_integer_list",
|
323 438 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
324 439 | )
|
325 440 | })?;
|
326 441 | builder = builder.header("X-IntegerList", header_value);
|
442 + | /* HttpBindingGenerator.kt:646 */
|
327 443 | }
|
444 + | /* HttpBindingGenerator.kt:638 */
|
328 445 | }
|
446 + | /* HttpBindingGenerator.kt:592 */
|
329 447 | }
|
448 + | /* HttpBindingGenerator.kt:592 */
|
330 449 | if let ::std::option::Option::Some(inner_28) = &input.header_boolean_list {
|
331 - | // Empty vec in header is serialized as an empty string
|
450 + | /* HttpBindingGenerator.kt:638 */// Empty vec in header is serialized as an empty string
|
332 451 | if inner_28.is_empty() {
|
333 452 | builder = builder.header("X-BooleanList", "");
|
334 453 | } else {
|
454 + | /* HttpBindingGenerator.kt:646 */
|
335 455 | for inner_29 in inner_28 {
|
456 + | /* HttpBindingGenerator.kt:690 */
|
336 457 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_29);
|
458 + | /* HttpBindingGenerator.kt:704 */
|
337 459 | let formatted_30 = encoder.encode();
|
460 + | /* HttpBindingGenerator.kt:706 */
|
338 461 | let header_value = formatted_30;
|
339 462 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
340 463 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
341 464 | "header_boolean_list",
|
342 465 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
343 466 | )
|
344 467 | })?;
|
345 468 | builder = builder.header("X-BooleanList", header_value);
|
469 + | /* HttpBindingGenerator.kt:646 */
|
346 470 | }
|
471 + | /* HttpBindingGenerator.kt:638 */
|
347 472 | }
|
473 + | /* HttpBindingGenerator.kt:592 */
|
348 474 | }
|
475 + | /* HttpBindingGenerator.kt:592 */
|
349 476 | if let ::std::option::Option::Some(inner_31) = &input.header_timestamp_list {
|
350 - | // Empty vec in header is serialized as an empty string
|
477 + | /* HttpBindingGenerator.kt:638 */// Empty vec in header is serialized as an empty string
|
351 478 | if inner_31.is_empty() {
|
352 479 | builder = builder.header("X-TimestampList", "");
|
353 480 | } else {
|
481 + | /* HttpBindingGenerator.kt:646 */
|
354 482 | for inner_32 in inner_31 {
|
483 + | /* HttpBindingGenerator.kt:704 */
|
355 484 | let formatted_33 = inner_32.fmt(::aws_smithy_types::date_time::Format::HttpDate)?;
|
485 + | /* HttpBindingGenerator.kt:706 */
|
356 486 | let header_value = formatted_33;
|
357 487 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
358 488 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
359 489 | "header_timestamp_list",
|
360 490 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
361 491 | )
|
362 492 | })?;
|
363 493 | builder = builder.header("X-TimestampList", header_value);
|
494 + | /* HttpBindingGenerator.kt:646 */
|
364 495 | }
|
496 + | /* HttpBindingGenerator.kt:638 */
|
365 497 | }
|
498 + | /* HttpBindingGenerator.kt:592 */
|
366 499 | }
|
500 + | /* HttpBindingGenerator.kt:592 */
|
367 501 | if let ::std::option::Option::Some(inner_34) = &input.header_enum {
|
502 + | /* HttpBindingGenerator.kt:704 */
|
368 503 | let formatted_35 = inner_34.as_str();
|
504 + | /* HttpBindingGenerator.kt:706 */
|
369 505 | let header_value = formatted_35;
|
370 506 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
371 507 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
372 508 | "header_enum",
|
373 509 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
374 510 | )
|
375 511 | })?;
|
376 512 | builder = builder.header("X-Enum", header_value);
|
513 + | /* HttpBindingGenerator.kt:592 */
|
377 514 | }
|
515 + | /* HttpBindingGenerator.kt:592 */
|
378 516 | if let ::std::option::Option::Some(inner_36) = &input.header_enum_list {
|
379 - | // Empty vec in header is serialized as an empty string
|
517 + | /* HttpBindingGenerator.kt:638 */// Empty vec in header is serialized as an empty string
|
380 518 | if inner_36.is_empty() {
|
381 519 | builder = builder.header("X-EnumList", "");
|
382 520 | } else {
|
521 + | /* HttpBindingGenerator.kt:646 */
|
383 522 | for inner_37 in inner_36 {
|
523 + | /* HttpBindingGenerator.kt:704 */
|
384 524 | let formatted_38 = ::aws_smithy_http::header::quote_header_value(inner_37.as_str());
|
525 + | /* HttpBindingGenerator.kt:706 */
|
385 526 | let header_value = formatted_38;
|
386 527 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
387 528 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
388 529 | "header_enum_list",
|
389 530 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
390 531 | )
|
391 532 | })?;
|
392 533 | builder = builder.header("X-EnumList", header_value);
|
534 + | /* HttpBindingGenerator.kt:646 */
|
393 535 | }
|
536 + | /* HttpBindingGenerator.kt:638 */
|
394 537 | }
|
538 + | /* HttpBindingGenerator.kt:592 */
|
395 539 | }
|
540 + | /* HttpBindingGenerator.kt:592 */
|
396 541 | if let ::std::option::Option::Some(inner_39) = &input.header_integer_enum {
|
542 + | /* HttpBindingGenerator.kt:690 */
|
397 543 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_39);
|
544 + | /* HttpBindingGenerator.kt:704 */
|
398 545 | let formatted_40 = encoder.encode();
|
546 + | /* HttpBindingGenerator.kt:706 */
|
399 547 | let header_value = formatted_40;
|
400 548 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
401 549 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
402 550 | "header_integer_enum",
|
403 551 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
404 552 | )
|
405 553 | })?;
|
406 554 | builder = builder.header("X-IntegerEnum", header_value);
|
555 + | /* HttpBindingGenerator.kt:592 */
|
407 556 | }
|
557 + | /* HttpBindingGenerator.kt:592 */
|
408 558 | if let ::std::option::Option::Some(inner_41) = &input.header_integer_enum_list {
|
409 - | // Empty vec in header is serialized as an empty string
|
559 + | /* HttpBindingGenerator.kt:638 */// Empty vec in header is serialized as an empty string
|
410 560 | if inner_41.is_empty() {
|
411 561 | builder = builder.header("X-IntegerEnumList", "");
|
412 562 | } else {
|
563 + | /* HttpBindingGenerator.kt:646 */
|
413 564 | for inner_42 in inner_41 {
|
565 + | /* HttpBindingGenerator.kt:690 */
|
414 566 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_42);
|
567 + | /* HttpBindingGenerator.kt:704 */
|
415 568 | let formatted_43 = encoder.encode();
|
569 + | /* HttpBindingGenerator.kt:706 */
|
416 570 | let header_value = formatted_43;
|
417 571 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
418 572 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
419 573 | "header_integer_enum_list",
|
420 574 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
421 575 | )
|
422 576 | })?;
|
423 577 | builder = builder.header("X-IntegerEnumList", header_value);
|
578 + | /* HttpBindingGenerator.kt:646 */
|
424 579 | }
|
580 + | /* HttpBindingGenerator.kt:638 */
|
425 581 | }
|
582 + | /* HttpBindingGenerator.kt:592 */
|
426 583 | }
|
584 + | /* HttpBindingGenerator.kt:555 */
|
427 585 | Ok(builder)
|
586 + | /* HttpBindingGenerator.kt:542 */
|
428 587 | }
|