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_internal::Builder::default(
|
19 24 | );
|
25 + | /* RustType.kt:516 */
|
20 26 | #[allow(unused_variables)]
|
27 + | /* ServerHttpBoundProtocolGenerator.kt:728 */
|
21 28 | let ::aws_smithy_runtime_api::http::RequestParts {
|
22 29 | uri, headers, body, ..
|
23 30 | } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
|
31 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
24 32 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_list_pattern_string_header_header(&headers)? {
|
25 33 | input = input.set_length_list_pattern_string_header(Some(value))
|
26 34 | }
|
35 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
27 36 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_set_pattern_string_header_header(&headers)? {
|
28 37 | input = input.set_length_set_pattern_string_header(Some(value))
|
29 38 | }
|
39 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
30 40 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_header_header(&headers)? {
|
31 41 | input = input.set_length_string_header(Some(value))
|
32 42 | }
|
43 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
33 44 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_header_map_prefix_header(&headers)? {
|
34 45 | input = input.set_length_string_header_map(value)
|
35 46 | }
|
47 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
36 48 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_set_header_header(&headers)? {
|
37 49 | input = input.set_length_string_set_header(Some(value))
|
38 50 | }
|
51 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
39 52 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_list_length_string_header_header(&headers)? {
|
40 53 | input = input.set_list_length_string_header(Some(value))
|
41 54 | }
|
55 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
42 56 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_header_header(&headers)? {
|
43 57 | input = input.set_range_byte_header(value)
|
44 58 | }
|
59 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
45 60 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_list_header_header(&headers)? {
|
46 61 | input = input.set_range_byte_list_header(Some(value))
|
47 62 | }
|
63 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
48 64 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_set_header_header(&headers)? {
|
49 65 | input = input.set_range_byte_set_header(Some(value))
|
50 66 | }
|
67 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
51 68 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_header_header(&headers)? {
|
52 69 | input = input.set_range_integer_header(value)
|
53 70 | }
|
71 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
54 72 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_list_header_header(&headers)? {
|
55 73 | input = input.set_range_integer_list_header(Some(value))
|
56 74 | }
|
75 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
57 76 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_set_header_header(&headers)? {
|
58 77 | input = input.set_range_integer_set_header(Some(value))
|
59 78 | }
|
79 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
60 80 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_header_header(&headers)? {
|
61 81 | input = input.set_range_long_header(value)
|
62 82 | }
|
83 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
63 84 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_list_header_header(&headers)? {
|
64 85 | input = input.set_range_long_list_header(Some(value))
|
65 86 | }
|
87 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
66 88 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_set_header_header(&headers)? {
|
67 89 | input = input.set_range_long_set_header(Some(value))
|
68 90 | }
|
91 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
69 92 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_header_header(&headers)? {
|
70 93 | input = input.set_range_short_header(value)
|
71 94 | }
|
95 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
72 96 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_list_header_header(&headers)? {
|
73 97 | input = input.set_range_short_list_header(Some(value))
|
74 98 | }
|
99 + | /* ServerHttpBoundProtocolGenerator.kt:794 */
|
75 100 | if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_set_header_header(&headers)? {
|
76 101 | input = input.set_range_short_set_header(Some(value))
|
77 102 | }
|
103 + | /* ServerHttpBoundProtocolGenerator.kt:986 */
|
78 104 | let input_string = uri.path();
|
105 + | /* ServerHttpBoundProtocolGenerator.kt:998 */
|
79 106 | let (input_string, (_, m1, m2, m3, m4, m5, m6)) =
|
80 107 | ::nom::sequence::tuple::<_, _, ::nom::error::Error<&str>, _>((
|
81 108 | ::nom::sequence::preceded(
|
82 109 | ::nom::bytes::complete::tag("/"),
|
83 110 | ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>(
|
84 111 | "constrained-http-bound-shapes-operation",
|
85 112 | ),
|
86 113 | ),
|
87 114 | ::nom::sequence::preceded(
|
88 115 | ::nom::bytes::complete::tag("/"),
|
89 116 | ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
|
90 117 | ::nom::bytes::complete::take_until("/"),
|
91 118 | ::nom::combinator::rest,
|
92 119 | )),
|
93 120 | ),
|
94 121 | ::nom::sequence::preceded(
|
95 122 | ::nom::bytes::complete::tag("/"),
|
96 123 | ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
|
97 124 | ::nom::bytes::complete::take_until("/"),
|
98 125 | ::nom::combinator::rest,
|
99 126 | )),
|
100 127 | ),
|
101 128 | ::nom::sequence::preceded(
|
102 129 | ::nom::bytes::complete::tag("/"),
|
103 130 | ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
|
104 131 | ::nom::bytes::complete::take_until("/"),
|
105 132 | ::nom::combinator::rest,
|
106 133 | )),
|
107 134 | ),
|
108 135 | ::nom::sequence::preceded(
|
109 136 | ::nom::bytes::complete::tag("/"),
|
110 137 | ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
|
111 138 | ::nom::bytes::complete::take_until("/"),
|
112 139 | ::nom::combinator::rest,
|
113 140 | )),
|
114 141 | ),
|
115 142 | ::nom::sequence::preceded(
|
116 143 | ::nom::bytes::complete::tag("/"),
|
117 144 | ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
|
118 145 | ::nom::bytes::complete::take_until("/"),
|
119 146 | ::nom::combinator::rest,
|
120 147 | )),
|
121 148 | ),
|
122 149 | ::nom::sequence::preceded(
|
123 150 | ::nom::bytes::complete::tag("/"),
|
124 151 | ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
|
125 152 | ::nom::bytes::complete::take_until("/"),
|
126 153 | ::nom::combinator::rest,
|
127 154 | )),
|
128 155 | ),
|
129 156 | ))(input_string)?;
|
130 157 | debug_assert_eq!("", input_string);
|
158 + | /* ServerHttpBoundProtocolGenerator.kt:1009 */
|
131 159 | input = input.set_range_integer_label(
|
132 160 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_label(m1)?
|
133 161 | );
|
162 + | /* ServerHttpBoundProtocolGenerator.kt:1009 */
|
134 163 | input = input.set_range_short_label(
|
135 164 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_label(m2)?
|
136 165 | );
|
166 + | /* ServerHttpBoundProtocolGenerator.kt:1009 */
|
137 167 | input = input.set_range_long_label(
|
138 168 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_label(m3)?
|
139 169 | );
|
170 + | /* ServerHttpBoundProtocolGenerator.kt:1009 */
|
140 171 | input = input.set_range_byte_label(
|
141 172 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_label(m4)?
|
142 173 | );
|
174 + | /* ServerHttpBoundProtocolGenerator.kt:1009 */
|
143 175 | input = input.set_length_string_label(
|
144 176 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_label(m5)?
|
145 177 | );
|
178 + | /* ServerHttpBoundProtocolGenerator.kt:1009 */
|
146 179 | input = input.set_enum_string_label(
|
147 180 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_enum_string_label(m6)?
|
148 181 | );
|
182 + | /* ServerHttpBoundProtocolGenerator.kt:1073 */
|
149 183 | let query_string = uri.query().unwrap_or("");
|
150 184 | let pairs = ::form_urlencoded::parse(query_string.as_bytes());
|
185 + | /* ServerHttpBoundProtocolGenerator.kt:1099 */
|
151 186 | let mut enum_string_query_seen = false;
|
187 + | /* ServerHttpBoundProtocolGenerator.kt:1099 */
|
152 188 | let mut length_string_query_seen = false;
|
189 + | /* ServerHttpBoundProtocolGenerator.kt:1099 */
|
153 190 | let mut range_byte_query_seen = false;
|
191 + | /* ServerHttpBoundProtocolGenerator.kt:1099 */
|
154 192 | let mut range_integer_query_seen = false;
|
193 + | /* ServerHttpBoundProtocolGenerator.kt:1099 */
|
155 194 | let mut range_long_query_seen = false;
|
195 + | /* ServerHttpBoundProtocolGenerator.kt:1099 */
|
156 196 | let mut range_short_query_seen = false;
|
197 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
157 198 | let mut enum_string_list_query = Vec::new();
|
199 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
158 200 | let mut length_list_pattern_string_query = Vec::new();
|
201 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
159 202 | let mut length_string_list_query = Vec::new();
|
203 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
160 204 | let mut length_string_set_query = Vec::new();
|
205 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
161 206 | let mut range_byte_list_query = Vec::new();
|
207 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
162 208 | let mut range_byte_set_query = Vec::new();
|
209 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
163 210 | let mut range_integer_list_query = Vec::new();
|
211 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
164 212 | let mut range_integer_set_query = Vec::new();
|
213 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
165 214 | let mut range_long_list_query = Vec::new();
|
215 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
166 216 | let mut range_long_set_query = Vec::new();
|
217 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
167 218 | let mut range_short_list_query = Vec::new();
|
219 + | /* ServerHttpBoundProtocolGenerator.kt:1102 */
|
168 220 | let mut range_short_set_query = Vec::new();
|
221 + | /* ServerHttpBoundProtocolGenerator.kt:1105 */
|
169 222 | for (k, v) in pairs {
|
223 + | /* ServerHttpBoundProtocolGenerator.kt:1109 */
|
170 224 | if !enum_string_query_seen && k == "enumString" {
|
171 225 | input = input.set_enum_string_query(
|
172 226 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_enum_string_query(&v)?
|
173 227 | );
|
174 228 | enum_string_query_seen = true;
|
175 229 | }
|
230 + | /* ServerHttpBoundProtocolGenerator.kt:1109 */
|
176 231 | if !length_string_query_seen && k == "lengthString" {
|
177 232 | input = input.set_length_string_query(
|
178 233 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_query(&v)?
|
179 234 | );
|
180 235 | length_string_query_seen = true;
|
181 236 | }
|
237 + | /* ServerHttpBoundProtocolGenerator.kt:1109 */
|
182 238 | if !range_byte_query_seen && k == "rangeByte" {
|
183 239 | input = input.set_range_byte_query(
|
184 240 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_query(&v)?
|
185 241 | );
|
186 242 | range_byte_query_seen = true;
|
187 243 | }
|
244 + | /* ServerHttpBoundProtocolGenerator.kt:1109 */
|
188 245 | if !range_integer_query_seen && k == "rangeInteger" {
|
189 246 | input = input.set_range_integer_query(
|
190 247 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_query(&v)?
|
191 248 | );
|
192 249 | range_integer_query_seen = true;
|
193 250 | }
|
251 + | /* ServerHttpBoundProtocolGenerator.kt:1109 */
|
194 252 | if !range_long_query_seen && k == "rangeLong" {
|
195 253 | input = input.set_range_long_query(
|
196 254 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_query(&v)?
|
197 255 | );
|
198 256 | range_long_query_seen = true;
|
199 257 | }
|
258 + | /* ServerHttpBoundProtocolGenerator.kt:1109 */
|
200 259 | if !range_short_query_seen && k == "rangeShort" {
|
201 260 | input = input.set_range_short_query(
|
202 261 | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_query(&v)?
|
203 262 | );
|
204 263 | range_short_query_seen = true;
|
205 264 | }
|
265 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
206 266 | if k == "enumStringList" {
|
267 + | /* ServerHttpBoundProtocolGenerator.kt:1134 */
|
207 268 | let v = v.into_owned();
|
269 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
208 270 | enum_string_list_query.push(v);
|
209 - | } else if k == "lengthListPatternString" {
|
271 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
272 + | }
|
273 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
274 + | else if k == "lengthListPatternString" {
|
275 + | /* ServerHttpBoundProtocolGenerator.kt:1134 */
|
210 276 | let v = v.into_owned();
|
277 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
211 278 | length_list_pattern_string_query.push(v);
|
212 - | } else if k == "lengthStringList" {
|
279 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
280 + | }
|
281 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
282 + | else if k == "lengthStringList" {
|
283 + | /* ServerHttpBoundProtocolGenerator.kt:1134 */
|
213 284 | let v = v.into_owned();
|
285 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
214 286 | length_string_list_query.push(v);
|
215 - | } else if k == "lengthStringSet" {
|
287 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
288 + | }
|
289 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
290 + | else if k == "lengthStringSet" {
|
291 + | /* ServerHttpBoundProtocolGenerator.kt:1134 */
|
216 292 | let v = v.into_owned();
|
293 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
217 294 | length_string_set_query.push(v);
|
218 - | } else if k == "rangeByteList" {
|
295 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
296 + | }
|
297 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
298 + | else if k == "rangeByteList" {
|
299 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
219 300 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
301 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
220 302 | range_byte_list_query.push(v);
|
221 - | } else if k == "rangeByteSet" {
|
303 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
304 + | }
|
305 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
306 + | else if k == "rangeByteSet" {
|
307 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
222 308 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
309 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
223 310 | range_byte_set_query.push(v);
|
224 - | } else if k == "rangeIntegerList" {
|
311 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
312 + | }
|
313 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
314 + | else if k == "rangeIntegerList" {
|
315 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
225 316 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
317 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
226 318 | range_integer_list_query.push(v);
|
227 - | } else if k == "rangeIntegerSet" {
|
319 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
320 + | }
|
321 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
322 + | else if k == "rangeIntegerSet" {
|
323 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
228 324 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
325 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
229 326 | range_integer_set_query.push(v);
|
230 - | } else if k == "rangeLongList" {
|
327 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
328 + | }
|
329 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
330 + | else if k == "rangeLongList" {
|
331 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
231 332 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
333 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
232 334 | range_long_list_query.push(v);
|
233 - | } else if k == "rangeLongSet" {
|
335 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
336 + | }
|
337 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
338 + | else if k == "rangeLongSet" {
|
339 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
234 340 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
341 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
235 342 | range_long_set_query.push(v);
|
236 - | } else if k == "rangeShortList" {
|
343 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
344 + | }
|
345 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
346 + | else if k == "rangeShortList" {
|
347 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
237 348 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
349 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
238 350 | range_short_list_query.push(v);
|
239 - | } else if k == "rangeShortSet" {
|
351 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
352 + | }
|
353 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
354 + | else if k == "rangeShortSet" {
|
355 + | /* ServerHttpBoundProtocolGenerator.kt:1159 */
|
240 356 | let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
|
357 + | /* ServerHttpBoundProtocolGenerator.kt:1168 */
|
241 358 | range_short_set_query.push(v);
|
359 + | /* ServerHttpBoundProtocolGenerator.kt:1122 */
|
242 360 | }
|
361 + | /* ServerHttpBoundProtocolGenerator.kt:1105 */
|
243 362 | }
|
363 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
244 364 | if !enum_string_list_query.is_empty() {
|
365 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
245 366 | input = input.set_enum_string_list_query(
|
246 - | Some(
|
247 - | crate::unconstrained::list_of_enum_string_unconstrained::ListOfEnumStringUnconstrained(
|
248 - | enum_string_list_query
|
249 - | )
|
250 - | )
|
251 - | );
|
252 - | }
|
367 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
368 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_enum_string_unconstrained::ListOfEnumStringUnconstrained(
|
369 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */enum_string_list_query
|
370 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
371 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
372 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
373 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
374 + | }
|
375 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
253 376 | if !length_list_pattern_string_query.is_empty() {
|
377 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
254 378 | input = input.set_length_list_pattern_string_query(
|
255 - | Some(
|
256 - | crate::unconstrained::length_list_of_pattern_string_unconstrained::LengthListOfPatternStringUnconstrained(
|
257 - | length_list_pattern_string_query
|
258 - | )
|
259 - | )
|
260 - | );
|
261 - | }
|
379 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
380 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::length_list_of_pattern_string_unconstrained::LengthListOfPatternStringUnconstrained(
|
381 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */length_list_pattern_string_query
|
382 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
383 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
384 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
385 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
386 + | }
|
387 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
262 388 | if !length_string_list_query.is_empty() {
|
389 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
263 390 | input = input.set_length_string_list_query(
|
264 - | Some(
|
265 - | crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained(
|
266 - | length_string_list_query
|
267 - | )
|
268 - | )
|
269 - | );
|
270 - | }
|
391 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
392 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained(
|
393 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */length_string_list_query
|
394 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
395 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
396 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
397 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
398 + | }
|
399 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
271 400 | if !length_string_set_query.is_empty() {
|
401 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
272 402 | input = input.set_length_string_set_query(
|
273 - | Some(
|
274 - | crate::unconstrained::set_of_length_string_unconstrained::SetOfLengthStringUnconstrained(
|
275 - | length_string_set_query
|
276 - | )
|
277 - | )
|
278 - | );
|
279 - | }
|
403 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
404 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::set_of_length_string_unconstrained::SetOfLengthStringUnconstrained(
|
405 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */length_string_set_query
|
406 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
407 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
408 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
409 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
410 + | }
|
411 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
280 412 | if !range_byte_list_query.is_empty() {
|
413 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
281 414 | input = input.set_range_byte_list_query(
|
282 - | Some(
|
283 - | crate::unconstrained::list_of_range_byte_unconstrained::ListOfRangeByteUnconstrained(
|
284 - | range_byte_list_query
|
285 - | )
|
286 - | )
|
287 - | );
|
288 - | }
|
415 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
416 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_range_byte_unconstrained::ListOfRangeByteUnconstrained(
|
417 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_byte_list_query
|
418 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
419 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
420 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
421 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
422 + | }
|
423 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
289 424 | if !range_byte_set_query.is_empty() {
|
290 - | input = input.set_range_byte_set_query(Some(
|
291 - | crate::unconstrained::set_of_range_byte_unconstrained::SetOfRangeByteUnconstrained(
|
292 - | range_byte_set_query,
|
293 - | ),
|
294 - | ));
|
295 - | }
|
425 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
426 + | input = input.set_range_byte_set_query(
|
427 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
428 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::set_of_range_byte_unconstrained::SetOfRangeByteUnconstrained(
|
429 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_byte_set_query
|
430 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
431 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
432 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
433 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
434 + | }
|
435 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
296 436 | if !range_integer_list_query.is_empty() {
|
437 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
297 438 | input = input.set_range_integer_list_query(
|
298 - | Some(
|
299 - | crate::unconstrained::list_of_range_integer_unconstrained::ListOfRangeIntegerUnconstrained(
|
300 - | range_integer_list_query
|
301 - | )
|
302 - | )
|
303 - | );
|
304 - | }
|
439 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
440 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_range_integer_unconstrained::ListOfRangeIntegerUnconstrained(
|
441 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_integer_list_query
|
442 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
443 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
444 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
445 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
446 + | }
|
447 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
305 448 | if !range_integer_set_query.is_empty() {
|
449 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
306 450 | input = input.set_range_integer_set_query(
|
307 - | Some(
|
308 - | crate::unconstrained::set_of_range_integer_unconstrained::SetOfRangeIntegerUnconstrained(
|
309 - | range_integer_set_query
|
310 - | )
|
311 - | )
|
312 - | );
|
313 - | }
|
451 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
452 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::set_of_range_integer_unconstrained::SetOfRangeIntegerUnconstrained(
|
453 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_integer_set_query
|
454 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
455 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
456 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
457 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
458 + | }
|
459 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
314 460 | if !range_long_list_query.is_empty() {
|
461 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
315 462 | input = input.set_range_long_list_query(
|
316 - | Some(
|
317 - | crate::unconstrained::list_of_range_long_unconstrained::ListOfRangeLongUnconstrained(
|
318 - | range_long_list_query
|
319 - | )
|
320 - | )
|
321 - | );
|
322 - | }
|
463 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
464 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_range_long_unconstrained::ListOfRangeLongUnconstrained(
|
465 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_long_list_query
|
466 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
467 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
468 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
469 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
470 + | }
|
471 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
323 472 | if !range_long_set_query.is_empty() {
|
324 - | input = input.set_range_long_set_query(Some(
|
325 - | crate::unconstrained::set_of_range_long_unconstrained::SetOfRangeLongUnconstrained(
|
326 - | range_long_set_query,
|
327 - | ),
|
328 - | ));
|
329 - | }
|
473 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
474 + | input = input.set_range_long_set_query(
|
475 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
476 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::set_of_range_long_unconstrained::SetOfRangeLongUnconstrained(
|
477 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_long_set_query
|
478 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
479 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
480 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
481 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
482 + | }
|
483 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
330 484 | if !range_short_list_query.is_empty() {
|
485 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
331 486 | input = input.set_range_short_list_query(
|
332 - | Some(
|
333 - | crate::unconstrained::list_of_range_short_unconstrained::ListOfRangeShortUnconstrained(
|
334 - | range_short_list_query
|
335 - | )
|
336 - | )
|
337 - | );
|
338 - | }
|
487 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
488 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_range_short_unconstrained::ListOfRangeShortUnconstrained(
|
489 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_short_list_query
|
490 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
491 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
492 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
493 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
494 + | }
|
495 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
339 496 | if !range_short_set_query.is_empty() {
|
497 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */
|
340 498 | input = input.set_range_short_set_query(
|
341 - | Some(
|
342 - | crate::unconstrained::set_of_range_short_unconstrained::SetOfRangeShortUnconstrained(
|
343 - | range_short_set_query
|
344 - | )
|
345 - | )
|
346 - | );
|
347 - | }
|
499 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
|
500 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::set_of_range_short_unconstrained::SetOfRangeShortUnconstrained(
|
501 + | /* ServerHttpBoundProtocolGenerator.kt:1244 */range_short_set_query
|
502 + | /* ServerHttpBoundProtocolGenerator.kt:1236 */)
|
503 + | /* ServerHttpBoundProtocolGenerator.kt:1235 */)
|
504 + | /* ServerHttpBoundProtocolGenerator.kt:1229 */);
|
505 + | /* ServerHttpBoundProtocolGenerator.kt:1228 */
|
506 + | }
|
507 + | /* ServerHttpBoundProtocolGenerator.kt:834 */
|
348 508 | input.build()?
|
509 + | /* ServerHttpBoundProtocolGenerator.kt:399 */
|
349 510 | })
|
511 + | /* ServerHttpBoundProtocolGenerator.kt:383 */
|
350 512 | }
|
351 513 |
|
514 + | /* RustType.kt:516 */
|
352 515 | #[allow(clippy::unnecessary_wraps)]
|
516 + | /* ServerHttpBoundProtocolGenerator.kt:421 */
|
353 517 | pub fn ser_constrained_http_bound_shapes_operation_http_response(
|
354 518 | #[allow(unused_variables)] output: crate::output::ConstrainedHttpBoundShapesOperationOutput,
|
355 519 | ) -> std::result::Result<
|
356 520 | ::aws_smithy_http_server::response::Response,
|
357 521 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
|
358 522 | > {
|
523 + | /* ServerHttpBoundProtocolGenerator.kt:433 */
|
359 524 | Ok({
|
525 + | /* RustType.kt:516 */
|
360 526 | #[allow(unused_mut)]
|
527 + | /* ServerHttpBoundProtocolGenerator.kt:523 */
|
361 528 | let mut builder = ::http::Response::builder();
|
529 + | /* ServerHttpBoundProtocolGenerator.kt:629 */
|
362 530 | builder = crate::protocol_serde::shape_constrained_http_bound_shapes_operation::ser_constrained_http_bound_shapes_operation_headers(&output, builder)?;
|
531 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
363 532 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
364 533 | builder,
|
365 534 | ::http::header::CONTENT_TYPE,
|
366 535 | "application/json",
|
367 536 | );
|
537 + | /* ServerHttpBoundProtocolGenerator.kt:682 */
|
368 538 | let http_status: u16 = 200;
|
369 539 | builder = builder.status(http_status);
|
540 + | /* ServerHttpBoundProtocolGenerator.kt:561 */
|
370 541 | let payload =
|
371 - | crate::protocol_serde::shape_constrained_http_bound_shapes_operation_output::ser_constrained_http_bound_shapes_operation_output_output_output(&output)?
|
372 - | ;
|
542 + | /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_constrained_http_bound_shapes_operation_output::ser_constrained_http_bound_shapes_operation_output_output_output(&output)?
|
543 + | /* ServerHttpBoundProtocolGenerator.kt:561 */;
|
544 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
373 545 | let content_length = payload.len();
|
374 546 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
375 547 | builder,
|
376 548 | ::http::header::CONTENT_LENGTH,
|
377 549 | content_length,
|
378 550 | );
|
551 + | /* ServerHttpBoundProtocolGenerator.kt:567 */
|
379 552 | let body = ::aws_smithy_http_server::body::to_boxed(payload);
|
553 + | /* ServerHttpBoundProtocolGenerator.kt:575 */
|
380 554 | builder.body(body)?
|
555 + | /* ServerHttpBoundProtocolGenerator.kt:433 */
|
381 556 | })
|
557 + | /* ServerHttpBoundProtocolGenerator.kt:421 */
|
382 558 | }
|
383 559 |
|
560 + | /* RustType.kt:516 */
|
384 561 | #[allow(clippy::unnecessary_wraps)]
|
562 + | /* ServerHttpBoundProtocolGenerator.kt:447 */
|
385 563 | pub fn ser_constrained_http_bound_shapes_operation_http_error(
|
386 564 | error: &crate::error::ConstrainedHttpBoundShapesOperationError,
|
387 565 | ) -> std::result::Result<
|
388 566 | ::aws_smithy_http_server::response::Response,
|
389 567 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
|
390 568 | > {
|
569 + | /* ServerHttpBoundProtocolGenerator.kt:452 */
|
391 570 | Ok({
|
571 + | /* ServerHttpBoundProtocolGenerator.kt:468 */
|
392 572 | match error {
|
573 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
393 574 | crate::error::ConstrainedHttpBoundShapesOperationError::ValidationException(output) => {
|
575 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
394 576 | let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
|
577 + | /* RustType.kt:516 */
|
395 578 | #[allow(unused_mut)]
|
579 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
396 580 | let mut builder = ::http::Response::builder();
|
581 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
397 582 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
398 583 | builder,
|
399 584 | ::http::header::CONTENT_TYPE,
|
400 585 | "application/json",
|
401 586 | );
|
587 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
402 588 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
403 589 | builder,
|
404 590 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
405 591 | "ValidationException",
|
406 592 | );
|
593 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
407 594 | let content_length = payload.len();
|
408 595 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
409 596 | builder,
|
410 597 | ::http::header::CONTENT_LENGTH,
|
411 598 | content_length,
|
412 599 | );
|
600 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
413 601 | builder
|
414 602 | .status(400)
|
415 603 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
604 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
605 + | } /* ServerHttpBoundProtocolGenerator.kt:468 */
|
416 606 | }
|
417 - | }
|
607 + | /* ServerHttpBoundProtocolGenerator.kt:452 */
|
418 608 | })
|
609 + | /* ServerHttpBoundProtocolGenerator.kt:447 */
|
419 610 | }
|
420 611 |
|
612 + | /* HttpBindingGenerator.kt:542 */
|
421 613 | pub fn ser_constrained_http_bound_shapes_operation_headers(
|
422 614 | input: &crate::output::ConstrainedHttpBoundShapesOperationOutput,
|
423 615 | mut builder: ::http::response::Builder,
|
424 616 | ) -> std::result::Result<::http::response::Builder, ::aws_smithy_types::error::operation::BuildError>
|
425 617 | {
|
618 + | /* HttpBindingGenerator.kt:592 */
|
426 619 | if let ::std::option::Option::Some(inner_1) = &input.length_string_header {
|
620 + | /* HttpBindingGenerator.kt:704 */
|
427 621 | let formatted_2 = inner_1.as_str();
|
622 + | /* HttpBindingGenerator.kt:705 */
|
428 623 | if !formatted_2.is_empty() {
|
624 + | /* HttpBindingGenerator.kt:706 */
|
429 625 | let header_value = formatted_2;
|
430 626 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
431 627 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
432 628 | "length_string_header",
|
433 629 | format!(
|
434 630 | "`{}` cannot be used as a header value: {}",
|
435 631 | &header_value, err
|
436 632 | ),
|
437 633 | )
|
438 634 | })?;
|
439 635 | builder = builder.header("X-Length", header_value);
|
636 + | /* HttpBindingGenerator.kt:705 */
|
440 637 | }
|
638 + | /* HttpBindingGenerator.kt:592 */
|
441 639 | }
|
640 + | /* SerializerUtil.kt:46 */
|
442 641 | if input.range_integer_header != 0 {
|
642 + | /* HttpBindingGenerator.kt:690 */
|
443 643 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(input.range_integer_header);
|
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 | if input.range_short_header != 0 {
|
666 + | /* HttpBindingGenerator.kt:690 */
|
460 667 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(input.range_short_header);
|
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 | if input.range_long_header != 0 {
|
690 + | /* HttpBindingGenerator.kt:690 */
|
477 691 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(input.range_long_header);
|
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 | if input.range_byte_header != 0 {
|
714 + | /* HttpBindingGenerator.kt:690 */
|
494 715 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(input.range_byte_header);
|
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 {
|
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 {
|
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 {
|
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 {
|
844 + | /* HttpBindingGenerator.kt:690 */
|
584 845 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_20);
|
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 {
|
872 + | /* HttpBindingGenerator.kt:690 */
|
603 873 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_23);
|
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 {
|
900 + | /* HttpBindingGenerator.kt:690 */
|
622 901 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_26);
|
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 {
|
928 + | /* HttpBindingGenerator.kt:690 */
|
641 929 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_29);
|
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);
|
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);
|
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);
|
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);
|
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 | }
|