1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - |
|
3 - | /// Describes one specific validation failure for an input member.
|
2 + | /* StructureGenerator.kt:197 */
|
3 + | /// /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
|
4 + | /* RustType.kt:516 */
|
4 5 | #[derive(
|
5 6 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
6 7 | )]
|
7 - | pub struct ValidationExceptionField {
|
8 - | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
8 + | pub /* StructureGenerator.kt:201 */ struct ValidationExceptionField {
|
9 + | /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
9 10 | pub path: ::std::string::String,
|
10 - | /// A detailed description of the validation failure.
|
11 + | /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
|
11 12 | pub message: ::std::string::String,
|
13 + | /* StructureGenerator.kt:201 */
|
12 14 | }
|
15 + | /* StructureGenerator.kt:135 */
|
13 16 | impl ValidationExceptionField {
|
14 - | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
17 + | /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
18 + | /* StructureGenerator.kt:166 */
|
15 19 | pub fn path(&self) -> &str {
|
20 + | /* StructureGenerator.kt:171 */
|
16 21 | use std::ops::Deref;
|
17 22 | self.path.deref()
|
23 + | /* StructureGenerator.kt:166 */
|
18 24 | }
|
19 - | /// A detailed description of the validation failure.
|
25 + | /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
|
26 + | /* StructureGenerator.kt:166 */
|
20 27 | pub fn message(&self) -> &str {
|
28 + | /* StructureGenerator.kt:171 */
|
21 29 | use std::ops::Deref;
|
22 30 | self.message.deref()
|
31 + | /* StructureGenerator.kt:166 */
|
23 32 | }
|
33 + | /* StructureGenerator.kt:135 */
|
24 34 | }
|
35 + | /* ServerCodegenVisitor.kt:345 */
|
25 36 | impl ValidationExceptionField {
|
26 - | /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
37 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
38 + | /* ServerBuilderGenerator.kt:295 */
|
27 39 | pub fn builder() -> crate::model::validation_exception_field::Builder {
|
40 + | /* ServerBuilderGenerator.kt:296 */
|
28 41 | crate::model::validation_exception_field::Builder::default()
|
42 + | /* ServerBuilderGenerator.kt:295 */
|
29 43 | }
|
44 + | /* ServerCodegenVisitor.kt:345 */
|
30 45 | }
|
31 46 |
|
47 + | /* UnionGenerator.kt:67 */
|
32 48 | #[allow(missing_docs)] // documentation missing in model
|
49 + | /* RustType.kt:516 */
|
33 50 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
34 - | pub enum ComplexUnion {
|
51 + | pub /* UnionGenerator.kt:85 */ enum ComplexUnion {
|
52 + | /* UnionGenerator.kt:90 */
|
35 53 | #[allow(missing_docs)] // documentation missing in model
|
54 + | /* UnionGenerator.kt:190 */
|
36 55 | ComplexStruct(crate::model::ComplexStruct),
|
56 + | /* UnionGenerator.kt:90 */
|
37 57 | #[allow(missing_docs)] // documentation missing in model
|
58 + | /* UnionGenerator.kt:190 */
|
38 59 | List(::std::vec::Vec<::std::string::String>),
|
60 + | /* UnionGenerator.kt:90 */
|
39 61 | #[allow(missing_docs)] // documentation missing in model
|
62 + | /* UnionGenerator.kt:190 */
|
40 63 | Map(::std::collections::HashMap<::std::string::String, i32>),
|
64 + | /* UnionGenerator.kt:90 */
|
41 65 | #[allow(missing_docs)] // documentation missing in model
|
66 + | /* UnionGenerator.kt:190 */
|
42 67 | Structure(crate::model::SimpleStruct),
|
68 + | /* UnionGenerator.kt:90 */
|
43 69 | #[allow(missing_docs)] // documentation missing in model
|
70 + | /* UnionGenerator.kt:190 */
|
44 71 | Union(crate::model::SimpleUnion),
|
72 + | /* UnionGenerator.kt:85 */
|
45 73 | }
|
74 + | /* UnionGenerator.kt:111 */
|
46 75 | impl ComplexUnion {
|
76 + | /* UnionGenerator.kt:217 */
|
47 77 | /// Tries to convert the enum instance into [`ComplexStruct`](crate::model::ComplexUnion::ComplexStruct), extracting the inner [`ComplexStruct`](crate::model::ComplexStruct).
|
78 + | /* UnionGenerator.kt:222 */
|
48 79 | /// Returns `Err(&Self)` if it can't be converted.
|
80 + | /* UnionGenerator.kt:223 */
|
49 81 | pub fn as_complex_struct(&self) -> ::std::result::Result<&crate::model::ComplexStruct, &Self> {
|
82 + | /* UnionGenerator.kt:227 */
|
50 83 | if let ComplexUnion::ComplexStruct(val) = &self {
|
51 84 | ::std::result::Result::Ok(val)
|
52 85 | } else {
|
53 86 | ::std::result::Result::Err(self)
|
54 87 | }
|
88 + | /* UnionGenerator.kt:223 */
|
55 89 | }
|
90 + | /* UnionGenerator.kt:121 */
|
56 91 | /// Returns true if this is a [`ComplexStruct`](crate::model::ComplexUnion::ComplexStruct).
|
92 + | /* UnionGenerator.kt:122 */
|
57 93 | pub fn is_complex_struct(&self) -> bool {
|
94 + | /* UnionGenerator.kt:123 */
|
58 95 | self.as_complex_struct().is_ok()
|
96 + | /* UnionGenerator.kt:122 */
|
59 97 | }
|
98 + | /* UnionGenerator.kt:217 */
|
60 99 | /// Tries to convert the enum instance into [`List`](crate::model::ComplexUnion::List), extracting the inner [`Vec`](::std::vec::Vec).
|
100 + | /* UnionGenerator.kt:222 */
|
61 101 | /// Returns `Err(&Self)` if it can't be converted.
|
102 + | /* UnionGenerator.kt:223 */
|
62 103 | pub fn as_list(&self) -> ::std::result::Result<&::std::vec::Vec<::std::string::String>, &Self> {
|
104 + | /* UnionGenerator.kt:227 */
|
63 105 | if let ComplexUnion::List(val) = &self {
|
64 106 | ::std::result::Result::Ok(val)
|
65 107 | } else {
|
66 108 | ::std::result::Result::Err(self)
|
67 109 | }
|
110 + | /* UnionGenerator.kt:223 */
|
68 111 | }
|
112 + | /* UnionGenerator.kt:121 */
|
69 113 | /// Returns true if this is a [`List`](crate::model::ComplexUnion::List).
|
114 + | /* UnionGenerator.kt:122 */
|
70 115 | pub fn is_list(&self) -> bool {
|
116 + | /* UnionGenerator.kt:123 */
|
71 117 | self.as_list().is_ok()
|
118 + | /* UnionGenerator.kt:122 */
|
72 119 | }
|
120 + | /* UnionGenerator.kt:217 */
|
73 121 | /// Tries to convert the enum instance into [`Map`](crate::model::ComplexUnion::Map), extracting the inner [`HashMap`](::std::collections::HashMap).
|
122 + | /* UnionGenerator.kt:222 */
|
74 123 | /// Returns `Err(&Self)` if it can't be converted.
|
124 + | /* UnionGenerator.kt:223 */
|
75 125 | pub fn as_map(
|
76 126 | &self,
|
77 127 | ) -> ::std::result::Result<&::std::collections::HashMap<::std::string::String, i32>, &Self>
|
78 128 | {
|
129 + | /* UnionGenerator.kt:227 */
|
79 130 | if let ComplexUnion::Map(val) = &self {
|
80 131 | ::std::result::Result::Ok(val)
|
81 132 | } else {
|
82 133 | ::std::result::Result::Err(self)
|
83 134 | }
|
135 + | /* UnionGenerator.kt:223 */
|
84 136 | }
|
137 + | /* UnionGenerator.kt:121 */
|
85 138 | /// Returns true if this is a [`Map`](crate::model::ComplexUnion::Map).
|
139 + | /* UnionGenerator.kt:122 */
|
86 140 | pub fn is_map(&self) -> bool {
|
141 + | /* UnionGenerator.kt:123 */
|
87 142 | self.as_map().is_ok()
|
143 + | /* UnionGenerator.kt:122 */
|
88 144 | }
|
145 + | /* UnionGenerator.kt:217 */
|
89 146 | /// Tries to convert the enum instance into [`Structure`](crate::model::ComplexUnion::Structure), extracting the inner [`SimpleStruct`](crate::model::SimpleStruct).
|
147 + | /* UnionGenerator.kt:222 */
|
90 148 | /// Returns `Err(&Self)` if it can't be converted.
|
149 + | /* UnionGenerator.kt:223 */
|
91 150 | pub fn as_structure(&self) -> ::std::result::Result<&crate::model::SimpleStruct, &Self> {
|
151 + | /* UnionGenerator.kt:227 */
|
92 152 | if let ComplexUnion::Structure(val) = &self {
|
93 153 | ::std::result::Result::Ok(val)
|
94 154 | } else {
|
95 155 | ::std::result::Result::Err(self)
|
96 156 | }
|
157 + | /* UnionGenerator.kt:223 */
|
97 158 | }
|
159 + | /* UnionGenerator.kt:121 */
|
98 160 | /// Returns true if this is a [`Structure`](crate::model::ComplexUnion::Structure).
|
161 + | /* UnionGenerator.kt:122 */
|
99 162 | pub fn is_structure(&self) -> bool {
|
163 + | /* UnionGenerator.kt:123 */
|
100 164 | self.as_structure().is_ok()
|
165 + | /* UnionGenerator.kt:122 */
|
101 166 | }
|
167 + | /* UnionGenerator.kt:217 */
|
102 168 | /// Tries to convert the enum instance into [`Union`](crate::model::ComplexUnion::Union), extracting the inner [`SimpleUnion`](crate::model::SimpleUnion).
|
169 + | /* UnionGenerator.kt:222 */
|
103 170 | /// Returns `Err(&Self)` if it can't be converted.
|
171 + | /* UnionGenerator.kt:223 */
|
104 172 | pub fn as_union(&self) -> ::std::result::Result<&crate::model::SimpleUnion, &Self> {
|
173 + | /* UnionGenerator.kt:227 */
|
105 174 | if let ComplexUnion::Union(val) = &self {
|
106 175 | ::std::result::Result::Ok(val)
|
107 176 | } else {
|
108 177 | ::std::result::Result::Err(self)
|
109 178 | }
|
179 + | /* UnionGenerator.kt:223 */
|
110 180 | }
|
181 + | /* UnionGenerator.kt:121 */
|
111 182 | /// Returns true if this is a [`Union`](crate::model::ComplexUnion::Union).
|
183 + | /* UnionGenerator.kt:122 */
|
112 184 | pub fn is_union(&self) -> bool {
|
185 + | /* UnionGenerator.kt:123 */
|
113 186 | self.as_union().is_ok()
|
187 + | /* UnionGenerator.kt:122 */
|
114 188 | }
|
189 + | /* UnionGenerator.kt:111 */
|
115 190 | }
|
116 191 |
|
192 + | /* UnionGenerator.kt:67 */
|
117 193 | #[allow(missing_docs)] // documentation missing in model
|
194 + | /* RustType.kt:516 */
|
118 195 | #[derive(
|
119 196 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
120 197 | )]
|
121 - | pub enum SimpleUnion {
|
198 + | pub /* UnionGenerator.kt:85 */ enum SimpleUnion {
|
199 + | /* UnionGenerator.kt:90 */
|
122 200 | #[allow(missing_docs)] // documentation missing in model
|
201 + | /* UnionGenerator.kt:190 */
|
123 202 | Blob(::aws_smithy_types::Blob),
|
203 + | /* UnionGenerator.kt:90 */
|
124 204 | #[allow(missing_docs)] // documentation missing in model
|
205 + | /* UnionGenerator.kt:190 */
|
125 206 | Boolean(bool),
|
207 + | /* UnionGenerator.kt:90 */
|
126 208 | #[allow(missing_docs)] // documentation missing in model
|
209 + | /* UnionGenerator.kt:190 */
|
127 210 | String(::std::string::String),
|
211 + | /* UnionGenerator.kt:90 */
|
128 212 | #[allow(missing_docs)] // documentation missing in model
|
213 + | /* UnionGenerator.kt:188 */
|
129 214 | Unit,
|
215 + | /* UnionGenerator.kt:85 */
|
130 216 | }
|
217 + | /* UnionGenerator.kt:111 */
|
131 218 | impl SimpleUnion {
|
219 + | /* UnionGenerator.kt:217 */
|
132 220 | /// Tries to convert the enum instance into [`Blob`](crate::model::SimpleUnion::Blob), extracting the inner [`Blob`](::aws_smithy_types::Blob).
|
221 + | /* UnionGenerator.kt:222 */
|
133 222 | /// Returns `Err(&Self)` if it can't be converted.
|
223 + | /* UnionGenerator.kt:223 */
|
134 224 | pub fn as_blob(&self) -> ::std::result::Result<&::aws_smithy_types::Blob, &Self> {
|
225 + | /* UnionGenerator.kt:227 */
|
135 226 | if let SimpleUnion::Blob(val) = &self {
|
136 227 | ::std::result::Result::Ok(val)
|
137 228 | } else {
|
138 229 | ::std::result::Result::Err(self)
|
139 230 | }
|
231 + | /* UnionGenerator.kt:223 */
|
140 232 | }
|
233 + | /* UnionGenerator.kt:121 */
|
141 234 | /// Returns true if this is a [`Blob`](crate::model::SimpleUnion::Blob).
|
235 + | /* UnionGenerator.kt:122 */
|
142 236 | pub fn is_blob(&self) -> bool {
|
237 + | /* UnionGenerator.kt:123 */
|
143 238 | self.as_blob().is_ok()
|
239 + | /* UnionGenerator.kt:122 */
|
144 240 | }
|
241 + | /* UnionGenerator.kt:217 */
|
145 242 | /// Tries to convert the enum instance into [`Boolean`](crate::model::SimpleUnion::Boolean), extracting the inner [`bool`](bool).
|
243 + | /* UnionGenerator.kt:222 */
|
146 244 | /// Returns `Err(&Self)` if it can't be converted.
|
245 + | /* UnionGenerator.kt:223 */
|
147 246 | pub fn as_boolean(&self) -> ::std::result::Result<&bool, &Self> {
|
247 + | /* UnionGenerator.kt:227 */
|
148 248 | if let SimpleUnion::Boolean(val) = &self {
|
149 249 | ::std::result::Result::Ok(val)
|
150 250 | } else {
|
151 251 | ::std::result::Result::Err(self)
|
152 252 | }
|
253 + | /* UnionGenerator.kt:223 */
|
153 254 | }
|
255 + | /* UnionGenerator.kt:121 */
|
154 256 | /// Returns true if this is a [`Boolean`](crate::model::SimpleUnion::Boolean).
|
257 + | /* UnionGenerator.kt:122 */
|
155 258 | pub fn is_boolean(&self) -> bool {
|
259 + | /* UnionGenerator.kt:123 */
|
156 260 | self.as_boolean().is_ok()
|
261 + | /* UnionGenerator.kt:122 */
|
157 262 | }
|
263 + | /* UnionGenerator.kt:217 */
|
158 264 | /// Tries to convert the enum instance into [`String`](crate::model::SimpleUnion::String), extracting the inner [`String`](::std::string::String).
|
265 + | /* UnionGenerator.kt:222 */
|
159 266 | /// Returns `Err(&Self)` if it can't be converted.
|
267 + | /* UnionGenerator.kt:223 */
|
160 268 | pub fn as_string(&self) -> ::std::result::Result<&::std::string::String, &Self> {
|
269 + | /* UnionGenerator.kt:227 */
|
161 270 | if let SimpleUnion::String(val) = &self {
|
162 271 | ::std::result::Result::Ok(val)
|
163 272 | } else {
|
164 273 | ::std::result::Result::Err(self)
|
165 274 | }
|
275 + | /* UnionGenerator.kt:223 */
|
166 276 | }
|
277 + | /* UnionGenerator.kt:121 */
|
167 278 | /// Returns true if this is a [`String`](crate::model::SimpleUnion::String).
|
279 + | /* UnionGenerator.kt:122 */
|
168 280 | pub fn is_string(&self) -> bool {
|
281 + | /* UnionGenerator.kt:123 */
|
169 282 | self.as_string().is_ok()
|
283 + | /* UnionGenerator.kt:122 */
|
170 284 | }
|
285 + | /* UnionGenerator.kt:203 */
|
171 286 | /// Tries to convert the enum instance into [`Unit`](crate::model::SimpleUnion::Unit), extracting the inner `()`.
|
287 + | /* UnionGenerator.kt:207 */
|
172 288 | /// Returns `Err(&Self)` if it can't be converted.
|
289 + | /* UnionGenerator.kt:208 */
|
173 290 | pub fn as_unit(&self) -> ::std::result::Result<(), &Self> {
|
291 + | /* UnionGenerator.kt:209 */
|
174 292 | if let SimpleUnion::Unit = &self {
|
175 293 | ::std::result::Result::Ok(())
|
176 294 | } else {
|
177 295 | ::std::result::Result::Err(self)
|
178 296 | }
|
297 + | /* UnionGenerator.kt:208 */
|
179 298 | }
|
299 + | /* UnionGenerator.kt:121 */
|
180 300 | /// Returns true if this is a [`Unit`](crate::model::SimpleUnion::Unit).
|
301 + | /* UnionGenerator.kt:122 */
|
181 302 | pub fn is_unit(&self) -> bool {
|
303 + | /* UnionGenerator.kt:123 */
|
182 304 | self.as_unit().is_ok()
|
305 + | /* UnionGenerator.kt:122 */
|
183 306 | }
|
307 + | /* UnionGenerator.kt:111 */
|
184 308 | }
|
185 309 |
|
310 + | /* StructureGenerator.kt:197 */
|
186 311 | #[allow(missing_docs)] // documentation missing in model
|
312 + | /* RustType.kt:516 */
|
187 313 | #[derive(
|
188 314 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
189 315 | )]
|
190 - | pub struct Unit {}
|
316 + | pub /* StructureGenerator.kt:201 */ struct Unit {/* StructureGenerator.kt:201 */}
|
317 + | /* ServerCodegenVisitor.kt:345 */
|
191 318 | impl Unit {
|
192 - | /// Creates a new builder-style object to manufacture [`Unit`](crate::model::Unit).
|
319 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`Unit`](crate::model::Unit).
|
320 + | /* ServerBuilderGenerator.kt:295 */
|
193 321 | pub fn builder() -> crate::model::unit::Builder {
|
322 + | /* ServerBuilderGenerator.kt:296 */
|
194 323 | crate::model::unit::Builder::default()
|
324 + | /* ServerBuilderGenerator.kt:295 */
|
195 325 | }
|
326 + | /* ServerCodegenVisitor.kt:345 */
|
196 327 | }
|
328 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
197 329 | impl crate::constrained::Constrained for crate::model::Unit {
|
198 330 | type Unconstrained = crate::model::unit::Builder;
|
199 331 | }
|
200 332 |
|
333 + | /* StructureGenerator.kt:197 */
|
201 334 | #[allow(missing_docs)] // documentation missing in model
|
335 + | /* RustType.kt:516 */
|
202 336 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
203 - | pub struct SimpleStruct {
|
337 + | pub /* StructureGenerator.kt:201 */ struct SimpleStruct {
|
338 + | /* StructureGenerator.kt:231 */
|
204 339 | #[allow(missing_docs)] // documentation missing in model
|
205 340 | pub blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
341 + | /* StructureGenerator.kt:231 */
|
206 342 | #[allow(missing_docs)] // documentation missing in model
|
207 343 | pub boolean: ::std::option::Option<bool>,
|
344 + | /* StructureGenerator.kt:231 */
|
208 345 | #[allow(missing_docs)] // documentation missing in model
|
209 346 | pub string: ::std::option::Option<::std::string::String>,
|
347 + | /* StructureGenerator.kt:231 */
|
210 348 | #[allow(missing_docs)] // documentation missing in model
|
211 349 | pub byte: ::std::option::Option<i8>,
|
350 + | /* StructureGenerator.kt:231 */
|
212 351 | #[allow(missing_docs)] // documentation missing in model
|
213 352 | pub short: ::std::option::Option<i16>,
|
353 + | /* StructureGenerator.kt:231 */
|
214 354 | #[allow(missing_docs)] // documentation missing in model
|
215 355 | pub integer: ::std::option::Option<i32>,
|
356 + | /* StructureGenerator.kt:231 */
|
216 357 | #[allow(missing_docs)] // documentation missing in model
|
217 358 | pub long: ::std::option::Option<i64>,
|
359 + | /* StructureGenerator.kt:231 */
|
218 360 | #[allow(missing_docs)] // documentation missing in model
|
219 361 | pub float: ::std::option::Option<f32>,
|
362 + | /* StructureGenerator.kt:231 */
|
220 363 | #[allow(missing_docs)] // documentation missing in model
|
221 364 | pub double: ::std::option::Option<f64>,
|
365 + | /* StructureGenerator.kt:231 */
|
222 366 | #[allow(missing_docs)] // documentation missing in model
|
223 367 | pub timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
368 + | /* StructureGenerator.kt:231 */
|
224 369 | #[allow(missing_docs)] // documentation missing in model
|
225 370 | pub r#enum: ::std::option::Option<crate::model::Suit>,
|
371 + | /* StructureGenerator.kt:231 */
|
226 372 | #[allow(missing_docs)] // documentation missing in model
|
227 373 | pub required_blob: ::aws_smithy_types::Blob,
|
374 + | /* StructureGenerator.kt:231 */
|
228 375 | #[allow(missing_docs)] // documentation missing in model
|
229 376 | pub required_boolean: bool,
|
377 + | /* StructureGenerator.kt:231 */
|
230 378 | #[allow(missing_docs)] // documentation missing in model
|
231 379 | pub required_string: ::std::string::String,
|
380 + | /* StructureGenerator.kt:231 */
|
232 381 | #[allow(missing_docs)] // documentation missing in model
|
233 382 | pub required_byte: i8,
|
383 + | /* StructureGenerator.kt:231 */
|
234 384 | #[allow(missing_docs)] // documentation missing in model
|
235 385 | pub required_short: i16,
|
386 + | /* StructureGenerator.kt:231 */
|
236 387 | #[allow(missing_docs)] // documentation missing in model
|
237 388 | pub required_integer: i32,
|
389 + | /* StructureGenerator.kt:231 */
|
238 390 | #[allow(missing_docs)] // documentation missing in model
|
239 391 | pub required_long: i64,
|
392 + | /* StructureGenerator.kt:231 */
|
240 393 | #[allow(missing_docs)] // documentation missing in model
|
241 394 | pub required_float: f32,
|
395 + | /* StructureGenerator.kt:231 */
|
242 396 | #[allow(missing_docs)] // documentation missing in model
|
243 397 | pub required_double: f64,
|
398 + | /* StructureGenerator.kt:231 */
|
244 399 | #[allow(missing_docs)] // documentation missing in model
|
245 400 | pub required_timestamp: ::aws_smithy_types::DateTime,
|
401 + | /* StructureGenerator.kt:231 */
|
246 402 | #[allow(missing_docs)] // documentation missing in model
|
247 403 | pub required_enum: crate::model::Suit,
|
404 + | /* StructureGenerator.kt:201 */
|
248 405 | }
|
406 + | /* StructureGenerator.kt:135 */
|
249 407 | impl SimpleStruct {
|
408 + | /* StructureGenerator.kt:231 */
|
250 409 | #[allow(missing_docs)] // documentation missing in model
|
410 + | /* StructureGenerator.kt:166 */
|
251 411 | pub fn blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
|
412 + | /* StructureGenerator.kt:170 */
|
252 413 | self.blob.as_ref()
|
414 + | /* StructureGenerator.kt:166 */
|
253 415 | }
|
416 + | /* StructureGenerator.kt:231 */
|
254 417 | #[allow(missing_docs)] // documentation missing in model
|
418 + | /* StructureGenerator.kt:166 */
|
255 419 | pub fn boolean(&self) -> ::std::option::Option<bool> {
|
420 + | /* StructureGenerator.kt:168 */
|
256 421 | self.boolean
|
422 + | /* StructureGenerator.kt:166 */
|
257 423 | }
|
424 + | /* StructureGenerator.kt:231 */
|
258 425 | #[allow(missing_docs)] // documentation missing in model
|
426 + | /* StructureGenerator.kt:166 */
|
259 427 | pub fn string(&self) -> ::std::option::Option<&str> {
|
428 + | /* StructureGenerator.kt:169 */
|
260 429 | self.string.as_deref()
|
430 + | /* StructureGenerator.kt:166 */
|
261 431 | }
|
432 + | /* StructureGenerator.kt:231 */
|
262 433 | #[allow(missing_docs)] // documentation missing in model
|
434 + | /* StructureGenerator.kt:166 */
|
263 435 | pub fn byte(&self) -> ::std::option::Option<i8> {
|
436 + | /* StructureGenerator.kt:168 */
|
264 437 | self.byte
|
438 + | /* StructureGenerator.kt:166 */
|
265 439 | }
|
440 + | /* StructureGenerator.kt:231 */
|
266 441 | #[allow(missing_docs)] // documentation missing in model
|
442 + | /* StructureGenerator.kt:166 */
|
267 443 | pub fn short(&self) -> ::std::option::Option<i16> {
|
444 + | /* StructureGenerator.kt:168 */
|
268 445 | self.short
|
446 + | /* StructureGenerator.kt:166 */
|
269 447 | }
|
448 + | /* StructureGenerator.kt:231 */
|
270 449 | #[allow(missing_docs)] // documentation missing in model
|
450 + | /* StructureGenerator.kt:166 */
|
271 451 | pub fn integer(&self) -> ::std::option::Option<i32> {
|
452 + | /* StructureGenerator.kt:168 */
|
272 453 | self.integer
|
454 + | /* StructureGenerator.kt:166 */
|
273 455 | }
|
456 + | /* StructureGenerator.kt:231 */
|
274 457 | #[allow(missing_docs)] // documentation missing in model
|
458 + | /* StructureGenerator.kt:166 */
|
275 459 | pub fn long(&self) -> ::std::option::Option<i64> {
|
460 + | /* StructureGenerator.kt:168 */
|
276 461 | self.long
|
462 + | /* StructureGenerator.kt:166 */
|
277 463 | }
|
464 + | /* StructureGenerator.kt:231 */
|
278 465 | #[allow(missing_docs)] // documentation missing in model
|
466 + | /* StructureGenerator.kt:166 */
|
279 467 | pub fn float(&self) -> ::std::option::Option<f32> {
|
468 + | /* StructureGenerator.kt:168 */
|
280 469 | self.float
|
470 + | /* StructureGenerator.kt:166 */
|
281 471 | }
|
472 + | /* StructureGenerator.kt:231 */
|
282 473 | #[allow(missing_docs)] // documentation missing in model
|
474 + | /* StructureGenerator.kt:166 */
|
283 475 | pub fn double(&self) -> ::std::option::Option<f64> {
|
476 + | /* StructureGenerator.kt:168 */
|
284 477 | self.double
|
478 + | /* StructureGenerator.kt:166 */
|
285 479 | }
|
480 + | /* StructureGenerator.kt:231 */
|
286 481 | #[allow(missing_docs)] // documentation missing in model
|
482 + | /* StructureGenerator.kt:166 */
|
287 483 | pub fn timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
484 + | /* StructureGenerator.kt:170 */
|
288 485 | self.timestamp.as_ref()
|
486 + | /* StructureGenerator.kt:166 */
|
289 487 | }
|
488 + | /* StructureGenerator.kt:231 */
|
290 489 | #[allow(missing_docs)] // documentation missing in model
|
490 + | /* StructureGenerator.kt:166 */
|
291 491 | pub fn r#enum(&self) -> ::std::option::Option<&crate::model::Suit> {
|
492 + | /* StructureGenerator.kt:170 */
|
292 493 | self.r#enum.as_ref()
|
494 + | /* StructureGenerator.kt:166 */
|
293 495 | }
|
496 + | /* StructureGenerator.kt:231 */
|
294 497 | #[allow(missing_docs)] // documentation missing in model
|
498 + | /* StructureGenerator.kt:166 */
|
295 499 | pub fn required_blob(&self) -> &::aws_smithy_types::Blob {
|
500 + | /* StructureGenerator.kt:172 */
|
296 501 | &self.required_blob
|
502 + | /* StructureGenerator.kt:166 */
|
297 503 | }
|
504 + | /* StructureGenerator.kt:231 */
|
298 505 | #[allow(missing_docs)] // documentation missing in model
|
506 + | /* StructureGenerator.kt:166 */
|
299 507 | pub fn required_boolean(&self) -> bool {
|
508 + | /* StructureGenerator.kt:168 */
|
300 509 | self.required_boolean
|
510 + | /* StructureGenerator.kt:166 */
|
301 511 | }
|
512 + | /* StructureGenerator.kt:231 */
|
302 513 | #[allow(missing_docs)] // documentation missing in model
|
514 + | /* StructureGenerator.kt:166 */
|
303 515 | pub fn required_string(&self) -> &str {
|
516 + | /* StructureGenerator.kt:171 */
|
304 517 | use std::ops::Deref;
|
305 518 | self.required_string.deref()
|
519 + | /* StructureGenerator.kt:166 */
|
306 520 | }
|
521 + | /* StructureGenerator.kt:231 */
|
307 522 | #[allow(missing_docs)] // documentation missing in model
|
523 + | /* StructureGenerator.kt:166 */
|
308 524 | pub fn required_byte(&self) -> i8 {
|
525 + | /* StructureGenerator.kt:168 */
|
309 526 | self.required_byte
|
527 + | /* StructureGenerator.kt:166 */
|
310 528 | }
|
529 + | /* StructureGenerator.kt:231 */
|
311 530 | #[allow(missing_docs)] // documentation missing in model
|
531 + | /* StructureGenerator.kt:166 */
|
312 532 | pub fn required_short(&self) -> i16 {
|
533 + | /* StructureGenerator.kt:168 */
|
313 534 | self.required_short
|
535 + | /* StructureGenerator.kt:166 */
|
314 536 | }
|
537 + | /* StructureGenerator.kt:231 */
|
315 538 | #[allow(missing_docs)] // documentation missing in model
|
539 + | /* StructureGenerator.kt:166 */
|
316 540 | pub fn required_integer(&self) -> i32 {
|
541 + | /* StructureGenerator.kt:168 */
|
317 542 | self.required_integer
|
543 + | /* StructureGenerator.kt:166 */
|
318 544 | }
|
545 + | /* StructureGenerator.kt:231 */
|
319 546 | #[allow(missing_docs)] // documentation missing in model
|
547 + | /* StructureGenerator.kt:166 */
|
320 548 | pub fn required_long(&self) -> i64 {
|
549 + | /* StructureGenerator.kt:168 */
|
321 550 | self.required_long
|
551 + | /* StructureGenerator.kt:166 */
|
322 552 | }
|
553 + | /* StructureGenerator.kt:231 */
|
323 554 | #[allow(missing_docs)] // documentation missing in model
|
555 + | /* StructureGenerator.kt:166 */
|
324 556 | pub fn required_float(&self) -> f32 {
|
557 + | /* StructureGenerator.kt:168 */
|
325 558 | self.required_float
|
559 + | /* StructureGenerator.kt:166 */
|
326 560 | }
|
561 + | /* StructureGenerator.kt:231 */
|
327 562 | #[allow(missing_docs)] // documentation missing in model
|
563 + | /* StructureGenerator.kt:166 */
|
328 564 | pub fn required_double(&self) -> f64 {
|
565 + | /* StructureGenerator.kt:168 */
|
329 566 | self.required_double
|
567 + | /* StructureGenerator.kt:166 */
|
330 568 | }
|
569 + | /* StructureGenerator.kt:231 */
|
331 570 | #[allow(missing_docs)] // documentation missing in model
|
571 + | /* StructureGenerator.kt:166 */
|
332 572 | pub fn required_timestamp(&self) -> &::aws_smithy_types::DateTime {
|
573 + | /* StructureGenerator.kt:172 */
|
333 574 | &self.required_timestamp
|
575 + | /* StructureGenerator.kt:166 */
|
334 576 | }
|
577 + | /* StructureGenerator.kt:231 */
|
335 578 | #[allow(missing_docs)] // documentation missing in model
|
579 + | /* StructureGenerator.kt:166 */
|
336 580 | pub fn required_enum(&self) -> &crate::model::Suit {
|
581 + | /* StructureGenerator.kt:172 */
|
337 582 | &self.required_enum
|
583 + | /* StructureGenerator.kt:166 */
|
338 584 | }
|
585 + | /* StructureGenerator.kt:135 */
|
339 586 | }
|
587 + | /* ServerCodegenVisitor.kt:345 */
|
340 588 | impl SimpleStruct {
|
341 - | /// Creates a new builder-style object to manufacture [`SimpleStruct`](crate::model::SimpleStruct).
|
589 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`SimpleStruct`](crate::model::SimpleStruct).
|
590 + | /* ServerBuilderGenerator.kt:295 */
|
342 591 | pub fn builder() -> crate::model::simple_struct::Builder {
|
592 + | /* ServerBuilderGenerator.kt:296 */
|
343 593 | crate::model::simple_struct::Builder::default()
|
594 + | /* ServerBuilderGenerator.kt:295 */
|
344 595 | }
|
596 + | /* ServerCodegenVisitor.kt:345 */
|
345 597 | }
|
598 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
346 599 | impl crate::constrained::Constrained for crate::model::SimpleStruct {
|
347 600 | type Unconstrained = crate::model::simple_struct::Builder;
|
348 601 | }
|
349 602 |
|
603 + | /* EnumGenerator.kt:154 */
|
350 604 | #[allow(missing_docs)] // documentation missing in model
|
605 + | /* RustType.kt:516 */
|
351 606 | #[derive(
|
352 607 | ::std::clone::Clone,
|
353 608 | ::std::cmp::Eq,
|
354 609 | ::std::cmp::Ord,
|
355 610 | ::std::cmp::PartialEq,
|
356 611 | ::std::cmp::PartialOrd,
|
357 612 | ::std::fmt::Debug,
|
358 613 | ::std::hash::Hash,
|
359 614 | )]
|
360 - | pub enum Suit {
|
615 + | pub /* EnumGenerator.kt:267 */ enum Suit {
|
616 + | /* EnumGenerator.kt:154 */
|
361 617 | #[allow(missing_docs)] // documentation missing in model
|
618 + | /* EnumGenerator.kt:143 */
|
362 619 | Club,
|
620 + | /* EnumGenerator.kt:154 */
|
363 621 | #[allow(missing_docs)] // documentation missing in model
|
622 + | /* EnumGenerator.kt:143 */
|
364 623 | Diamond,
|
624 + | /* EnumGenerator.kt:154 */
|
365 625 | #[allow(missing_docs)] // documentation missing in model
|
626 + | /* EnumGenerator.kt:143 */
|
366 627 | Heart,
|
628 + | /* EnumGenerator.kt:154 */
|
367 629 | #[allow(missing_docs)] // documentation missing in model
|
630 + | /* EnumGenerator.kt:143 */
|
368 631 | Spade,
|
632 + | /* EnumGenerator.kt:267 */
|
369 633 | }
|
370 - | /// See [`Suit`](crate::model::Suit).
|
634 + | /// /* CodegenDelegator.kt:51 */See [`Suit`](crate::model::Suit).
|
371 635 | pub mod suit {
|
372 636 | #[derive(Debug, PartialEq)]
|
373 637 | pub struct ConstraintViolation(pub(crate) ::std::string::String);
|
374 638 |
|
375 639 | impl ::std::fmt::Display for ConstraintViolation {
|
376 640 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
377 641 | write!(
|
378 642 | f,
|
379 643 | r#"Value provided for 'smithy.protocoltests.rpcv2Cbor#Suit' failed to satisfy constraint: Member must satisfy enum value set: [DIAMOND, CLUB, HEART, SPADE]"#
|
380 644 | )
|
381 645 | }
|
382 646 | }
|
383 647 |
|
384 648 | impl ::std::error::Error for ConstraintViolation {}
|
385 649 | impl ConstraintViolation {
|
386 650 | pub(crate) fn as_validation_exception_field(
|
387 651 | self,
|
388 652 | path: ::std::string::String,
|
389 653 | ) -> crate::model::ValidationExceptionField {
|
390 654 | crate::model::ValidationExceptionField {
|
391 655 | message: format!(
|
392 656 | r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [DIAMOND, CLUB, HEART, SPADE]"#,
|
393 657 | &path
|
394 658 | ),
|
395 659 | path,
|
396 660 | }
|
397 661 | }
|
398 662 | }
|
663 + |
|
664 + | /* ServerEnumGenerator.kt:46 */
|
399 665 | }
|
666 + | /* ServerEnumGenerator.kt:85 */
|
400 667 | impl ::std::convert::TryFrom<&str> for Suit {
|
401 668 | type Error = crate::model::suit::ConstraintViolation;
|
402 669 | fn try_from(
|
403 670 | s: &str,
|
404 671 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
|
405 672 | match s {
|
406 673 | "CLUB" => Ok(Suit::Club),
|
407 674 | "DIAMOND" => Ok(Suit::Diamond),
|
408 675 | "HEART" => Ok(Suit::Heart),
|
409 676 | "SPADE" => Ok(Suit::Spade),
|
410 677 | _ => Err(crate::model::suit::ConstraintViolation(s.to_owned())),
|
411 678 | }
|
412 679 | }
|
413 680 | }
|
414 681 | impl ::std::convert::TryFrom<::std::string::String> for Suit {
|
415 682 | type Error = crate::model::suit::ConstraintViolation;
|
416 683 | fn try_from(
|
417 684 | s: ::std::string::String,
|
418 685 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
|
419 686 | {
|
420 687 | s.as_str().try_into()
|
421 688 | }
|
422 689 | }
|
690 + | /* ServerEnumGenerator.kt:145 */
|
423 691 | impl std::str::FromStr for Suit {
|
424 692 | type Err = crate::model::suit::ConstraintViolation;
|
425 693 | fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
|
426 694 | Self::try_from(s)
|
427 695 | }
|
428 696 | }
|
697 + | /* EnumGenerator.kt:274 */
|
429 698 | impl Suit {
|
430 699 | /// Returns the `&str` value of the enum member.
|
431 700 | pub fn as_str(&self) -> &str {
|
432 701 | match self {
|
433 702 | Suit::Club => "CLUB",
|
434 703 | Suit::Diamond => "DIAMOND",
|
435 704 | Suit::Heart => "HEART",
|
436 705 | Suit::Spade => "SPADE",
|
437 706 | }
|
438 707 | }
|
439 708 | /// Returns all the `&str` representations of the enum members.
|
440 709 | pub const fn values() -> &'static [&'static str] {
|
441 710 | &["CLUB", "DIAMOND", "HEART", "SPADE"]
|
442 711 | }
|
443 712 | }
|
713 + | /* EnumGenerator.kt:223 */
|
444 714 | impl ::std::convert::AsRef<str> for Suit {
|
445 715 | fn as_ref(&self) -> &str {
|
446 716 | self.as_str()
|
447 717 | }
|
448 718 | }
|
719 + | /* ConstrainedTraitForEnumGenerator.kt:36 */
|
449 720 | impl crate::constrained::Constrained for Suit {
|
450 721 | type Unconstrained = ::std::string::String;
|
451 722 | }
|
452 723 |
|
453 724 | impl ::std::convert::From<::std::string::String>
|
454 725 | for crate::constrained::MaybeConstrained<crate::model::Suit>
|
455 726 | {
|
456 727 | fn from(value: ::std::string::String) -> Self {
|
457 728 | Self::Unconstrained(value)
|
458 729 | }
|
459 730 | }
|
460 731 |
|
732 + | /* StructureGenerator.kt:197 */
|
461 733 | #[allow(missing_docs)] // documentation missing in model
|
734 + | /* RustType.kt:516 */
|
462 735 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
463 - | pub struct ComplexStruct {
|
736 + | pub /* StructureGenerator.kt:201 */ struct ComplexStruct {
|
737 + | /* StructureGenerator.kt:231 */
|
464 738 | #[allow(missing_docs)] // documentation missing in model
|
465 739 | pub structure: ::std::option::Option<crate::model::SimpleStruct>,
|
740 + | /* StructureGenerator.kt:231 */
|
466 741 | #[allow(missing_docs)] // documentation missing in model
|
467 742 | pub empty_structure: ::std::option::Option<crate::model::EmptyStruct>,
|
743 + | /* StructureGenerator.kt:231 */
|
468 744 | #[allow(missing_docs)] // documentation missing in model
|
469 745 | pub list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
746 + | /* StructureGenerator.kt:231 */
|
470 747 | #[allow(missing_docs)] // documentation missing in model
|
471 748 | pub map: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
|
749 + | /* StructureGenerator.kt:231 */
|
472 750 | #[allow(missing_docs)] // documentation missing in model
|
473 751 | pub union: ::std::option::Option<crate::model::SimpleUnion>,
|
752 + | /* StructureGenerator.kt:231 */
|
474 753 | #[allow(missing_docs)] // documentation missing in model
|
475 754 | pub unit_union: ::std::option::Option<crate::model::UnitUnion>,
|
755 + | /* StructureGenerator.kt:231 */
|
476 756 | #[allow(missing_docs)] // documentation missing in model
|
477 757 | pub structure_list: ::std::option::Option<::std::vec::Vec<crate::model::SimpleStruct>>,
|
758 + | /* StructureGenerator.kt:231 */
|
478 759 | #[allow(missing_docs)] // documentation missing in model
|
479 760 | pub complex_list: ::std::vec::Vec<
|
480 761 | ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
|
481 762 | >,
|
763 + | /* StructureGenerator.kt:231 */
|
482 764 | #[allow(missing_docs)] // documentation missing in model
|
483 765 | pub complex_map: ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
|
766 + | /* StructureGenerator.kt:231 */
|
484 767 | #[allow(missing_docs)] // documentation missing in model
|
485 768 | pub complex_union: ::std::boxed::Box<crate::model::ComplexUnion>,
|
769 + | /* StructureGenerator.kt:201 */
|
486 770 | }
|
771 + | /* StructureGenerator.kt:135 */
|
487 772 | impl ComplexStruct {
|
773 + | /* StructureGenerator.kt:231 */
|
488 774 | #[allow(missing_docs)] // documentation missing in model
|
775 + | /* StructureGenerator.kt:166 */
|
489 776 | pub fn structure(&self) -> ::std::option::Option<&crate::model::SimpleStruct> {
|
777 + | /* StructureGenerator.kt:170 */
|
490 778 | self.structure.as_ref()
|
779 + | /* StructureGenerator.kt:166 */
|
491 780 | }
|
781 + | /* StructureGenerator.kt:231 */
|
492 782 | #[allow(missing_docs)] // documentation missing in model
|
783 + | /* StructureGenerator.kt:166 */
|
493 784 | pub fn empty_structure(&self) -> ::std::option::Option<&crate::model::EmptyStruct> {
|
785 + | /* StructureGenerator.kt:170 */
|
494 786 | self.empty_structure.as_ref()
|
787 + | /* StructureGenerator.kt:166 */
|
495 788 | }
|
789 + | /* StructureGenerator.kt:231 */
|
496 790 | #[allow(missing_docs)] // documentation missing in model
|
791 + | /* StructureGenerator.kt:166 */
|
497 792 | pub fn list(&self) -> ::std::option::Option<&[::std::string::String]> {
|
793 + | /* StructureGenerator.kt:169 */
|
498 794 | self.list.as_deref()
|
795 + | /* StructureGenerator.kt:166 */
|
499 796 | }
|
797 + | /* StructureGenerator.kt:231 */
|
500 798 | #[allow(missing_docs)] // documentation missing in model
|
799 + | /* StructureGenerator.kt:166 */
|
501 800 | pub fn map(
|
502 801 | &self,
|
503 802 | ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, i32>> {
|
803 + | /* StructureGenerator.kt:170 */
|
504 804 | self.map.as_ref()
|
805 + | /* StructureGenerator.kt:166 */
|
505 806 | }
|
807 + | /* StructureGenerator.kt:231 */
|
506 808 | #[allow(missing_docs)] // documentation missing in model
|
809 + | /* StructureGenerator.kt:166 */
|
507 810 | pub fn union(&self) -> ::std::option::Option<&crate::model::SimpleUnion> {
|
811 + | /* StructureGenerator.kt:170 */
|
508 812 | self.union.as_ref()
|
813 + | /* StructureGenerator.kt:166 */
|
509 814 | }
|
815 + | /* StructureGenerator.kt:231 */
|
510 816 | #[allow(missing_docs)] // documentation missing in model
|
817 + | /* StructureGenerator.kt:166 */
|
511 818 | pub fn unit_union(&self) -> ::std::option::Option<&crate::model::UnitUnion> {
|
819 + | /* StructureGenerator.kt:170 */
|
512 820 | self.unit_union.as_ref()
|
821 + | /* StructureGenerator.kt:166 */
|
513 822 | }
|
823 + | /* StructureGenerator.kt:231 */
|
514 824 | #[allow(missing_docs)] // documentation missing in model
|
825 + | /* StructureGenerator.kt:166 */
|
515 826 | pub fn structure_list(&self) -> ::std::option::Option<&[crate::model::SimpleStruct]> {
|
827 + | /* StructureGenerator.kt:169 */
|
516 828 | self.structure_list.as_deref()
|
829 + | /* StructureGenerator.kt:166 */
|
517 830 | }
|
831 + | /* StructureGenerator.kt:231 */
|
518 832 | #[allow(missing_docs)] // documentation missing in model
|
833 + | /* StructureGenerator.kt:166 */
|
519 834 | pub fn complex_list(
|
520 835 | &self,
|
521 836 | ) -> &[::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>] {
|
837 + | /* StructureGenerator.kt:171 */
|
522 838 | use std::ops::Deref;
|
523 839 | self.complex_list.deref()
|
840 + | /* StructureGenerator.kt:166 */
|
524 841 | }
|
842 + | /* StructureGenerator.kt:231 */
|
525 843 | #[allow(missing_docs)] // documentation missing in model
|
844 + | /* StructureGenerator.kt:166 */
|
526 845 | pub fn complex_map(
|
527 846 | &self,
|
528 847 | ) -> &::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion> {
|
848 + | /* StructureGenerator.kt:172 */
|
529 849 | &self.complex_map
|
850 + | /* StructureGenerator.kt:166 */
|
530 851 | }
|
852 + | /* StructureGenerator.kt:231 */
|
531 853 | #[allow(missing_docs)] // documentation missing in model
|
854 + | /* StructureGenerator.kt:166 */
|
532 855 | pub fn complex_union(&self) -> &crate::model::ComplexUnion {
|
856 + | /* StructureGenerator.kt:171 */
|
533 857 | use std::ops::Deref;
|
534 858 | self.complex_union.deref()
|
859 + | /* StructureGenerator.kt:166 */
|
535 860 | }
|
861 + | /* StructureGenerator.kt:135 */
|
536 862 | }
|
863 + | /* ServerCodegenVisitor.kt:345 */
|
537 864 | impl ComplexStruct {
|
538 - | /// Creates a new builder-style object to manufacture [`ComplexStruct`](crate::model::ComplexStruct).
|
865 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ComplexStruct`](crate::model::ComplexStruct).
|
866 + | /* ServerBuilderGenerator.kt:295 */
|
539 867 | pub fn builder() -> crate::model::complex_struct::Builder {
|
868 + | /* ServerBuilderGenerator.kt:296 */
|
540 869 | crate::model::complex_struct::Builder::default()
|
870 + | /* ServerBuilderGenerator.kt:295 */
|
541 871 | }
|
872 + | /* ServerCodegenVisitor.kt:345 */
|
542 873 | }
|
874 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
543 875 | impl crate::constrained::Constrained for crate::model::ComplexStruct {
|
544 876 | type Unconstrained = crate::model::complex_struct::Builder;
|
545 877 | }
|
546 878 |
|
879 + | /* UnionGenerator.kt:67 */
|
547 880 | #[allow(missing_docs)] // documentation missing in model
|
881 + | /* RustType.kt:516 */
|
548 882 | #[derive(
|
549 883 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
550 884 | )]
|
551 - | pub enum UnitUnion {
|
885 + | pub /* UnionGenerator.kt:85 */ enum UnitUnion {
|
886 + | /* UnionGenerator.kt:90 */
|
552 887 | #[allow(missing_docs)] // documentation missing in model
|
888 + | /* UnionGenerator.kt:188 */
|
553 889 | UnitA,
|
890 + | /* UnionGenerator.kt:90 */
|
554 891 | #[allow(missing_docs)] // documentation missing in model
|
892 + | /* UnionGenerator.kt:188 */
|
555 893 | UnitB,
|
894 + | /* UnionGenerator.kt:85 */
|
556 895 | }
|
896 + | /* UnionGenerator.kt:111 */
|
557 897 | impl UnitUnion {
|
898 + | /* UnionGenerator.kt:203 */
|
558 899 | /// Tries to convert the enum instance into [`UnitA`](crate::model::UnitUnion::UnitA), extracting the inner `()`.
|
900 + | /* UnionGenerator.kt:207 */
|
559 901 | /// Returns `Err(&Self)` if it can't be converted.
|
902 + | /* UnionGenerator.kt:208 */
|
560 903 | pub fn as_unit_a(&self) -> ::std::result::Result<(), &Self> {
|
904 + | /* UnionGenerator.kt:209 */
|
561 905 | if let UnitUnion::UnitA = &self {
|
562 906 | ::std::result::Result::Ok(())
|
563 907 | } else {
|
564 908 | ::std::result::Result::Err(self)
|
565 909 | }
|
910 + | /* UnionGenerator.kt:208 */
|
566 911 | }
|
912 + | /* UnionGenerator.kt:121 */
|
567 913 | /// Returns true if this is a [`UnitA`](crate::model::UnitUnion::UnitA).
|
914 + | /* UnionGenerator.kt:122 */
|
568 915 | pub fn is_unit_a(&self) -> bool {
|
916 + | /* UnionGenerator.kt:123 */
|
569 917 | self.as_unit_a().is_ok()
|
918 + | /* UnionGenerator.kt:122 */
|
570 919 | }
|
920 + | /* UnionGenerator.kt:203 */
|
571 921 | /// Tries to convert the enum instance into [`UnitB`](crate::model::UnitUnion::UnitB), extracting the inner `()`.
|
922 + | /* UnionGenerator.kt:207 */
|
572 923 | /// Returns `Err(&Self)` if it can't be converted.
|
924 + | /* UnionGenerator.kt:208 */
|
573 925 | pub fn as_unit_b(&self) -> ::std::result::Result<(), &Self> {
|
926 + | /* UnionGenerator.kt:209 */
|
574 927 | if let UnitUnion::UnitB = &self {
|
575 928 | ::std::result::Result::Ok(())
|
576 929 | } else {
|
577 930 | ::std::result::Result::Err(self)
|
578 931 | }
|
932 + | /* UnionGenerator.kt:208 */
|
579 933 | }
|
934 + | /* UnionGenerator.kt:121 */
|
580 935 | /// Returns true if this is a [`UnitB`](crate::model::UnitUnion::UnitB).
|
936 + | /* UnionGenerator.kt:122 */
|
581 937 | pub fn is_unit_b(&self) -> bool {
|
938 + | /* UnionGenerator.kt:123 */
|
582 939 | self.as_unit_b().is_ok()
|
940 + | /* UnionGenerator.kt:122 */
|
583 941 | }
|
942 + | /* UnionGenerator.kt:111 */
|
584 943 | }
|
585 944 |
|
945 + | /* StructureGenerator.kt:197 */
|
586 946 | #[allow(missing_docs)] // documentation missing in model
|
947 + | /* RustType.kt:516 */
|
587 948 | #[derive(
|
588 949 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
589 950 | )]
|
590 - | pub struct EmptyStruct {}
|
951 + | pub /* StructureGenerator.kt:201 */ struct EmptyStruct {/* StructureGenerator.kt:201 */}
|
952 + | /* ServerCodegenVisitor.kt:345 */
|
591 953 | impl EmptyStruct {
|
592 - | /// Creates a new builder-style object to manufacture [`EmptyStruct`](crate::model::EmptyStruct).
|
954 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`EmptyStruct`](crate::model::EmptyStruct).
|
955 + | /* ServerBuilderGenerator.kt:295 */
|
593 956 | pub fn builder() -> crate::model::empty_struct::Builder {
|
957 + | /* ServerBuilderGenerator.kt:296 */
|
594 958 | crate::model::empty_struct::Builder::default()
|
959 + | /* ServerBuilderGenerator.kt:295 */
|
595 960 | }
|
961 + | /* ServerCodegenVisitor.kt:345 */
|
596 962 | }
|
963 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
597 964 | impl crate::constrained::Constrained for crate::model::EmptyStruct {
|
598 965 | type Unconstrained = crate::model::empty_struct::Builder;
|
599 966 | }
|
600 - | /// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
967 + | /// /* ServerBuilderGenerator.kt:171 */See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
601 968 | pub mod validation_exception_field {
|
602 969 |
|
970 + | /* RustType.kt:516 */
|
603 971 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
604 - | /// Holds one variant for each of the ways the builder can fail.
|
972 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
973 + | /* RustType.kt:516 */
|
605 974 | #[non_exhaustive]
|
975 + | /* ServerBuilderConstraintViolations.kt:75 */
|
606 976 | #[allow(clippy::enum_variant_names)]
|
607 977 | pub enum ConstraintViolation {
|
608 - | /// `path` was not provided but it is required when building `ValidationExceptionField`.
|
978 + | /// /* ServerBuilderConstraintViolations.kt:138 */`path` was not provided but it is required when building `ValidationExceptionField`.
|
979 + | /* ServerBuilderConstraintViolations.kt:143 */
|
609 980 | MissingPath,
|
610 - | /// `message` was not provided but it is required when building `ValidationExceptionField`.
|
981 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationExceptionField`.
|
982 + | /* ServerBuilderConstraintViolations.kt:143 */
|
611 983 | MissingMessage,
|
984 + | /* ServerBuilderConstraintViolations.kt:75 */
|
612 985 | }
|
986 + | /* ServerBuilderConstraintViolations.kt:117 */
|
613 987 | impl ::std::fmt::Display for ConstraintViolation {
|
988 + | /* ServerBuilderConstraintViolations.kt:118 */
|
614 989 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
990 + | /* ServerBuilderConstraintViolations.kt:119 */
|
615 991 | match self {
|
616 - | ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
|
617 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
|
618 - | }
|
992 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
|
993 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
|
994 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
995 + | /* ServerBuilderConstraintViolations.kt:118 */
|
619 996 | }
|
997 + | /* ServerBuilderConstraintViolations.kt:117 */
|
620 998 | }
|
999 + | /* ServerBuilderConstraintViolations.kt:84 */
|
621 1000 | impl ::std::error::Error for ConstraintViolation {}
|
1001 + | /* ServerBuilderGenerator.kt:446 */
|
622 1002 | impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
|
623 1003 | type Error = ConstraintViolation;
|
624 1004 |
|
625 1005 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
626 1006 | builder.build()
|
627 1007 | }
|
628 1008 | }
|
629 - | /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
1009 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
1010 + | /* RustType.kt:516 */
|
630 1011 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1012 + | /* ServerBuilderGenerator.kt:211 */
|
631 1013 | pub struct Builder {
|
1014 + | /* ServerBuilderGenerator.kt:308 */
|
632 1015 | pub(crate) path: ::std::option::Option<::std::string::String>,
|
1016 + | /* ServerBuilderGenerator.kt:308 */
|
633 1017 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
1018 + | /* ServerBuilderGenerator.kt:211 */
|
634 1019 | }
|
1020 + | /* ServerBuilderGenerator.kt:215 */
|
635 1021 | impl Builder {
|
636 - | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
1022 + | /// /* ServerBuilderGenerator.kt:331 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
1023 + | /* ServerBuilderGenerator.kt:343 */
|
637 1024 | pub fn path(mut self, input: ::std::string::String) -> Self {
|
638 - | self.path = Some(input);
|
1025 + | /* ServerBuilderGenerator.kt:344 */
|
1026 + | self.path =
|
1027 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1028 + | /* ServerBuilderGenerator.kt:376 */input
|
1029 + | /* ServerBuilderGenerator.kt:345 */)
|
1030 + | /* ServerBuilderGenerator.kt:344 */;
|
639 1031 | self
|
1032 + | /* ServerBuilderGenerator.kt:343 */
|
640 1033 | }
|
641 - | /// A detailed description of the validation failure.
|
1034 + | /// /* ServerBuilderGenerator.kt:331 */A detailed description of the validation failure.
|
1035 + | /* ServerBuilderGenerator.kt:343 */
|
642 1036 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
643 - | self.message = Some(input);
|
1037 + | /* ServerBuilderGenerator.kt:344 */
|
1038 + | self.message =
|
1039 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1040 + | /* ServerBuilderGenerator.kt:376 */input
|
1041 + | /* ServerBuilderGenerator.kt:345 */)
|
1042 + | /* ServerBuilderGenerator.kt:344 */;
|
644 1043 | self
|
1044 + | /* ServerBuilderGenerator.kt:343 */
|
645 1045 | }
|
646 - | /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
647 - | ///
|
1046 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
1047 + | /// /* ServerBuilderGenerator.kt:260 */
|
648 1048 | /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if a [`ConstraintViolation`] occurs.
|
649 1049 | ///
|
650 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1050 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1051 + | /* ServerBuilderGenerator.kt:271 */
|
651 1052 | pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
|
652 1053 | self.build_enforcing_all_constraints()
|
653 1054 | }
|
1055 + | /* ServerBuilderGenerator.kt:283 */
|
654 1056 | fn build_enforcing_all_constraints(
|
655 1057 | self,
|
656 1058 | ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
|
657 - | Ok(crate::model::ValidationExceptionField {
|
658 - | path: self.path.ok_or(ConstraintViolation::MissingPath)?,
|
659 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
660 - | })
|
1059 + | /* ServerBuilderGenerator.kt:287 */
|
1060 + | Ok(
|
1061 + | /* ServerBuilderGenerator.kt:542 */
|
1062 + | crate::model::ValidationExceptionField {
|
1063 + | /* ServerBuilderGenerator.kt:546 */
|
1064 + | path: self
|
1065 + | .path
|
1066 + | /* ServerBuilderGenerator.kt:569 */
|
1067 + | .ok_or(ConstraintViolation::MissingPath)?,
|
1068 + | /* ServerBuilderGenerator.kt:546 */
|
1069 + | message: self
|
1070 + | .message
|
1071 + | /* ServerBuilderGenerator.kt:569 */
|
1072 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
1073 + | /* ServerBuilderGenerator.kt:542 */
|
1074 + | }, /* ServerBuilderGenerator.kt:287 */
|
1075 + | )
|
1076 + | /* ServerBuilderGenerator.kt:283 */
|
661 1077 | }
|
1078 + | /* ServerBuilderGenerator.kt:215 */
|
662 1079 | }
|
1080 + |
|
1081 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
663 1082 | }
|
664 1083 | pub mod complex_union {
|
665 1084 |
|
1085 + | /* RustType.kt:516 */
|
666 1086 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1087 + | /* UnconstrainedUnionGenerator.kt:150 */
|
667 1088 | #[allow(clippy::enum_variant_names)]
|
668 1089 | pub enum ConstraintViolation {
|
1090 + | /* UnconstrainedUnionGenerator.kt:218 */
|
669 1091 | ComplexStruct(crate::model::complex_struct::ConstraintViolation),
|
1092 + | /* UnconstrainedUnionGenerator.kt:218 */
|
670 1093 | Structure(crate::model::simple_struct::ConstraintViolation),
|
1094 + | /* UnconstrainedUnionGenerator.kt:150 */
|
671 1095 | }
|
1096 + | /* UnconstrainedUnionGenerator.kt:158 */
|
672 1097 | impl ::std::fmt::Display for ConstraintViolation {
|
673 1098 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
674 1099 | match self {
|
675 1100 | Self::ComplexStruct(inner) => write!(f, "{inner}"),
|
676 1101 | Self::Structure(inner) => write!(f, "{inner}"),
|
677 1102 | }
|
678 1103 | }
|
679 1104 | }
|
680 1105 |
|
681 1106 | impl ::std::error::Error for ConstraintViolation {}
|
1107 + | /* UnconstrainedUnionGenerator.kt:176 */
|
682 1108 | impl ConstraintViolation {
|
683 1109 | pub(crate) fn as_validation_exception_field(
|
684 1110 | self,
|
685 1111 | path: ::std::string::String,
|
686 1112 | ) -> crate::model::ValidationExceptionField {
|
687 1113 | match self {
|
688 1114 | Self::ComplexStruct(inner) => {
|
689 1115 | inner.as_validation_exception_field(path + "/complexStruct")
|
690 1116 | }
|
691 1117 | Self::Structure(inner) => inner.as_validation_exception_field(path + "/structure"),
|
692 1118 | }
|
693 1119 | }
|
694 1120 | }
|
1121 + |
|
1122 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
695 1123 | }
|
696 - | /// See [`Unit`](crate::model::Unit).
|
1124 + | /// /* ServerBuilderGenerator.kt:171 */See [`Unit`](crate::model::Unit).
|
697 1125 | pub mod unit {
|
698 1126 |
|
1127 + | /* ServerBuilderGenerator.kt:461 */
|
699 1128 | impl ::std::convert::From<Builder> for crate::model::Unit {
|
700 1129 | fn from(builder: Builder) -> Self {
|
701 1130 | builder.build()
|
702 1131 | }
|
703 1132 | }
|
704 - | /// A builder for [`Unit`](crate::model::Unit).
|
1133 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Unit`](crate::model::Unit).
|
1134 + | /* RustType.kt:516 */
|
705 1135 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
706 - | pub struct Builder {}
|
1136 + | /* ServerBuilderGenerator.kt:211 */
|
1137 + | pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
1138 + | /* ServerBuilderGenerator.kt:215 */
|
707 1139 | impl Builder {
|
708 - | /// Consumes the builder and constructs a [`Unit`](crate::model::Unit).
|
1140 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Unit`](crate::model::Unit).
|
1141 + | /* ServerBuilderGenerator.kt:271 */
|
709 1142 | pub fn build(self) -> crate::model::Unit {
|
710 1143 | self.build_enforcing_all_constraints()
|
711 1144 | }
|
1145 + | /* ServerBuilderGenerator.kt:283 */
|
712 1146 | fn build_enforcing_all_constraints(self) -> crate::model::Unit {
|
713 - | crate::model::Unit {}
|
1147 + | /* ServerBuilderGenerator.kt:542 */
|
1148 + | crate::model::Unit {
|
1149 + | /* ServerBuilderGenerator.kt:542 */}
|
1150 + | /* ServerBuilderGenerator.kt:283 */
|
714 1151 | }
|
1152 + | /* ServerBuilderGenerator.kt:215 */
|
715 1153 | }
|
1154 + |
|
1155 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
716 1156 | }
|
717 - | /// See [`SimpleStruct`](crate::model::SimpleStruct).
|
1157 + | /// /* ServerBuilderGenerator.kt:171 */See [`SimpleStruct`](crate::model::SimpleStruct).
|
718 1158 | pub mod simple_struct {
|
719 1159 |
|
1160 + | /* RustType.kt:516 */
|
720 1161 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
721 - | /// Holds one variant for each of the ways the builder can fail.
|
1162 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
1163 + | /* RustType.kt:516 */
|
722 1164 | #[non_exhaustive]
|
1165 + | /* ServerBuilderConstraintViolations.kt:75 */
|
723 1166 | #[allow(clippy::enum_variant_names)]
|
724 1167 | pub enum ConstraintViolation {
|
725 - | /// Constraint violation occurred building member `r#enum` when building `SimpleStruct`.
|
1168 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `r#enum` when building `SimpleStruct`.
|
1169 + | /* RustType.kt:516 */
|
726 1170 | #[doc(hidden)]
|
1171 + | /* ServerBuilderConstraintViolations.kt:164 */
|
727 1172 | Enum(crate::model::suit::ConstraintViolation),
|
728 - | /// `required_blob` was not provided but it is required when building `SimpleStruct`.
|
1173 + | /// /* ServerBuilderConstraintViolations.kt:138 */`required_blob` was not provided but it is required when building `SimpleStruct`.
|
1174 + | /* ServerBuilderConstraintViolations.kt:143 */
|
729 1175 | MissingRequiredBlob,
|
730 - | /// `required_boolean` was not provided but it is required when building `SimpleStruct`.
|
1176 + | /// /* ServerBuilderConstraintViolations.kt:138 */`required_boolean` was not provided but it is required when building `SimpleStruct`.
|
1177 + | /* ServerBuilderConstraintViolations.kt:143 */
|
731 1178 | MissingRequiredBoolean,
|
732 - | /// `required_string` was not provided but it is required when building `SimpleStruct`.
|
1179 + | /// /* ServerBuilderConstraintViolations.kt:138 */`required_string` was not provided but it is required when building `SimpleStruct`.
|
1180 + | /* ServerBuilderConstraintViolations.kt:143 */
|
733 1181 | MissingRequiredString,
|
734 - | /// `required_byte` was not provided but it is required when building `SimpleStruct`.
|
1182 + | /// /* ServerBuilderConstraintViolations.kt:138 */`required_byte` was not provided but it is required when building `SimpleStruct`.
|
1183 + | /* ServerBuilderConstraintViolations.kt:143 */
|
735 1184 | MissingRequiredByte,
|
736 - | /// `required_short` was not provided but it is required when building `SimpleStruct`.
|
1185 + | /// /* ServerBuilderConstraintViolations.kt:138 */`required_short` was not provided but it is required when building `SimpleStruct`.
|
1186 + | /* ServerBuilderConstraintViolations.kt:143 */
|
737 1187 | MissingRequiredShort,
|
738 - | /// `required_integer` was not provided but it is required when building `SimpleStruct`.
|
1188 + | /// /* ServerBuilderConstraintViolations.kt:138 */`required_integer` was not provided but it is required when building `SimpleStruct`.
|
1189 + | /* ServerBuilderConstraintViolations.kt:143 */
|
739 1190 | MissingRequiredInteger,
|
740 - | /// `required_long` was not provided but it is required when building `SimpleStruct`.
|
1191 + | /// /* ServerBuilderConstraintViolations.kt:138 */`required_long` was not provided but it is required when building `SimpleStruct`.
|
1192 + | /* ServerBuilderConstraintViolations.kt:143 */
|
741 1193 | MissingRequiredLong,
|
742 - | /// `required_float` was not provided but it is required when building `SimpleStruct`.
|
1194 + | /// /* ServerBuilderConstraintViolations.kt:138 */`required_float` was not provided but it is required when building `SimpleStruct`.
|
1195 + | /* ServerBuilderConstraintViolations.kt:143 */
|
743 1196 | MissingRequiredFloat,
|
744 - | /// `required_double` was not provided but it is required when building `SimpleStruct`.
|
1197 + | /// /* ServerBuilderConstraintViolations.kt:138 */`required_double` was not provided but it is required when building `SimpleStruct`.
|
1198 + | /* ServerBuilderConstraintViolations.kt:143 */
|
745 1199 | MissingRequiredDouble,
|
746 - | /// `required_timestamp` was not provided but it is required when building `SimpleStruct`.
|
1200 + | /// /* ServerBuilderConstraintViolations.kt:138 */`required_timestamp` was not provided but it is required when building `SimpleStruct`.
|
1201 + | /* ServerBuilderConstraintViolations.kt:143 */
|
747 1202 | MissingRequiredTimestamp,
|
748 - | /// `required_enum` was not provided but it is required when building `SimpleStruct`.
|
1203 + | /// /* ServerBuilderConstraintViolations.kt:138 */`required_enum` was not provided but it is required when building `SimpleStruct`.
|
1204 + | /* ServerBuilderConstraintViolations.kt:143 */
|
749 1205 | MissingRequiredEnum,
|
750 - | /// Constraint violation occurred building member `required_enum` when building `SimpleStruct`.
|
1206 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `required_enum` when building `SimpleStruct`.
|
1207 + | /* RustType.kt:516 */
|
751 1208 | #[doc(hidden)]
|
1209 + | /* ServerBuilderConstraintViolations.kt:164 */
|
752 1210 | RequiredEnum(crate::model::suit::ConstraintViolation),
|
1211 + | /* ServerBuilderConstraintViolations.kt:75 */
|
753 1212 | }
|
1213 + | /* ServerBuilderConstraintViolations.kt:117 */
|
754 1214 | impl ::std::fmt::Display for ConstraintViolation {
|
1215 + | /* ServerBuilderConstraintViolations.kt:118 */
|
755 1216 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1217 + | /* ServerBuilderConstraintViolations.kt:119 */
|
756 1218 | match self {
|
757 - | ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `SimpleStruct`"),
|
758 - | ConstraintViolation::MissingRequiredBlob => write!(f, "`required_blob` was not provided but it is required when building `SimpleStruct`"),
|
759 - | ConstraintViolation::MissingRequiredBoolean => write!(f, "`required_boolean` was not provided but it is required when building `SimpleStruct`"),
|
760 - | ConstraintViolation::MissingRequiredString => write!(f, "`required_string` was not provided but it is required when building `SimpleStruct`"),
|
761 - | ConstraintViolation::MissingRequiredByte => write!(f, "`required_byte` was not provided but it is required when building `SimpleStruct`"),
|
762 - | ConstraintViolation::MissingRequiredShort => write!(f, "`required_short` was not provided but it is required when building `SimpleStruct`"),
|
763 - | ConstraintViolation::MissingRequiredInteger => write!(f, "`required_integer` was not provided but it is required when building `SimpleStruct`"),
|
764 - | ConstraintViolation::MissingRequiredLong => write!(f, "`required_long` was not provided but it is required when building `SimpleStruct`"),
|
765 - | ConstraintViolation::MissingRequiredFloat => write!(f, "`required_float` was not provided but it is required when building `SimpleStruct`"),
|
766 - | ConstraintViolation::MissingRequiredDouble => write!(f, "`required_double` was not provided but it is required when building `SimpleStruct`"),
|
767 - | ConstraintViolation::MissingRequiredTimestamp => write!(f, "`required_timestamp` was not provided but it is required when building `SimpleStruct`"),
|
768 - | ConstraintViolation::MissingRequiredEnum => write!(f, "`required_enum` was not provided but it is required when building `SimpleStruct`"),
|
769 - | ConstraintViolation::RequiredEnum(_) => write!(f, "constraint violation occurred building member `required_enum` when building `SimpleStruct`"),
|
770 - | }
|
771 - | }
|
772 - | }
|
1219 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `SimpleStruct`"),
|
1220 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredBlob => write!(f, "`required_blob` was not provided but it is required when building `SimpleStruct`"),
|
1221 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredBoolean => write!(f, "`required_boolean` was not provided but it is required when building `SimpleStruct`"),
|
1222 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredString => write!(f, "`required_string` was not provided but it is required when building `SimpleStruct`"),
|
1223 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredByte => write!(f, "`required_byte` was not provided but it is required when building `SimpleStruct`"),
|
1224 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredShort => write!(f, "`required_short` was not provided but it is required when building `SimpleStruct`"),
|
1225 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredInteger => write!(f, "`required_integer` was not provided but it is required when building `SimpleStruct`"),
|
1226 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredLong => write!(f, "`required_long` was not provided but it is required when building `SimpleStruct`"),
|
1227 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredFloat => write!(f, "`required_float` was not provided but it is required when building `SimpleStruct`"),
|
1228 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredDouble => write!(f, "`required_double` was not provided but it is required when building `SimpleStruct`"),
|
1229 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredTimestamp => write!(f, "`required_timestamp` was not provided but it is required when building `SimpleStruct`"),
|
1230 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredEnum => write!(f, "`required_enum` was not provided but it is required when building `SimpleStruct`"),
|
1231 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::RequiredEnum(_) => write!(f, "constraint violation occurred building member `required_enum` when building `SimpleStruct`"),
|
1232 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
1233 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1234 + | }
|
1235 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1236 + | }
|
1237 + | /* ServerBuilderConstraintViolations.kt:84 */
|
773 1238 | impl ::std::error::Error for ConstraintViolation {}
|
1239 + | /* ServerBuilderConstraintViolations.kt:171 */
|
774 1240 | impl ConstraintViolation {
|
775 1241 | pub(crate) fn as_validation_exception_field(
|
776 1242 | self,
|
777 1243 | path: ::std::string::String,
|
778 1244 | ) -> crate::model::ValidationExceptionField {
|
779 1245 | match self {
|
780 1246 | ConstraintViolation::Enum(inner) => inner.as_validation_exception_field(path + "/enum"),
|
781 1247 | ConstraintViolation::MissingRequiredBlob => crate::model::ValidationExceptionField {
|
782 1248 | message: format!("Value at '{}/requiredBlob' failed to satisfy constraint: Member must not be null", path),
|
783 1249 | path: path + "/requiredBlob",
|
784 1250 | },
|
785 1251 | ConstraintViolation::MissingRequiredBoolean => crate::model::ValidationExceptionField {
|
786 1252 | message: format!("Value at '{}/requiredBoolean' failed to satisfy constraint: Member must not be null", path),
|
787 1253 | path: path + "/requiredBoolean",
|
788 1254 | },
|
789 1255 | ConstraintViolation::MissingRequiredString => crate::model::ValidationExceptionField {
|
790 1256 | message: format!("Value at '{}/requiredString' failed to satisfy constraint: Member must not be null", path),
|
791 1257 | path: path + "/requiredString",
|
792 1258 | },
|
793 1259 | ConstraintViolation::MissingRequiredByte => crate::model::ValidationExceptionField {
|
794 1260 | message: format!("Value at '{}/requiredByte' failed to satisfy constraint: Member must not be null", path),
|
795 1261 | path: path + "/requiredByte",
|
796 1262 | },
|
797 1263 | ConstraintViolation::MissingRequiredShort => crate::model::ValidationExceptionField {
|
798 1264 | message: format!("Value at '{}/requiredShort' failed to satisfy constraint: Member must not be null", path),
|
799 1265 | path: path + "/requiredShort",
|
800 1266 | },
|
801 1267 | ConstraintViolation::MissingRequiredInteger => crate::model::ValidationExceptionField {
|
802 1268 | message: format!("Value at '{}/requiredInteger' failed to satisfy constraint: Member must not be null", path),
|
803 1269 | path: path + "/requiredInteger",
|
804 1270 | },
|
805 1271 | ConstraintViolation::MissingRequiredLong => crate::model::ValidationExceptionField {
|
806 1272 | message: format!("Value at '{}/requiredLong' failed to satisfy constraint: Member must not be null", path),
|
807 1273 | path: path + "/requiredLong",
|
808 1274 | },
|
809 1275 | ConstraintViolation::MissingRequiredFloat => crate::model::ValidationExceptionField {
|
810 1276 | message: format!("Value at '{}/requiredFloat' failed to satisfy constraint: Member must not be null", path),
|
811 1277 | path: path + "/requiredFloat",
|
812 1278 | },
|
813 1279 | ConstraintViolation::MissingRequiredDouble => crate::model::ValidationExceptionField {
|
814 1280 | message: format!("Value at '{}/requiredDouble' failed to satisfy constraint: Member must not be null", path),
|
815 1281 | path: path + "/requiredDouble",
|
816 1282 | },
|
817 1283 | ConstraintViolation::MissingRequiredTimestamp => crate::model::ValidationExceptionField {
|
818 1284 | message: format!("Value at '{}/requiredTimestamp' failed to satisfy constraint: Member must not be null", path),
|
819 1285 | path: path + "/requiredTimestamp",
|
820 1286 | },
|
821 1287 | ConstraintViolation::MissingRequiredEnum => crate::model::ValidationExceptionField {
|
822 1288 | message: format!("Value at '{}/requiredEnum' failed to satisfy constraint: Member must not be null", path),
|
823 1289 | path: path + "/requiredEnum",
|
824 1290 | },
|
825 1291 | ConstraintViolation::RequiredEnum(inner) => inner.as_validation_exception_field(path + "/requiredEnum"),
|
826 1292 | }
|
827 1293 | }
|
828 1294 | }
|
1295 + | /* ServerBuilderGenerator.kt:244 */
|
829 1296 | impl ::std::convert::From<Builder>
|
830 1297 | for crate::constrained::MaybeConstrained<crate::model::SimpleStruct>
|
831 1298 | {
|
832 1299 | fn from(builder: Builder) -> Self {
|
833 1300 | Self::Unconstrained(builder)
|
834 1301 | }
|
835 1302 | }
|
1303 + | /* ServerBuilderGenerator.kt:446 */
|
836 1304 | impl ::std::convert::TryFrom<Builder> for crate::model::SimpleStruct {
|
837 1305 | type Error = ConstraintViolation;
|
838 1306 |
|
839 1307 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
840 1308 | builder.build()
|
841 1309 | }
|
842 1310 | }
|
843 - | /// A builder for [`SimpleStruct`](crate::model::SimpleStruct).
|
1311 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`SimpleStruct`](crate::model::SimpleStruct).
|
1312 + | /* RustType.kt:516 */
|
844 1313 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1314 + | /* ServerBuilderGenerator.kt:211 */
|
845 1315 | pub struct Builder {
|
1316 + | /* ServerBuilderGenerator.kt:308 */
|
846 1317 | pub(crate) blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
847 - | pub(crate) boolean: ::std::option::Option<bool>,
|
1318 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) boolean: ::std::option::Option<bool>,
|
1319 + | /* ServerBuilderGenerator.kt:308 */
|
848 1320 | pub(crate) string: ::std::option::Option<::std::string::String>,
|
849 - | pub(crate) byte: ::std::option::Option<i8>,
|
850 - | pub(crate) short: ::std::option::Option<i16>,
|
851 - | pub(crate) integer: ::std::option::Option<i32>,
|
852 - | pub(crate) long: ::std::option::Option<i64>,
|
853 - | pub(crate) float: ::std::option::Option<f32>,
|
854 - | pub(crate) double: ::std::option::Option<f64>,
|
1321 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) byte: ::std::option::Option<i8>,
|
1322 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) short: ::std::option::Option<i16>,
|
1323 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) integer: ::std::option::Option<i32>,
|
1324 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) long: ::std::option::Option<i64>,
|
1325 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) float: ::std::option::Option<f32>,
|
1326 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) double: ::std::option::Option<f64>,
|
1327 + | /* ServerBuilderGenerator.kt:308 */
|
855 1328 | pub(crate) timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
1329 + | /* ServerBuilderGenerator.kt:308 */
|
856 1330 | pub(crate) r#enum:
|
857 1331 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Suit>>,
|
1332 + | /* ServerBuilderGenerator.kt:308 */
|
858 1333 | pub(crate) required_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
1334 + | /* ServerBuilderGenerator.kt:308 */
|
859 1335 | pub(crate) required_boolean: ::std::option::Option<bool>,
|
1336 + | /* ServerBuilderGenerator.kt:308 */
|
860 1337 | pub(crate) required_string: ::std::option::Option<::std::string::String>,
|
1338 + | /* ServerBuilderGenerator.kt:308 */
|
861 1339 | pub(crate) required_byte: ::std::option::Option<i8>,
|
1340 + | /* ServerBuilderGenerator.kt:308 */
|
862 1341 | pub(crate) required_short: ::std::option::Option<i16>,
|
1342 + | /* ServerBuilderGenerator.kt:308 */
|
863 1343 | pub(crate) required_integer: ::std::option::Option<i32>,
|
1344 + | /* ServerBuilderGenerator.kt:308 */
|
864 1345 | pub(crate) required_long: ::std::option::Option<i64>,
|
1346 + | /* ServerBuilderGenerator.kt:308 */
|
865 1347 | pub(crate) required_float: ::std::option::Option<f32>,
|
1348 + | /* ServerBuilderGenerator.kt:308 */
|
866 1349 | pub(crate) required_double: ::std::option::Option<f64>,
|
1350 + | /* ServerBuilderGenerator.kt:308 */
|
867 1351 | pub(crate) required_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
1352 + | /* ServerBuilderGenerator.kt:308 */
|
868 1353 | pub(crate) required_enum:
|
869 1354 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Suit>>,
|
1355 + | /* ServerBuilderGenerator.kt:211 */
|
870 1356 | }
|
1357 + | /* ServerBuilderGenerator.kt:215 */
|
871 1358 | impl Builder {
|
1359 + | /* ServerBuilderGenerator.kt:331 */
|
872 1360 | #[allow(missing_docs)] // documentation missing in model
|
1361 + | /* ServerBuilderGenerator.kt:343 */
|
873 1362 | pub fn blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
|
874 - | self.blob = input;
|
1363 + | /* ServerBuilderGenerator.kt:344 */
|
1364 + | self.blob =
|
1365 + | /* ServerBuilderGenerator.kt:376 */input
|
1366 + | /* ServerBuilderGenerator.kt:344 */;
|
875 1367 | self
|
1368 + | /* ServerBuilderGenerator.kt:343 */
|
876 1369 | }
|
1370 + | /* ServerBuilderGenerator.kt:426 */
|
877 1371 | #[allow(missing_docs)] // documentation missing in model
|
1372 + | /* ServerBuilderGenerator.kt:428 */
|
878 1373 | pub(crate) fn set_blob(
|
879 1374 | mut self,
|
880 1375 | input: Option<impl ::std::convert::Into<::aws_smithy_types::Blob>>,
|
881 1376 | ) -> Self {
|
1377 + | /* ServerBuilderGenerator.kt:429 */
|
882 1378 | self.blob = input.map(|v| v.into());
|
883 1379 | self
|
1380 + | /* ServerBuilderGenerator.kt:428 */
|
884 1381 | }
|
1382 + | /* ServerBuilderGenerator.kt:331 */
|
885 1383 | #[allow(missing_docs)] // documentation missing in model
|
1384 + | /* ServerBuilderGenerator.kt:343 */
|
886 1385 | pub fn boolean(mut self, input: ::std::option::Option<bool>) -> Self {
|
887 - | self.boolean = input;
|
1386 + | /* ServerBuilderGenerator.kt:344 */
|
1387 + | self.boolean =
|
1388 + | /* ServerBuilderGenerator.kt:376 */input
|
1389 + | /* ServerBuilderGenerator.kt:344 */;
|
888 1390 | self
|
1391 + | /* ServerBuilderGenerator.kt:343 */
|
889 1392 | }
|
1393 + | /* ServerBuilderGenerator.kt:426 */
|
890 1394 | #[allow(missing_docs)] // documentation missing in model
|
1395 + | /* ServerBuilderGenerator.kt:428 */
|
891 1396 | pub(crate) fn set_boolean(
|
892 1397 | mut self,
|
893 1398 | input: Option<impl ::std::convert::Into<bool>>,
|
894 1399 | ) -> Self {
|
1400 + | /* ServerBuilderGenerator.kt:429 */
|
895 1401 | self.boolean = input.map(|v| v.into());
|
896 1402 | self
|
1403 + | /* ServerBuilderGenerator.kt:428 */
|
897 1404 | }
|
1405 + | /* ServerBuilderGenerator.kt:331 */
|
898 1406 | #[allow(missing_docs)] // documentation missing in model
|
1407 + | /* ServerBuilderGenerator.kt:343 */
|
899 1408 | pub fn string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
900 - | self.string = input;
|
1409 + | /* ServerBuilderGenerator.kt:344 */
|
1410 + | self.string =
|
1411 + | /* ServerBuilderGenerator.kt:376 */input
|
1412 + | /* ServerBuilderGenerator.kt:344 */;
|
901 1413 | self
|
1414 + | /* ServerBuilderGenerator.kt:343 */
|
902 1415 | }
|
1416 + | /* ServerBuilderGenerator.kt:426 */
|
903 1417 | #[allow(missing_docs)] // documentation missing in model
|
1418 + | /* ServerBuilderGenerator.kt:428 */
|
904 1419 | pub(crate) fn set_string(
|
905 1420 | mut self,
|
906 1421 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
907 1422 | ) -> Self {
|
1423 + | /* ServerBuilderGenerator.kt:429 */
|
908 1424 | self.string = input.map(|v| v.into());
|
909 1425 | self
|
1426 + | /* ServerBuilderGenerator.kt:428 */
|
910 1427 | }
|
1428 + | /* ServerBuilderGenerator.kt:331 */
|
911 1429 | #[allow(missing_docs)] // documentation missing in model
|
1430 + | /* ServerBuilderGenerator.kt:343 */
|
912 1431 | pub fn byte(mut self, input: ::std::option::Option<i8>) -> Self {
|
913 - | self.byte = input;
|
1432 + | /* ServerBuilderGenerator.kt:344 */
|
1433 + | self.byte =
|
1434 + | /* ServerBuilderGenerator.kt:376 */input
|
1435 + | /* ServerBuilderGenerator.kt:344 */;
|
914 1436 | self
|
1437 + | /* ServerBuilderGenerator.kt:343 */
|
915 1438 | }
|
1439 + | /* ServerBuilderGenerator.kt:426 */
|
916 1440 | #[allow(missing_docs)] // documentation missing in model
|
1441 + | /* ServerBuilderGenerator.kt:428 */
|
917 1442 | pub(crate) fn set_byte(mut self, input: Option<impl ::std::convert::Into<i8>>) -> Self {
|
1443 + | /* ServerBuilderGenerator.kt:429 */
|
918 1444 | self.byte = input.map(|v| v.into());
|
919 1445 | self
|
1446 + | /* ServerBuilderGenerator.kt:428 */
|
920 1447 | }
|
1448 + | /* ServerBuilderGenerator.kt:331 */
|
921 1449 | #[allow(missing_docs)] // documentation missing in model
|
1450 + | /* ServerBuilderGenerator.kt:343 */
|
922 1451 | pub fn short(mut self, input: ::std::option::Option<i16>) -> Self {
|
923 - | self.short = input;
|
1452 + | /* ServerBuilderGenerator.kt:344 */
|
1453 + | self.short =
|
1454 + | /* ServerBuilderGenerator.kt:376 */input
|
1455 + | /* ServerBuilderGenerator.kt:344 */;
|
924 1456 | self
|
1457 + | /* ServerBuilderGenerator.kt:343 */
|
925 1458 | }
|
1459 + | /* ServerBuilderGenerator.kt:426 */
|
926 1460 | #[allow(missing_docs)] // documentation missing in model
|
1461 + | /* ServerBuilderGenerator.kt:428 */
|
927 1462 | pub(crate) fn set_short(mut self, input: Option<impl ::std::convert::Into<i16>>) -> Self {
|
1463 + | /* ServerBuilderGenerator.kt:429 */
|
928 1464 | self.short = input.map(|v| v.into());
|
929 1465 | self
|
1466 + | /* ServerBuilderGenerator.kt:428 */
|
930 1467 | }
|
1468 + | /* ServerBuilderGenerator.kt:331 */
|
931 1469 | #[allow(missing_docs)] // documentation missing in model
|
1470 + | /* ServerBuilderGenerator.kt:343 */
|
932 1471 | pub fn integer(mut self, input: ::std::option::Option<i32>) -> Self {
|
933 - | self.integer = input;
|
1472 + | /* ServerBuilderGenerator.kt:344 */
|
1473 + | self.integer =
|
1474 + | /* ServerBuilderGenerator.kt:376 */input
|
1475 + | /* ServerBuilderGenerator.kt:344 */;
|
934 1476 | self
|
1477 + | /* ServerBuilderGenerator.kt:343 */
|
935 1478 | }
|
1479 + | /* ServerBuilderGenerator.kt:426 */
|
936 1480 | #[allow(missing_docs)] // documentation missing in model
|
1481 + | /* ServerBuilderGenerator.kt:428 */
|
937 1482 | pub(crate) fn set_integer(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
1483 + | /* ServerBuilderGenerator.kt:429 */
|
938 1484 | self.integer = input.map(|v| v.into());
|
939 1485 | self
|
1486 + | /* ServerBuilderGenerator.kt:428 */
|
940 1487 | }
|
1488 + | /* ServerBuilderGenerator.kt:331 */
|
941 1489 | #[allow(missing_docs)] // documentation missing in model
|
1490 + | /* ServerBuilderGenerator.kt:343 */
|
942 1491 | pub fn long(mut self, input: ::std::option::Option<i64>) -> Self {
|
943 - | self.long = input;
|
1492 + | /* ServerBuilderGenerator.kt:344 */
|
1493 + | self.long =
|
1494 + | /* ServerBuilderGenerator.kt:376 */input
|
1495 + | /* ServerBuilderGenerator.kt:344 */;
|
944 1496 | self
|
1497 + | /* ServerBuilderGenerator.kt:343 */
|
945 1498 | }
|
1499 + | /* ServerBuilderGenerator.kt:426 */
|
946 1500 | #[allow(missing_docs)] // documentation missing in model
|
1501 + | /* ServerBuilderGenerator.kt:428 */
|
947 1502 | pub(crate) fn set_long(mut self, input: Option<impl ::std::convert::Into<i64>>) -> Self {
|
1503 + | /* ServerBuilderGenerator.kt:429 */
|
948 1504 | self.long = input.map(|v| v.into());
|
949 1505 | self
|
1506 + | /* ServerBuilderGenerator.kt:428 */
|
950 1507 | }
|
1508 + | /* ServerBuilderGenerator.kt:331 */
|
951 1509 | #[allow(missing_docs)] // documentation missing in model
|
1510 + | /* ServerBuilderGenerator.kt:343 */
|
952 1511 | pub fn float(mut self, input: ::std::option::Option<f32>) -> Self {
|
953 - | self.float = input;
|
1512 + | /* ServerBuilderGenerator.kt:344 */
|
1513 + | self.float =
|
1514 + | /* ServerBuilderGenerator.kt:376 */input
|
1515 + | /* ServerBuilderGenerator.kt:344 */;
|
954 1516 | self
|
1517 + | /* ServerBuilderGenerator.kt:343 */
|
955 1518 | }
|
1519 + | /* ServerBuilderGenerator.kt:426 */
|
956 1520 | #[allow(missing_docs)] // documentation missing in model
|
1521 + | /* ServerBuilderGenerator.kt:428 */
|
957 1522 | pub(crate) fn set_float(mut self, input: Option<impl ::std::convert::Into<f32>>) -> Self {
|
1523 + | /* ServerBuilderGenerator.kt:429 */
|
958 1524 | self.float = input.map(|v| v.into());
|
959 1525 | self
|
1526 + | /* ServerBuilderGenerator.kt:428 */
|
960 1527 | }
|
1528 + | /* ServerBuilderGenerator.kt:331 */
|
961 1529 | #[allow(missing_docs)] // documentation missing in model
|
1530 + | /* ServerBuilderGenerator.kt:343 */
|
962 1531 | pub fn double(mut self, input: ::std::option::Option<f64>) -> Self {
|
963 - | self.double = input;
|
1532 + | /* ServerBuilderGenerator.kt:344 */
|
1533 + | self.double =
|
1534 + | /* ServerBuilderGenerator.kt:376 */input
|
1535 + | /* ServerBuilderGenerator.kt:344 */;
|
964 1536 | self
|
1537 + | /* ServerBuilderGenerator.kt:343 */
|
965 1538 | }
|
1539 + | /* ServerBuilderGenerator.kt:426 */
|
966 1540 | #[allow(missing_docs)] // documentation missing in model
|
1541 + | /* ServerBuilderGenerator.kt:428 */
|
967 1542 | pub(crate) fn set_double(mut self, input: Option<impl ::std::convert::Into<f64>>) -> Self {
|
1543 + | /* ServerBuilderGenerator.kt:429 */
|
968 1544 | self.double = input.map(|v| v.into());
|
969 1545 | self
|
1546 + | /* ServerBuilderGenerator.kt:428 */
|
970 1547 | }
|
1548 + | /* ServerBuilderGenerator.kt:331 */
|
971 1549 | #[allow(missing_docs)] // documentation missing in model
|
1550 + | /* ServerBuilderGenerator.kt:343 */
|
972 1551 | pub fn timestamp(
|
973 1552 | mut self,
|
974 1553 | input: ::std::option::Option<::aws_smithy_types::DateTime>,
|
975 1554 | ) -> Self {
|
976 - | self.timestamp = input;
|
1555 + | /* ServerBuilderGenerator.kt:344 */
|
1556 + | self.timestamp =
|
1557 + | /* ServerBuilderGenerator.kt:376 */input
|
1558 + | /* ServerBuilderGenerator.kt:344 */;
|
977 1559 | self
|
1560 + | /* ServerBuilderGenerator.kt:343 */
|
978 1561 | }
|
1562 + | /* ServerBuilderGenerator.kt:426 */
|
979 1563 | #[allow(missing_docs)] // documentation missing in model
|
1564 + | /* ServerBuilderGenerator.kt:428 */
|
980 1565 | pub(crate) fn set_timestamp(
|
981 1566 | mut self,
|
982 1567 | input: Option<impl ::std::convert::Into<::aws_smithy_types::DateTime>>,
|
983 1568 | ) -> Self {
|
1569 + | /* ServerBuilderGenerator.kt:429 */
|
984 1570 | self.timestamp = input.map(|v| v.into());
|
985 1571 | self
|
1572 + | /* ServerBuilderGenerator.kt:428 */
|
986 1573 | }
|
1574 + | /* ServerBuilderGenerator.kt:331 */
|
987 1575 | #[allow(missing_docs)] // documentation missing in model
|
1576 + | /* ServerBuilderGenerator.kt:343 */
|
988 1577 | pub fn r#enum(mut self, input: ::std::option::Option<crate::model::Suit>) -> Self {
|
989 - | self.r#enum = input.map(
|
990 - | #[allow(clippy::redundant_closure)]
|
991 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
992 - | );
|
1578 + | /* ServerBuilderGenerator.kt:344 */
|
1579 + | self.r#enum =
|
1580 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
1581 + | /* ServerBuilderGenerator.kt:344 */;
|
993 1582 | self
|
1583 + | /* ServerBuilderGenerator.kt:343 */
|
994 1584 | }
|
1585 + | /* ServerBuilderGenerator.kt:426 */
|
995 1586 | #[allow(missing_docs)] // documentation missing in model
|
1587 + | /* ServerBuilderGenerator.kt:428 */
|
996 1588 | pub(crate) fn set_enum(
|
997 1589 | mut self,
|
998 1590 | input: Option<
|
999 1591 | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Suit>>,
|
1000 1592 | >,
|
1001 1593 | ) -> Self {
|
1594 + | /* ServerBuilderGenerator.kt:429 */
|
1002 1595 | self.r#enum = input.map(|v| v.into());
|
1003 1596 | self
|
1597 + | /* ServerBuilderGenerator.kt:428 */
|
1004 1598 | }
|
1599 + | /* ServerBuilderGenerator.kt:331 */
|
1005 1600 | #[allow(missing_docs)] // documentation missing in model
|
1601 + | /* ServerBuilderGenerator.kt:343 */
|
1006 1602 | pub fn required_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
|
1007 - | self.required_blob = Some(input);
|
1603 + | /* ServerBuilderGenerator.kt:344 */
|
1604 + | self.required_blob =
|
1605 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1606 + | /* ServerBuilderGenerator.kt:376 */input
|
1607 + | /* ServerBuilderGenerator.kt:345 */)
|
1608 + | /* ServerBuilderGenerator.kt:344 */;
|
1008 1609 | self
|
1610 + | /* ServerBuilderGenerator.kt:343 */
|
1009 1611 | }
|
1612 + | /* ServerBuilderGenerator.kt:426 */
|
1010 1613 | #[allow(missing_docs)] // documentation missing in model
|
1614 + | /* ServerBuilderGenerator.kt:428 */
|
1011 1615 | pub(crate) fn set_required_blob(
|
1012 1616 | mut self,
|
1013 1617 | input: impl ::std::convert::Into<::aws_smithy_types::Blob>,
|
1014 1618 | ) -> Self {
|
1619 + | /* ServerBuilderGenerator.kt:429 */
|
1015 1620 | self.required_blob = Some(input.into());
|
1016 1621 | self
|
1622 + | /* ServerBuilderGenerator.kt:428 */
|
1017 1623 | }
|
1624 + | /* ServerBuilderGenerator.kt:331 */
|
1018 1625 | #[allow(missing_docs)] // documentation missing in model
|
1626 + | /* ServerBuilderGenerator.kt:343 */
|
1019 1627 | pub fn required_boolean(mut self, input: bool) -> Self {
|
1020 - | self.required_boolean = Some(input);
|
1628 + | /* ServerBuilderGenerator.kt:344 */
|
1629 + | self.required_boolean =
|
1630 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1631 + | /* ServerBuilderGenerator.kt:376 */input
|
1632 + | /* ServerBuilderGenerator.kt:345 */)
|
1633 + | /* ServerBuilderGenerator.kt:344 */;
|
1021 1634 | self
|
1635 + | /* ServerBuilderGenerator.kt:343 */
|
1022 1636 | }
|
1637 + | /* ServerBuilderGenerator.kt:426 */
|
1023 1638 | #[allow(missing_docs)] // documentation missing in model
|
1639 + | /* ServerBuilderGenerator.kt:428 */
|
1024 1640 | pub(crate) fn set_required_boolean(
|
1025 1641 | mut self,
|
1026 1642 | input: impl ::std::convert::Into<bool>,
|
1027 1643 | ) -> Self {
|
1644 + | /* ServerBuilderGenerator.kt:429 */
|
1028 1645 | self.required_boolean = Some(input.into());
|
1029 1646 | self
|
1647 + | /* ServerBuilderGenerator.kt:428 */
|
1030 1648 | }
|
1649 + | /* ServerBuilderGenerator.kt:331 */
|
1031 1650 | #[allow(missing_docs)] // documentation missing in model
|
1651 + | /* ServerBuilderGenerator.kt:343 */
|
1032 1652 | pub fn required_string(mut self, input: ::std::string::String) -> Self {
|
1033 - | self.required_string = Some(input);
|
1653 + | /* ServerBuilderGenerator.kt:344 */
|
1654 + | self.required_string =
|
1655 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1656 + | /* ServerBuilderGenerator.kt:376 */input
|
1657 + | /* ServerBuilderGenerator.kt:345 */)
|
1658 + | /* ServerBuilderGenerator.kt:344 */;
|
1034 1659 | self
|
1660 + | /* ServerBuilderGenerator.kt:343 */
|
1035 1661 | }
|
1662 + | /* ServerBuilderGenerator.kt:426 */
|
1036 1663 | #[allow(missing_docs)] // documentation missing in model
|
1664 + | /* ServerBuilderGenerator.kt:428 */
|
1037 1665 | pub(crate) fn set_required_string(
|
1038 1666 | mut self,
|
1039 1667 | input: impl ::std::convert::Into<::std::string::String>,
|
1040 1668 | ) -> Self {
|
1669 + | /* ServerBuilderGenerator.kt:429 */
|
1041 1670 | self.required_string = Some(input.into());
|
1042 1671 | self
|
1672 + | /* ServerBuilderGenerator.kt:428 */
|
1043 1673 | }
|
1674 + | /* ServerBuilderGenerator.kt:331 */
|
1044 1675 | #[allow(missing_docs)] // documentation missing in model
|
1676 + | /* ServerBuilderGenerator.kt:343 */
|
1045 1677 | pub fn required_byte(mut self, input: i8) -> Self {
|
1046 - | self.required_byte = Some(input);
|
1678 + | /* ServerBuilderGenerator.kt:344 */
|
1679 + | self.required_byte =
|
1680 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1681 + | /* ServerBuilderGenerator.kt:376 */input
|
1682 + | /* ServerBuilderGenerator.kt:345 */)
|
1683 + | /* ServerBuilderGenerator.kt:344 */;
|
1047 1684 | self
|
1685 + | /* ServerBuilderGenerator.kt:343 */
|
1048 1686 | }
|
1687 + | /* ServerBuilderGenerator.kt:426 */
|
1049 1688 | #[allow(missing_docs)] // documentation missing in model
|
1689 + | /* ServerBuilderGenerator.kt:428 */
|
1050 1690 | pub(crate) fn set_required_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
|
1691 + | /* ServerBuilderGenerator.kt:429 */
|
1051 1692 | self.required_byte = Some(input.into());
|
1052 1693 | self
|
1694 + | /* ServerBuilderGenerator.kt:428 */
|
1053 1695 | }
|
1696 + | /* ServerBuilderGenerator.kt:331 */
|
1054 1697 | #[allow(missing_docs)] // documentation missing in model
|
1698 + | /* ServerBuilderGenerator.kt:343 */
|
1055 1699 | pub fn required_short(mut self, input: i16) -> Self {
|
1056 - | self.required_short = Some(input);
|
1700 + | /* ServerBuilderGenerator.kt:344 */
|
1701 + | self.required_short =
|
1702 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1703 + | /* ServerBuilderGenerator.kt:376 */input
|
1704 + | /* ServerBuilderGenerator.kt:345 */)
|
1705 + | /* ServerBuilderGenerator.kt:344 */;
|
1057 1706 | self
|
1707 + | /* ServerBuilderGenerator.kt:343 */
|
1058 1708 | }
|
1709 + | /* ServerBuilderGenerator.kt:426 */
|
1059 1710 | #[allow(missing_docs)] // documentation missing in model
|
1711 + | /* ServerBuilderGenerator.kt:428 */
|
1060 1712 | pub(crate) fn set_required_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
|
1713 + | /* ServerBuilderGenerator.kt:429 */
|
1061 1714 | self.required_short = Some(input.into());
|
1062 1715 | self
|
1716 + | /* ServerBuilderGenerator.kt:428 */
|
1063 1717 | }
|
1718 + | /* ServerBuilderGenerator.kt:331 */
|
1064 1719 | #[allow(missing_docs)] // documentation missing in model
|
1720 + | /* ServerBuilderGenerator.kt:343 */
|
1065 1721 | pub fn required_integer(mut self, input: i32) -> Self {
|
1066 - | self.required_integer = Some(input);
|
1722 + | /* ServerBuilderGenerator.kt:344 */
|
1723 + | self.required_integer =
|
1724 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1725 + | /* ServerBuilderGenerator.kt:376 */input
|
1726 + | /* ServerBuilderGenerator.kt:345 */)
|
1727 + | /* ServerBuilderGenerator.kt:344 */;
|
1067 1728 | self
|
1729 + | /* ServerBuilderGenerator.kt:343 */
|
1068 1730 | }
|
1731 + | /* ServerBuilderGenerator.kt:426 */
|
1069 1732 | #[allow(missing_docs)] // documentation missing in model
|
1733 + | /* ServerBuilderGenerator.kt:428 */
|
1070 1734 | pub(crate) fn set_required_integer(
|
1071 1735 | mut self,
|
1072 1736 | input: impl ::std::convert::Into<i32>,
|
1073 1737 | ) -> Self {
|
1738 + | /* ServerBuilderGenerator.kt:429 */
|
1074 1739 | self.required_integer = Some(input.into());
|
1075 1740 | self
|
1741 + | /* ServerBuilderGenerator.kt:428 */
|
1076 1742 | }
|
1743 + | /* ServerBuilderGenerator.kt:331 */
|
1077 1744 | #[allow(missing_docs)] // documentation missing in model
|
1745 + | /* ServerBuilderGenerator.kt:343 */
|
1078 1746 | pub fn required_long(mut self, input: i64) -> Self {
|
1079 - | self.required_long = Some(input);
|
1747 + | /* ServerBuilderGenerator.kt:344 */
|
1748 + | self.required_long =
|
1749 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1750 + | /* ServerBuilderGenerator.kt:376 */input
|
1751 + | /* ServerBuilderGenerator.kt:345 */)
|
1752 + | /* ServerBuilderGenerator.kt:344 */;
|
1080 1753 | self
|
1754 + | /* ServerBuilderGenerator.kt:343 */
|
1081 1755 | }
|
1756 + | /* ServerBuilderGenerator.kt:426 */
|
1082 1757 | #[allow(missing_docs)] // documentation missing in model
|
1758 + | /* ServerBuilderGenerator.kt:428 */
|
1083 1759 | pub(crate) fn set_required_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
|
1760 + | /* ServerBuilderGenerator.kt:429 */
|
1084 1761 | self.required_long = Some(input.into());
|
1085 1762 | self
|
1763 + | /* ServerBuilderGenerator.kt:428 */
|
1086 1764 | }
|
1765 + | /* ServerBuilderGenerator.kt:331 */
|
1087 1766 | #[allow(missing_docs)] // documentation missing in model
|
1767 + | /* ServerBuilderGenerator.kt:343 */
|
1088 1768 | pub fn required_float(mut self, input: f32) -> Self {
|
1089 - | self.required_float = Some(input);
|
1769 + | /* ServerBuilderGenerator.kt:344 */
|
1770 + | self.required_float =
|
1771 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1772 + | /* ServerBuilderGenerator.kt:376 */input
|
1773 + | /* ServerBuilderGenerator.kt:345 */)
|
1774 + | /* ServerBuilderGenerator.kt:344 */;
|
1090 1775 | self
|
1776 + | /* ServerBuilderGenerator.kt:343 */
|
1091 1777 | }
|
1778 + | /* ServerBuilderGenerator.kt:426 */
|
1092 1779 | #[allow(missing_docs)] // documentation missing in model
|
1780 + | /* ServerBuilderGenerator.kt:428 */
|
1093 1781 | pub(crate) fn set_required_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
|
1782 + | /* ServerBuilderGenerator.kt:429 */
|
1094 1783 | self.required_float = Some(input.into());
|
1095 1784 | self
|
1785 + | /* ServerBuilderGenerator.kt:428 */
|
1096 1786 | }
|
1787 + | /* ServerBuilderGenerator.kt:331 */
|
1097 1788 | #[allow(missing_docs)] // documentation missing in model
|
1789 + | /* ServerBuilderGenerator.kt:343 */
|
1098 1790 | pub fn required_double(mut self, input: f64) -> Self {
|
1099 - | self.required_double = Some(input);
|
1791 + | /* ServerBuilderGenerator.kt:344 */
|
1792 + | self.required_double =
|
1793 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1794 + | /* ServerBuilderGenerator.kt:376 */input
|
1795 + | /* ServerBuilderGenerator.kt:345 */)
|
1796 + | /* ServerBuilderGenerator.kt:344 */;
|
1100 1797 | self
|
1798 + | /* ServerBuilderGenerator.kt:343 */
|
1101 1799 | }
|
1800 + | /* ServerBuilderGenerator.kt:426 */
|
1102 1801 | #[allow(missing_docs)] // documentation missing in model
|
1802 + | /* ServerBuilderGenerator.kt:428 */
|
1103 1803 | pub(crate) fn set_required_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
|
1804 + | /* ServerBuilderGenerator.kt:429 */
|
1104 1805 | self.required_double = Some(input.into());
|
1105 1806 | self
|
1807 + | /* ServerBuilderGenerator.kt:428 */
|
1106 1808 | }
|
1809 + | /* ServerBuilderGenerator.kt:331 */
|
1107 1810 | #[allow(missing_docs)] // documentation missing in model
|
1811 + | /* ServerBuilderGenerator.kt:343 */
|
1108 1812 | pub fn required_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
1109 - | self.required_timestamp = Some(input);
|
1813 + | /* ServerBuilderGenerator.kt:344 */
|
1814 + | self.required_timestamp =
|
1815 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1816 + | /* ServerBuilderGenerator.kt:376 */input
|
1817 + | /* ServerBuilderGenerator.kt:345 */)
|
1818 + | /* ServerBuilderGenerator.kt:344 */;
|
1110 1819 | self
|
1820 + | /* ServerBuilderGenerator.kt:343 */
|
1111 1821 | }
|
1822 + | /* ServerBuilderGenerator.kt:426 */
|
1112 1823 | #[allow(missing_docs)] // documentation missing in model
|
1824 + | /* ServerBuilderGenerator.kt:428 */
|
1113 1825 | pub(crate) fn set_required_timestamp(
|
1114 1826 | mut self,
|
1115 1827 | input: impl ::std::convert::Into<::aws_smithy_types::DateTime>,
|
1116 1828 | ) -> Self {
|
1829 + | /* ServerBuilderGenerator.kt:429 */
|
1117 1830 | self.required_timestamp = Some(input.into());
|
1118 1831 | self
|
1832 + | /* ServerBuilderGenerator.kt:428 */
|
1119 1833 | }
|
1834 + | /* ServerBuilderGenerator.kt:331 */
|
1120 1835 | #[allow(missing_docs)] // documentation missing in model
|
1836 + | /* ServerBuilderGenerator.kt:343 */
|
1121 1837 | pub fn required_enum(mut self, input: crate::model::Suit) -> Self {
|
1122 - | self.required_enum = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1838 + | /* ServerBuilderGenerator.kt:344 */
|
1839 + | self.required_enum =
|
1840 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1841 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
1842 + | /* ServerBuilderGenerator.kt:345 */)
|
1843 + | /* ServerBuilderGenerator.kt:344 */;
|
1123 1844 | self
|
1845 + | /* ServerBuilderGenerator.kt:343 */
|
1124 1846 | }
|
1847 + | /* ServerBuilderGenerator.kt:426 */
|
1125 1848 | #[allow(missing_docs)] // documentation missing in model
|
1849 + | /* ServerBuilderGenerator.kt:428 */
|
1126 1850 | pub(crate) fn set_required_enum(
|
1127 1851 | mut self,
|
1128 1852 | input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Suit>>,
|
1129 1853 | ) -> Self {
|
1854 + | /* ServerBuilderGenerator.kt:429 */
|
1130 1855 | self.required_enum = Some(input.into());
|
1131 1856 | self
|
1857 + | /* ServerBuilderGenerator.kt:428 */
|
1132 1858 | }
|
1133 - | /// Consumes the builder and constructs a [`SimpleStruct`](crate::model::SimpleStruct).
|
1134 - | ///
|
1859 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`SimpleStruct`](crate::model::SimpleStruct).
|
1860 + | /// /* ServerBuilderGenerator.kt:260 */
|
1135 1861 | /// The builder fails to construct a [`SimpleStruct`](crate::model::SimpleStruct) if a [`ConstraintViolation`] occurs.
|
1136 1862 | ///
|
1137 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1863 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1864 + | /* ServerBuilderGenerator.kt:271 */
|
1138 1865 | pub fn build(self) -> Result<crate::model::SimpleStruct, ConstraintViolation> {
|
1139 1866 | self.build_enforcing_all_constraints()
|
1140 1867 | }
|
1868 + | /* ServerBuilderGenerator.kt:283 */
|
1141 1869 | fn build_enforcing_all_constraints(
|
1142 1870 | self,
|
1143 1871 | ) -> Result<crate::model::SimpleStruct, ConstraintViolation> {
|
1144 - | Ok(crate::model::SimpleStruct {
|
1872 + | /* ServerBuilderGenerator.kt:287 */
|
1873 + | Ok(
|
1874 + | /* ServerBuilderGenerator.kt:542 */
|
1875 + | crate::model::SimpleStruct {
|
1876 + | /* ServerBuilderGenerator.kt:546 */
|
1145 1877 | blob: self.blob,
|
1878 + | /* ServerBuilderGenerator.kt:546 */
|
1146 1879 | boolean: self.boolean,
|
1880 + | /* ServerBuilderGenerator.kt:546 */
|
1147 1881 | string: self.string,
|
1882 + | /* ServerBuilderGenerator.kt:546 */
|
1148 1883 | byte: self.byte,
|
1884 + | /* ServerBuilderGenerator.kt:546 */
|
1149 1885 | short: self.short,
|
1886 + | /* ServerBuilderGenerator.kt:546 */
|
1150 1887 | integer: self.integer,
|
1888 + | /* ServerBuilderGenerator.kt:546 */
|
1151 1889 | long: self.long,
|
1890 + | /* ServerBuilderGenerator.kt:546 */
|
1152 1891 | float: self.float,
|
1892 + | /* ServerBuilderGenerator.kt:546 */
|
1153 1893 | double: self.double,
|
1894 + | /* ServerBuilderGenerator.kt:546 */
|
1154 1895 | timestamp: self.timestamp,
|
1896 + | /* ServerBuilderGenerator.kt:546 */
|
1155 1897 | r#enum: self
|
1156 1898 | .r#enum
|
1899 + | /* ServerBuilderGenerator.kt:602 */
|
1157 1900 | .map(|v| match v {
|
1158 1901 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1159 1902 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1160 1903 | })
|
1904 + | /* ServerBuilderGenerator.kt:614 */
|
1161 1905 | .map(|res| res.map_err(ConstraintViolation::Enum))
|
1162 1906 | .transpose()?,
|
1907 + | /* ServerBuilderGenerator.kt:546 */
|
1163 1908 | required_blob: self
|
1164 1909 | .required_blob
|
1910 + | /* ServerBuilderGenerator.kt:569 */
|
1165 1911 | .ok_or(ConstraintViolation::MissingRequiredBlob)?,
|
1912 + | /* ServerBuilderGenerator.kt:546 */
|
1166 1913 | required_boolean: self
|
1167 1914 | .required_boolean
|
1915 + | /* ServerBuilderGenerator.kt:569 */
|
1168 1916 | .ok_or(ConstraintViolation::MissingRequiredBoolean)?,
|
1917 + | /* ServerBuilderGenerator.kt:546 */
|
1169 1918 | required_string: self
|
1170 1919 | .required_string
|
1920 + | /* ServerBuilderGenerator.kt:569 */
|
1171 1921 | .ok_or(ConstraintViolation::MissingRequiredString)?,
|
1922 + | /* ServerBuilderGenerator.kt:546 */
|
1172 1923 | required_byte: self
|
1173 1924 | .required_byte
|
1925 + | /* ServerBuilderGenerator.kt:569 */
|
1174 1926 | .ok_or(ConstraintViolation::MissingRequiredByte)?,
|
1927 + | /* ServerBuilderGenerator.kt:546 */
|
1175 1928 | required_short: self
|
1176 1929 | .required_short
|
1930 + | /* ServerBuilderGenerator.kt:569 */
|
1177 1931 | .ok_or(ConstraintViolation::MissingRequiredShort)?,
|
1932 + | /* ServerBuilderGenerator.kt:546 */
|
1178 1933 | required_integer: self
|
1179 1934 | .required_integer
|
1935 + | /* ServerBuilderGenerator.kt:569 */
|
1180 1936 | .ok_or(ConstraintViolation::MissingRequiredInteger)?,
|
1937 + | /* ServerBuilderGenerator.kt:546 */
|
1181 1938 | required_long: self
|
1182 1939 | .required_long
|
1940 + | /* ServerBuilderGenerator.kt:569 */
|
1183 1941 | .ok_or(ConstraintViolation::MissingRequiredLong)?,
|
1942 + | /* ServerBuilderGenerator.kt:546 */
|
1184 1943 | required_float: self
|
1185 1944 | .required_float
|
1945 + | /* ServerBuilderGenerator.kt:569 */
|
1186 1946 | .ok_or(ConstraintViolation::MissingRequiredFloat)?,
|
1947 + | /* ServerBuilderGenerator.kt:546 */
|
1187 1948 | required_double: self
|
1188 1949 | .required_double
|
1950 + | /* ServerBuilderGenerator.kt:569 */
|
1189 1951 | .ok_or(ConstraintViolation::MissingRequiredDouble)?,
|
1952 + | /* ServerBuilderGenerator.kt:546 */
|
1190 1953 | required_timestamp: self
|
1191 1954 | .required_timestamp
|
1955 + | /* ServerBuilderGenerator.kt:569 */
|
1192 1956 | .ok_or(ConstraintViolation::MissingRequiredTimestamp)?,
|
1957 + | /* ServerBuilderGenerator.kt:546 */
|
1193 1958 | required_enum: self
|
1194 1959 | .required_enum
|
1960 + | /* ServerBuilderGenerator.kt:602 */
|
1195 1961 | .map(|v| match v {
|
1196 1962 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1197 1963 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1198 1964 | })
|
1965 + | /* ServerBuilderGenerator.kt:614 */
|
1199 1966 | .map(|res| res.map_err(ConstraintViolation::RequiredEnum))
|
1200 1967 | .transpose()?
|
1968 + | /* ServerBuilderGenerator.kt:569 */
|
1201 1969 | .ok_or(ConstraintViolation::MissingRequiredEnum)?,
|
1202 - | })
|
1970 + | /* ServerBuilderGenerator.kt:542 */
|
1971 + | }, /* ServerBuilderGenerator.kt:287 */
|
1972 + | )
|
1973 + | /* ServerBuilderGenerator.kt:283 */
|
1203 1974 | }
|
1975 + | /* ServerBuilderGenerator.kt:215 */
|
1204 1976 | }
|
1977 + |
|
1978 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1205 1979 | }
|
1206 - | /// See [`ComplexStruct`](crate::model::ComplexStruct).
|
1980 + | /// /* ServerBuilderGenerator.kt:171 */See [`ComplexStruct`](crate::model::ComplexStruct).
|
1207 1981 | pub mod complex_struct {
|
1208 1982 |
|
1983 + | /* RustType.kt:516 */
|
1209 1984 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1210 - | /// Holds one variant for each of the ways the builder can fail.
|
1985 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
1986 + | /* RustType.kt:516 */
|
1211 1987 | #[non_exhaustive]
|
1988 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1212 1989 | #[allow(clippy::enum_variant_names)]
|
1213 1990 | pub enum ConstraintViolation {
|
1214 - | /// Constraint violation occurred building member `structure` when building `ComplexStruct`.
|
1991 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `structure` when building `ComplexStruct`.
|
1992 + | /* RustType.kt:516 */
|
1215 1993 | #[doc(hidden)]
|
1994 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1216 1995 | Structure(crate::model::simple_struct::ConstraintViolation),
|
1217 - | /// Constraint violation occurred building member `structure_list` when building `ComplexStruct`.
|
1996 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `structure_list` when building `ComplexStruct`.
|
1997 + | /* RustType.kt:516 */
|
1218 1998 | #[doc(hidden)]
|
1999 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1219 2000 | StructureList(crate::model::struct_list::ConstraintViolation),
|
1220 - | /// `complex_list` was not provided but it is required when building `ComplexStruct`.
|
2001 + | /// /* ServerBuilderConstraintViolations.kt:138 */`complex_list` was not provided but it is required when building `ComplexStruct`.
|
2002 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1221 2003 | MissingComplexList,
|
1222 - | /// Constraint violation occurred building member `complex_list` when building `ComplexStruct`.
|
2004 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `complex_list` when building `ComplexStruct`.
|
2005 + | /* RustType.kt:516 */
|
1223 2006 | #[doc(hidden)]
|
2007 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1224 2008 | ComplexList(crate::model::complex_list::ConstraintViolation),
|
1225 - | /// `complex_map` was not provided but it is required when building `ComplexStruct`.
|
2009 + | /// /* ServerBuilderConstraintViolations.kt:138 */`complex_map` was not provided but it is required when building `ComplexStruct`.
|
2010 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1226 2011 | MissingComplexMap,
|
1227 - | /// Constraint violation occurred building member `complex_map` when building `ComplexStruct`.
|
2012 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `complex_map` when building `ComplexStruct`.
|
2013 + | /* RustType.kt:516 */
|
1228 2014 | #[doc(hidden)]
|
2015 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1229 2016 | ComplexMap(crate::model::complex_map::ConstraintViolation),
|
1230 - | /// `complex_union` was not provided but it is required when building `ComplexStruct`.
|
2017 + | /// /* ServerBuilderConstraintViolations.kt:138 */`complex_union` was not provided but it is required when building `ComplexStruct`.
|
2018 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1231 2019 | MissingComplexUnion,
|
1232 - | /// Constraint violation occurred building member `complex_union` when building `ComplexStruct`.
|
2020 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `complex_union` when building `ComplexStruct`.
|
2021 + | /* RustType.kt:516 */
|
1233 2022 | #[doc(hidden)]
|
2023 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1234 2024 | ComplexUnion(::std::boxed::Box<crate::model::complex_union::ConstraintViolation>),
|
2025 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1235 2026 | }
|
2027 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1236 2028 | impl ::std::fmt::Display for ConstraintViolation {
|
2029 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1237 2030 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2031 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1238 2032 | match self {
|
1239 - | ConstraintViolation::Structure(_) => write!(f, "constraint violation occurred building member `structure` when building `ComplexStruct`"),
|
1240 - | ConstraintViolation::StructureList(_) => write!(f, "constraint violation occurred building member `structure_list` when building `ComplexStruct`"),
|
1241 - | ConstraintViolation::MissingComplexList => write!(f, "`complex_list` was not provided but it is required when building `ComplexStruct`"),
|
1242 - | ConstraintViolation::ComplexList(_) => write!(f, "constraint violation occurred building member `complex_list` when building `ComplexStruct`"),
|
1243 - | ConstraintViolation::MissingComplexMap => write!(f, "`complex_map` was not provided but it is required when building `ComplexStruct`"),
|
1244 - | ConstraintViolation::ComplexMap(_) => write!(f, "constraint violation occurred building member `complex_map` when building `ComplexStruct`"),
|
1245 - | ConstraintViolation::MissingComplexUnion => write!(f, "`complex_union` was not provided but it is required when building `ComplexStruct`"),
|
1246 - | ConstraintViolation::ComplexUnion(_) => write!(f, "constraint violation occurred building member `complex_union` when building `ComplexStruct`"),
|
1247 - | }
|
1248 - | }
|
1249 - | }
|
2033 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Structure(_) => write!(f, "constraint violation occurred building member `structure` when building `ComplexStruct`"),
|
2034 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::StructureList(_) => write!(f, "constraint violation occurred building member `structure_list` when building `ComplexStruct`"),
|
2035 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingComplexList => write!(f, "`complex_list` was not provided but it is required when building `ComplexStruct`"),
|
2036 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::ComplexList(_) => write!(f, "constraint violation occurred building member `complex_list` when building `ComplexStruct`"),
|
2037 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingComplexMap => write!(f, "`complex_map` was not provided but it is required when building `ComplexStruct`"),
|
2038 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::ComplexMap(_) => write!(f, "constraint violation occurred building member `complex_map` when building `ComplexStruct`"),
|
2039 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingComplexUnion => write!(f, "`complex_union` was not provided but it is required when building `ComplexStruct`"),
|
2040 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::ComplexUnion(_) => write!(f, "constraint violation occurred building member `complex_union` when building `ComplexStruct`"),
|
2041 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
2042 + | /* ServerBuilderConstraintViolations.kt:118 */
|
2043 + | }
|
2044 + | /* ServerBuilderConstraintViolations.kt:117 */
|
2045 + | }
|
2046 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1250 2047 | impl ::std::error::Error for ConstraintViolation {}
|
2048 + | /* ServerBuilderConstraintViolations.kt:171 */
|
1251 2049 | impl ConstraintViolation {
|
1252 2050 | pub(crate) fn as_validation_exception_field(
|
1253 2051 | self,
|
1254 2052 | path: ::std::string::String,
|
1255 2053 | ) -> crate::model::ValidationExceptionField {
|
1256 2054 | match self {
|
1257 2055 | ConstraintViolation::Structure(inner) => inner.as_validation_exception_field(path + "/structure"),
|
1258 2056 | ConstraintViolation::StructureList(inner) => inner.as_validation_exception_field(path + "/structureList"),
|
1259 2057 | ConstraintViolation::MissingComplexList => crate::model::ValidationExceptionField {
|
1260 2058 | message: format!("Value at '{}/complexList' failed to satisfy constraint: Member must not be null", path),
|
1261 2059 | path: path + "/complexList",
|
1262 2060 | },
|
1263 2061 | ConstraintViolation::ComplexList(inner) => inner.as_validation_exception_field(path + "/complexList"),
|
1264 2062 | ConstraintViolation::MissingComplexMap => crate::model::ValidationExceptionField {
|
1265 2063 | message: format!("Value at '{}/complexMap' failed to satisfy constraint: Member must not be null", path),
|
1266 2064 | path: path + "/complexMap",
|
1267 2065 | },
|
1268 2066 | ConstraintViolation::ComplexMap(inner) => inner.as_validation_exception_field(path + "/complexMap"),
|
1269 2067 | ConstraintViolation::MissingComplexUnion => crate::model::ValidationExceptionField {
|
1270 2068 | message: format!("Value at '{}/complexUnion' failed to satisfy constraint: Member must not be null", path),
|
1271 2069 | path: path + "/complexUnion",
|
1272 2070 | },
|
1273 2071 | ConstraintViolation::ComplexUnion(inner) => inner.as_validation_exception_field(path + "/complexUnion"),
|
1274 2072 | }
|
1275 2073 | }
|
1276 2074 | }
|
2075 + | /* ServerBuilderGenerator.kt:244 */
|
1277 2076 | impl ::std::convert::From<Builder>
|
1278 2077 | for crate::constrained::MaybeConstrained<crate::model::ComplexStruct>
|
1279 2078 | {
|
1280 2079 | fn from(builder: Builder) -> Self {
|
1281 2080 | Self::Unconstrained(builder)
|
1282 2081 | }
|
1283 2082 | }
|
2083 + | /* ServerBuilderGenerator.kt:446 */
|
1284 2084 | impl ::std::convert::TryFrom<Builder> for crate::model::ComplexStruct {
|
1285 2085 | type Error = ConstraintViolation;
|
1286 2086 |
|
1287 2087 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1288 2088 | builder.build()
|
1289 2089 | }
|
1290 2090 | }
|
1291 - | /// A builder for [`ComplexStruct`](crate::model::ComplexStruct).
|
2091 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ComplexStruct`](crate::model::ComplexStruct).
|
2092 + | /* RustType.kt:516 */
|
1292 2093 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2094 + | /* ServerBuilderGenerator.kt:211 */
|
1293 2095 | pub struct Builder {
|
2096 + | /* ServerBuilderGenerator.kt:308 */
|
1294 2097 | pub(crate) structure:
|
1295 2098 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SimpleStruct>>,
|
2099 + | /* ServerBuilderGenerator.kt:308 */
|
1296 2100 | pub(crate) empty_structure: ::std::option::Option<crate::model::EmptyStruct>,
|
2101 + | /* ServerBuilderGenerator.kt:308 */
|
1297 2102 | pub(crate) list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2103 + | /* ServerBuilderGenerator.kt:308 */
|
1298 2104 | pub(crate) map:
|
1299 2105 | ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
|
2106 + | /* ServerBuilderGenerator.kt:308 */
|
1300 2107 | pub(crate) union: ::std::option::Option<crate::model::SimpleUnion>,
|
2108 + | /* ServerBuilderGenerator.kt:308 */
|
1301 2109 | pub(crate) unit_union: ::std::option::Option<crate::model::UnitUnion>,
|
2110 + | /* ServerBuilderGenerator.kt:308 */
|
1302 2111 | pub(crate) structure_list: ::std::option::Option<
|
1303 2112 | crate::constrained::MaybeConstrained<
|
1304 2113 | crate::constrained::struct_list_constrained::StructListConstrained,
|
1305 2114 | >,
|
1306 2115 | >,
|
2116 + | /* ServerBuilderGenerator.kt:308 */
|
1307 2117 | pub(crate) complex_list: ::std::option::Option<
|
1308 2118 | crate::constrained::MaybeConstrained<
|
1309 2119 | crate::constrained::complex_list_constrained::ComplexListConstrained,
|
1310 2120 | >,
|
1311 2121 | >,
|
2122 + | /* ServerBuilderGenerator.kt:308 */
|
1312 2123 | pub(crate) complex_map: ::std::option::Option<
|
1313 2124 | crate::constrained::MaybeConstrained<
|
1314 2125 | crate::constrained::complex_map_constrained::ComplexMapConstrained,
|
1315 2126 | >,
|
1316 2127 | >,
|
2128 + | /* ServerBuilderGenerator.kt:308 */
|
1317 2129 | pub(crate) complex_union: ::std::option::Option<
|
1318 2130 | ::std::boxed::Box<crate::constrained::MaybeConstrained<crate::model::ComplexUnion>>,
|
1319 2131 | >,
|
2132 + | /* ServerBuilderGenerator.kt:211 */
|
1320 2133 | }
|
2134 + | /* ServerBuilderGenerator.kt:215 */
|
1321 2135 | impl Builder {
|
2136 + | /* ServerBuilderGenerator.kt:331 */
|
1322 2137 | #[allow(missing_docs)] // documentation missing in model
|
2138 + | /* ServerBuilderGenerator.kt:343 */
|
1323 2139 | pub fn structure(
|
1324 2140 | mut self,
|
1325 2141 | input: ::std::option::Option<crate::model::SimpleStruct>,
|
1326 2142 | ) -> Self {
|
1327 - | self.structure = input.map(
|
1328 - | #[allow(clippy::redundant_closure)]
|
1329 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
1330 - | );
|
2143 + | /* ServerBuilderGenerator.kt:344 */
|
2144 + | self.structure =
|
2145 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
2146 + | /* ServerBuilderGenerator.kt:344 */;
|
1331 2147 | self
|
2148 + | /* ServerBuilderGenerator.kt:343 */
|
1332 2149 | }
|
2150 + | /* ServerBuilderGenerator.kt:426 */
|
1333 2151 | #[allow(missing_docs)] // documentation missing in model
|
2152 + | /* ServerBuilderGenerator.kt:428 */
|
1334 2153 | pub(crate) fn set_structure(
|
1335 2154 | mut self,
|
1336 2155 | input: Option<
|
1337 2156 | impl ::std::convert::Into<
|
1338 2157 | crate::constrained::MaybeConstrained<crate::model::SimpleStruct>,
|
1339 2158 | >,
|
1340 2159 | >,
|
1341 2160 | ) -> Self {
|
2161 + | /* ServerBuilderGenerator.kt:429 */
|
1342 2162 | self.structure = input.map(|v| v.into());
|
1343 2163 | self
|
2164 + | /* ServerBuilderGenerator.kt:428 */
|
1344 2165 | }
|
2166 + | /* ServerBuilderGenerator.kt:331 */
|
1345 2167 | #[allow(missing_docs)] // documentation missing in model
|
2168 + | /* ServerBuilderGenerator.kt:343 */
|
1346 2169 | pub fn empty_structure(
|
1347 2170 | mut self,
|
1348 2171 | input: ::std::option::Option<crate::model::EmptyStruct>,
|
1349 2172 | ) -> Self {
|
1350 - | self.empty_structure = input;
|
2173 + | /* ServerBuilderGenerator.kt:344 */
|
2174 + | self.empty_structure =
|
2175 + | /* ServerBuilderGenerator.kt:376 */input
|
2176 + | /* ServerBuilderGenerator.kt:344 */;
|
1351 2177 | self
|
2178 + | /* ServerBuilderGenerator.kt:343 */
|
1352 2179 | }
|
2180 + | /* ServerBuilderGenerator.kt:426 */
|
1353 2181 | #[allow(missing_docs)] // documentation missing in model
|
2182 + | /* ServerBuilderGenerator.kt:428 */
|
1354 2183 | pub(crate) fn set_empty_structure(
|
1355 2184 | mut self,
|
1356 2185 | input: Option<impl ::std::convert::Into<crate::model::EmptyStruct>>,
|
1357 2186 | ) -> Self {
|
2187 + | /* ServerBuilderGenerator.kt:429 */
|
1358 2188 | self.empty_structure = input.map(|v| v.into());
|
1359 2189 | self
|
2190 + | /* ServerBuilderGenerator.kt:428 */
|
1360 2191 | }
|
2192 + | /* ServerBuilderGenerator.kt:331 */
|
1361 2193 | #[allow(missing_docs)] // documentation missing in model
|
2194 + | /* ServerBuilderGenerator.kt:343 */
|
1362 2195 | pub fn list(
|
1363 2196 | mut self,
|
1364 2197 | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
1365 2198 | ) -> Self {
|
1366 - | self.list = input;
|
2199 + | /* ServerBuilderGenerator.kt:344 */
|
2200 + | self.list =
|
2201 + | /* ServerBuilderGenerator.kt:376 */input
|
2202 + | /* ServerBuilderGenerator.kt:344 */;
|
1367 2203 | self
|
2204 + | /* ServerBuilderGenerator.kt:343 */
|
1368 2205 | }
|
2206 + | /* ServerBuilderGenerator.kt:426 */
|
1369 2207 | #[allow(missing_docs)] // documentation missing in model
|
2208 + | /* ServerBuilderGenerator.kt:428 */
|
1370 2209 | pub(crate) fn set_list(
|
1371 2210 | mut self,
|
1372 2211 | input: Option<impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>>,
|
1373 2212 | ) -> Self {
|
2213 + | /* ServerBuilderGenerator.kt:429 */
|
1374 2214 | self.list = input.map(|v| v.into());
|
1375 2215 | self
|
2216 + | /* ServerBuilderGenerator.kt:428 */
|
1376 2217 | }
|
2218 + | /* ServerBuilderGenerator.kt:331 */
|
1377 2219 | #[allow(missing_docs)] // documentation missing in model
|
2220 + | /* ServerBuilderGenerator.kt:343 */
|
1378 2221 | pub fn map(
|
1379 2222 | mut self,
|
1380 2223 | input: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
|
1381 2224 | ) -> Self {
|
1382 - | self.map = input;
|
2225 + | /* ServerBuilderGenerator.kt:344 */
|
2226 + | self.map =
|
2227 + | /* ServerBuilderGenerator.kt:376 */input
|
2228 + | /* ServerBuilderGenerator.kt:344 */;
|
1383 2229 | self
|
2230 + | /* ServerBuilderGenerator.kt:343 */
|
1384 2231 | }
|
2232 + | /* ServerBuilderGenerator.kt:426 */
|
1385 2233 | #[allow(missing_docs)] // documentation missing in model
|
2234 + | /* ServerBuilderGenerator.kt:428 */
|
1386 2235 | pub(crate) fn set_map(
|
1387 2236 | mut self,
|
1388 2237 | input: Option<
|
1389 2238 | impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, i32>>,
|
1390 2239 | >,
|
1391 2240 | ) -> Self {
|
2241 + | /* ServerBuilderGenerator.kt:429 */
|
1392 2242 | self.map = input.map(|v| v.into());
|
1393 2243 | self
|
2244 + | /* ServerBuilderGenerator.kt:428 */
|
1394 2245 | }
|
2246 + | /* ServerBuilderGenerator.kt:331 */
|
1395 2247 | #[allow(missing_docs)] // documentation missing in model
|
2248 + | /* ServerBuilderGenerator.kt:343 */
|
1396 2249 | pub fn union(mut self, input: ::std::option::Option<crate::model::SimpleUnion>) -> Self {
|
1397 - | self.union = input;
|
2250 + | /* ServerBuilderGenerator.kt:344 */
|
2251 + | self.union =
|
2252 + | /* ServerBuilderGenerator.kt:376 */input
|
2253 + | /* ServerBuilderGenerator.kt:344 */;
|
1398 2254 | self
|
2255 + | /* ServerBuilderGenerator.kt:343 */
|
1399 2256 | }
|
2257 + | /* ServerBuilderGenerator.kt:426 */
|
1400 2258 | #[allow(missing_docs)] // documentation missing in model
|
2259 + | /* ServerBuilderGenerator.kt:428 */
|
1401 2260 | pub(crate) fn set_union(
|
1402 2261 | mut self,
|
1403 2262 | input: Option<impl ::std::convert::Into<crate::model::SimpleUnion>>,
|
1404 2263 | ) -> Self {
|
2264 + | /* ServerBuilderGenerator.kt:429 */
|
1405 2265 | self.union = input.map(|v| v.into());
|
1406 2266 | self
|
2267 + | /* ServerBuilderGenerator.kt:428 */
|
1407 2268 | }
|
2269 + | /* ServerBuilderGenerator.kt:331 */
|
1408 2270 | #[allow(missing_docs)] // documentation missing in model
|
2271 + | /* ServerBuilderGenerator.kt:343 */
|
1409 2272 | pub fn unit_union(mut self, input: ::std::option::Option<crate::model::UnitUnion>) -> Self {
|
1410 - | self.unit_union = input;
|
2273 + | /* ServerBuilderGenerator.kt:344 */
|
2274 + | self.unit_union =
|
2275 + | /* ServerBuilderGenerator.kt:376 */input
|
2276 + | /* ServerBuilderGenerator.kt:344 */;
|
1411 2277 | self
|
2278 + | /* ServerBuilderGenerator.kt:343 */
|
1412 2279 | }
|
2280 + | /* ServerBuilderGenerator.kt:426 */
|
1413 2281 | #[allow(missing_docs)] // documentation missing in model
|
2282 + | /* ServerBuilderGenerator.kt:428 */
|
1414 2283 | pub(crate) fn set_unit_union(
|
1415 2284 | mut self,
|
1416 2285 | input: Option<impl ::std::convert::Into<crate::model::UnitUnion>>,
|
1417 2286 | ) -> Self {
|
2287 + | /* ServerBuilderGenerator.kt:429 */
|
1418 2288 | self.unit_union = input.map(|v| v.into());
|
1419 2289 | self
|
2290 + | /* ServerBuilderGenerator.kt:428 */
|
1420 2291 | }
|
2292 + | /* ServerBuilderGenerator.kt:331 */
|
1421 2293 | #[allow(missing_docs)] // documentation missing in model
|
2294 + | /* ServerBuilderGenerator.kt:343 */
|
1422 2295 | pub fn structure_list(
|
1423 2296 | mut self,
|
1424 2297 | input: ::std::option::Option<::std::vec::Vec<crate::model::SimpleStruct>>,
|
1425 2298 | ) -> Self {
|
1426 - | self.structure_list = input.map(
|
1427 - | #[allow(clippy::redundant_closure)]
|
1428 - | |v| crate::constrained::MaybeConstrained::Constrained((v).into()),
|
1429 - | );
|
2299 + | /* ServerBuilderGenerator.kt:344 */
|
2300 + | self.structure_list =
|
2301 + | /* ServerBuilderGenerator.kt:369 */input.map(#[allow(clippy::redundant_closure)] |v|
|
2302 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained((v).into())
|
2303 + | /* ServerBuilderGenerator.kt:369 */)
|
2304 + | /* ServerBuilderGenerator.kt:344 */;
|
1430 2305 | self
|
2306 + | /* ServerBuilderGenerator.kt:343 */
|
1431 2307 | }
|
2308 + | /* ServerBuilderGenerator.kt:426 */
|
1432 2309 | #[allow(missing_docs)] // documentation missing in model
|
2310 + | /* ServerBuilderGenerator.kt:428 */
|
1433 2311 | pub(crate) fn set_structure_list(
|
1434 2312 | mut self,
|
1435 2313 | input: Option<
|
1436 2314 | impl ::std::convert::Into<
|
1437 2315 | crate::constrained::MaybeConstrained<
|
1438 2316 | crate::constrained::struct_list_constrained::StructListConstrained,
|
1439 2317 | >,
|
1440 2318 | >,
|
1441 2319 | >,
|
1442 2320 | ) -> Self {
|
2321 + | /* ServerBuilderGenerator.kt:429 */
|
1443 2322 | self.structure_list = input.map(|v| v.into());
|
1444 2323 | self
|
2324 + | /* ServerBuilderGenerator.kt:428 */
|
1445 2325 | }
|
2326 + | /* ServerBuilderGenerator.kt:331 */
|
1446 2327 | #[allow(missing_docs)] // documentation missing in model
|
2328 + | /* ServerBuilderGenerator.kt:343 */
|
1447 2329 | pub fn complex_list(
|
1448 2330 | mut self,
|
1449 2331 | input: ::std::vec::Vec<
|
1450 2332 | ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
|
1451 2333 | >,
|
1452 2334 | ) -> Self {
|
1453 - | self.complex_list = Some(crate::constrained::MaybeConstrained::Constrained(
|
1454 - | (input).into(),
|
1455 - | ));
|
2335 + | /* ServerBuilderGenerator.kt:344 */
|
2336 + | self.complex_list =
|
2337 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2338 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained((input).into())
|
2339 + | /* ServerBuilderGenerator.kt:345 */)
|
2340 + | /* ServerBuilderGenerator.kt:344 */;
|
1456 2341 | self
|
2342 + | /* ServerBuilderGenerator.kt:343 */
|
1457 2343 | }
|
2344 + | /* ServerBuilderGenerator.kt:426 */
|
1458 2345 | #[allow(missing_docs)] // documentation missing in model
|
2346 + | /* ServerBuilderGenerator.kt:428 */
|
1459 2347 | pub(crate) fn set_complex_list(
|
1460 2348 | mut self,
|
1461 2349 | input: impl ::std::convert::Into<
|
1462 2350 | crate::constrained::MaybeConstrained<
|
1463 2351 | crate::constrained::complex_list_constrained::ComplexListConstrained,
|
1464 2352 | >,
|
1465 2353 | >,
|
1466 2354 | ) -> Self {
|
2355 + | /* ServerBuilderGenerator.kt:429 */
|
1467 2356 | self.complex_list = Some(input.into());
|
1468 2357 | self
|
2358 + | /* ServerBuilderGenerator.kt:428 */
|
1469 2359 | }
|
2360 + | /* ServerBuilderGenerator.kt:331 */
|
1470 2361 | #[allow(missing_docs)] // documentation missing in model
|
2362 + | /* ServerBuilderGenerator.kt:343 */
|
1471 2363 | pub fn complex_map(
|
1472 2364 | mut self,
|
1473 2365 | input: ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
|
1474 2366 | ) -> Self {
|
1475 - | self.complex_map = Some(crate::constrained::MaybeConstrained::Constrained(
|
1476 - | (input).into(),
|
1477 - | ));
|
2367 + | /* ServerBuilderGenerator.kt:344 */
|
2368 + | self.complex_map =
|
2369 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2370 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained((input).into())
|
2371 + | /* ServerBuilderGenerator.kt:345 */)
|
2372 + | /* ServerBuilderGenerator.kt:344 */;
|
1478 2373 | self
|
2374 + | /* ServerBuilderGenerator.kt:343 */
|
1479 2375 | }
|
2376 + | /* ServerBuilderGenerator.kt:426 */
|
1480 2377 | #[allow(missing_docs)] // documentation missing in model
|
2378 + | /* ServerBuilderGenerator.kt:428 */
|
1481 2379 | pub(crate) fn set_complex_map(
|
1482 2380 | mut self,
|
1483 2381 | input: impl ::std::convert::Into<
|
1484 2382 | crate::constrained::MaybeConstrained<
|
1485 2383 | crate::constrained::complex_map_constrained::ComplexMapConstrained,
|
1486 2384 | >,
|
1487 2385 | >,
|
1488 2386 | ) -> Self {
|
2387 + | /* ServerBuilderGenerator.kt:429 */
|
1489 2388 | self.complex_map = Some(input.into());
|
1490 2389 | self
|
2390 + | /* ServerBuilderGenerator.kt:428 */
|
1491 2391 | }
|
2392 + | /* ServerBuilderGenerator.kt:331 */
|
1492 2393 | #[allow(missing_docs)] // documentation missing in model
|
2394 + | /* RustType.kt:516 */
|
1493 2395 | #[allow(clippy::boxed_local)]
|
2396 + | /* ServerBuilderGenerator.kt:343 */
|
1494 2397 | pub fn complex_union(
|
1495 2398 | mut self,
|
1496 2399 | input: ::std::boxed::Box<crate::model::ComplexUnion>,
|
1497 2400 | ) -> Self {
|
1498 - | self.complex_union = Some(Box::new(crate::constrained::MaybeConstrained::Constrained(
|
1499 - | *input,
|
1500 - | )));
|
2401 + | /* ServerBuilderGenerator.kt:344 */
|
2402 + | self.complex_union =
|
2403 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2404 + | /* ServerBuilderGenerator.kt:370 */Box::new(
|
2405 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(*input)
|
2406 + | /* ServerBuilderGenerator.kt:370 */)
|
2407 + | /* ServerBuilderGenerator.kt:345 */)
|
2408 + | /* ServerBuilderGenerator.kt:344 */;
|
1501 2409 | self
|
2410 + | /* ServerBuilderGenerator.kt:343 */
|
1502 2411 | }
|
2412 + | /* ServerBuilderGenerator.kt:426 */
|
1503 2413 | #[allow(missing_docs)] // documentation missing in model
|
2414 + | /* ServerBuilderGenerator.kt:428 */
|
1504 2415 | pub(crate) fn set_complex_union(
|
1505 2416 | mut self,
|
1506 2417 | input: impl ::std::convert::Into<
|
1507 2418 | ::std::boxed::Box<crate::constrained::MaybeConstrained<crate::model::ComplexUnion>>,
|
1508 2419 | >,
|
1509 2420 | ) -> Self {
|
2421 + | /* ServerBuilderGenerator.kt:429 */
|
1510 2422 | self.complex_union = Some(input.into());
|
1511 2423 | self
|
2424 + | /* ServerBuilderGenerator.kt:428 */
|
1512 2425 | }
|
1513 - | /// Consumes the builder and constructs a [`ComplexStruct`](crate::model::ComplexStruct).
|
1514 - | ///
|
2426 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ComplexStruct`](crate::model::ComplexStruct).
|
2427 + | /// /* ServerBuilderGenerator.kt:260 */
|
1515 2428 | /// The builder fails to construct a [`ComplexStruct`](crate::model::ComplexStruct) if a [`ConstraintViolation`] occurs.
|
1516 2429 | ///
|
1517 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
2430 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
2431 + | /* ServerBuilderGenerator.kt:271 */
|
1518 2432 | pub fn build(self) -> Result<crate::model::ComplexStruct, ConstraintViolation> {
|
1519 2433 | self.build_enforcing_all_constraints()
|
1520 2434 | }
|
2435 + | /* ServerBuilderGenerator.kt:283 */
|
1521 2436 | fn build_enforcing_all_constraints(
|
1522 2437 | self,
|
1523 2438 | ) -> Result<crate::model::ComplexStruct, ConstraintViolation> {
|
1524 - | Ok(crate::model::ComplexStruct {
|
2439 + | /* ServerBuilderGenerator.kt:287 */
|
2440 + | Ok(
|
2441 + | /* ServerBuilderGenerator.kt:542 */
|
2442 + | crate::model::ComplexStruct {
|
2443 + | /* ServerBuilderGenerator.kt:546 */
|
1525 2444 | structure: self
|
1526 2445 | .structure
|
2446 + | /* ServerBuilderGenerator.kt:602 */
|
1527 2447 | .map(|v| match v {
|
1528 2448 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1529 2449 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1530 2450 | })
|
2451 + | /* ServerBuilderGenerator.kt:614 */
|
1531 2452 | .map(|res| res.map_err(ConstraintViolation::Structure))
|
1532 2453 | .transpose()?,
|
2454 + | /* ServerBuilderGenerator.kt:546 */
|
1533 2455 | empty_structure: self.empty_structure,
|
2456 + | /* ServerBuilderGenerator.kt:546 */
|
1534 2457 | list: self.list,
|
2458 + | /* ServerBuilderGenerator.kt:546 */
|
1535 2459 | map: self.map,
|
2460 + | /* ServerBuilderGenerator.kt:546 */
|
1536 2461 | union: self.union,
|
2462 + | /* ServerBuilderGenerator.kt:546 */
|
1537 2463 | unit_union: self.unit_union,
|
2464 + | /* ServerBuilderGenerator.kt:546 */
|
1538 2465 | structure_list: self
|
1539 2466 | .structure_list
|
2467 + | /* ServerBuilderGenerator.kt:602 */
|
1540 2468 | .map(|v| match v {
|
1541 2469 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1542 2470 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1543 2471 | })
|
2472 + | /* ServerBuilderGenerator.kt:614 */
|
1544 2473 | .map(|res| {
|
1545 2474 | res.map(|v| v.into())
|
1546 2475 | .map_err(ConstraintViolation::StructureList)
|
1547 2476 | })
|
1548 2477 | .transpose()?,
|
2478 + | /* ServerBuilderGenerator.kt:546 */
|
1549 2479 | complex_list: self
|
1550 2480 | .complex_list
|
2481 + | /* ServerBuilderGenerator.kt:602 */
|
1551 2482 | .map(|v| match v {
|
1552 2483 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1553 2484 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1554 2485 | })
|
2486 + | /* ServerBuilderGenerator.kt:614 */
|
1555 2487 | .map(|res| {
|
1556 2488 | res.map(|v| v.into())
|
1557 2489 | .map_err(ConstraintViolation::ComplexList)
|
1558 2490 | })
|
1559 2491 | .transpose()?
|
2492 + | /* ServerBuilderGenerator.kt:569 */
|
1560 2493 | .ok_or(ConstraintViolation::MissingComplexList)?,
|
2494 + | /* ServerBuilderGenerator.kt:546 */
|
1561 2495 | complex_map: self
|
1562 2496 | .complex_map
|
2497 + | /* ServerBuilderGenerator.kt:602 */
|
1563 2498 | .map(|v| match v {
|
1564 2499 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1565 2500 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1566 2501 | })
|
2502 + | /* ServerBuilderGenerator.kt:614 */
|
1567 2503 | .map(|res| {
|
1568 2504 | res.map(|v| v.into())
|
1569 2505 | .map_err(ConstraintViolation::ComplexMap)
|
1570 2506 | })
|
1571 2507 | .transpose()?
|
2508 + | /* ServerBuilderGenerator.kt:569 */
|
1572 2509 | .ok_or(ConstraintViolation::MissingComplexMap)?,
|
2510 + | /* ServerBuilderGenerator.kt:546 */
|
1573 2511 | complex_union: self
|
1574 2512 | .complex_union
|
2513 + | /* ServerBuilderGenerator.kt:592 */
|
1575 2514 | .map(|v| match *v {
|
1576 2515 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(Box::new(x)),
|
1577 2516 | crate::constrained::MaybeConstrained::Unconstrained(x) => {
|
1578 2517 | Ok(Box::new(x.try_into()?))
|
1579 2518 | }
|
1580 2519 | })
|
2520 + | /* ServerBuilderGenerator.kt:614 */
|
1581 2521 | .map(|res| {
|
1582 2522 | res.map_err(Box::new)
|
1583 2523 | .map_err(ConstraintViolation::ComplexUnion)
|
1584 2524 | })
|
1585 2525 | .transpose()?
|
2526 + | /* ServerBuilderGenerator.kt:569 */
|
1586 2527 | .ok_or(ConstraintViolation::MissingComplexUnion)?,
|
1587 - | })
|
2528 + | /* ServerBuilderGenerator.kt:542 */
|
2529 + | }, /* ServerBuilderGenerator.kt:287 */
|
2530 + | )
|
2531 + | /* ServerBuilderGenerator.kt:283 */
|
1588 2532 | }
|
2533 + | /* ServerBuilderGenerator.kt:215 */
|
1589 2534 | }
|
2535 + |
|
2536 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1590 2537 | }
|
1591 2538 | pub mod complex_map {
|
1592 2539 |
|
2540 + | /* MapConstraintViolationGenerator.kt:82 */
|
1593 2541 | #[allow(clippy::enum_variant_names)]
|
1594 2542 | #[derive(Debug, PartialEq)]
|
1595 2543 | pub enum ConstraintViolation {
|
1596 2544 | #[doc(hidden)]
|
1597 2545 | Value(
|
1598 2546 | ::std::string::String,
|
1599 2547 | ::std::boxed::Box<crate::model::complex_union::ConstraintViolation>,
|
1600 2548 | ),
|
1601 2549 | }
|
1602 2550 |
|
1603 2551 | impl ::std::fmt::Display for ConstraintViolation {
|
1604 2552 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1605 2553 | match self {
|
1606 2554 | Self::Value(_, value_constraint_violation) => {
|
1607 2555 | write!(f, "{}", value_constraint_violation)
|
1608 2556 | }
|
1609 2557 | }
|
1610 2558 | }
|
1611 2559 | }
|
1612 2560 |
|
1613 2561 | impl ::std::error::Error for ConstraintViolation {}
|
2562 + | /* MapConstraintViolationGenerator.kt:111 */
|
1614 2563 | impl ConstraintViolation {
|
1615 2564 | pub(crate) fn as_validation_exception_field(
|
1616 2565 | self,
|
1617 2566 | path: ::std::string::String,
|
1618 2567 | ) -> crate::model::ValidationExceptionField {
|
1619 2568 | match self {
|
1620 2569 | Self::Value(key, value_constraint_violation) => value_constraint_violation
|
1621 2570 | .as_validation_exception_field(path + "/" + key.as_str()),
|
1622 2571 | }
|
1623 2572 | }
|
1624 2573 | }
|
2574 + |
|
2575 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1625 2576 | }
|
1626 2577 | pub mod complex_list {
|
1627 2578 |
|
2579 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
1628 2580 | #[allow(clippy::enum_variant_names)]
|
1629 2581 | #[derive(Debug, PartialEq)]
|
1630 2582 | pub enum ConstraintViolation {
|
1631 2583 | /// Constraint violation error when an element doesn't satisfy its own constraints.
|
1632 2584 | /// The first component of the tuple is the index in the collection where the
|
1633 2585 | /// first constraint violation was found.
|
1634 2586 | #[doc(hidden)]
|
1635 2587 | Member(
|
1636 2588 | usize,
|
1637 2589 | ::std::boxed::Box<crate::model::complex_map::ConstraintViolation>,
|
1638 2590 | ),
|
1639 2591 | }
|
1640 2592 |
|
1641 2593 | impl ::std::fmt::Display for ConstraintViolation {
|
1642 2594 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1643 2595 | let message = match self {
|
1644 2596 | Self::Member(index, failing_member) => format!(
|
1645 2597 | "Value at index {index} failed to satisfy constraint. {}",
|
1646 2598 | failing_member
|
1647 2599 | ),
|
1648 2600 | };
|
1649 2601 | write!(f, "{message}")
|
1650 2602 | }
|
1651 2603 | }
|
1652 2604 |
|
1653 2605 | impl ::std::error::Error for ConstraintViolation {}
|
2606 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
1654 2607 | impl ConstraintViolation {
|
1655 2608 | pub(crate) fn as_validation_exception_field(
|
1656 2609 | self,
|
1657 2610 | path: ::std::string::String,
|
1658 2611 | ) -> crate::model::ValidationExceptionField {
|
1659 2612 | match self {
|
1660 2613 | Self::Member(index, member_constraint_violation) => member_constraint_violation
|
1661 2614 | .as_validation_exception_field(path + "/" + &index.to_string()),
|
1662 2615 | }
|
1663 2616 | }
|
1664 2617 | }
|
2618 + |
|
2619 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1665 2620 | }
|
1666 2621 | pub mod struct_list {
|
1667 2622 |
|
2623 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
1668 2624 | #[allow(clippy::enum_variant_names)]
|
1669 2625 | #[derive(Debug, PartialEq)]
|
1670 2626 | pub enum ConstraintViolation {
|
1671 2627 | /// Constraint violation error when an element doesn't satisfy its own constraints.
|
1672 2628 | /// The first component of the tuple is the index in the collection where the
|
1673 2629 | /// first constraint violation was found.
|
1674 2630 | #[doc(hidden)]
|
1675 2631 | Member(usize, crate::model::simple_struct::ConstraintViolation),
|
1676 2632 | }
|
1677 2633 |
|
1678 2634 | impl ::std::fmt::Display for ConstraintViolation {
|
1679 2635 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1680 2636 | let message = match self {
|
1681 2637 | Self::Member(index, failing_member) => format!(
|
1682 2638 | "Value at index {index} failed to satisfy constraint. {}",
|
1683 2639 | failing_member
|
1684 2640 | ),
|
1685 2641 | };
|
1686 2642 | write!(f, "{message}")
|
1687 2643 | }
|
1688 2644 | }
|
1689 2645 |
|
1690 2646 | impl ::std::error::Error for ConstraintViolation {}
|
2647 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
1691 2648 | impl ConstraintViolation {
|
1692 2649 | pub(crate) fn as_validation_exception_field(
|
1693 2650 | self,
|
1694 2651 | path: ::std::string::String,
|
1695 2652 | ) -> crate::model::ValidationExceptionField {
|
1696 2653 | match self {
|
1697 2654 | Self::Member(index, member_constraint_violation) => member_constraint_violation
|
1698 2655 | .as_validation_exception_field(path + "/" + &index.to_string()),
|
1699 2656 | }
|
1700 2657 | }
|
1701 2658 | }
|
2659 + |
|
2660 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1702 2661 | }
|
1703 - | /// See [`EmptyStruct`](crate::model::EmptyStruct).
|
2662 + | /// /* ServerBuilderGenerator.kt:171 */See [`EmptyStruct`](crate::model::EmptyStruct).
|
1704 2663 | pub mod empty_struct {
|
1705 2664 |
|
2665 + | /* ServerBuilderGenerator.kt:461 */
|
1706 2666 | impl ::std::convert::From<Builder> for crate::model::EmptyStruct {
|
1707 2667 | fn from(builder: Builder) -> Self {
|
1708 2668 | builder.build()
|
1709 2669 | }
|
1710 2670 | }
|
1711 - | /// A builder for [`EmptyStruct`](crate::model::EmptyStruct).
|
2671 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`EmptyStruct`](crate::model::EmptyStruct).
|
2672 + | /* RustType.kt:516 */
|
1712 2673 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1713 - | pub struct Builder {}
|
2674 + | /* ServerBuilderGenerator.kt:211 */
|
2675 + | pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
2676 + | /* ServerBuilderGenerator.kt:215 */
|
1714 2677 | impl Builder {
|
1715 - | /// Consumes the builder and constructs a [`EmptyStruct`](crate::model::EmptyStruct).
|
2678 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`EmptyStruct`](crate::model::EmptyStruct).
|
2679 + | /* ServerBuilderGenerator.kt:271 */
|
1716 2680 | pub fn build(self) -> crate::model::EmptyStruct {
|
1717 2681 | self.build_enforcing_all_constraints()
|
1718 2682 | }
|
2683 + | /* ServerBuilderGenerator.kt:283 */
|
1719 2684 | fn build_enforcing_all_constraints(self) -> crate::model::EmptyStruct {
|
1720 - | crate::model::EmptyStruct {}
|
2685 + | /* ServerBuilderGenerator.kt:542 */
|
2686 + | crate::model::EmptyStruct {
|
2687 + | /* ServerBuilderGenerator.kt:542 */}
|
2688 + | /* ServerBuilderGenerator.kt:283 */
|
1721 2689 | }
|
2690 + | /* ServerBuilderGenerator.kt:215 */
|
1722 2691 | }
|
2692 + |
|
2693 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1723 2694 | }
|