1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* StructureGenerator.kt:197 */
|
2 3 | #[allow(missing_docs)] // documentation missing in model
|
4 + | /* RustType.kt:516 */
|
3 5 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4 - | pub struct OperationWithNestedStructureInput {
|
6 + | pub /* StructureGenerator.kt:201 */ struct OperationWithNestedStructureInput {
|
7 + | /* StructureGenerator.kt:231 */
|
5 8 | #[allow(missing_docs)] // documentation missing in model
|
6 9 | pub top_level: crate::model::TopLevel,
|
10 + | /* StructureGenerator.kt:201 */
|
7 11 | }
|
12 + | /* StructureGenerator.kt:135 */
|
8 13 | impl OperationWithNestedStructureInput {
|
14 + | /* StructureGenerator.kt:231 */
|
9 15 | #[allow(missing_docs)] // documentation missing in model
|
16 + | /* StructureGenerator.kt:166 */
|
10 17 | pub fn top_level(&self) -> &crate::model::TopLevel {
|
18 + | /* StructureGenerator.kt:172 */
|
11 19 | &self.top_level
|
20 + | /* StructureGenerator.kt:166 */
|
12 21 | }
|
22 + | /* StructureGenerator.kt:135 */
|
13 23 | }
|
24 + | /* ServerCodegenVisitor.kt:345 */
|
14 25 | impl OperationWithNestedStructureInput {
|
15 - | /// Creates a new builder-style object to manufacture [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
26 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
27 + | /* ServerBuilderGenerator.kt:295 */
|
16 28 | pub fn builder() -> crate::input::operation_with_nested_structure_input::Builder {
|
29 + | /* ServerBuilderGenerator.kt:296 */
|
17 30 | crate::input::operation_with_nested_structure_input::Builder::default()
|
31 + | /* ServerBuilderGenerator.kt:295 */
|
18 32 | }
|
33 + | /* ServerCodegenVisitor.kt:345 */
|
19 34 | }
|
35 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
20 36 | impl crate::constrained::Constrained for crate::input::OperationWithNestedStructureInput {
|
21 37 | type Unconstrained = crate::input::operation_with_nested_structure_input::Builder;
|
22 38 | }
|
23 39 |
|
40 + | /* StructureGenerator.kt:197 */
|
24 41 | #[allow(missing_docs)] // documentation missing in model
|
42 + | /* RustType.kt:516 */
|
25 43 | #[derive(
|
26 44 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
27 45 | )]
|
28 - | pub struct OperationWithRequiredMembersInput {}
|
46 + | pub /* StructureGenerator.kt:201 */ struct OperationWithRequiredMembersInput {/* StructureGenerator.kt:201 */}
|
47 + | /* ServerCodegenVisitor.kt:345 */
|
29 48 | impl OperationWithRequiredMembersInput {
|
30 - | /// Creates a new builder-style object to manufacture [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
49 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
50 + | /* ServerBuilderGenerator.kt:295 */
|
31 51 | pub fn builder() -> crate::input::operation_with_required_members_input::Builder {
|
52 + | /* ServerBuilderGenerator.kt:296 */
|
32 53 | crate::input::operation_with_required_members_input::Builder::default()
|
54 + | /* ServerBuilderGenerator.kt:295 */
|
33 55 | }
|
56 + | /* ServerCodegenVisitor.kt:345 */
|
34 57 | }
|
58 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
35 59 | impl crate::constrained::Constrained for crate::input::OperationWithRequiredMembersInput {
|
36 60 | type Unconstrained = crate::input::operation_with_required_members_input::Builder;
|
37 61 | }
|
38 62 |
|
63 + | /* StructureGenerator.kt:197 */
|
39 64 | #[allow(missing_docs)] // documentation missing in model
|
65 + | /* RustType.kt:516 */
|
40 66 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
41 - | pub struct OperationWithDefaultsInput {
|
67 + | pub /* StructureGenerator.kt:201 */ struct OperationWithDefaultsInput {
|
68 + | /* StructureGenerator.kt:231 */
|
42 69 | #[allow(missing_docs)] // documentation missing in model
|
43 70 | pub defaults: ::std::option::Option<crate::model::Defaults>,
|
71 + | /* StructureGenerator.kt:231 */
|
44 72 | #[allow(missing_docs)] // documentation missing in model
|
45 73 | pub client_optional_defaults: ::std::option::Option<crate::model::ClientOptionalDefaults>,
|
74 + | /* StructureGenerator.kt:231 */
|
46 75 | #[allow(missing_docs)] // documentation missing in model
|
47 76 | pub top_level_default: ::std::string::String,
|
77 + | /* StructureGenerator.kt:231 */
|
48 78 | #[allow(missing_docs)] // documentation missing in model
|
49 79 | pub other_top_level_default: i32,
|
80 + | /* StructureGenerator.kt:201 */
|
50 81 | }
|
82 + | /* StructureGenerator.kt:135 */
|
51 83 | impl OperationWithDefaultsInput {
|
84 + | /* StructureGenerator.kt:231 */
|
52 85 | #[allow(missing_docs)] // documentation missing in model
|
86 + | /* StructureGenerator.kt:166 */
|
53 87 | pub fn defaults(&self) -> ::std::option::Option<&crate::model::Defaults> {
|
88 + | /* StructureGenerator.kt:170 */
|
54 89 | self.defaults.as_ref()
|
90 + | /* StructureGenerator.kt:166 */
|
55 91 | }
|
92 + | /* StructureGenerator.kt:231 */
|
56 93 | #[allow(missing_docs)] // documentation missing in model
|
94 + | /* StructureGenerator.kt:166 */
|
57 95 | pub fn client_optional_defaults(
|
58 96 | &self,
|
59 97 | ) -> ::std::option::Option<&crate::model::ClientOptionalDefaults> {
|
98 + | /* StructureGenerator.kt:170 */
|
60 99 | self.client_optional_defaults.as_ref()
|
100 + | /* StructureGenerator.kt:166 */
|
61 101 | }
|
102 + | /* StructureGenerator.kt:231 */
|
62 103 | #[allow(missing_docs)] // documentation missing in model
|
104 + | /* StructureGenerator.kt:166 */
|
63 105 | pub fn top_level_default(&self) -> &str {
|
106 + | /* StructureGenerator.kt:171 */
|
64 107 | use std::ops::Deref;
|
65 108 | self.top_level_default.deref()
|
109 + | /* StructureGenerator.kt:166 */
|
66 110 | }
|
111 + | /* StructureGenerator.kt:231 */
|
67 112 | #[allow(missing_docs)] // documentation missing in model
|
113 + | /* StructureGenerator.kt:166 */
|
68 114 | pub fn other_top_level_default(&self) -> i32 {
|
115 + | /* StructureGenerator.kt:168 */
|
69 116 | self.other_top_level_default
|
117 + | /* StructureGenerator.kt:166 */
|
70 118 | }
|
119 + | /* StructureGenerator.kt:135 */
|
71 120 | }
|
121 + | /* ServerCodegenVisitor.kt:345 */
|
72 122 | impl OperationWithDefaultsInput {
|
73 - | /// Creates a new builder-style object to manufacture [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
123 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
124 + | /* ServerBuilderGenerator.kt:295 */
|
74 125 | pub fn builder() -> crate::input::operation_with_defaults_input::Builder {
|
126 + | /* ServerBuilderGenerator.kt:296 */
|
75 127 | crate::input::operation_with_defaults_input::Builder::default()
|
128 + | /* ServerBuilderGenerator.kt:295 */
|
76 129 | }
|
130 + | /* ServerCodegenVisitor.kt:345 */
|
77 131 | }
|
132 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
78 133 | impl crate::constrained::Constrained for crate::input::OperationWithDefaultsInput {
|
79 134 | type Unconstrained = crate::input::operation_with_defaults_input::Builder;
|
80 135 | }
|
81 136 |
|
137 + | /* StructureGenerator.kt:197 */
|
82 138 | #[allow(missing_docs)] // documentation missing in model
|
139 + | /* RustType.kt:516 */
|
83 140 | #[derive(
|
84 141 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
85 142 | )]
|
86 - | pub struct ContentTypeParametersInput {
|
143 + | pub /* StructureGenerator.kt:201 */ struct ContentTypeParametersInput {
|
144 + | /* StructureGenerator.kt:231 */
|
87 145 | #[allow(missing_docs)] // documentation missing in model
|
88 146 | pub value: ::std::option::Option<i32>,
|
147 + | /* StructureGenerator.kt:201 */
|
89 148 | }
|
149 + | /* StructureGenerator.kt:135 */
|
90 150 | impl ContentTypeParametersInput {
|
151 + | /* StructureGenerator.kt:231 */
|
91 152 | #[allow(missing_docs)] // documentation missing in model
|
153 + | /* StructureGenerator.kt:166 */
|
92 154 | pub fn value(&self) -> ::std::option::Option<i32> {
|
155 + | /* StructureGenerator.kt:168 */
|
93 156 | self.value
|
157 + | /* StructureGenerator.kt:166 */
|
94 158 | }
|
159 + | /* StructureGenerator.kt:135 */
|
95 160 | }
|
161 + | /* ServerCodegenVisitor.kt:345 */
|
96 162 | impl ContentTypeParametersInput {
|
97 - | /// Creates a new builder-style object to manufacture [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
163 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
164 + | /* ServerBuilderGenerator.kt:295 */
|
98 165 | pub fn builder() -> crate::input::content_type_parameters_input::Builder {
|
166 + | /* ServerBuilderGenerator.kt:296 */
|
99 167 | crate::input::content_type_parameters_input::Builder::default()
|
168 + | /* ServerBuilderGenerator.kt:295 */
|
100 169 | }
|
170 + | /* ServerCodegenVisitor.kt:345 */
|
101 171 | }
|
172 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
102 173 | impl crate::constrained::Constrained for crate::input::ContentTypeParametersInput {
|
103 174 | type Unconstrained = crate::input::content_type_parameters_input::Builder;
|
104 175 | }
|
105 176 |
|
177 + | /* StructureGenerator.kt:197 */
|
106 178 | #[allow(missing_docs)] // documentation missing in model
|
179 + | /* RustType.kt:516 */
|
107 180 | #[derive(
|
108 181 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
109 182 | )]
|
110 - | pub struct PutWithContentEncodingInput {
|
183 + | pub /* StructureGenerator.kt:201 */ struct PutWithContentEncodingInput {
|
184 + | /* StructureGenerator.kt:231 */
|
111 185 | #[allow(missing_docs)] // documentation missing in model
|
112 186 | pub encoding: ::std::option::Option<::std::string::String>,
|
187 + | /* StructureGenerator.kt:231 */
|
113 188 | #[allow(missing_docs)] // documentation missing in model
|
114 189 | pub data: ::std::option::Option<::std::string::String>,
|
190 + | /* StructureGenerator.kt:201 */
|
115 191 | }
|
192 + | /* StructureGenerator.kt:135 */
|
116 193 | impl PutWithContentEncodingInput {
|
194 + | /* StructureGenerator.kt:231 */
|
117 195 | #[allow(missing_docs)] // documentation missing in model
|
196 + | /* StructureGenerator.kt:166 */
|
118 197 | pub fn encoding(&self) -> ::std::option::Option<&str> {
|
198 + | /* StructureGenerator.kt:169 */
|
119 199 | self.encoding.as_deref()
|
200 + | /* StructureGenerator.kt:166 */
|
120 201 | }
|
202 + | /* StructureGenerator.kt:231 */
|
121 203 | #[allow(missing_docs)] // documentation missing in model
|
204 + | /* StructureGenerator.kt:166 */
|
122 205 | pub fn data(&self) -> ::std::option::Option<&str> {
|
206 + | /* StructureGenerator.kt:169 */
|
123 207 | self.data.as_deref()
|
208 + | /* StructureGenerator.kt:166 */
|
124 209 | }
|
210 + | /* StructureGenerator.kt:135 */
|
125 211 | }
|
212 + | /* ServerCodegenVisitor.kt:345 */
|
126 213 | impl PutWithContentEncodingInput {
|
127 - | /// Creates a new builder-style object to manufacture [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
214 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
215 + | /* ServerBuilderGenerator.kt:295 */
|
128 216 | pub fn builder() -> crate::input::put_with_content_encoding_input::Builder {
|
217 + | /* ServerBuilderGenerator.kt:296 */
|
129 218 | crate::input::put_with_content_encoding_input::Builder::default()
|
219 + | /* ServerBuilderGenerator.kt:295 */
|
130 220 | }
|
221 + | /* ServerCodegenVisitor.kt:345 */
|
131 222 | }
|
223 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
132 224 | impl crate::constrained::Constrained for crate::input::PutWithContentEncodingInput {
|
133 225 | type Unconstrained = crate::input::put_with_content_encoding_input::Builder;
|
134 226 | }
|
135 227 |
|
228 + | /* StructureGenerator.kt:197 */
|
136 229 | #[allow(missing_docs)] // documentation missing in model
|
230 + | /* RustType.kt:516 */
|
137 231 | #[derive(
|
138 232 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
139 233 | )]
|
140 - | pub struct HostWithPathOperationInput {}
|
234 + | pub /* StructureGenerator.kt:201 */ struct HostWithPathOperationInput {/* StructureGenerator.kt:201 */}
|
235 + | /* ServerCodegenVisitor.kt:345 */
|
141 236 | impl HostWithPathOperationInput {
|
142 - | /// Creates a new builder-style object to manufacture [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
237 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
238 + | /* ServerBuilderGenerator.kt:295 */
|
143 239 | pub fn builder() -> crate::input::host_with_path_operation_input::Builder {
|
240 + | /* ServerBuilderGenerator.kt:296 */
|
144 241 | crate::input::host_with_path_operation_input::Builder::default()
|
242 + | /* ServerBuilderGenerator.kt:295 */
|
145 243 | }
|
244 + | /* ServerCodegenVisitor.kt:345 */
|
146 245 | }
|
246 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
147 247 | impl crate::constrained::Constrained for crate::input::HostWithPathOperationInput {
|
148 248 | type Unconstrained = crate::input::host_with_path_operation_input::Builder;
|
149 249 | }
|
150 250 |
|
251 + | /* StructureGenerator.kt:197 */
|
151 252 | #[allow(missing_docs)] // documentation missing in model
|
253 + | /* RustType.kt:516 */
|
152 254 | #[derive(
|
153 255 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
154 256 | )]
|
155 - | pub struct EndpointWithHostLabelOperationInput {
|
257 + | pub /* StructureGenerator.kt:201 */ struct EndpointWithHostLabelOperationInput {
|
258 + | /* StructureGenerator.kt:231 */
|
156 259 | #[allow(missing_docs)] // documentation missing in model
|
157 260 | pub label: ::std::string::String,
|
261 + | /* StructureGenerator.kt:201 */
|
158 262 | }
|
263 + | /* StructureGenerator.kt:135 */
|
159 264 | impl EndpointWithHostLabelOperationInput {
|
265 + | /* StructureGenerator.kt:231 */
|
160 266 | #[allow(missing_docs)] // documentation missing in model
|
267 + | /* StructureGenerator.kt:166 */
|
161 268 | pub fn label(&self) -> &str {
|
269 + | /* StructureGenerator.kt:171 */
|
162 270 | use std::ops::Deref;
|
163 271 | self.label.deref()
|
272 + | /* StructureGenerator.kt:166 */
|
164 273 | }
|
274 + | /* StructureGenerator.kt:135 */
|
165 275 | }
|
276 + | /* ServerCodegenVisitor.kt:345 */
|
166 277 | impl EndpointWithHostLabelOperationInput {
|
167 - | /// Creates a new builder-style object to manufacture [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
278 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
279 + | /* ServerBuilderGenerator.kt:295 */
|
168 280 | pub fn builder() -> crate::input::endpoint_with_host_label_operation_input::Builder {
|
281 + | /* ServerBuilderGenerator.kt:296 */
|
169 282 | crate::input::endpoint_with_host_label_operation_input::Builder::default()
|
283 + | /* ServerBuilderGenerator.kt:295 */
|
170 284 | }
|
285 + | /* ServerCodegenVisitor.kt:345 */
|
171 286 | }
|
287 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
172 288 | impl crate::constrained::Constrained for crate::input::EndpointWithHostLabelOperationInput {
|
173 289 | type Unconstrained = crate::input::endpoint_with_host_label_operation_input::Builder;
|
174 290 | }
|
175 291 |
|
292 + | /* StructureGenerator.kt:197 */
|
176 293 | #[allow(missing_docs)] // documentation missing in model
|
294 + | /* RustType.kt:516 */
|
177 295 | #[derive(
|
178 296 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
179 297 | )]
|
180 - | pub struct EndpointOperationInput {}
|
298 + | pub /* StructureGenerator.kt:201 */ struct EndpointOperationInput {/* StructureGenerator.kt:201 */}
|
299 + | /* ServerCodegenVisitor.kt:345 */
|
181 300 | impl EndpointOperationInput {
|
182 - | /// Creates a new builder-style object to manufacture [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
301 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
302 + | /* ServerBuilderGenerator.kt:295 */
|
183 303 | pub fn builder() -> crate::input::endpoint_operation_input::Builder {
|
304 + | /* ServerBuilderGenerator.kt:296 */
|
184 305 | crate::input::endpoint_operation_input::Builder::default()
|
306 + | /* ServerBuilderGenerator.kt:295 */
|
185 307 | }
|
308 + | /* ServerCodegenVisitor.kt:345 */
|
186 309 | }
|
310 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
187 311 | impl crate::constrained::Constrained for crate::input::EndpointOperationInput {
|
188 312 | type Unconstrained = crate::input::endpoint_operation_input::Builder;
|
189 313 | }
|
190 314 |
|
315 + | /* StructureGenerator.kt:197 */
|
191 316 | #[allow(missing_docs)] // documentation missing in model
|
317 + | /* RustType.kt:516 */
|
192 318 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
193 - | pub struct JsonUnionsInput {
|
194 - | /// A union with a representative set of types for members.
|
319 + | pub /* StructureGenerator.kt:201 */ struct JsonUnionsInput {
|
320 + | /// /* StructureGenerator.kt:231 */A union with a representative set of types for members.
|
195 321 | pub contents: ::std::option::Option<crate::model::MyUnion>,
|
322 + | /* StructureGenerator.kt:201 */
|
196 323 | }
|
324 + | /* StructureGenerator.kt:135 */
|
197 325 | impl JsonUnionsInput {
|
198 - | /// A union with a representative set of types for members.
|
326 + | /// /* StructureGenerator.kt:231 */A union with a representative set of types for members.
|
327 + | /* StructureGenerator.kt:166 */
|
199 328 | pub fn contents(&self) -> ::std::option::Option<&crate::model::MyUnion> {
|
329 + | /* StructureGenerator.kt:170 */
|
200 330 | self.contents.as_ref()
|
331 + | /* StructureGenerator.kt:166 */
|
201 332 | }
|
333 + | /* StructureGenerator.kt:135 */
|
202 334 | }
|
335 + | /* ServerCodegenVisitor.kt:345 */
|
203 336 | impl JsonUnionsInput {
|
204 - | /// Creates a new builder-style object to manufacture [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
337 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
338 + | /* ServerBuilderGenerator.kt:295 */
|
205 339 | pub fn builder() -> crate::input::json_unions_input::Builder {
|
340 + | /* ServerBuilderGenerator.kt:296 */
|
206 341 | crate::input::json_unions_input::Builder::default()
|
342 + | /* ServerBuilderGenerator.kt:295 */
|
207 343 | }
|
344 + | /* ServerCodegenVisitor.kt:345 */
|
208 345 | }
|
346 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
209 347 | impl crate::constrained::Constrained for crate::input::JsonUnionsInput {
|
210 348 | type Unconstrained = crate::input::json_unions_input::Builder;
|
211 349 | }
|
212 350 |
|
351 + | /* StructureGenerator.kt:197 */
|
213 352 | #[allow(missing_docs)] // documentation missing in model
|
353 + | /* RustType.kt:516 */
|
214 354 | #[derive(
|
215 355 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
216 356 | )]
|
217 - | pub struct GreetingWithErrorsInput {
|
357 + | pub /* StructureGenerator.kt:201 */ struct GreetingWithErrorsInput {
|
358 + | /* StructureGenerator.kt:231 */
|
218 359 | #[allow(missing_docs)] // documentation missing in model
|
219 360 | pub greeting: ::std::option::Option<::std::string::String>,
|
361 + | /* StructureGenerator.kt:201 */
|
220 362 | }
|
363 + | /* StructureGenerator.kt:135 */
|
221 364 | impl GreetingWithErrorsInput {
|
365 + | /* StructureGenerator.kt:231 */
|
222 366 | #[allow(missing_docs)] // documentation missing in model
|
367 + | /* StructureGenerator.kt:166 */
|
223 368 | pub fn greeting(&self) -> ::std::option::Option<&str> {
|
369 + | /* StructureGenerator.kt:169 */
|
224 370 | self.greeting.as_deref()
|
371 + | /* StructureGenerator.kt:166 */
|
225 372 | }
|
373 + | /* StructureGenerator.kt:135 */
|
226 374 | }
|
375 + | /* ServerCodegenVisitor.kt:345 */
|
227 376 | impl GreetingWithErrorsInput {
|
228 - | /// Creates a new builder-style object to manufacture [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
377 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
378 + | /* ServerBuilderGenerator.kt:295 */
|
229 379 | pub fn builder() -> crate::input::greeting_with_errors_input::Builder {
|
380 + | /* ServerBuilderGenerator.kt:296 */
|
230 381 | crate::input::greeting_with_errors_input::Builder::default()
|
382 + | /* ServerBuilderGenerator.kt:295 */
|
231 383 | }
|
384 + | /* ServerCodegenVisitor.kt:345 */
|
232 385 | }
|
386 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
233 387 | impl crate::constrained::Constrained for crate::input::GreetingWithErrorsInput {
|
234 388 | type Unconstrained = crate::input::greeting_with_errors_input::Builder;
|
235 389 | }
|
236 390 |
|
391 + | /* StructureGenerator.kt:197 */
|
237 392 | #[allow(missing_docs)] // documentation missing in model
|
393 + | /* RustType.kt:516 */
|
238 394 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
239 - | pub struct SimpleScalarPropertiesInput {
|
395 + | pub /* StructureGenerator.kt:201 */ struct SimpleScalarPropertiesInput {
|
396 + | /* StructureGenerator.kt:231 */
|
240 397 | #[allow(missing_docs)] // documentation missing in model
|
241 398 | pub float_value: ::std::option::Option<f32>,
|
399 + | /* StructureGenerator.kt:231 */
|
242 400 | #[allow(missing_docs)] // documentation missing in model
|
243 401 | pub double_value: ::std::option::Option<f64>,
|
402 + | /* StructureGenerator.kt:201 */
|
244 403 | }
|
404 + | /* StructureGenerator.kt:135 */
|
245 405 | impl SimpleScalarPropertiesInput {
|
406 + | /* StructureGenerator.kt:231 */
|
246 407 | #[allow(missing_docs)] // documentation missing in model
|
408 + | /* StructureGenerator.kt:166 */
|
247 409 | pub fn float_value(&self) -> ::std::option::Option<f32> {
|
410 + | /* StructureGenerator.kt:168 */
|
248 411 | self.float_value
|
412 + | /* StructureGenerator.kt:166 */
|
249 413 | }
|
414 + | /* StructureGenerator.kt:231 */
|
250 415 | #[allow(missing_docs)] // documentation missing in model
|
416 + | /* StructureGenerator.kt:166 */
|
251 417 | pub fn double_value(&self) -> ::std::option::Option<f64> {
|
418 + | /* StructureGenerator.kt:168 */
|
252 419 | self.double_value
|
420 + | /* StructureGenerator.kt:166 */
|
253 421 | }
|
422 + | /* StructureGenerator.kt:135 */
|
254 423 | }
|
424 + | /* ServerCodegenVisitor.kt:345 */
|
255 425 | impl SimpleScalarPropertiesInput {
|
256 - | /// Creates a new builder-style object to manufacture [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
426 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
427 + | /* ServerBuilderGenerator.kt:295 */
|
257 428 | pub fn builder() -> crate::input::simple_scalar_properties_input::Builder {
|
429 + | /* ServerBuilderGenerator.kt:296 */
|
258 430 | crate::input::simple_scalar_properties_input::Builder::default()
|
431 + | /* ServerBuilderGenerator.kt:295 */
|
259 432 | }
|
433 + | /* ServerCodegenVisitor.kt:345 */
|
260 434 | }
|
435 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
261 436 | impl crate::constrained::Constrained for crate::input::SimpleScalarPropertiesInput {
|
262 437 | type Unconstrained = crate::input::simple_scalar_properties_input::Builder;
|
263 438 | }
|
264 439 |
|
440 + | /* StructureGenerator.kt:197 */
|
265 441 | #[allow(missing_docs)] // documentation missing in model
|
442 + | /* RustType.kt:516 */
|
266 443 | #[derive(
|
267 444 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
268 445 | )]
|
269 - | pub struct EmptyInputAndEmptyOutputInput {}
|
446 + | pub /* StructureGenerator.kt:201 */ struct EmptyInputAndEmptyOutputInput {/* StructureGenerator.kt:201 */}
|
447 + | /* ServerCodegenVisitor.kt:345 */
|
270 448 | impl EmptyInputAndEmptyOutputInput {
|
271 - | /// Creates a new builder-style object to manufacture [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
449 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
450 + | /* ServerBuilderGenerator.kt:295 */
|
272 451 | pub fn builder() -> crate::input::empty_input_and_empty_output_input::Builder {
|
452 + | /* ServerBuilderGenerator.kt:296 */
|
273 453 | crate::input::empty_input_and_empty_output_input::Builder::default()
|
454 + | /* ServerBuilderGenerator.kt:295 */
|
274 455 | }
|
456 + | /* ServerCodegenVisitor.kt:345 */
|
275 457 | }
|
458 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
276 459 | impl crate::constrained::Constrained for crate::input::EmptyInputAndEmptyOutputInput {
|
277 460 | type Unconstrained = crate::input::empty_input_and_empty_output_input::Builder;
|
278 461 | }
|
279 462 |
|
463 + | /* StructureGenerator.kt:197 */
|
280 464 | #[allow(missing_docs)] // documentation missing in model
|
465 + | /* RustType.kt:516 */
|
281 466 | #[derive(
|
282 467 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
283 468 | )]
|
284 - | pub struct NoInputAndOutputInput {}
|
469 + | pub /* StructureGenerator.kt:201 */ struct NoInputAndOutputInput {/* StructureGenerator.kt:201 */}
|
470 + | /* ServerCodegenVisitor.kt:345 */
|
285 471 | impl NoInputAndOutputInput {
|
286 - | /// Creates a new builder-style object to manufacture [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
472 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
473 + | /* ServerBuilderGenerator.kt:295 */
|
287 474 | pub fn builder() -> crate::input::no_input_and_output_input::Builder {
|
475 + | /* ServerBuilderGenerator.kt:296 */
|
288 476 | crate::input::no_input_and_output_input::Builder::default()
|
477 + | /* ServerBuilderGenerator.kt:295 */
|
289 478 | }
|
479 + | /* ServerCodegenVisitor.kt:345 */
|
290 480 | }
|
481 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
291 482 | impl crate::constrained::Constrained for crate::input::NoInputAndOutputInput {
|
292 483 | type Unconstrained = crate::input::no_input_and_output_input::Builder;
|
293 484 | }
|
294 485 |
|
486 + | /* StructureGenerator.kt:197 */
|
295 487 | #[allow(missing_docs)] // documentation missing in model
|
488 + | /* RustType.kt:516 */
|
296 489 | #[derive(
|
297 490 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
298 491 | )]
|
299 - | pub struct NoInputAndNoOutputInput {}
|
492 + | pub /* StructureGenerator.kt:201 */ struct NoInputAndNoOutputInput {/* StructureGenerator.kt:201 */}
|
493 + | /* ServerCodegenVisitor.kt:345 */
|
300 494 | impl NoInputAndNoOutputInput {
|
301 - | /// Creates a new builder-style object to manufacture [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
495 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
496 + | /* ServerBuilderGenerator.kt:295 */
|
302 497 | pub fn builder() -> crate::input::no_input_and_no_output_input::Builder {
|
498 + | /* ServerBuilderGenerator.kt:296 */
|
303 499 | crate::input::no_input_and_no_output_input::Builder::default()
|
500 + | /* ServerBuilderGenerator.kt:295 */
|
304 501 | }
|
502 + | /* ServerCodegenVisitor.kt:345 */
|
305 503 | }
|
504 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
306 505 | impl crate::constrained::Constrained for crate::input::NoInputAndNoOutputInput {
|
307 506 | type Unconstrained = crate::input::no_input_and_no_output_input::Builder;
|
308 507 | }
|
309 - | /// See [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
508 + | /// /* ServerBuilderGenerator.kt:171 */See [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
310 509 | pub mod operation_with_nested_structure_input {
|
311 510 |
|
511 + | /* RustType.kt:516 */
|
312 512 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
313 - | /// Holds one variant for each of the ways the builder can fail.
|
513 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
514 + | /* RustType.kt:516 */
|
314 515 | #[non_exhaustive]
|
516 + | /* ServerBuilderConstraintViolations.kt:75 */
|
315 517 | #[allow(clippy::enum_variant_names)]
|
316 518 | pub enum ConstraintViolation {
|
317 - | /// `top_level` was not provided but it is required when building `OperationWithNestedStructureInput`.
|
519 + | /// /* ServerBuilderConstraintViolations.kt:138 */`top_level` was not provided but it is required when building `OperationWithNestedStructureInput`.
|
520 + | /* ServerBuilderConstraintViolations.kt:143 */
|
318 521 | MissingTopLevel,
|
319 - | /// Constraint violation occurred building member `top_level` when building `OperationWithNestedStructureInput`.
|
522 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `top_level` when building `OperationWithNestedStructureInput`.
|
523 + | /* RustType.kt:516 */
|
320 524 | #[doc(hidden)]
|
525 + | /* ServerBuilderConstraintViolations.kt:164 */
|
321 526 | TopLevel(crate::model::top_level::ConstraintViolation),
|
527 + | /* ServerBuilderConstraintViolations.kt:75 */
|
322 528 | }
|
529 + | /* ServerBuilderConstraintViolations.kt:117 */
|
323 530 | impl ::std::fmt::Display for ConstraintViolation {
|
531 + | /* ServerBuilderConstraintViolations.kt:118 */
|
324 532 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
533 + | /* ServerBuilderConstraintViolations.kt:119 */
|
325 534 | match self {
|
326 - | ConstraintViolation::MissingTopLevel => write!(f, "`top_level` was not provided but it is required when building `OperationWithNestedStructureInput`"),
|
327 - | ConstraintViolation::TopLevel(_) => write!(f, "constraint violation occurred building member `top_level` when building `OperationWithNestedStructureInput`"),
|
328 - | }
|
535 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingTopLevel => write!(f, "`top_level` was not provided but it is required when building `OperationWithNestedStructureInput`"),
|
536 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::TopLevel(_) => write!(f, "constraint violation occurred building member `top_level` when building `OperationWithNestedStructureInput`"),
|
537 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
538 + | /* ServerBuilderConstraintViolations.kt:118 */
|
329 539 | }
|
540 + | /* ServerBuilderConstraintViolations.kt:117 */
|
330 541 | }
|
542 + | /* ServerBuilderConstraintViolations.kt:84 */
|
331 543 | impl ::std::error::Error for ConstraintViolation {}
|
544 + | /* ServerBuilderConstraintViolations.kt:171 */
|
332 545 | impl ConstraintViolation {
|
333 546 | pub(crate) fn as_validation_exception_field(
|
334 547 | self,
|
335 548 | path: ::std::string::String,
|
336 549 | ) -> crate::model::ValidationExceptionField {
|
337 550 | match self {
|
338 551 | ConstraintViolation::MissingTopLevel => crate::model::ValidationExceptionField {
|
339 552 | message: format!("Value at '{}/topLevel' failed to satisfy constraint: Member must not be null", path),
|
340 553 | path: path + "/topLevel",
|
341 554 | },
|
342 555 | ConstraintViolation::TopLevel(inner) => inner.as_validation_exception_field(path + "/topLevel"),
|
343 556 | }
|
344 557 | }
|
345 558 | }
|
559 + | /* ServerBuilderGenerator.kt:234 */
|
346 560 | impl ::std::convert::From<ConstraintViolation>
|
347 561 | for ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection
|
348 562 | {
|
349 563 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
350 564 | let first_validation_exception_field =
|
351 565 | constraint_violation.as_validation_exception_field("".to_owned());
|
352 566 | let validation_exception = crate::error::ValidationException {
|
353 567 | message: format!(
|
354 568 | "1 validation error detected. {}",
|
355 569 | &first_validation_exception_field.message
|
356 570 | ),
|
357 571 | field_list: Some(vec![first_validation_exception_field]),
|
358 572 | };
|
359 573 | Self::ConstraintViolation(
|
360 574 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
361 575 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
362 576 | )
|
363 577 | }
|
364 578 | }
|
579 + | /* ServerBuilderGenerator.kt:244 */
|
365 580 | impl ::std::convert::From<Builder>
|
366 581 | for crate::constrained::MaybeConstrained<crate::input::OperationWithNestedStructureInput>
|
367 582 | {
|
368 583 | fn from(builder: Builder) -> Self {
|
369 584 | Self::Unconstrained(builder)
|
370 585 | }
|
371 586 | }
|
587 + | /* ServerBuilderGenerator.kt:446 */
|
372 588 | impl ::std::convert::TryFrom<Builder> for crate::input::OperationWithNestedStructureInput {
|
373 589 | type Error = ConstraintViolation;
|
374 590 |
|
375 591 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
376 592 | builder.build()
|
377 593 | }
|
378 594 | }
|
379 - | /// A builder for [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
595 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
596 + | /* RustType.kt:516 */
|
380 597 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
598 + | /* ServerBuilderGenerator.kt:211 */
|
381 599 | pub struct Builder {
|
600 + | /* ServerBuilderGenerator.kt:308 */
|
382 601 | pub(crate) top_level:
|
383 602 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::TopLevel>>,
|
603 + | /* ServerBuilderGenerator.kt:211 */
|
384 604 | }
|
605 + | /* ServerBuilderGenerator.kt:215 */
|
385 606 | impl Builder {
|
607 + | /* ServerBuilderGenerator.kt:331 */
|
386 608 | #[allow(missing_docs)] // documentation missing in model
|
609 + | /* ServerBuilderGenerator.kt:343 */
|
387 610 | pub fn top_level(mut self, input: crate::model::TopLevel) -> Self {
|
388 - | self.top_level = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
611 + | /* ServerBuilderGenerator.kt:344 */
|
612 + | self.top_level =
|
613 + | /* ServerBuilderGenerator.kt:345 */Some(
|
614 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
615 + | /* ServerBuilderGenerator.kt:345 */)
|
616 + | /* ServerBuilderGenerator.kt:344 */;
|
389 617 | self
|
618 + | /* ServerBuilderGenerator.kt:343 */
|
390 619 | }
|
620 + | /* ServerBuilderGenerator.kt:426 */
|
391 621 | #[allow(missing_docs)] // documentation missing in model
|
622 + | /* ServerBuilderGenerator.kt:428 */
|
392 623 | pub(crate) fn set_top_level(
|
393 624 | mut self,
|
394 625 | input: impl ::std::convert::Into<
|
395 626 | crate::constrained::MaybeConstrained<crate::model::TopLevel>,
|
396 627 | >,
|
397 628 | ) -> Self {
|
629 + | /* ServerBuilderGenerator.kt:429 */
|
398 630 | self.top_level = Some(input.into());
|
399 631 | self
|
632 + | /* ServerBuilderGenerator.kt:428 */
|
400 633 | }
|
401 - | /// Consumes the builder and constructs a [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
402 - | ///
|
634 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
635 + | /// /* ServerBuilderGenerator.kt:260 */
|
403 636 | /// The builder fails to construct a [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput) if a [`ConstraintViolation`] occurs.
|
404 637 | ///
|
405 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
638 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
639 + | /* ServerBuilderGenerator.kt:271 */
|
406 640 | pub fn build(
|
407 641 | self,
|
408 642 | ) -> Result<crate::input::OperationWithNestedStructureInput, ConstraintViolation> {
|
409 643 | self.build_enforcing_all_constraints()
|
410 644 | }
|
645 + | /* ServerBuilderGenerator.kt:283 */
|
411 646 | fn build_enforcing_all_constraints(
|
412 647 | self,
|
413 648 | ) -> Result<crate::input::OperationWithNestedStructureInput, ConstraintViolation> {
|
414 - | Ok(crate::input::OperationWithNestedStructureInput {
|
415 - | top_level: self
|
416 - | .top_level
|
417 - | .map(|v| match v {
|
418 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
419 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
420 - | })
|
421 - | .map(|res| res.map_err(ConstraintViolation::TopLevel))
|
422 - | .transpose()?
|
423 - | .ok_or(ConstraintViolation::MissingTopLevel)?,
|
424 - | })
|
425 - | }
|
649 + | /* ServerBuilderGenerator.kt:287 */
|
650 + | Ok(
|
651 + | /* ServerBuilderGenerator.kt:542 */
|
652 + | crate::input::OperationWithNestedStructureInput {
|
653 + | /* ServerBuilderGenerator.kt:546 */
|
654 + | top_level: self
|
655 + | .top_level
|
656 + | /* ServerBuilderGenerator.kt:602 */
|
657 + | .map(|v| match v {
|
658 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
659 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
660 + | })
|
661 + | /* ServerBuilderGenerator.kt:614 */
|
662 + | .map(|res| res.map_err(ConstraintViolation::TopLevel))
|
663 + | .transpose()?
|
664 + | /* ServerBuilderGenerator.kt:569 */
|
665 + | .ok_or(ConstraintViolation::MissingTopLevel)?,
|
666 + | /* ServerBuilderGenerator.kt:542 */
|
667 + | }, /* ServerBuilderGenerator.kt:287 */
|
668 + | )
|
669 + | /* ServerBuilderGenerator.kt:283 */
|
670 + | }
|
671 + | /* ServerBuilderGenerator.kt:215 */
|
426 672 | }
|
673 + |
|
674 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
427 675 | }
|
428 - | /// See [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
676 + | /// /* ServerBuilderGenerator.kt:171 */See [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
429 677 | pub mod operation_with_required_members_input {
|
430 678 |
|
679 + | /* ServerBuilderGenerator.kt:461 */
|
431 680 | impl ::std::convert::From<Builder> for crate::input::OperationWithRequiredMembersInput {
|
432 681 | fn from(builder: Builder) -> Self {
|
433 682 | builder.build()
|
434 683 | }
|
435 684 | }
|
436 - | /// A builder for [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
685 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
686 + | /* RustType.kt:516 */
|
437 687 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
438 - | pub struct Builder {}
|
688 + | /* ServerBuilderGenerator.kt:211 */
|
689 + | pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
690 + | /* ServerBuilderGenerator.kt:215 */
|
439 691 | impl Builder {
|
440 - | /// Consumes the builder and constructs a [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
692 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
693 + | /* ServerBuilderGenerator.kt:271 */
|
441 694 | pub fn build(self) -> crate::input::OperationWithRequiredMembersInput {
|
442 695 | self.build_enforcing_all_constraints()
|
443 696 | }
|
697 + | /* ServerBuilderGenerator.kt:283 */
|
444 698 | fn build_enforcing_all_constraints(
|
445 699 | self,
|
446 700 | ) -> crate::input::OperationWithRequiredMembersInput {
|
447 - | crate::input::OperationWithRequiredMembersInput {}
|
701 + | /* ServerBuilderGenerator.kt:542 */
|
702 + | crate::input::OperationWithRequiredMembersInput {
|
703 + | /* ServerBuilderGenerator.kt:542 */}
|
704 + | /* ServerBuilderGenerator.kt:283 */
|
448 705 | }
|
706 + | /* ServerBuilderGenerator.kt:215 */
|
449 707 | }
|
708 + |
|
709 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
450 710 | }
|
451 - | /// See [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
711 + | /// /* ServerBuilderGenerator.kt:171 */See [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
452 712 | pub mod operation_with_defaults_input {
|
453 713 |
|
714 + | /* RustType.kt:516 */
|
454 715 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
455 - | /// Holds one variant for each of the ways the builder can fail.
|
716 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
717 + | /* RustType.kt:516 */
|
456 718 | #[non_exhaustive]
|
719 + | /* ServerBuilderConstraintViolations.kt:75 */
|
457 720 | #[allow(clippy::enum_variant_names)]
|
458 721 | pub enum ConstraintViolation {
|
459 - | /// Constraint violation occurred building member `defaults` when building `OperationWithDefaultsInput`.
|
722 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `defaults` when building `OperationWithDefaultsInput`.
|
723 + | /* RustType.kt:516 */
|
460 724 | #[doc(hidden)]
|
725 + | /* ServerBuilderConstraintViolations.kt:164 */
|
461 726 | Defaults(crate::model::defaults::ConstraintViolation),
|
727 + | /* ServerBuilderConstraintViolations.kt:75 */
|
462 728 | }
|
729 + | /* ServerBuilderConstraintViolations.kt:117 */
|
463 730 | impl ::std::fmt::Display for ConstraintViolation {
|
731 + | /* ServerBuilderConstraintViolations.kt:118 */
|
464 732 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
733 + | /* ServerBuilderConstraintViolations.kt:119 */
|
465 734 | match self {
|
466 - | ConstraintViolation::Defaults(_) => write!(f, "constraint violation occurred building member `defaults` when building `OperationWithDefaultsInput`"),
|
467 - | }
|
735 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Defaults(_) => write!(f, "constraint violation occurred building member `defaults` when building `OperationWithDefaultsInput`"),
|
736 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
737 + | /* ServerBuilderConstraintViolations.kt:118 */
|
468 738 | }
|
739 + | /* ServerBuilderConstraintViolations.kt:117 */
|
469 740 | }
|
741 + | /* ServerBuilderConstraintViolations.kt:84 */
|
470 742 | impl ::std::error::Error for ConstraintViolation {}
|
743 + | /* ServerBuilderConstraintViolations.kt:171 */
|
471 744 | impl ConstraintViolation {
|
472 745 | pub(crate) fn as_validation_exception_field(
|
473 746 | self,
|
474 747 | path: ::std::string::String,
|
475 748 | ) -> crate::model::ValidationExceptionField {
|
476 749 | match self {
|
477 750 | ConstraintViolation::Defaults(inner) => {
|
478 751 | inner.as_validation_exception_field(path + "/defaults")
|
479 752 | }
|
480 753 | }
|
481 754 | }
|
482 755 | }
|
756 + | /* ServerBuilderGenerator.kt:234 */
|
483 757 | impl ::std::convert::From<ConstraintViolation>
|
484 758 | for ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection
|
485 759 | {
|
486 760 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
487 761 | let first_validation_exception_field =
|
488 762 | constraint_violation.as_validation_exception_field("".to_owned());
|
489 763 | let validation_exception = crate::error::ValidationException {
|
490 764 | message: format!(
|
491 765 | "1 validation error detected. {}",
|
492 766 | &first_validation_exception_field.message
|
493 767 | ),
|
494 768 | field_list: Some(vec![first_validation_exception_field]),
|
495 769 | };
|
496 770 | Self::ConstraintViolation(
|
497 771 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
498 772 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
499 773 | )
|
500 774 | }
|
501 775 | }
|
776 + | /* ServerBuilderGenerator.kt:244 */
|
502 777 | impl ::std::convert::From<Builder>
|
503 778 | for crate::constrained::MaybeConstrained<crate::input::OperationWithDefaultsInput>
|
504 779 | {
|
505 780 | fn from(builder: Builder) -> Self {
|
506 781 | Self::Unconstrained(builder)
|
507 782 | }
|
508 783 | }
|
784 + | /* ServerBuilderGenerator.kt:446 */
|
509 785 | impl ::std::convert::TryFrom<Builder> for crate::input::OperationWithDefaultsInput {
|
510 786 | type Error = ConstraintViolation;
|
511 787 |
|
512 788 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
513 789 | builder.build()
|
514 790 | }
|
515 791 | }
|
516 - | /// A builder for [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
792 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
793 + | /* RustType.kt:516 */
|
517 794 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
795 + | /* ServerBuilderGenerator.kt:211 */
|
518 796 | pub struct Builder {
|
797 + | /* ServerBuilderGenerator.kt:308 */
|
519 798 | pub(crate) defaults:
|
520 799 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Defaults>>,
|
800 + | /* ServerBuilderGenerator.kt:308 */
|
521 801 | pub(crate) client_optional_defaults:
|
522 802 | ::std::option::Option<crate::model::ClientOptionalDefaults>,
|
803 + | /* ServerBuilderGenerator.kt:308 */
|
523 804 | pub(crate) top_level_default: ::std::option::Option<::std::string::String>,
|
805 + | /* ServerBuilderGenerator.kt:308 */
|
524 806 | pub(crate) other_top_level_default: ::std::option::Option<i32>,
|
807 + | /* ServerBuilderGenerator.kt:211 */
|
525 808 | }
|
809 + | /* ServerBuilderGenerator.kt:215 */
|
526 810 | impl Builder {
|
811 + | /* ServerBuilderGenerator.kt:331 */
|
527 812 | #[allow(missing_docs)] // documentation missing in model
|
813 + | /* ServerBuilderGenerator.kt:343 */
|
528 814 | pub fn defaults(mut self, input: ::std::option::Option<crate::model::Defaults>) -> Self {
|
529 - | self.defaults = input.map(
|
530 - | #[allow(clippy::redundant_closure)]
|
531 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
532 - | );
|
815 + | /* ServerBuilderGenerator.kt:344 */
|
816 + | self.defaults =
|
817 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
818 + | /* ServerBuilderGenerator.kt:344 */;
|
533 819 | self
|
820 + | /* ServerBuilderGenerator.kt:343 */
|
534 821 | }
|
822 + | /* ServerBuilderGenerator.kt:426 */
|
535 823 | #[allow(missing_docs)] // documentation missing in model
|
824 + | /* ServerBuilderGenerator.kt:428 */
|
536 825 | pub(crate) fn set_defaults(
|
537 826 | mut self,
|
538 827 | input: Option<
|
539 828 | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Defaults>>,
|
540 829 | >,
|
541 830 | ) -> Self {
|
831 + | /* ServerBuilderGenerator.kt:429 */
|
542 832 | self.defaults = input.map(|v| v.into());
|
543 833 | self
|
834 + | /* ServerBuilderGenerator.kt:428 */
|
544 835 | }
|
836 + | /* ServerBuilderGenerator.kt:331 */
|
545 837 | #[allow(missing_docs)] // documentation missing in model
|
838 + | /* ServerBuilderGenerator.kt:343 */
|
546 839 | pub fn client_optional_defaults(
|
547 840 | mut self,
|
548 841 | input: ::std::option::Option<crate::model::ClientOptionalDefaults>,
|
549 842 | ) -> Self {
|
550 - | self.client_optional_defaults = input;
|
843 + | /* ServerBuilderGenerator.kt:344 */
|
844 + | self.client_optional_defaults =
|
845 + | /* ServerBuilderGenerator.kt:376 */input
|
846 + | /* ServerBuilderGenerator.kt:344 */;
|
551 847 | self
|
848 + | /* ServerBuilderGenerator.kt:343 */
|
552 849 | }
|
850 + | /* ServerBuilderGenerator.kt:426 */
|
553 851 | #[allow(missing_docs)] // documentation missing in model
|
852 + | /* ServerBuilderGenerator.kt:428 */
|
554 853 | pub(crate) fn set_client_optional_defaults(
|
555 854 | mut self,
|
556 855 | input: Option<impl ::std::convert::Into<crate::model::ClientOptionalDefaults>>,
|
557 856 | ) -> Self {
|
857 + | /* ServerBuilderGenerator.kt:429 */
|
558 858 | self.client_optional_defaults = input.map(|v| v.into());
|
559 859 | self
|
860 + | /* ServerBuilderGenerator.kt:428 */
|
560 861 | }
|
862 + | /* ServerBuilderGenerator.kt:331 */
|
561 863 | #[allow(missing_docs)] // documentation missing in model
|
864 + | /* ServerBuilderGenerator.kt:343 */
|
562 865 | pub fn top_level_default(mut self, input: ::std::string::String) -> Self {
|
563 - | self.top_level_default = Some(input);
|
866 + | /* ServerBuilderGenerator.kt:344 */
|
867 + | self.top_level_default =
|
868 + | /* ServerBuilderGenerator.kt:345 */Some(
|
869 + | /* ServerBuilderGenerator.kt:376 */input
|
870 + | /* ServerBuilderGenerator.kt:345 */)
|
871 + | /* ServerBuilderGenerator.kt:344 */;
|
564 872 | self
|
873 + | /* ServerBuilderGenerator.kt:343 */
|
565 874 | }
|
875 + | /* ServerBuilderGenerator.kt:426 */
|
566 876 | #[allow(missing_docs)] // documentation missing in model
|
877 + | /* ServerBuilderGenerator.kt:428 */
|
567 878 | pub(crate) fn set_top_level_default(
|
568 879 | mut self,
|
569 880 | input: impl ::std::convert::Into<::std::string::String>,
|
570 881 | ) -> Self {
|
882 + | /* ServerBuilderGenerator.kt:429 */
|
571 883 | self.top_level_default = Some(input.into());
|
572 884 | self
|
885 + | /* ServerBuilderGenerator.kt:428 */
|
573 886 | }
|
887 + | /* ServerBuilderGenerator.kt:331 */
|
574 888 | #[allow(missing_docs)] // documentation missing in model
|
889 + | /* ServerBuilderGenerator.kt:343 */
|
575 890 | pub fn other_top_level_default(mut self, input: i32) -> Self {
|
576 - | self.other_top_level_default = Some(input);
|
891 + | /* ServerBuilderGenerator.kt:344 */
|
892 + | self.other_top_level_default =
|
893 + | /* ServerBuilderGenerator.kt:345 */Some(
|
894 + | /* ServerBuilderGenerator.kt:376 */input
|
895 + | /* ServerBuilderGenerator.kt:345 */)
|
896 + | /* ServerBuilderGenerator.kt:344 */;
|
577 897 | self
|
898 + | /* ServerBuilderGenerator.kt:343 */
|
578 899 | }
|
900 + | /* ServerBuilderGenerator.kt:426 */
|
579 901 | #[allow(missing_docs)] // documentation missing in model
|
902 + | /* ServerBuilderGenerator.kt:428 */
|
580 903 | pub(crate) fn set_other_top_level_default(
|
581 904 | mut self,
|
582 905 | input: impl ::std::convert::Into<i32>,
|
583 906 | ) -> Self {
|
907 + | /* ServerBuilderGenerator.kt:429 */
|
584 908 | self.other_top_level_default = Some(input.into());
|
585 909 | self
|
910 + | /* ServerBuilderGenerator.kt:428 */
|
586 911 | }
|
587 - | /// Consumes the builder and constructs a [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
588 - | ///
|
912 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
913 + | /// /* ServerBuilderGenerator.kt:260 */
|
589 914 | /// The builder fails to construct a [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput) if a [`ConstraintViolation`] occurs.
|
590 915 | ///
|
916 + | /* ServerBuilderGenerator.kt:271 */
|
591 917 | pub fn build(
|
592 918 | self,
|
593 919 | ) -> Result<crate::input::OperationWithDefaultsInput, ConstraintViolation> {
|
594 920 | self.build_enforcing_all_constraints()
|
595 921 | }
|
922 + | /* ServerBuilderGenerator.kt:283 */
|
596 923 | fn build_enforcing_all_constraints(
|
597 924 | self,
|
598 925 | ) -> Result<crate::input::OperationWithDefaultsInput, ConstraintViolation> {
|
599 - | Ok(crate::input::OperationWithDefaultsInput {
|
600 - | defaults: self
|
601 - | .defaults
|
602 - | .map(|v| match v {
|
603 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
604 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
605 - | })
|
606 - | .map(|res| res.map_err(ConstraintViolation::Defaults))
|
607 - | .transpose()?,
|
608 - | client_optional_defaults: self.client_optional_defaults,
|
609 - | top_level_default: self.top_level_default.unwrap_or_else(
|
610 - | #[allow(clippy::redundant_closure)]
|
611 - | || String::from("hi"),
|
612 - | ),
|
613 - | other_top_level_default: self.other_top_level_default.unwrap_or(0i32),
|
614 - | })
|
615 - | }
|
926 + | /* ServerBuilderGenerator.kt:287 */
|
927 + | Ok(
|
928 + | /* ServerBuilderGenerator.kt:542 */
|
929 + | crate::input::OperationWithDefaultsInput {
|
930 + | /* ServerBuilderGenerator.kt:546 */
|
931 + | defaults: self
|
932 + | .defaults
|
933 + | /* ServerBuilderGenerator.kt:602 */
|
934 + | .map(|v| match v {
|
935 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
936 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
937 + | })
|
938 + | /* ServerBuilderGenerator.kt:614 */
|
939 + | .map(|res| res.map_err(ConstraintViolation::Defaults))
|
940 + | .transpose()?,
|
941 + | /* ServerBuilderGenerator.kt:546 */
|
942 + | client_optional_defaults: self.client_optional_defaults,
|
943 + | /* ServerBuilderGenerator.kt:546 */
|
944 + | top_level_default: self
|
945 + | .top_level_default
|
946 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
947 + | .unwrap_or_else(
|
948 + | #[allow(clippy::redundant_closure)]
|
949 + | || String::from("hi"),
|
950 + | ),
|
951 + | /* ServerBuilderGenerator.kt:546 */
|
952 + | other_top_level_default: self
|
953 + | .other_top_level_default
|
954 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
955 + | .unwrap_or(0i32),
|
956 + | /* ServerBuilderGenerator.kt:542 */
|
957 + | }, /* ServerBuilderGenerator.kt:287 */
|
958 + | )
|
959 + | /* ServerBuilderGenerator.kt:283 */
|
960 + | }
|
961 + | /* ServerBuilderGenerator.kt:215 */
|
616 962 | }
|
963 + |
|
964 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
617 965 | }
|
618 - | /// See [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
966 + | /// /* ServerBuilderGenerator.kt:171 */See [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
619 967 | pub mod content_type_parameters_input {
|
620 968 |
|
969 + | /* ServerBuilderGenerator.kt:461 */
|
621 970 | impl ::std::convert::From<Builder> for crate::input::ContentTypeParametersInput {
|
622 971 | fn from(builder: Builder) -> Self {
|
623 972 | builder.build()
|
624 973 | }
|
625 974 | }
|
626 - | /// A builder for [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
975 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
976 + | /* RustType.kt:516 */
|
627 977 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
978 + | /* ServerBuilderGenerator.kt:211 */
|
628 979 | pub struct Builder {
|
980 + | /* ServerBuilderGenerator.kt:308 */
|
629 981 | pub(crate) value: ::std::option::Option<i32>,
|
982 + | /* ServerBuilderGenerator.kt:211 */
|
630 983 | }
|
984 + | /* ServerBuilderGenerator.kt:215 */
|
631 985 | impl Builder {
|
986 + | /* ServerBuilderGenerator.kt:331 */
|
632 987 | #[allow(missing_docs)] // documentation missing in model
|
988 + | /* ServerBuilderGenerator.kt:343 */
|
633 989 | pub fn value(mut self, input: ::std::option::Option<i32>) -> Self {
|
634 - | self.value = input;
|
990 + | /* ServerBuilderGenerator.kt:344 */
|
991 + | self.value =
|
992 + | /* ServerBuilderGenerator.kt:376 */input
|
993 + | /* ServerBuilderGenerator.kt:344 */;
|
635 994 | self
|
995 + | /* ServerBuilderGenerator.kt:343 */
|
636 996 | }
|
997 + | /* ServerBuilderGenerator.kt:426 */
|
637 998 | #[allow(missing_docs)] // documentation missing in model
|
999 + | /* ServerBuilderGenerator.kt:428 */
|
638 1000 | pub(crate) fn set_value(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
1001 + | /* ServerBuilderGenerator.kt:429 */
|
639 1002 | self.value = input.map(|v| v.into());
|
640 1003 | self
|
1004 + | /* ServerBuilderGenerator.kt:428 */
|
641 1005 | }
|
642 - | /// Consumes the builder and constructs a [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
1006 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
1007 + | /* ServerBuilderGenerator.kt:271 */
|
643 1008 | pub fn build(self) -> crate::input::ContentTypeParametersInput {
|
644 1009 | self.build_enforcing_all_constraints()
|
645 1010 | }
|
1011 + | /* ServerBuilderGenerator.kt:283 */
|
646 1012 | fn build_enforcing_all_constraints(self) -> crate::input::ContentTypeParametersInput {
|
647 - | crate::input::ContentTypeParametersInput { value: self.value }
|
1013 + | /* ServerBuilderGenerator.kt:542 */
|
1014 + | crate::input::ContentTypeParametersInput {
|
1015 + | /* ServerBuilderGenerator.kt:546 */
|
1016 + | value: self.value,
|
1017 + | /* ServerBuilderGenerator.kt:542 */
|
1018 + | }
|
1019 + | /* ServerBuilderGenerator.kt:283 */
|
648 1020 | }
|
1021 + | /* ServerBuilderGenerator.kt:215 */
|
649 1022 | }
|
1023 + |
|
1024 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
650 1025 | }
|
651 - | /// See [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
1026 + | /// /* ServerBuilderGenerator.kt:171 */See [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
652 1027 | pub mod put_with_content_encoding_input {
|
653 1028 |
|
1029 + | /* ServerBuilderGenerator.kt:461 */
|
654 1030 | impl ::std::convert::From<Builder> for crate::input::PutWithContentEncodingInput {
|
655 1031 | fn from(builder: Builder) -> Self {
|
656 1032 | builder.build()
|
657 1033 | }
|
658 1034 | }
|
659 - | /// A builder for [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
1035 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
1036 + | /* RustType.kt:516 */
|
660 1037 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1038 + | /* ServerBuilderGenerator.kt:211 */
|
661 1039 | pub struct Builder {
|
1040 + | /* ServerBuilderGenerator.kt:308 */
|
662 1041 | pub(crate) encoding: ::std::option::Option<::std::string::String>,
|
1042 + | /* ServerBuilderGenerator.kt:308 */
|
663 1043 | pub(crate) data: ::std::option::Option<::std::string::String>,
|
1044 + | /* ServerBuilderGenerator.kt:211 */
|
664 1045 | }
|
1046 + | /* ServerBuilderGenerator.kt:215 */
|
665 1047 | impl Builder {
|
1048 + | /* ServerBuilderGenerator.kt:331 */
|
666 1049 | #[allow(missing_docs)] // documentation missing in model
|
1050 + | /* ServerBuilderGenerator.kt:343 */
|
667 1051 | pub fn encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
668 - | self.encoding = input;
|
1052 + | /* ServerBuilderGenerator.kt:344 */
|
1053 + | self.encoding =
|
1054 + | /* ServerBuilderGenerator.kt:376 */input
|
1055 + | /* ServerBuilderGenerator.kt:344 */;
|
669 1056 | self
|
1057 + | /* ServerBuilderGenerator.kt:343 */
|
670 1058 | }
|
1059 + | /* ServerBuilderGenerator.kt:426 */
|
671 1060 | #[allow(missing_docs)] // documentation missing in model
|
1061 + | /* ServerBuilderGenerator.kt:428 */
|
672 1062 | pub(crate) fn set_encoding(
|
673 1063 | mut self,
|
674 1064 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
675 1065 | ) -> Self {
|
1066 + | /* ServerBuilderGenerator.kt:429 */
|
676 1067 | self.encoding = input.map(|v| v.into());
|
677 1068 | self
|
1069 + | /* ServerBuilderGenerator.kt:428 */
|
678 1070 | }
|
1071 + | /* ServerBuilderGenerator.kt:331 */
|
679 1072 | #[allow(missing_docs)] // documentation missing in model
|
1073 + | /* ServerBuilderGenerator.kt:343 */
|
680 1074 | pub fn data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
681 - | self.data = input;
|
1075 + | /* ServerBuilderGenerator.kt:344 */
|
1076 + | self.data =
|
1077 + | /* ServerBuilderGenerator.kt:376 */input
|
1078 + | /* ServerBuilderGenerator.kt:344 */;
|
682 1079 | self
|
1080 + | /* ServerBuilderGenerator.kt:343 */
|
683 1081 | }
|
1082 + | /* ServerBuilderGenerator.kt:426 */
|
684 1083 | #[allow(missing_docs)] // documentation missing in model
|
1084 + | /* ServerBuilderGenerator.kt:428 */
|
685 1085 | pub(crate) fn set_data(
|
686 1086 | mut self,
|
687 1087 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
688 1088 | ) -> Self {
|
1089 + | /* ServerBuilderGenerator.kt:429 */
|
689 1090 | self.data = input.map(|v| v.into());
|
690 1091 | self
|
1092 + | /* ServerBuilderGenerator.kt:428 */
|
691 1093 | }
|
692 - | /// Consumes the builder and constructs a [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
1094 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
1095 + | /* ServerBuilderGenerator.kt:271 */
|
693 1096 | pub fn build(self) -> crate::input::PutWithContentEncodingInput {
|
694 1097 | self.build_enforcing_all_constraints()
|
695 1098 | }
|
1099 + | /* ServerBuilderGenerator.kt:283 */
|
696 1100 | fn build_enforcing_all_constraints(self) -> crate::input::PutWithContentEncodingInput {
|
1101 + | /* ServerBuilderGenerator.kt:542 */
|
697 1102 | crate::input::PutWithContentEncodingInput {
|
1103 + | /* ServerBuilderGenerator.kt:546 */
|
698 1104 | encoding: self.encoding,
|
1105 + | /* ServerBuilderGenerator.kt:546 */
|
699 1106 | data: self.data,
|
1107 + | /* ServerBuilderGenerator.kt:542 */
|
700 1108 | }
|
1109 + | /* ServerBuilderGenerator.kt:283 */
|
701 1110 | }
|
1111 + | /* ServerBuilderGenerator.kt:215 */
|
702 1112 | }
|
1113 + |
|
1114 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
703 1115 | }
|
704 - | /// See [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
1116 + | /// /* ServerBuilderGenerator.kt:171 */See [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
705 1117 | pub mod host_with_path_operation_input {
|
706 1118 |
|
1119 + | /* ServerBuilderGenerator.kt:461 */
|
707 1120 | impl ::std::convert::From<Builder> for crate::input::HostWithPathOperationInput {
|
708 1121 | fn from(builder: Builder) -> Self {
|
709 1122 | builder.build()
|
710 1123 | }
|
711 1124 | }
|
712 - | /// A builder for [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
1125 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
1126 + | /* RustType.kt:516 */
|
713 1127 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
714 - | pub struct Builder {}
|
1128 + | /* ServerBuilderGenerator.kt:211 */
|
1129 + | pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
1130 + | /* ServerBuilderGenerator.kt:215 */
|
715 1131 | impl Builder {
|
716 - | /// Consumes the builder and constructs a [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
1132 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
1133 + | /* ServerBuilderGenerator.kt:271 */
|
717 1134 | pub fn build(self) -> crate::input::HostWithPathOperationInput {
|
718 1135 | self.build_enforcing_all_constraints()
|
719 1136 | }
|
1137 + | /* ServerBuilderGenerator.kt:283 */
|
720 1138 | fn build_enforcing_all_constraints(self) -> crate::input::HostWithPathOperationInput {
|
721 - | crate::input::HostWithPathOperationInput {}
|
1139 + | /* ServerBuilderGenerator.kt:542 */
|
1140 + | crate::input::HostWithPathOperationInput {
|
1141 + | /* ServerBuilderGenerator.kt:542 */}
|
1142 + | /* ServerBuilderGenerator.kt:283 */
|
722 1143 | }
|
1144 + | /* ServerBuilderGenerator.kt:215 */
|
723 1145 | }
|
1146 + |
|
1147 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
724 1148 | }
|
725 - | /// See [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
1149 + | /// /* ServerBuilderGenerator.kt:171 */See [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
726 1150 | pub mod endpoint_with_host_label_operation_input {
|
727 1151 |
|
1152 + | /* RustType.kt:516 */
|
728 1153 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
729 - | /// Holds one variant for each of the ways the builder can fail.
|
1154 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
1155 + | /* RustType.kt:516 */
|
730 1156 | #[non_exhaustive]
|
1157 + | /* ServerBuilderConstraintViolations.kt:75 */
|
731 1158 | #[allow(clippy::enum_variant_names)]
|
732 1159 | pub enum ConstraintViolation {
|
733 - | /// `label` was not provided but it is required when building `EndpointWithHostLabelOperationInput`.
|
1160 + | /// /* ServerBuilderConstraintViolations.kt:138 */`label` was not provided but it is required when building `EndpointWithHostLabelOperationInput`.
|
1161 + | /* ServerBuilderConstraintViolations.kt:143 */
|
734 1162 | MissingLabel,
|
1163 + | /* ServerBuilderConstraintViolations.kt:75 */
|
735 1164 | }
|
1165 + | /* ServerBuilderConstraintViolations.kt:117 */
|
736 1166 | impl ::std::fmt::Display for ConstraintViolation {
|
1167 + | /* ServerBuilderConstraintViolations.kt:118 */
|
737 1168 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1169 + | /* ServerBuilderConstraintViolations.kt:119 */
|
738 1170 | match self {
|
739 - | ConstraintViolation::MissingLabel => write!(f, "`label` was not provided but it is required when building `EndpointWithHostLabelOperationInput`"),
|
740 - | }
|
1171 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingLabel => write!(f, "`label` was not provided but it is required when building `EndpointWithHostLabelOperationInput`"),
|
1172 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
1173 + | /* ServerBuilderConstraintViolations.kt:118 */
|
741 1174 | }
|
1175 + | /* ServerBuilderConstraintViolations.kt:117 */
|
742 1176 | }
|
1177 + | /* ServerBuilderConstraintViolations.kt:84 */
|
743 1178 | impl ::std::error::Error for ConstraintViolation {}
|
1179 + | /* ServerBuilderConstraintViolations.kt:171 */
|
744 1180 | impl ConstraintViolation {
|
745 1181 | pub(crate) fn as_validation_exception_field(
|
746 1182 | self,
|
747 1183 | path: ::std::string::String,
|
748 1184 | ) -> crate::model::ValidationExceptionField {
|
749 1185 | match self {
|
750 1186 | ConstraintViolation::MissingLabel => crate::model::ValidationExceptionField {
|
751 1187 | message: format!(
|
752 1188 | "Value at '{}/label' failed to satisfy constraint: Member must not be null",
|
753 1189 | path
|
754 1190 | ),
|
755 1191 | path: path + "/label",
|
756 1192 | },
|
757 1193 | }
|
758 1194 | }
|
759 1195 | }
|
1196 + | /* ServerBuilderGenerator.kt:234 */
|
760 1197 | impl ::std::convert::From<ConstraintViolation>
|
761 1198 | for ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection
|
762 1199 | {
|
763 1200 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
764 1201 | let first_validation_exception_field =
|
765 1202 | constraint_violation.as_validation_exception_field("".to_owned());
|
766 1203 | let validation_exception = crate::error::ValidationException {
|
767 1204 | message: format!(
|
768 1205 | "1 validation error detected. {}",
|
769 1206 | &first_validation_exception_field.message
|
770 1207 | ),
|
771 1208 | field_list: Some(vec![first_validation_exception_field]),
|
772 1209 | };
|
773 1210 | Self::ConstraintViolation(
|
774 1211 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
775 1212 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
776 1213 | )
|
777 1214 | }
|
778 1215 | }
|
1216 + | /* ServerBuilderGenerator.kt:244 */
|
779 1217 | impl ::std::convert::From<Builder>
|
780 1218 | for crate::constrained::MaybeConstrained<crate::input::EndpointWithHostLabelOperationInput>
|
781 1219 | {
|
782 1220 | fn from(builder: Builder) -> Self {
|
783 1221 | Self::Unconstrained(builder)
|
784 1222 | }
|
785 1223 | }
|
1224 + | /* ServerBuilderGenerator.kt:446 */
|
786 1225 | impl ::std::convert::TryFrom<Builder> for crate::input::EndpointWithHostLabelOperationInput {
|
787 1226 | type Error = ConstraintViolation;
|
788 1227 |
|
789 1228 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
790 1229 | builder.build()
|
791 1230 | }
|
792 1231 | }
|
793 - | /// A builder for [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
1232 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
1233 + | /* RustType.kt:516 */
|
794 1234 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1235 + | /* ServerBuilderGenerator.kt:211 */
|
795 1236 | pub struct Builder {
|
1237 + | /* ServerBuilderGenerator.kt:308 */
|
796 1238 | pub(crate) label: ::std::option::Option<::std::string::String>,
|
1239 + | /* ServerBuilderGenerator.kt:211 */
|
797 1240 | }
|
1241 + | /* ServerBuilderGenerator.kt:215 */
|
798 1242 | impl Builder {
|
1243 + | /* ServerBuilderGenerator.kt:331 */
|
799 1244 | #[allow(missing_docs)] // documentation missing in model
|
1245 + | /* ServerBuilderGenerator.kt:343 */
|
800 1246 | pub fn label(mut self, input: ::std::string::String) -> Self {
|
801 - | self.label = Some(input);
|
1247 + | /* ServerBuilderGenerator.kt:344 */
|
1248 + | self.label =
|
1249 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1250 + | /* ServerBuilderGenerator.kt:376 */input
|
1251 + | /* ServerBuilderGenerator.kt:345 */)
|
1252 + | /* ServerBuilderGenerator.kt:344 */;
|
802 1253 | self
|
1254 + | /* ServerBuilderGenerator.kt:343 */
|
803 1255 | }
|
1256 + | /* ServerBuilderGenerator.kt:426 */
|
804 1257 | #[allow(missing_docs)] // documentation missing in model
|
1258 + | /* ServerBuilderGenerator.kt:428 */
|
805 1259 | pub(crate) fn set_label(
|
806 1260 | mut self,
|
807 1261 | input: impl ::std::convert::Into<::std::string::String>,
|
808 1262 | ) -> Self {
|
1263 + | /* ServerBuilderGenerator.kt:429 */
|
809 1264 | self.label = Some(input.into());
|
810 1265 | self
|
1266 + | /* ServerBuilderGenerator.kt:428 */
|
811 1267 | }
|
812 - | /// Consumes the builder and constructs a [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
813 - | ///
|
1268 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
1269 + | /// /* ServerBuilderGenerator.kt:260 */
|
814 1270 | /// The builder fails to construct a [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput) if a [`ConstraintViolation`] occurs.
|
815 1271 | ///
|
1272 + | /* ServerBuilderGenerator.kt:271 */
|
816 1273 | pub fn build(
|
817 1274 | self,
|
818 1275 | ) -> Result<crate::input::EndpointWithHostLabelOperationInput, ConstraintViolation>
|
819 1276 | {
|
820 1277 | self.build_enforcing_all_constraints()
|
821 1278 | }
|
1279 + | /* ServerBuilderGenerator.kt:283 */
|
822 1280 | fn build_enforcing_all_constraints(
|
823 1281 | self,
|
824 1282 | ) -> Result<crate::input::EndpointWithHostLabelOperationInput, ConstraintViolation>
|
825 1283 | {
|
826 - | Ok(crate::input::EndpointWithHostLabelOperationInput {
|
827 - | label: self.label.ok_or(ConstraintViolation::MissingLabel)?,
|
828 - | })
|
829 - | }
|
1284 + | /* ServerBuilderGenerator.kt:287 */
|
1285 + | Ok(
|
1286 + | /* ServerBuilderGenerator.kt:542 */
|
1287 + | crate::input::EndpointWithHostLabelOperationInput {
|
1288 + | /* ServerBuilderGenerator.kt:546 */
|
1289 + | label: self
|
1290 + | .label
|
1291 + | /* ServerBuilderGenerator.kt:569 */
|
1292 + | .ok_or(ConstraintViolation::MissingLabel)?,
|
1293 + | /* ServerBuilderGenerator.kt:542 */
|
1294 + | }, /* ServerBuilderGenerator.kt:287 */
|
1295 + | )
|
1296 + | /* ServerBuilderGenerator.kt:283 */
|
1297 + | }
|
1298 + | /* ServerBuilderGenerator.kt:215 */
|
830 1299 | }
|
1300 + |
|
1301 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
831 1302 | }
|
832 - | /// See [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
1303 + | /// /* ServerBuilderGenerator.kt:171 */See [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
833 1304 | pub mod endpoint_operation_input {
|
834 1305 |
|
1306 + | /* ServerBuilderGenerator.kt:461 */
|
835 1307 | impl ::std::convert::From<Builder> for crate::input::EndpointOperationInput {
|
836 1308 | fn from(builder: Builder) -> Self {
|
837 1309 | builder.build()
|
838 1310 | }
|
839 1311 | }
|
840 - | /// A builder for [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
1312 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
1313 + | /* RustType.kt:516 */
|
841 1314 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
842 - | pub struct Builder {}
|
1315 + | /* ServerBuilderGenerator.kt:211 */
|
1316 + | pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
1317 + | /* ServerBuilderGenerator.kt:215 */
|
843 1318 | impl Builder {
|
844 - | /// Consumes the builder and constructs a [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
1319 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
1320 + | /* ServerBuilderGenerator.kt:271 */
|
845 1321 | pub fn build(self) -> crate::input::EndpointOperationInput {
|
846 1322 | self.build_enforcing_all_constraints()
|
847 1323 | }
|
1324 + | /* ServerBuilderGenerator.kt:283 */
|
848 1325 | fn build_enforcing_all_constraints(self) -> crate::input::EndpointOperationInput {
|
849 - | crate::input::EndpointOperationInput {}
|
1326 + | /* ServerBuilderGenerator.kt:542 */
|
1327 + | crate::input::EndpointOperationInput {
|
1328 + | /* ServerBuilderGenerator.kt:542 */}
|
1329 + | /* ServerBuilderGenerator.kt:283 */
|
850 1330 | }
|
1331 + | /* ServerBuilderGenerator.kt:215 */
|
851 1332 | }
|
1333 + |
|
1334 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
852 1335 | }
|
853 - | /// See [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
1336 + | /// /* ServerBuilderGenerator.kt:171 */See [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
854 1337 | pub mod json_unions_input {
|
855 1338 |
|
1339 + | /* RustType.kt:516 */
|
856 1340 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
857 - | /// Holds one variant for each of the ways the builder can fail.
|
1341 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
1342 + | /* RustType.kt:516 */
|
858 1343 | #[non_exhaustive]
|
1344 + | /* ServerBuilderConstraintViolations.kt:75 */
|
859 1345 | #[allow(clippy::enum_variant_names)]
|
860 1346 | pub enum ConstraintViolation {
|
861 - | /// Constraint violation occurred building member `contents` when building `JsonUnionsInput`.
|
1347 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `contents` when building `JsonUnionsInput`.
|
1348 + | /* RustType.kt:516 */
|
862 1349 | #[doc(hidden)]
|
1350 + | /* ServerBuilderConstraintViolations.kt:164 */
|
863 1351 | Contents(crate::model::my_union::ConstraintViolation),
|
1352 + | /* ServerBuilderConstraintViolations.kt:75 */
|
864 1353 | }
|
1354 + | /* ServerBuilderConstraintViolations.kt:117 */
|
865 1355 | impl ::std::fmt::Display for ConstraintViolation {
|
1356 + | /* ServerBuilderConstraintViolations.kt:118 */
|
866 1357 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1358 + | /* ServerBuilderConstraintViolations.kt:119 */
|
867 1359 | match self {
|
868 - | ConstraintViolation::Contents(_) => write!(f, "constraint violation occurred building member `contents` when building `JsonUnionsInput`"),
|
869 - | }
|
1360 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Contents(_) => write!(f, "constraint violation occurred building member `contents` when building `JsonUnionsInput`"),
|
1361 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
1362 + | /* ServerBuilderConstraintViolations.kt:118 */
|
870 1363 | }
|
1364 + | /* ServerBuilderConstraintViolations.kt:117 */
|
871 1365 | }
|
1366 + | /* ServerBuilderConstraintViolations.kt:84 */
|
872 1367 | impl ::std::error::Error for ConstraintViolation {}
|
1368 + | /* ServerBuilderConstraintViolations.kt:171 */
|
873 1369 | impl ConstraintViolation {
|
874 1370 | pub(crate) fn as_validation_exception_field(
|
875 1371 | self,
|
876 1372 | path: ::std::string::String,
|
877 1373 | ) -> crate::model::ValidationExceptionField {
|
878 1374 | match self {
|
879 1375 | ConstraintViolation::Contents(inner) => {
|
880 1376 | inner.as_validation_exception_field(path + "/contents")
|
881 1377 | }
|
882 1378 | }
|
883 1379 | }
|
884 1380 | }
|
1381 + | /* ServerBuilderGenerator.kt:234 */
|
885 1382 | impl ::std::convert::From<ConstraintViolation>
|
886 1383 | for ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection
|
887 1384 | {
|
888 1385 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
889 1386 | let first_validation_exception_field =
|
890 1387 | constraint_violation.as_validation_exception_field("".to_owned());
|
891 1388 | let validation_exception = crate::error::ValidationException {
|
892 1389 | message: format!(
|
893 1390 | "1 validation error detected. {}",
|
894 1391 | &first_validation_exception_field.message
|
895 1392 | ),
|
896 1393 | field_list: Some(vec![first_validation_exception_field]),
|
897 1394 | };
|
898 1395 | Self::ConstraintViolation(
|
899 1396 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
900 1397 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
901 1398 | )
|
902 1399 | }
|
903 1400 | }
|
1401 + | /* ServerBuilderGenerator.kt:244 */
|
904 1402 | impl ::std::convert::From<Builder>
|
905 1403 | for crate::constrained::MaybeConstrained<crate::input::JsonUnionsInput>
|
906 1404 | {
|
907 1405 | fn from(builder: Builder) -> Self {
|
908 1406 | Self::Unconstrained(builder)
|
909 1407 | }
|
910 1408 | }
|
1409 + | /* ServerBuilderGenerator.kt:446 */
|
911 1410 | impl ::std::convert::TryFrom<Builder> for crate::input::JsonUnionsInput {
|
912 1411 | type Error = ConstraintViolation;
|
913 1412 |
|
914 1413 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
915 1414 | builder.build()
|
916 1415 | }
|
917 1416 | }
|
918 - | /// A builder for [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
1417 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
1418 + | /* RustType.kt:516 */
|
919 1419 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1420 + | /* ServerBuilderGenerator.kt:211 */
|
920 1421 | pub struct Builder {
|
1422 + | /* ServerBuilderGenerator.kt:308 */
|
921 1423 | pub(crate) contents:
|
922 1424 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
|
1425 + | /* ServerBuilderGenerator.kt:211 */
|
923 1426 | }
|
1427 + | /* ServerBuilderGenerator.kt:215 */
|
924 1428 | impl Builder {
|
925 - | /// A union with a representative set of types for members.
|
1429 + | /// /* ServerBuilderGenerator.kt:331 */A union with a representative set of types for members.
|
1430 + | /* ServerBuilderGenerator.kt:343 */
|
926 1431 | pub fn contents(mut self, input: ::std::option::Option<crate::model::MyUnion>) -> Self {
|
927 - | self.contents = input.map(
|
928 - | #[allow(clippy::redundant_closure)]
|
929 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
930 - | );
|
1432 + | /* ServerBuilderGenerator.kt:344 */
|
1433 + | self.contents =
|
1434 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
1435 + | /* ServerBuilderGenerator.kt:344 */;
|
931 1436 | self
|
1437 + | /* ServerBuilderGenerator.kt:343 */
|
932 1438 | }
|
933 - | /// A union with a representative set of types for members.
|
1439 + | /// /* ServerBuilderGenerator.kt:426 */A union with a representative set of types for members.
|
1440 + | /* ServerBuilderGenerator.kt:428 */
|
934 1441 | pub(crate) fn set_contents(
|
935 1442 | mut self,
|
936 1443 | input: Option<
|
937 1444 | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
|
938 1445 | >,
|
939 1446 | ) -> Self {
|
1447 + | /* ServerBuilderGenerator.kt:429 */
|
940 1448 | self.contents = input.map(|v| v.into());
|
941 1449 | self
|
1450 + | /* ServerBuilderGenerator.kt:428 */
|
942 1451 | }
|
943 - | /// Consumes the builder and constructs a [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
944 - | ///
|
1452 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
1453 + | /// /* ServerBuilderGenerator.kt:260 */
|
945 1454 | /// The builder fails to construct a [`JsonUnionsInput`](crate::input::JsonUnionsInput) if a [`ConstraintViolation`] occurs.
|
946 1455 | ///
|
1456 + | /* ServerBuilderGenerator.kt:271 */
|
947 1457 | pub fn build(self) -> Result<crate::input::JsonUnionsInput, ConstraintViolation> {
|
948 1458 | self.build_enforcing_all_constraints()
|
949 1459 | }
|
1460 + | /* ServerBuilderGenerator.kt:283 */
|
950 1461 | fn build_enforcing_all_constraints(
|
951 1462 | self,
|
952 1463 | ) -> Result<crate::input::JsonUnionsInput, ConstraintViolation> {
|
953 - | Ok(crate::input::JsonUnionsInput {
|
954 - | contents: self
|
955 - | .contents
|
956 - | .map(|v| match v {
|
957 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
958 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
959 - | })
|
960 - | .map(|res| res.map_err(ConstraintViolation::Contents))
|
961 - | .transpose()?,
|
962 - | })
|
963 - | }
|
1464 + | /* ServerBuilderGenerator.kt:287 */
|
1465 + | Ok(
|
1466 + | /* ServerBuilderGenerator.kt:542 */
|
1467 + | crate::input::JsonUnionsInput {
|
1468 + | /* ServerBuilderGenerator.kt:546 */
|
1469 + | contents: self
|
1470 + | .contents
|
1471 + | /* ServerBuilderGenerator.kt:602 */
|
1472 + | .map(|v| match v {
|
1473 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1474 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1475 + | })
|
1476 + | /* ServerBuilderGenerator.kt:614 */
|
1477 + | .map(|res| res.map_err(ConstraintViolation::Contents))
|
1478 + | .transpose()?,
|
1479 + | /* ServerBuilderGenerator.kt:542 */
|
1480 + | }, /* ServerBuilderGenerator.kt:287 */
|
1481 + | )
|
1482 + | /* ServerBuilderGenerator.kt:283 */
|
1483 + | }
|
1484 + | /* ServerBuilderGenerator.kt:215 */
|
964 1485 | }
|
1486 + |
|
1487 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
965 1488 | }
|
966 - | /// See [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
1489 + | /// /* ServerBuilderGenerator.kt:171 */See [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
967 1490 | pub mod greeting_with_errors_input {
|
968 1491 |
|
1492 + | /* ServerBuilderGenerator.kt:461 */
|
969 1493 | impl ::std::convert::From<Builder> for crate::input::GreetingWithErrorsInput {
|
970 1494 | fn from(builder: Builder) -> Self {
|
971 1495 | builder.build()
|
972 1496 | }
|
973 1497 | }
|
974 - | /// A builder for [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
1498 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
1499 + | /* RustType.kt:516 */
|
975 1500 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1501 + | /* ServerBuilderGenerator.kt:211 */
|
976 1502 | pub struct Builder {
|
1503 + | /* ServerBuilderGenerator.kt:308 */
|
977 1504 | pub(crate) greeting: ::std::option::Option<::std::string::String>,
|
1505 + | /* ServerBuilderGenerator.kt:211 */
|
978 1506 | }
|
1507 + | /* ServerBuilderGenerator.kt:215 */
|
979 1508 | impl Builder {
|
1509 + | /* ServerBuilderGenerator.kt:331 */
|
980 1510 | #[allow(missing_docs)] // documentation missing in model
|
1511 + | /* ServerBuilderGenerator.kt:343 */
|
981 1512 | pub fn greeting(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
982 - | self.greeting = input;
|
1513 + | /* ServerBuilderGenerator.kt:344 */
|
1514 + | self.greeting =
|
1515 + | /* ServerBuilderGenerator.kt:376 */input
|
1516 + | /* ServerBuilderGenerator.kt:344 */;
|
983 1517 | self
|
1518 + | /* ServerBuilderGenerator.kt:343 */
|
984 1519 | }
|
1520 + | /* ServerBuilderGenerator.kt:426 */
|
985 1521 | #[allow(missing_docs)] // documentation missing in model
|
1522 + | /* ServerBuilderGenerator.kt:428 */
|
986 1523 | pub(crate) fn set_greeting(
|
987 1524 | mut self,
|
988 1525 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
989 1526 | ) -> Self {
|
1527 + | /* ServerBuilderGenerator.kt:429 */
|
990 1528 | self.greeting = input.map(|v| v.into());
|
991 1529 | self
|
1530 + | /* ServerBuilderGenerator.kt:428 */
|
992 1531 | }
|
993 - | /// Consumes the builder and constructs a [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
1532 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
1533 + | /* ServerBuilderGenerator.kt:271 */
|
994 1534 | pub fn build(self) -> crate::input::GreetingWithErrorsInput {
|
995 1535 | self.build_enforcing_all_constraints()
|
996 1536 | }
|
1537 + | /* ServerBuilderGenerator.kt:283 */
|
997 1538 | fn build_enforcing_all_constraints(self) -> crate::input::GreetingWithErrorsInput {
|
1539 + | /* ServerBuilderGenerator.kt:542 */
|
998 1540 | crate::input::GreetingWithErrorsInput {
|
1541 + | /* ServerBuilderGenerator.kt:546 */
|
999 1542 | greeting: self.greeting,
|
1543 + | /* ServerBuilderGenerator.kt:542 */
|
1000 1544 | }
|
1545 + | /* ServerBuilderGenerator.kt:283 */
|
1001 1546 | }
|
1547 + | /* ServerBuilderGenerator.kt:215 */
|
1002 1548 | }
|
1549 + |
|
1550 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1003 1551 | }
|
1004 - | /// See [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
1552 + | /// /* ServerBuilderGenerator.kt:171 */See [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
1005 1553 | pub mod simple_scalar_properties_input {
|
1006 1554 |
|
1555 + | /* ServerBuilderGenerator.kt:461 */
|
1007 1556 | impl ::std::convert::From<Builder> for crate::input::SimpleScalarPropertiesInput {
|
1008 1557 | fn from(builder: Builder) -> Self {
|
1009 1558 | builder.build()
|
1010 1559 | }
|
1011 1560 | }
|
1012 - | /// A builder for [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
1561 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
1562 + | /* RustType.kt:516 */
|
1013 1563 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1564 + | /* ServerBuilderGenerator.kt:211 */
|
1014 1565 | pub struct Builder {
|
1566 + | /* ServerBuilderGenerator.kt:308 */
|
1015 1567 | pub(crate) float_value: ::std::option::Option<f32>,
|
1568 + | /* ServerBuilderGenerator.kt:308 */
|
1016 1569 | pub(crate) double_value: ::std::option::Option<f64>,
|
1570 + | /* ServerBuilderGenerator.kt:211 */
|
1017 1571 | }
|
1572 + | /* ServerBuilderGenerator.kt:215 */
|
1018 1573 | impl Builder {
|
1574 + | /* ServerBuilderGenerator.kt:331 */
|
1019 1575 | #[allow(missing_docs)] // documentation missing in model
|
1576 + | /* ServerBuilderGenerator.kt:343 */
|
1020 1577 | pub fn float_value(mut self, input: ::std::option::Option<f32>) -> Self {
|
1021 - | self.float_value = input;
|
1578 + | /* ServerBuilderGenerator.kt:344 */
|
1579 + | self.float_value =
|
1580 + | /* ServerBuilderGenerator.kt:376 */input
|
1581 + | /* ServerBuilderGenerator.kt:344 */;
|
1022 1582 | self
|
1583 + | /* ServerBuilderGenerator.kt:343 */
|
1023 1584 | }
|
1585 + | /* ServerBuilderGenerator.kt:426 */
|
1024 1586 | #[allow(missing_docs)] // documentation missing in model
|
1587 + | /* ServerBuilderGenerator.kt:428 */
|
1025 1588 | pub(crate) fn set_float_value(
|
1026 1589 | mut self,
|
1027 1590 | input: Option<impl ::std::convert::Into<f32>>,
|
1028 1591 | ) -> Self {
|
1592 + | /* ServerBuilderGenerator.kt:429 */
|
1029 1593 | self.float_value = input.map(|v| v.into());
|
1030 1594 | self
|
1595 + | /* ServerBuilderGenerator.kt:428 */
|
1031 1596 | }
|
1597 + | /* ServerBuilderGenerator.kt:331 */
|
1032 1598 | #[allow(missing_docs)] // documentation missing in model
|
1599 + | /* ServerBuilderGenerator.kt:343 */
|
1033 1600 | pub fn double_value(mut self, input: ::std::option::Option<f64>) -> Self {
|
1034 - | self.double_value = input;
|
1601 + | /* ServerBuilderGenerator.kt:344 */
|
1602 + | self.double_value =
|
1603 + | /* ServerBuilderGenerator.kt:376 */input
|
1604 + | /* ServerBuilderGenerator.kt:344 */;
|
1035 1605 | self
|
1606 + | /* ServerBuilderGenerator.kt:343 */
|
1036 1607 | }
|
1608 + | /* ServerBuilderGenerator.kt:426 */
|
1037 1609 | #[allow(missing_docs)] // documentation missing in model
|
1610 + | /* ServerBuilderGenerator.kt:428 */
|
1038 1611 | pub(crate) fn set_double_value(
|
1039 1612 | mut self,
|
1040 1613 | input: Option<impl ::std::convert::Into<f64>>,
|
1041 1614 | ) -> Self {
|
1615 + | /* ServerBuilderGenerator.kt:429 */
|
1042 1616 | self.double_value = input.map(|v| v.into());
|
1043 1617 | self
|
1618 + | /* ServerBuilderGenerator.kt:428 */
|
1044 1619 | }
|
1045 - | /// Consumes the builder and constructs a [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
1620 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
1621 + | /* ServerBuilderGenerator.kt:271 */
|
1046 1622 | pub fn build(self) -> crate::input::SimpleScalarPropertiesInput {
|
1047 1623 | self.build_enforcing_all_constraints()
|
1048 1624 | }
|
1625 + | /* ServerBuilderGenerator.kt:283 */
|
1049 1626 | fn build_enforcing_all_constraints(self) -> crate::input::SimpleScalarPropertiesInput {
|
1627 + | /* ServerBuilderGenerator.kt:542 */
|
1050 1628 | crate::input::SimpleScalarPropertiesInput {
|
1629 + | /* ServerBuilderGenerator.kt:546 */
|
1051 1630 | float_value: self.float_value,
|
1631 + | /* ServerBuilderGenerator.kt:546 */
|
1052 1632 | double_value: self.double_value,
|
1633 + | /* ServerBuilderGenerator.kt:542 */
|
1053 1634 | }
|
1635 + | /* ServerBuilderGenerator.kt:283 */
|
1054 1636 | }
|
1637 + | /* ServerBuilderGenerator.kt:215 */
|
1055 1638 | }
|
1639 + |
|
1640 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1056 1641 | }
|
1057 - | /// See [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
1642 + | /// /* ServerBuilderGenerator.kt:171 */See [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
1058 1643 | pub mod empty_input_and_empty_output_input {
|
1059 1644 |
|
1645 + | /* ServerBuilderGenerator.kt:461 */
|
1060 1646 | impl ::std::convert::From<Builder> for crate::input::EmptyInputAndEmptyOutputInput {
|
1061 1647 | fn from(builder: Builder) -> Self {
|
1062 1648 | builder.build()
|
1063 1649 | }
|
1064 1650 | }
|
1065 - | /// A builder for [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
1651 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
1652 + | /* RustType.kt:516 */
|
1066 1653 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1067 - | pub struct Builder {}
|
1654 + | /* ServerBuilderGenerator.kt:211 */
|
1655 + | pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
1656 + | /* ServerBuilderGenerator.kt:215 */
|
1068 1657 | impl Builder {
|
1069 - | /// Consumes the builder and constructs a [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
1658 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
1659 + | /* ServerBuilderGenerator.kt:271 */
|
1070 1660 | pub fn build(self) -> crate::input::EmptyInputAndEmptyOutputInput {
|
1071 1661 | self.build_enforcing_all_constraints()
|
1072 1662 | }
|
1663 + | /* ServerBuilderGenerator.kt:283 */
|
1073 1664 | fn build_enforcing_all_constraints(self) -> crate::input::EmptyInputAndEmptyOutputInput {
|
1074 - | crate::input::EmptyInputAndEmptyOutputInput {}
|
1665 + | /* ServerBuilderGenerator.kt:542 */
|
1666 + | crate::input::EmptyInputAndEmptyOutputInput {
|
1667 + | /* ServerBuilderGenerator.kt:542 */}
|
1668 + | /* ServerBuilderGenerator.kt:283 */
|
1075 1669 | }
|
1670 + | /* ServerBuilderGenerator.kt:215 */
|
1076 1671 | }
|
1672 + |
|
1673 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1077 1674 | }
|
1078 - | /// See [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
1675 + | /// /* ServerBuilderGenerator.kt:171 */See [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
1079 1676 | pub mod no_input_and_output_input {
|
1080 1677 |
|
1678 + | /* ServerBuilderGenerator.kt:461 */
|
1081 1679 | impl ::std::convert::From<Builder> for crate::input::NoInputAndOutputInput {
|
1082 1680 | fn from(builder: Builder) -> Self {
|
1083 1681 | builder.build()
|
1084 1682 | }
|
1085 1683 | }
|
1086 - | /// A builder for [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
1684 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
1685 + | /* RustType.kt:516 */
|
1087 1686 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1088 - | pub struct Builder {}
|
1687 + | /* ServerBuilderGenerator.kt:211 */
|
1688 + | pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
1689 + | /* ServerBuilderGenerator.kt:215 */
|
1089 1690 | impl Builder {
|
1090 - | /// Consumes the builder and constructs a [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
1691 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
1692 + | /* ServerBuilderGenerator.kt:271 */
|
1091 1693 | pub fn build(self) -> crate::input::NoInputAndOutputInput {
|
1092 1694 | self.build_enforcing_all_constraints()
|
1093 1695 | }
|
1696 + | /* ServerBuilderGenerator.kt:283 */
|
1094 1697 | fn build_enforcing_all_constraints(self) -> crate::input::NoInputAndOutputInput {
|
1095 - | crate::input::NoInputAndOutputInput {}
|
1698 + | /* ServerBuilderGenerator.kt:542 */
|
1699 + | crate::input::NoInputAndOutputInput {
|
1700 + | /* ServerBuilderGenerator.kt:542 */}
|
1701 + | /* ServerBuilderGenerator.kt:283 */
|
1096 1702 | }
|
1703 + | /* ServerBuilderGenerator.kt:215 */
|
1097 1704 | }
|
1705 + |
|
1706 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1098 1707 | }
|
1099 - | /// See [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
1708 + | /// /* ServerBuilderGenerator.kt:171 */See [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
1100 1709 | pub mod no_input_and_no_output_input {
|
1101 1710 |
|
1711 + | /* ServerBuilderGenerator.kt:461 */
|
1102 1712 | impl ::std::convert::From<Builder> for crate::input::NoInputAndNoOutputInput {
|
1103 1713 | fn from(builder: Builder) -> Self {
|
1104 1714 | builder.build()
|
1105 1715 | }
|
1106 1716 | }
|
1107 - | /// A builder for [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
1717 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
1718 + | /* RustType.kt:516 */
|
1108 1719 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1109 - | pub struct Builder {}
|
1720 + | /* ServerBuilderGenerator.kt:211 */
|
1721 + | pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
1722 + | /* ServerBuilderGenerator.kt:215 */
|
1110 1723 | impl Builder {
|
1111 - | /// Consumes the builder and constructs a [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
1724 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
1725 + | /* ServerBuilderGenerator.kt:271 */
|
1112 1726 | pub fn build(self) -> crate::input::NoInputAndNoOutputInput {
|
1113 1727 | self.build_enforcing_all_constraints()
|
1114 1728 | }
|
1729 + | /* ServerBuilderGenerator.kt:283 */
|
1115 1730 | fn build_enforcing_all_constraints(self) -> crate::input::NoInputAndNoOutputInput {
|
1116 - | crate::input::NoInputAndNoOutputInput {}
|
1731 + | /* ServerBuilderGenerator.kt:542 */
|
1732 + | crate::input::NoInputAndNoOutputInput {
|
1733 + | /* ServerBuilderGenerator.kt:542 */}
|
1734 + | /* ServerBuilderGenerator.kt:283 */
|
1117 1735 | }
|
1736 + | /* ServerBuilderGenerator.kt:215 */
|
1118 1737 | }
|
1738 + |
|
1739 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1119 1740 | }
|