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_constrained_http_bound_shapes_operation_http_request<B>(
|
4 6 | #[allow(unused_variables)] request: ::http::Request<B>,
|
5 7 | ) -> std::result::Result<
|
6 8 | crate::input::ConstrainedHttpBoundShapesOperationInput,
|
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 =
|
18 23 | crate::input::constrained_http_bound_shapes_operation_input::Builder::default();
|
24 + | /* RustType.kt:516 */
|
19 25 | #[allow(unused_variables)]
|
26 + | /* ServerHttpBoundProtocolGenerator.kt:728 */
|
20 27 | let ::aws_smithy_runtime_api::http::RequestParts {
|
21 28 | uri, headers, body, ..
|
22 29 | } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
|
30 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
23 31 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_list_pattern_string_header_header(&headers)? {
|
24 32 | input = input.set_length_list_pattern_string_header(Some(value))
|
25 33 | }
|
34 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
26 35 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_set_pattern_string_header_header(&headers)? {
|
27 36 | input = input.set_length_set_pattern_string_header(Some(value))
|
28 37 | }
|
38 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
29 39 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_header_header(&headers)? {
|
30 40 | input = input.set_length_string_header(Some(value))
|
31 41 | }
|
42 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
32 43 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_header_map_prefix_header(&headers)? {
|
33 44 | input = input.set_length_string_header_map(value)
|
34 45 | }
|
46 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
35 47 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_set_header_header(&headers)? {
|
36 48 | input = input.set_length_string_set_header(Some(value))
|
37 49 | }
|
50 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
38 51 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_list_length_string_header_header(&headers)? {
|
39 52 | input = input.set_list_length_string_header(Some(value))
|
40 53 | }
|
54 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
41 55 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_header_header(&headers)? {
|
42 56 | input = input.set_range_byte_header(value)
|
43 57 | }
|
58 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
44 59 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_list_header_header(&headers)? {
|
45 60 | input = input.set_range_byte_list_header(Some(value))
|
46 61 | }
|
62 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
47 63 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_set_header_header(&headers)? {
|
48 64 | input = input.set_range_byte_set_header(Some(value))
|
49 65 | }
|
66 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
50 67 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_header_header(&headers)? {
|
51 68 | input = input.set_range_integer_header(value)
|
52 69 | }
|
70 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
53 71 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_list_header_header(&headers)? {
|
54 72 | input = input.set_range_integer_list_header(Some(value))
|
55 73 | }
|
74 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
56 75 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_set_header_header(&headers)? {
|
57 76 | input = input.set_range_integer_set_header(Some(value))
|
58 77 | }
|
78 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
59 79 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_header_header(&headers)? {
|
60 80 | input = input.set_range_long_header(value)
|
61 81 | }
|
82 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
62 83 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_list_header_header(&headers)? {
|
63 84 | input = input.set_range_long_list_header(Some(value))
|
64 85 | }
|
86 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
65 87 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_set_header_header(&headers)? {
|
66 88 | input = input.set_range_long_set_header(Some(value))
|
67 89 | }
|
90 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
68 91 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_header_header(&headers)? {
|
69 92 | input = input.set_range_short_header(value)
|
70 93 | }
|
94 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
71 95 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_list_header_header(&headers)? {
|
72 96 | input = input.set_range_short_list_header(Some(value))
|
73 97 | }
|
98 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
74 99 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_set_header_header(&headers)? {
|
75 100 | input = input.set_range_short_set_header(Some(value))
|
76 101 | }
|
102 + | /* ServerHttpBoundProtocolGenerator.kt:986 */
|
77 103 | let input_string = uri.path();
|
104 + | /* ServerHttpBoundProtocolGenerator.kt:998 */
|
78 105 | let (input_string, (_, m1, m2, m3, m4, m5, m6)) =
|
79 106 | ::nom::sequence::tuple::<_, _, ::nom::error::Error<&str>, _>((
|
80 107 | ::nom::sequence::preceded(
|
81 108 | ::nom::bytes::complete::tag("/"),
|
82 109 | ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>(
|
83 110 | "constrained-http-bound-shapes-operation",
|
84 111 | ),
|
85 112 | ),
|
86 113 | ::nom::sequence::preceded(
|
87 114 | ::nom::bytes::complete::tag("/"),
|
88 115 | ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
|
89 116 | ::nom::bytes::complete::take_until("/"),
|
90 117 | ::nom::combinator::rest,
|
91 118 | )),
|
92 119 | ),
|
93 120 | ::nom::sequence::preceded(
|
94 121 | ::nom::bytes::complete::tag("/"),
|
95 122 | ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
|
96 123 | ::nom::bytes::complete::take_until("/"),
|
97 124 | ::nom::combinator::rest,
|
98 125 | )),
|
99 126 | ),
|
100 127 | ::nom::sequence::preceded(
|
101 128 | ::nom::bytes::complete::tag("/"),
|
102 129 | ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
|
103 130 | ::nom::bytes::complete::take_until("/"),
|
104 131 | ::nom::combinator::rest,
|
105 132 | )),
|
106 133 | ),
|
107 134 | ::nom::sequence::preceded(
|
108 135 | ::nom::bytes::complete::tag("/"),
|
109 136 | ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
|
110 137 | ::nom::bytes::complete::take_until("/"),
|
111 138 | ::nom::combinator::rest,
|
112 139 | )),
|
113 140 | ),
|
114 141 | ::nom::sequence::preceded(
|
115 142 | ::nom::bytes::complete::tag("/"),
|
116 143 | ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
|
117 144 | ::nom::bytes::complete::take_until("/"),
|
118 145 | ::nom::combinator::rest,
|
119 146 | )),
|
120 147 | ),
|
121 148 | ::nom::sequence::preceded(
|
122 149 | ::nom::bytes::complete::tag("/"),
|
123 150 | ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
|
124 151 | ::nom::bytes::complete::take_until("/"),
|
125 152 | ::nom::combinator::rest,
|
126 153 | )),
|
127 154 | ),
|
128 155 | ))(input_string)?;
|
129 156 | debug_assert_eq!("", input_string);
|
157 + | /* ServerHttpBoundProtocolGenerator.kt:1009 */
|
130 158 | input = input.set_range_integer_label(
|
131 159 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_label(m1)?
|
132 160 | );
|
161 + | /* ServerHttpBoundProtocolGenerator.kt:1009 */
|
133 162 | input = input.set_range_short_label(
|
134 163 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_label(m2)?
|
135 164 | );
|
165 + | /* ServerHttpBoundProtocolGenerator.kt:1009 */
|
136 166 | input = input.set_range_long_label(
|
137 167 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_label(m3)?
|
138 168 | );
|
169 + | /* ServerHttpBoundProtocolGenerator.kt:1009 */
|
139 170 | input = input.set_range_byte_label(
|
140 171 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_label(m4)?
|
141 172 | );
|
173 + | /* ServerHttpBoundProtocolGenerator.kt:1009 */
|
142 174 | input = input.set_length_string_label(
|
143 175 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_label(m5)?
|
144 176 | );
|
177 + | /* ServerHttpBoundProtocolGenerator.kt:1009 */
|
145 178 | input = input.set_enum_string_label(
|
146 179 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_enum_string_label(m6)?
|
147 180 | );
|
181 + | /* ServerHttpBoundProtocolGenerator.kt:1073 */
|
148 182 | let query_string = uri.query().unwrap_or("");
|
149 183 | let pairs = ::form_urlencoded::parse(query_string.as_bytes());
|
184 + | /* ServerHttpBoundProtocolGenerator.kt:1099 */
|
150 185 | let mut enum_string_query_seen = false;
|
186 + | /* ServerHttpBoundProtocolGenerator.kt:1099 */
|
151 187 | let mut length_string_query_seen = false;
|
188 + | /* ServerHttpBoundProtocolGenerator.kt:1099 */
|
152 189 | let mut range_byte_query_seen = false;
|
190 + | /* ServerHttpBoundProtocolGenerator.kt:1099 */
|
153 191 | let mut range_integer_query_seen = false;
|
192 + | /* ServerHttpBoundProtocolGenerator.kt:1099 */
|
154 193 | let mut range_long_query_seen = false;
|
194 + | /* ServerHttpBoundProtocolGenerator.kt:1099 */
|
155 195 | let mut range_short_query_seen = false;
|
196 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
156 197 | let mut enum_string_list_query = Vec::new();
|
198 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
157 199 | let mut length_list_pattern_string_query = Vec::new();
|
200 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
158 201 | let mut length_string_list_query = Vec::new();
|
202 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
159 203 | let mut length_string_set_query = Vec::new();
|
204 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
160 205 | let mut range_byte_list_query = Vec::new();
|
206 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
161 207 | let mut range_byte_set_query = Vec::new();
|
208 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
162 209 | let mut range_integer_list_query = Vec::new();
|
210 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
163 211 | let mut range_integer_set_query = Vec::new();
|
212 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
164 213 | let mut range_long_list_query = Vec::new();
|
214 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
165 215 | let mut range_long_set_query = Vec::new();
|
216 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
166 217 | let mut range_short_list_query = Vec::new();
|
218 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
167 219 | let mut range_short_set_query = Vec::new();
|
220 + | /* ServerHttpBoundProtocolGenerator.kt:1105 */
|
168 221 | for (k, v) in pairs {
|
222 + | /* ServerHttpBoundProtocolGenerator.kt:1109 */
|
169 223 | if !enum_string_query_seen && k == "enumString" {
|
170 224 | input = input.set_enum_string_query(
|
171 225 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_enum_string_query(&v)?
|
172 226 | );
|
173 227 | enum_string_query_seen = true;
|
174 228 | }
|
229 + | /* ServerHttpBoundProtocolGenerator.kt:1109 */
|
175 230 | if !length_string_query_seen && k == "lengthString" {
|
176 231 | input = input.set_length_string_query(
|
177 232 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_query(&v)?
|
178 233 | );
|
179 234 | length_string_query_seen = true;
|
180 235 | }
|
236 + | /* ServerHttpBoundProtocolGenerator.kt:1109 */
|
181 237 | if !range_byte_query_seen && k == "rangeByte" {
|
182 238 | input = input.set_range_byte_query(
|
183 239 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_query(&v)?
|
184 240 | );
|
185 241 | range_byte_query_seen = true;
|
186 242 | }
|
243 + | /* ServerHttpBoundProtocolGenerator.kt:1109 */
|
187 244 | if !range_integer_query_seen && k == "rangeInteger" {
|
188 245 | input = input.set_range_integer_query(
|
189 246 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_query(&v)?
|
190 247 | );
|
191 248 | range_integer_query_seen = true;
|
192 249 | }
|
250 + | /* ServerHttpBoundProtocolGenerator.kt:1109 */
|
193 251 | if !range_long_query_seen && k == "rangeLong" {
|
194 252 | input = input.set_range_long_query(
|
195 253 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_query(&v)?
|
196 254 | );
|
197 255 | range_long_query_seen = true;
|
198 256 | }
|
257 + | /* ServerHttpBoundProtocolGenerator.kt:1109 */
|
199 258 | if !range_short_query_seen && k == "rangeShort" {
|
200 259 | input = input.set_range_short_query(
|
201 260 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_query(&v)?
|
202 261 | );
|
203 262 | range_short_query_seen = true;
|
204 263 | }
|
264 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
205 265 | if k == "enumStringList" {
|
266 + | /* ServerHttpBoundProtocolGenerator.kt:1134 */
|
206 267 | let v = v.into_owned();
|
268 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
207 269 | enum_string_list_query.push(v);
|
208 - | } else if k == "lengthListPatternString" {
|
270 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
271 + | }
|
272 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
273 + | else if k == "lengthListPatternString" {
|
274 + | /* ServerHttpBoundProtocolGenerator.kt:1134 */
|
209 275 | let v = v.into_owned();
|
276 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
210 277 | length_list_pattern_string_query.push(v);
|
211 - | } else if k == "lengthStringList" {
|
278 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
279 + | }
|
280 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
281 + | else if k == "lengthStringList" {
|
282 + | /* ServerHttpBoundProtocolGenerator.kt:1134 */
|
212 283 | let v = v.into_owned();
|
284 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
213 285 | length_string_list_query.push(v);
|
214 - | } else if k == "lengthStringSet" {
|
286 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
287 + | }
|
288 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
289 + | else if k == "lengthStringSet" {
|
290 + | /* ServerHttpBoundProtocolGenerator.kt:1134 */
|
215 291 | let v = v.into_owned();
|
292 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
216 293 | length_string_set_query.push(v);
|
217 - | } else if k == "rangeByteList" {
|
294 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
295 + | }
|
296 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
297 + | else if k == "rangeByteList" {
|
298 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
218 299 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
300 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
219 301 | range_byte_list_query.push(v);
|
220 - | } else if k == "rangeByteSet" {
|
302 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
303 + | }
|
304 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
305 + | else if k == "rangeByteSet" {
|
306 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
221 307 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
308 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
222 309 | range_byte_set_query.push(v);
|
223 - | } else if k == "rangeIntegerList" {
|
310 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
311 + | }
|
312 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
313 + | else if k == "rangeIntegerList" {
|
314 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
224 315 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
316 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
225 317 | range_integer_list_query.push(v);
|
226 - | } else if k == "rangeIntegerSet" {
|
318 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
319 + | }
|
320 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
321 + | else if k == "rangeIntegerSet" {
|
322 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
227 323 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
324 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
228 325 | range_integer_set_query.push(v);
|
229 - | } else if k == "rangeLongList" {
|
326 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
327 + | }
|
328 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
329 + | else if k == "rangeLongList" {
|
330 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
230 331 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
332 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
231 333 | range_long_list_query.push(v);
|
232 - | } else if k == "rangeLongSet" {
|
334 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
335 + | }
|
336 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
337 + | else if k == "rangeLongSet" {
|
338 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
233 339 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
340 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
234 341 | range_long_set_query.push(v);
|
235 - | } else if k == "rangeShortList" {
|
342 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
343 + | }
|
344 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
345 + | else if k == "rangeShortList" {
|
346 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
236 347 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
348 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
237 349 | range_short_list_query.push(v);
|
238 - | } else if k == "rangeShortSet" {
|
350 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
351 + | }
|
352 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
353 + | else if k == "rangeShortSet" {
|
354 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
239 355 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
356 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
240 357 | range_short_set_query.push(v);
|
358 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
241 359 | }
|
360 + | /* ServerHttpBoundProtocolGenerator.kt:1105 */
|
242 361 | }
|
362 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
243 363 | if !enum_string_list_query.is_empty() {
|
364 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
244 365 | input = input.set_enum_string_list_query(
|
245 - | Some(
|
246 - | crate::unconstrained::list_of_enum_string_unconstrained::ListOfEnumStringUnconstrained(
|
247 - | enum_string_list_query
|
248 - | )
|
249 - | )
|
250 - | );
|
251 - | }
|
366 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
367 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_enum_string_unconstrained::ListOfEnumStringUnconstrained(
|
368 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */enum_string_list_query
|
369 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
370 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
371 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
372 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
373 + | }
|
374 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
252 375 | if !length_list_pattern_string_query.is_empty() {
|
376 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
253 377 | input = input.set_length_list_pattern_string_query(
|
254 - | Some(
|
255 - | crate::unconstrained::length_list_of_pattern_string_unconstrained::LengthListOfPatternStringUnconstrained(
|
256 - | length_list_pattern_string_query
|
257 - | )
|
258 - | )
|
259 - | );
|
260 - | }
|
378 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
379 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::length_list_of_pattern_string_unconstrained::LengthListOfPatternStringUnconstrained(
|
380 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */length_list_pattern_string_query
|
381 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
382 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
383 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
384 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
385 + | }
|
386 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
261 387 | if !length_string_list_query.is_empty() {
|
388 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
262 389 | input = input.set_length_string_list_query(
|
263 - | Some(
|
264 - | crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained(
|
265 - | length_string_list_query
|
266 - | )
|
267 - | )
|
268 - | );
|
269 - | }
|
390 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
391 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained(
|
392 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */length_string_list_query
|
393 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
394 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
395 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
396 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
397 + | }
|
398 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
270 399 | if !length_string_set_query.is_empty() {
|
400 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
271 401 | input = input.set_length_string_set_query(
|
272 - | Some(
|
273 - | crate::unconstrained::set_of_length_string_unconstrained::SetOfLengthStringUnconstrained(
|
274 - | length_string_set_query
|
275 - | )
|
276 - | )
|
277 - | );
|
278 - | }
|
402 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
403 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::set_of_length_string_unconstrained::SetOfLengthStringUnconstrained(
|
404 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */length_string_set_query
|
405 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
406 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
407 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
408 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
409 + | }
|
410 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
279 411 | if !range_byte_list_query.is_empty() {
|
412 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
280 413 | input = input.set_range_byte_list_query(
|
281 - | Some(
|
282 - | crate::unconstrained::list_of_range_byte_unconstrained::ListOfRangeByteUnconstrained(
|
283 - | range_byte_list_query
|
284 - | )
|
285 - | )
|
286 - | );
|
287 - | }
|
414 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
415 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_range_byte_unconstrained::ListOfRangeByteUnconstrained(
|
416 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_byte_list_query
|
417 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
418 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
419 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
420 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
421 + | }
|
422 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
288 423 | if !range_byte_set_query.is_empty() {
|
289 - | input = input.set_range_byte_set_query(Some(
|
290 - | crate::unconstrained::set_of_range_byte_unconstrained::SetOfRangeByteUnconstrained(
|
291 - | range_byte_set_query,
|
292 - | ),
|
293 - | ));
|
294 - | }
|
424 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
425 + | input = input.set_range_byte_set_query(
|
426 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
427 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::set_of_range_byte_unconstrained::SetOfRangeByteUnconstrained(
|
428 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_byte_set_query
|
429 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
430 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
431 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
432 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
433 + | }
|
434 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
295 435 | if !range_integer_list_query.is_empty() {
|
436 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
296 437 | input = input.set_range_integer_list_query(
|
297 - | Some(
|
298 - | crate::unconstrained::list_of_range_integer_unconstrained::ListOfRangeIntegerUnconstrained(
|
299 - | range_integer_list_query
|
300 - | )
|
301 - | )
|
302 - | );
|
303 - | }
|
438 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
439 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_range_integer_unconstrained::ListOfRangeIntegerUnconstrained(
|
440 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_integer_list_query
|
441 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
442 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
443 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
444 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
445 + | }
|
446 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
304 447 | if !range_integer_set_query.is_empty() {
|
448 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
305 449 | input = input.set_range_integer_set_query(
|
306 - | Some(
|
307 - | crate::unconstrained::set_of_range_integer_unconstrained::SetOfRangeIntegerUnconstrained(
|
308 - | range_integer_set_query
|
309 - | )
|
310 - | )
|
311 - | );
|
312 - | }
|
450 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
451 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::set_of_range_integer_unconstrained::SetOfRangeIntegerUnconstrained(
|
452 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_integer_set_query
|
453 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
454 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
455 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
456 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
457 + | }
|
458 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
313 459 | if !range_long_list_query.is_empty() {
|
460 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
314 461 | input = input.set_range_long_list_query(
|
315 - | Some(
|
316 - | crate::unconstrained::list_of_range_long_unconstrained::ListOfRangeLongUnconstrained(
|
317 - | range_long_list_query
|
318 - | )
|
319 - | )
|
320 - | );
|
321 - | }
|
462 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
463 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_range_long_unconstrained::ListOfRangeLongUnconstrained(
|
464 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_long_list_query
|
465 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
466 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
467 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
468 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
469 + | }
|
470 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
322 471 | if !range_long_set_query.is_empty() {
|
323 - | input = input.set_range_long_set_query(Some(
|
324 - | crate::unconstrained::set_of_range_long_unconstrained::SetOfRangeLongUnconstrained(
|
325 - | range_long_set_query,
|
326 - | ),
|
327 - | ));
|
328 - | }
|
472 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
473 + | input = input.set_range_long_set_query(
|
474 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
475 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::set_of_range_long_unconstrained::SetOfRangeLongUnconstrained(
|
476 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_long_set_query
|
477 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
478 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
479 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
480 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
481 + | }
|
482 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
329 483 | if !range_short_list_query.is_empty() {
|
484 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
330 485 | input = input.set_range_short_list_query(
|
331 - | Some(
|
332 - | crate::unconstrained::list_of_range_short_unconstrained::ListOfRangeShortUnconstrained(
|
333 - | range_short_list_query
|
334 - | )
|
335 - | )
|
336 - | );
|
337 - | }
|
486 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
487 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_range_short_unconstrained::ListOfRangeShortUnconstrained(
|
488 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_short_list_query
|
489 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
490 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
491 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
492 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
493 + | }
|
494 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
338 495 | if !range_short_set_query.is_empty() {
|
496 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
339 497 | input = input.set_range_short_set_query(
|
340 - | Some(
|
341 - | crate::unconstrained::set_of_range_short_unconstrained::SetOfRangeShortUnconstrained(
|
342 - | range_short_set_query
|
343 - | )
|
344 - | )
|
345 - | );
|
346 - | }
|
498 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
499 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::set_of_range_short_unconstrained::SetOfRangeShortUnconstrained(
|
500 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_short_set_query
|
501 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
502 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
503 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
504 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
505 + | }
|
506 + | /* ServerHttpBoundProtocolGenerator.kt:834 */
|
347 507 | input.build()?
|
508 + | /* ServerHttpBoundProtocolGenerator.kt:399 */
|
348 509 | })
|
510 + | /* ServerHttpBoundProtocolGenerator.kt:383 */
|
349 511 | }
|
350 512 |
|
513 + | /* RustType.kt:516 */
|
351 514 | #[allow(clippy::unnecessary_wraps)]
|
515 + | /* ServerHttpBoundProtocolGenerator.kt:421 */
|
352 516 | pub fn ser_constrained_http_bound_shapes_operation_http_response(
|
353 517 | #[allow(unused_variables)] output: crate::output::ConstrainedHttpBoundShapesOperationOutput,
|
354 518 | ) -> std::result::Result<
|
355 519 | ::aws_smithy_http_server::response::Response,
|
356 520 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
|
357 521 | > {
|
522 + | /* ServerHttpBoundProtocolGenerator.kt:433 */
|
358 523 | Ok({
|
524 + | /* RustType.kt:516 */
|
359 525 | #[allow(unused_mut)]
|
526 + | /* ServerHttpBoundProtocolGenerator.kt:523 */
|
360 527 | let mut builder = ::http::Response::builder();
|
528 + | /* ServerHttpBoundProtocolGenerator.kt:629 */
|
361 529 | builder = crate::protocol_serde::shape_constrained_http_bound_shapes_operation::ser_constrained_http_bound_shapes_operation_headers(&output, builder)?;
|
530 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
362 531 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
363 532 | builder,
|
364 533 | ::http::header::CONTENT_TYPE,
|
365 534 | "application/json",
|
366 535 | );
|
536 + | /* ServerHttpBoundProtocolGenerator.kt:682 */
|
367 537 | let http_status: u16 = 200;
|
368 538 | builder = builder.status(http_status);
|
539 + | /* ServerHttpBoundProtocolGenerator.kt:561 */
|
369 540 | let payload =
|
370 - | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_output::ser_constrained_http_bound_shapes_operation_output_output_output(&output)?
|
371 - | ;
|
541 + | /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_constrained_http_bound_shapes_operation_output::ser_constrained_http_bound_shapes_operation_output_output_output(&output)?
|
542 + | /* ServerHttpBoundProtocolGenerator.kt:561 */;
|
543 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
372 544 | let content_length = payload.len();
|
373 545 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
374 546 | builder,
|
375 547 | ::http::header::CONTENT_LENGTH,
|
376 548 | content_length,
|
377 549 | );
|
550 + | /* ServerHttpBoundProtocolGenerator.kt:567 */
|
378 551 | let body = ::aws_smithy_http_server::body::to_boxed(payload);
|
552 + | /* ServerHttpBoundProtocolGenerator.kt:575 */
|
379 553 | builder.body(body)?
|
554 + | /* ServerHttpBoundProtocolGenerator.kt:433 */
|
380 555 | })
|
556 + | /* ServerHttpBoundProtocolGenerator.kt:421 */
|
381 557 | }
|
382 558 |
|
559 + | /* RustType.kt:516 */
|
383 560 | #[allow(clippy::unnecessary_wraps)]
|
561 + | /* ServerHttpBoundProtocolGenerator.kt:447 */
|
384 562 | pub fn ser_constrained_http_bound_shapes_operation_http_error(
|
385 563 | error: &crate::error::ConstrainedHttpBoundShapesOperationError,
|
386 564 | ) -> std::result::Result<
|
387 565 | ::aws_smithy_http_server::response::Response,
|
388 566 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
|
389 567 | > {
|
568 + | /* ServerHttpBoundProtocolGenerator.kt:452 */
|
390 569 | Ok({
|
570 + | /* ServerHttpBoundProtocolGenerator.kt:468 */
|
391 571 | match error {
|
572 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
392 573 | crate::error::ConstrainedHttpBoundShapesOperationError::ValidationException(output) => {
|
574 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
393 575 | let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
|
576 + | /* RustType.kt:516 */
|
394 577 | #[allow(unused_mut)]
|
578 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
395 579 | let mut builder = ::http::Response::builder();
|
580 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
396 581 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
397 582 | builder,
|
398 583 | ::http::header::CONTENT_TYPE,
|
399 584 | "application/json",
|
400 585 | );
|
586 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
401 587 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
402 588 | builder,
|
403 589 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
404 590 | "ValidationException",
|
405 591 | );
|
592 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
406 593 | let content_length = payload.len();
|
407 594 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
408 595 | builder,
|
409 596 | ::http::header::CONTENT_LENGTH,
|
410 597 | content_length,
|
411 598 | );
|
599 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
412 600 | builder
|
413 601 | .status(400)
|
414 602 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
603 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
604 + | } /* ServerHttpBoundProtocolGenerator.kt:468 */
|
415 605 | }
|
416 - | }
|
606 + | /* ServerHttpBoundProtocolGenerator.kt:452 */
|
417 607 | })
|
608 + | /* ServerHttpBoundProtocolGenerator.kt:447 */
|
418 609 | }
|
419 610 |
|
611 + | /* HttpBindingGenerator.kt:542 */
|
420 612 | pub fn ser_constrained_http_bound_shapes_operation_headers(
|
421 613 | input: &crate::output::ConstrainedHttpBoundShapesOperationOutput,
|
422 614 | mut builder: ::http::response::Builder,
|
423 615 | ) -> std::result::Result<::http::response::Builder, ::aws_smithy_types::error::operation::BuildError>
|
424 616 | {
|
617 + | /* HttpBindingGenerator.kt:592 */
|
425 618 | if let ::std::option::Option::Some(inner_1) = &input.length_string_header {
|
619 + | /* HttpBindingGenerator.kt:704 */
|
426 620 | let formatted_2 = inner_1.as_str();
|
621 + | /* HttpBindingGenerator.kt:705 */
|
427 622 | if !formatted_2.is_empty() {
|
623 + | /* HttpBindingGenerator.kt:706 */
|
428 624 | let header_value = formatted_2;
|
429 625 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
430 626 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
431 627 | "length_string_header",
|
432 628 | format!(
|
433 629 | "`{}` cannot be used as a header value: {}",
|
434 630 | &header_value, err
|
435 631 | ),
|
436 632 | )
|
437 633 | })?;
|
438 634 | builder = builder.header("X-Length", header_value);
|
635 + | /* HttpBindingGenerator.kt:705 */
|
439 636 | }
|
637 + | /* HttpBindingGenerator.kt:592 */
|
440 638 | }
|
639 + | /* SerializerUtil.kt:46 */
|
441 640 | {
|
641 + | /* HttpBindingGenerator.kt:690 */
|
442 642 | let mut encoder =
|
443 643 | ::aws_smithy_types::primitive::Encoder::from(input.range_integer_header.0);
|
644 + | /* HttpBindingGenerator.kt:704 */
|
444 645 | let formatted_3 = encoder.encode();
|
646 + | /* HttpBindingGenerator.kt:705 */
|
445 647 | if !formatted_3.is_empty() {
|
648 + | /* HttpBindingGenerator.kt:706 */
|
446 649 | let header_value = formatted_3;
|
447 650 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
448 651 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
449 652 | "range_integer_header",
|
450 653 | format!(
|
451 654 | "`{}` cannot be used as a header value: {}",
|
452 655 | &header_value, err
|
453 656 | ),
|
454 657 | )
|
455 658 | })?;
|
456 659 | builder = builder.header("X-Range-Integer", header_value);
|
660 + | /* HttpBindingGenerator.kt:705 */
|
457 661 | }
|
662 + | /* SerializerUtil.kt:46 */
|
458 663 | }
|
664 + | /* SerializerUtil.kt:46 */
|
459 665 | {
|
666 + | /* HttpBindingGenerator.kt:690 */
|
460 667 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(input.range_short_header.0);
|
668 + | /* HttpBindingGenerator.kt:704 */
|
461 669 | let formatted_4 = encoder.encode();
|
670 + | /* HttpBindingGenerator.kt:705 */
|
462 671 | if !formatted_4.is_empty() {
|
672 + | /* HttpBindingGenerator.kt:706 */
|
463 673 | let header_value = formatted_4;
|
464 674 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
465 675 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
466 676 | "range_short_header",
|
467 677 | format!(
|
468 678 | "`{}` cannot be used as a header value: {}",
|
469 679 | &header_value, err
|
470 680 | ),
|
471 681 | )
|
472 682 | })?;
|
473 683 | builder = builder.header("X-Range-Short", header_value);
|
684 + | /* HttpBindingGenerator.kt:705 */
|
474 685 | }
|
686 + | /* SerializerUtil.kt:46 */
|
475 687 | }
|
688 + | /* SerializerUtil.kt:46 */
|
476 689 | {
|
690 + | /* HttpBindingGenerator.kt:690 */
|
477 691 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(input.range_long_header.0);
|
692 + | /* HttpBindingGenerator.kt:704 */
|
478 693 | let formatted_5 = encoder.encode();
|
694 + | /* HttpBindingGenerator.kt:705 */
|
479 695 | if !formatted_5.is_empty() {
|
696 + | /* HttpBindingGenerator.kt:706 */
|
480 697 | let header_value = formatted_5;
|
481 698 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
482 699 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
483 700 | "range_long_header",
|
484 701 | format!(
|
485 702 | "`{}` cannot be used as a header value: {}",
|
486 703 | &header_value, err
|
487 704 | ),
|
488 705 | )
|
489 706 | })?;
|
490 707 | builder = builder.header("X-Range-Long", header_value);
|
708 + | /* HttpBindingGenerator.kt:705 */
|
491 709 | }
|
710 + | /* SerializerUtil.kt:46 */
|
492 711 | }
|
712 + | /* SerializerUtil.kt:46 */
|
493 713 | {
|
714 + | /* HttpBindingGenerator.kt:690 */
|
494 715 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(input.range_byte_header.0);
|
716 + | /* HttpBindingGenerator.kt:704 */
|
495 717 | let formatted_6 = encoder.encode();
|
718 + | /* HttpBindingGenerator.kt:705 */
|
496 719 | if !formatted_6.is_empty() {
|
720 + | /* HttpBindingGenerator.kt:706 */
|
497 721 | let header_value = formatted_6;
|
498 722 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
499 723 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
500 724 | "range_byte_header",
|
501 725 | format!(
|
502 726 | "`{}` cannot be used as a header value: {}",
|
503 727 | &header_value, err
|
504 728 | ),
|
505 729 | )
|
506 730 | })?;
|
507 731 | builder = builder.header("X-Range-Byte", header_value);
|
732 + | /* HttpBindingGenerator.kt:705 */
|
508 733 | }
|
734 + | /* SerializerUtil.kt:46 */
|
509 735 | }
|
736 + | /* HttpBindingGenerator.kt:592 */
|
510 737 | if let ::std::option::Option::Some(inner_7) = &input.length_string_set_header {
|
738 + | /* HttpBindingGenerator.kt:646 */
|
511 739 | for inner_8 in &inner_7.0 {
|
740 + | /* HttpBindingGenerator.kt:704 */
|
512 741 | let formatted_9 = ::aws_smithy_http::header::quote_header_value(inner_8.as_str());
|
742 + | /* HttpBindingGenerator.kt:705 */
|
513 743 | if !formatted_9.is_empty() {
|
744 + | /* HttpBindingGenerator.kt:706 */
|
514 745 | let header_value = formatted_9;
|
515 746 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
516 747 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
517 748 | "length_string_set_header",
|
518 749 | format!(
|
519 750 | "`{}` cannot be used as a header value: {}",
|
520 751 | &header_value, err
|
521 752 | ),
|
522 753 | )
|
523 754 | })?;
|
524 755 | builder = builder.header("X-Length-Set", header_value);
|
756 + | /* HttpBindingGenerator.kt:705 */
|
525 757 | }
|
758 + | /* HttpBindingGenerator.kt:646 */
|
526 759 | }
|
760 + | /* HttpBindingGenerator.kt:592 */
|
527 761 | }
|
762 + | /* HttpBindingGenerator.kt:592 */
|
528 763 | if let ::std::option::Option::Some(inner_10) = &input.list_length_string_header {
|
764 + | /* HttpBindingGenerator.kt:646 */
|
529 765 | for inner_11 in inner_10 {
|
766 + | /* HttpBindingGenerator.kt:704 */
|
530 767 | let formatted_12 = ::aws_smithy_http::header::quote_header_value(inner_11.as_str());
|
768 + | /* HttpBindingGenerator.kt:705 */
|
531 769 | if !formatted_12.is_empty() {
|
770 + | /* HttpBindingGenerator.kt:706 */
|
532 771 | let header_value = formatted_12;
|
533 772 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
534 773 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
535 774 | "list_length_string_header",
|
536 775 | format!(
|
537 776 | "`{}` cannot be used as a header value: {}",
|
538 777 | &header_value, err
|
539 778 | ),
|
540 779 | )
|
541 780 | })?;
|
542 781 | builder = builder.header("X-List-Length-String", header_value);
|
782 + | /* HttpBindingGenerator.kt:705 */
|
543 783 | }
|
784 + | /* HttpBindingGenerator.kt:646 */
|
544 785 | }
|
786 + | /* HttpBindingGenerator.kt:592 */
|
545 787 | }
|
788 + | /* HttpBindingGenerator.kt:592 */
|
546 789 | if let ::std::option::Option::Some(inner_13) = &input.length_list_pattern_string_header {
|
790 + | /* HttpBindingGenerator.kt:646 */
|
547 791 | for inner_14 in &inner_13.0 {
|
792 + | /* HttpBindingGenerator.kt:704 */
|
548 793 | let formatted_15 = ::aws_smithy_http::header::quote_header_value(inner_14.as_str());
|
794 + | /* HttpBindingGenerator.kt:705 */
|
549 795 | if !formatted_15.is_empty() {
|
796 + | /* HttpBindingGenerator.kt:706 */
|
550 797 | let header_value = formatted_15;
|
551 798 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
552 799 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
553 800 | "length_list_pattern_string_header",
|
554 801 | format!(
|
555 802 | "`{}` cannot be used as a header value: {}",
|
556 803 | &header_value, err
|
557 804 | ),
|
558 805 | )
|
559 806 | })?;
|
560 807 | builder = builder.header("X-Length-List-Pattern-String", header_value);
|
808 + | /* HttpBindingGenerator.kt:705 */
|
561 809 | }
|
810 + | /* HttpBindingGenerator.kt:646 */
|
562 811 | }
|
812 + | /* HttpBindingGenerator.kt:592 */
|
563 813 | }
|
814 + | /* HttpBindingGenerator.kt:592 */
|
564 815 | if let ::std::option::Option::Some(inner_16) = &input.length_set_pattern_string_header {
|
816 + | /* HttpBindingGenerator.kt:646 */
|
565 817 | for inner_17 in &inner_16.0 {
|
818 + | /* HttpBindingGenerator.kt:704 */
|
566 819 | let formatted_18 = ::aws_smithy_http::header::quote_header_value(inner_17.as_str());
|
820 + | /* HttpBindingGenerator.kt:705 */
|
567 821 | if !formatted_18.is_empty() {
|
822 + | /* HttpBindingGenerator.kt:706 */
|
568 823 | let header_value = formatted_18;
|
569 824 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
570 825 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
571 826 | "length_set_pattern_string_header",
|
572 827 | format!(
|
573 828 | "`{}` cannot be used as a header value: {}",
|
574 829 | &header_value, err
|
575 830 | ),
|
576 831 | )
|
577 832 | })?;
|
578 833 | builder = builder.header("X-Length-Set-Pattern-String", header_value);
|
834 + | /* HttpBindingGenerator.kt:705 */
|
579 835 | }
|
836 + | /* HttpBindingGenerator.kt:646 */
|
580 837 | }
|
838 + | /* HttpBindingGenerator.kt:592 */
|
581 839 | }
|
840 + | /* HttpBindingGenerator.kt:592 */
|
582 841 | if let ::std::option::Option::Some(inner_19) = &input.range_byte_set_header {
|
842 + | /* HttpBindingGenerator.kt:646 */
|
583 843 | for inner_20 in &inner_19.0 {
|
844 + | /* HttpBindingGenerator.kt:690 */
|
584 845 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_20.0);
|
846 + | /* HttpBindingGenerator.kt:704 */
|
585 847 | let formatted_21 = encoder.encode();
|
848 + | /* HttpBindingGenerator.kt:705 */
|
586 849 | if !formatted_21.is_empty() {
|
850 + | /* HttpBindingGenerator.kt:706 */
|
587 851 | let header_value = formatted_21;
|
588 852 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
589 853 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
590 854 | "range_byte_set_header",
|
591 855 | format!(
|
592 856 | "`{}` cannot be used as a header value: {}",
|
593 857 | &header_value, err
|
594 858 | ),
|
595 859 | )
|
596 860 | })?;
|
597 861 | builder = builder.header("X-Range-Byte-Set", header_value);
|
862 + | /* HttpBindingGenerator.kt:705 */
|
598 863 | }
|
864 + | /* HttpBindingGenerator.kt:646 */
|
599 865 | }
|
866 + | /* HttpBindingGenerator.kt:592 */
|
600 867 | }
|
868 + | /* HttpBindingGenerator.kt:592 */
|
601 869 | if let ::std::option::Option::Some(inner_22) = &input.range_short_set_header {
|
870 + | /* HttpBindingGenerator.kt:646 */
|
602 871 | for inner_23 in &inner_22.0 {
|
872 + | /* HttpBindingGenerator.kt:690 */
|
603 873 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_23.0);
|
874 + | /* HttpBindingGenerator.kt:704 */
|
604 875 | let formatted_24 = encoder.encode();
|
876 + | /* HttpBindingGenerator.kt:705 */
|
605 877 | if !formatted_24.is_empty() {
|
878 + | /* HttpBindingGenerator.kt:706 */
|
606 879 | let header_value = formatted_24;
|
607 880 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
608 881 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
609 882 | "range_short_set_header",
|
610 883 | format!(
|
611 884 | "`{}` cannot be used as a header value: {}",
|
612 885 | &header_value, err
|
613 886 | ),
|
614 887 | )
|
615 888 | })?;
|
616 889 | builder = builder.header("X-Range-Short-Set", header_value);
|
890 + | /* HttpBindingGenerator.kt:705 */
|
617 891 | }
|
892 + | /* HttpBindingGenerator.kt:646 */
|
618 893 | }
|
894 + | /* HttpBindingGenerator.kt:592 */
|
619 895 | }
|
896 + | /* HttpBindingGenerator.kt:592 */
|
620 897 | if let ::std::option::Option::Some(inner_25) = &input.range_integer_set_header {
|
898 + | /* HttpBindingGenerator.kt:646 */
|
621 899 | for inner_26 in &inner_25.0 {
|
900 + | /* HttpBindingGenerator.kt:690 */
|
622 901 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_26.0);
|
902 + | /* HttpBindingGenerator.kt:704 */
|
623 903 | let formatted_27 = encoder.encode();
|
904 + | /* HttpBindingGenerator.kt:705 */
|
624 905 | if !formatted_27.is_empty() {
|
906 + | /* HttpBindingGenerator.kt:706 */
|
625 907 | let header_value = formatted_27;
|
626 908 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
627 909 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
628 910 | "range_integer_set_header",
|
629 911 | format!(
|
630 912 | "`{}` cannot be used as a header value: {}",
|
631 913 | &header_value, err
|
632 914 | ),
|
633 915 | )
|
634 916 | })?;
|
635 917 | builder = builder.header("X-Range-Integer-Set", header_value);
|
918 + | /* HttpBindingGenerator.kt:705 */
|
636 919 | }
|
920 + | /* HttpBindingGenerator.kt:646 */
|
637 921 | }
|
922 + | /* HttpBindingGenerator.kt:592 */
|
638 923 | }
|
924 + | /* HttpBindingGenerator.kt:592 */
|
639 925 | if let ::std::option::Option::Some(inner_28) = &input.range_long_set_header {
|
926 + | /* HttpBindingGenerator.kt:646 */
|
640 927 | for inner_29 in &inner_28.0 {
|
928 + | /* HttpBindingGenerator.kt:690 */
|
641 929 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_29.0);
|
930 + | /* HttpBindingGenerator.kt:704 */
|
642 931 | let formatted_30 = encoder.encode();
|
932 + | /* HttpBindingGenerator.kt:705 */
|
643 933 | if !formatted_30.is_empty() {
|
934 + | /* HttpBindingGenerator.kt:706 */
|
644 935 | let header_value = formatted_30;
|
645 936 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
646 937 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
647 938 | "range_long_set_header",
|
648 939 | format!(
|
649 940 | "`{}` cannot be used as a header value: {}",
|
650 941 | &header_value, err
|
651 942 | ),
|
652 943 | )
|
653 944 | })?;
|
654 945 | builder = builder.header("X-Range-Long-Set", header_value);
|
946 + | /* HttpBindingGenerator.kt:705 */
|
655 947 | }
|
948 + | /* HttpBindingGenerator.kt:646 */
|
656 949 | }
|
950 + | /* HttpBindingGenerator.kt:592 */
|
657 951 | }
|
952 + | /* HttpBindingGenerator.kt:592 */
|
658 953 | if let ::std::option::Option::Some(inner_31) = &input.range_byte_list_header {
|
954 + | /* HttpBindingGenerator.kt:646 */
|
659 955 | for inner_32 in inner_31 {
|
956 + | /* HttpBindingGenerator.kt:690 */
|
660 957 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_32.0);
|
958 + | /* HttpBindingGenerator.kt:704 */
|
661 959 | let formatted_33 = encoder.encode();
|
960 + | /* HttpBindingGenerator.kt:705 */
|
662 961 | if !formatted_33.is_empty() {
|
962 + | /* HttpBindingGenerator.kt:706 */
|
663 963 | let header_value = formatted_33;
|
664 964 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
665 965 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
666 966 | "range_byte_list_header",
|
667 967 | format!(
|
668 968 | "`{}` cannot be used as a header value: {}",
|
669 969 | &header_value, err
|
670 970 | ),
|
671 971 | )
|
672 972 | })?;
|
673 973 | builder = builder.header("X-Range-Byte-List", header_value);
|
974 + | /* HttpBindingGenerator.kt:705 */
|
674 975 | }
|
976 + | /* HttpBindingGenerator.kt:646 */
|
675 977 | }
|
978 + | /* HttpBindingGenerator.kt:592 */
|
676 979 | }
|
980 + | /* HttpBindingGenerator.kt:592 */
|
677 981 | if let ::std::option::Option::Some(inner_34) = &input.range_short_list_header {
|
982 + | /* HttpBindingGenerator.kt:646 */
|
678 983 | for inner_35 in inner_34 {
|
984 + | /* HttpBindingGenerator.kt:690 */
|
679 985 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_35.0);
|
986 + | /* HttpBindingGenerator.kt:704 */
|
680 987 | let formatted_36 = encoder.encode();
|
988 + | /* HttpBindingGenerator.kt:705 */
|
681 989 | if !formatted_36.is_empty() {
|
990 + | /* HttpBindingGenerator.kt:706 */
|
682 991 | let header_value = formatted_36;
|
683 992 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
684 993 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
685 994 | "range_short_list_header",
|
686 995 | format!(
|
687 996 | "`{}` cannot be used as a header value: {}",
|
688 997 | &header_value, err
|
689 998 | ),
|
690 999 | )
|
691 1000 | })?;
|
692 1001 | builder = builder.header("X-Range-Short-List", header_value);
|
1002 + | /* HttpBindingGenerator.kt:705 */
|
693 1003 | }
|
1004 + | /* HttpBindingGenerator.kt:646 */
|
694 1005 | }
|
1006 + | /* HttpBindingGenerator.kt:592 */
|
695 1007 | }
|
1008 + | /* HttpBindingGenerator.kt:592 */
|
696 1009 | if let ::std::option::Option::Some(inner_37) = &input.range_integer_list_header {
|
1010 + | /* HttpBindingGenerator.kt:646 */
|
697 1011 | for inner_38 in inner_37 {
|
1012 + | /* HttpBindingGenerator.kt:690 */
|
698 1013 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_38.0);
|
1014 + | /* HttpBindingGenerator.kt:704 */
|
699 1015 | let formatted_39 = encoder.encode();
|
1016 + | /* HttpBindingGenerator.kt:705 */
|
700 1017 | if !formatted_39.is_empty() {
|
1018 + | /* HttpBindingGenerator.kt:706 */
|
701 1019 | let header_value = formatted_39;
|
702 1020 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
703 1021 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
704 1022 | "range_integer_list_header",
|
705 1023 | format!(
|
706 1024 | "`{}` cannot be used as a header value: {}",
|
707 1025 | &header_value, err
|
708 1026 | ),
|
709 1027 | )
|
710 1028 | })?;
|
711 1029 | builder = builder.header("X-Range-Integer-List", header_value);
|
1030 + | /* HttpBindingGenerator.kt:705 */
|
712 1031 | }
|
1032 + | /* HttpBindingGenerator.kt:646 */
|
713 1033 | }
|
1034 + | /* HttpBindingGenerator.kt:592 */
|
714 1035 | }
|
1036 + | /* HttpBindingGenerator.kt:592 */
|
715 1037 | if let ::std::option::Option::Some(inner_40) = &input.range_long_list_header {
|
1038 + | /* HttpBindingGenerator.kt:646 */
|
716 1039 | for inner_41 in inner_40 {
|
1040 + | /* HttpBindingGenerator.kt:690 */
|
717 1041 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_41.0);
|
1042 + | /* HttpBindingGenerator.kt:704 */
|
718 1043 | let formatted_42 = encoder.encode();
|
1044 + | /* HttpBindingGenerator.kt:705 */
|
719 1045 | if !formatted_42.is_empty() {
|
1046 + | /* HttpBindingGenerator.kt:706 */
|
720 1047 | let header_value = formatted_42;
|
721 1048 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
722 1049 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
723 1050 | "range_long_list_header",
|
724 1051 | format!(
|
725 1052 | "`{}` cannot be used as a header value: {}",
|
726 1053 | &header_value, err
|
727 1054 | ),
|
728 1055 | )
|
729 1056 | })?;
|
730 1057 | builder = builder.header("X-Range-Long-List", header_value);
|
1058 + | /* HttpBindingGenerator.kt:705 */
|
731 1059 | }
|
1060 + | /* HttpBindingGenerator.kt:646 */
|
732 1061 | }
|
1062 + | /* HttpBindingGenerator.kt:592 */
|
733 1063 | }
|
1064 + | /* HttpBindingGenerator.kt:741 */
|
734 1065 | {
|
1066 + | /* HttpBindingGenerator.kt:747 */
|
735 1067 | for (k, v) in &input.length_string_header_map {
|
736 1068 | use std::str::FromStr;
|
737 1069 | let header_name = http::header::HeaderName::from_str(&format!(
|
738 1070 | "{}{}",
|
739 1071 | "X-Length-String-Prefix-Headers-", &k
|
740 1072 | ))
|
741 1073 | .map_err(|err| {
|
742 1074 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
743 1075 | "length_string_header_map",
|
744 1076 | format!("`{k}` cannot be used as a header name: {err}"),
|
745 1077 | )
|
746 1078 | })?;
|
747 1079 | let header_value = v.as_str();
|
748 1080 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
749 1081 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
750 1082 | "length_string_header_map",
|
751 1083 | format!("`{}` cannot be used as a header value: {}", v, err),
|
752 1084 | )
|
753 1085 | })?;
|
754 1086 | builder = builder.header(header_name, header_value);
|
755 1087 | }
|
1088 + | /* HttpBindingGenerator.kt:741 */
|
756 1089 | }
|
1090 + | /* HttpBindingGenerator.kt:555 */
|
757 1091 | Ok(builder)
|
1092 + | /* HttpBindingGenerator.kt:542 */
|
758 1093 | }
|