1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* StructureGenerator.kt:197 */
|
3 + | /// /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
|
4 + | /* RustType.kt:534 */
|
5 + | #[derive(
|
6 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
7 + | )]
|
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.
|
10 + | pub path: ::std::string::String,
|
11 + | /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
|
12 + | pub message: ::std::string::String,
|
13 + | /* StructureGenerator.kt:201 */
|
14 + | }
|
15 + | /* StructureGenerator.kt:135 */
|
16 + | impl ValidationExceptionField {
|
17 + | /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
18 + | /* StructureGenerator.kt:166 */
|
19 + | pub fn path(&self) -> &str {
|
20 + | /* StructureGenerator.kt:171 */
|
21 + | use std::ops::Deref;
|
22 + | self.path.deref()
|
23 + | /* StructureGenerator.kt:166 */
|
24 + | }
|
25 + | /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
|
26 + | /* StructureGenerator.kt:166 */
|
27 + | pub fn message(&self) -> &str {
|
28 + | /* StructureGenerator.kt:171 */
|
29 + | use std::ops::Deref;
|
30 + | self.message.deref()
|
31 + | /* StructureGenerator.kt:166 */
|
32 + | }
|
33 + | /* StructureGenerator.kt:135 */
|
34 + | }
|
35 + | /* ServerCodegenVisitor.kt:356 */
|
36 + | impl ValidationExceptionField {
|
37 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
38 + | /* ServerBuilderGenerator.kt:295 */
|
39 + | pub fn builder() -> crate::model::validation_exception_field::Builder {
|
40 + | /* ServerBuilderGenerator.kt:296 */
|
41 + | crate::model::validation_exception_field::Builder::default()
|
42 + | /* ServerBuilderGenerator.kt:295 */
|
43 + | }
|
44 + | /* ServerCodegenVisitor.kt:356 */
|
45 + | }
|
46 + |
|
47 + | /* StructureGenerator.kt:197 */
|
48 + | #[allow(missing_docs)] // documentation missing in model
|
49 + | /* RustType.kt:534 */
|
50 + | #[derive(
|
51 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
52 + | )]
|
53 + | pub /* StructureGenerator.kt:201 */ struct Dialog {
|
54 + | /* StructureGenerator.kt:231 */
|
55 + | #[allow(missing_docs)] // documentation missing in model
|
56 + | pub language: ::std::option::Option<::std::string::String>,
|
57 + | /* StructureGenerator.kt:231 */
|
58 + | #[allow(missing_docs)] // documentation missing in model
|
59 + | pub greeting: ::std::string::String,
|
60 + | /* StructureGenerator.kt:231 */
|
61 + | #[allow(missing_docs)] // documentation missing in model
|
62 + | pub farewell: ::std::option::Option<crate::model::Farewell>,
|
63 + | /* StructureGenerator.kt:201 */
|
64 + | }
|
65 + | /* StructureGenerator.kt:135 */
|
66 + | impl Dialog {
|
67 + | /* StructureGenerator.kt:231 */
|
68 + | #[allow(missing_docs)] // documentation missing in model
|
69 + | /* StructureGenerator.kt:166 */
|
70 + | pub fn language(&self) -> ::std::option::Option<&str> {
|
71 + | /* StructureGenerator.kt:169 */
|
72 + | self.language.as_deref()
|
73 + | /* StructureGenerator.kt:166 */
|
74 + | }
|
75 + | /* StructureGenerator.kt:231 */
|
76 + | #[allow(missing_docs)] // documentation missing in model
|
77 + | /* StructureGenerator.kt:166 */
|
78 + | pub fn greeting(&self) -> &str {
|
79 + | /* StructureGenerator.kt:171 */
|
80 + | use std::ops::Deref;
|
81 + | self.greeting.deref()
|
82 + | /* StructureGenerator.kt:166 */
|
83 + | }
|
84 + | /* StructureGenerator.kt:231 */
|
85 + | #[allow(missing_docs)] // documentation missing in model
|
86 + | /* StructureGenerator.kt:166 */
|
87 + | pub fn farewell(&self) -> ::std::option::Option<&crate::model::Farewell> {
|
88 + | /* StructureGenerator.kt:170 */
|
89 + | self.farewell.as_ref()
|
90 + | /* StructureGenerator.kt:166 */
|
91 + | }
|
92 + | /* StructureGenerator.kt:135 */
|
93 + | }
|
94 + | /* ServerCodegenVisitor.kt:356 */
|
95 + | impl Dialog {
|
96 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`Dialog`](crate::model::Dialog).
|
97 + | /* ServerBuilderGenerator.kt:295 */
|
98 + | pub fn builder() -> crate::model::dialog::Builder {
|
99 + | /* ServerBuilderGenerator.kt:296 */
|
100 + | crate::model::dialog::Builder::default()
|
101 + | /* ServerBuilderGenerator.kt:295 */
|
102 + | }
|
103 + | /* ServerCodegenVisitor.kt:356 */
|
104 + | }
|
105 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
106 + | impl crate::constrained::Constrained for crate::model::Dialog {
|
107 + | type Unconstrained = crate::model::dialog::Builder;
|
108 + | }
|
109 + |
|
110 + | /* StructureGenerator.kt:197 */
|
111 + | #[allow(missing_docs)] // documentation missing in model
|
112 + | /* RustType.kt:534 */
|
113 + | #[derive(
|
114 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
115 + | )]
|
116 + | pub /* StructureGenerator.kt:201 */ struct Farewell {
|
117 + | /* StructureGenerator.kt:231 */
|
118 + | #[allow(missing_docs)] // documentation missing in model
|
119 + | pub phrase: ::std::string::String,
|
120 + | /* StructureGenerator.kt:201 */
|
121 + | }
|
122 + | /* StructureGenerator.kt:135 */
|
123 + | impl Farewell {
|
124 + | /* StructureGenerator.kt:231 */
|
125 + | #[allow(missing_docs)] // documentation missing in model
|
126 + | /* StructureGenerator.kt:166 */
|
127 + | pub fn phrase(&self) -> &str {
|
128 + | /* StructureGenerator.kt:171 */
|
129 + | use std::ops::Deref;
|
130 + | self.phrase.deref()
|
131 + | /* StructureGenerator.kt:166 */
|
132 + | }
|
133 + | /* StructureGenerator.kt:135 */
|
134 + | }
|
135 + | /* ServerCodegenVisitor.kt:356 */
|
136 + | impl Farewell {
|
137 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`Farewell`](crate::model::Farewell).
|
138 + | /* ServerBuilderGenerator.kt:295 */
|
139 + | pub fn builder() -> crate::model::farewell::Builder {
|
140 + | /* ServerBuilderGenerator.kt:296 */
|
141 + | crate::model::farewell::Builder::default()
|
142 + | /* ServerBuilderGenerator.kt:295 */
|
143 + | }
|
144 + | /* ServerCodegenVisitor.kt:356 */
|
145 + | }
|
146 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
147 + | impl crate::constrained::Constrained for crate::model::Farewell {
|
148 + | type Unconstrained = crate::model::farewell::Builder;
|
149 + | }
|
150 + |
|
151 + | /* StructureGenerator.kt:197 */
|
152 + | #[allow(missing_docs)] // documentation missing in model
|
153 + | /* RustType.kt:534 */
|
154 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
155 + | pub /* StructureGenerator.kt:201 */ struct TopLevel {
|
156 + | /* StructureGenerator.kt:231 */
|
157 + | #[allow(missing_docs)] // documentation missing in model
|
158 + | pub dialog: crate::model::Dialog,
|
159 + | /* StructureGenerator.kt:231 */
|
160 + | #[allow(missing_docs)] // documentation missing in model
|
161 + | pub dialog_list: ::std::vec::Vec<crate::model::Dialog>,
|
162 + | /* StructureGenerator.kt:231 */
|
163 + | #[allow(missing_docs)] // documentation missing in model
|
164 + | pub dialog_map: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
165 + | /* StructureGenerator.kt:201 */
|
166 + | }
|
167 + | /* StructureGenerator.kt:135 */
|
168 + | impl TopLevel {
|
169 + | /* StructureGenerator.kt:231 */
|
170 + | #[allow(missing_docs)] // documentation missing in model
|
171 + | /* StructureGenerator.kt:166 */
|
172 + | pub fn dialog(&self) -> &crate::model::Dialog {
|
173 + | /* StructureGenerator.kt:172 */
|
174 + | &self.dialog
|
175 + | /* StructureGenerator.kt:166 */
|
176 + | }
|
177 + | /* StructureGenerator.kt:231 */
|
178 + | #[allow(missing_docs)] // documentation missing in model
|
179 + | /* StructureGenerator.kt:166 */
|
180 + | pub fn dialog_list(&self) -> &[crate::model::Dialog] {
|
181 + | /* StructureGenerator.kt:171 */
|
182 + | use std::ops::Deref;
|
183 + | self.dialog_list.deref()
|
184 + | /* StructureGenerator.kt:166 */
|
185 + | }
|
186 + | /* StructureGenerator.kt:231 */
|
187 + | #[allow(missing_docs)] // documentation missing in model
|
188 + | /* StructureGenerator.kt:166 */
|
189 + | pub fn dialog_map(
|
190 + | &self,
|
191 + | ) -> &::std::collections::HashMap<::std::string::String, crate::model::Dialog> {
|
192 + | /* StructureGenerator.kt:172 */
|
193 + | &self.dialog_map
|
194 + | /* StructureGenerator.kt:166 */
|
195 + | }
|
196 + | /* StructureGenerator.kt:135 */
|
197 + | }
|
198 + | /* ServerCodegenVisitor.kt:356 */
|
199 + | impl TopLevel {
|
200 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`TopLevel`](crate::model::TopLevel).
|
201 + | /* ServerBuilderGenerator.kt:295 */
|
202 + | pub fn builder() -> crate::model::top_level::Builder {
|
203 + | /* ServerBuilderGenerator.kt:296 */
|
204 + | crate::model::top_level::Builder::default()
|
205 + | /* ServerBuilderGenerator.kt:295 */
|
206 + | }
|
207 + | /* ServerCodegenVisitor.kt:356 */
|
208 + | }
|
209 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
210 + | impl crate::constrained::Constrained for crate::model::TopLevel {
|
211 + | type Unconstrained = crate::model::top_level::Builder;
|
212 + | }
|
213 + |
|
214 + | /* EnumGenerator.kt:181 */
|
215 + | #[allow(missing_docs)] // documentation missing in model
|
216 + | /* RustType.kt:534 */
|
217 + | #[derive(
|
218 + | ::std::clone::Clone,
|
219 + | ::std::cmp::Eq,
|
220 + | ::std::cmp::Ord,
|
221 + | ::std::cmp::PartialEq,
|
222 + | ::std::cmp::PartialOrd,
|
223 + | ::std::fmt::Debug,
|
224 + | ::std::hash::Hash,
|
225 + | )]
|
226 + | pub /* EnumGenerator.kt:298 */ enum TestEnum {
|
227 + | /* EnumGenerator.kt:181 */
|
228 + | #[allow(missing_docs)] // documentation missing in model
|
229 + | /* EnumGenerator.kt:170 */
|
230 + | Bar,
|
231 + | /* EnumGenerator.kt:181 */
|
232 + | #[allow(missing_docs)] // documentation missing in model
|
233 + | /* EnumGenerator.kt:170 */
|
234 + | Baz,
|
235 + | /* EnumGenerator.kt:181 */
|
236 + | #[allow(missing_docs)] // documentation missing in model
|
237 + | /* EnumGenerator.kt:170 */
|
238 + | Foo,
|
239 + | /* EnumGenerator.kt:298 */
|
240 + | }
|
241 + | /// /* CodegenDelegator.kt:52 */See [`TestEnum`](crate::model::TestEnum).
|
242 + | pub mod test_enum {
|
243 + | #[derive(Debug, PartialEq)]
|
244 + | pub struct ConstraintViolation(pub(crate) ::std::string::String);
|
245 + |
|
246 + | impl ::std::fmt::Display for ConstraintViolation {
|
247 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
248 + | write!(
|
249 + | f,
|
250 + | r#"Value provided for 'aws.protocoltests.restjson#TestEnum' failed to satisfy constraint: Member must satisfy enum value set: [FOO, BAR, BAZ]"#
|
251 + | )
|
252 + | }
|
253 + | }
|
254 + |
|
255 + | impl ::std::error::Error for ConstraintViolation {}
|
256 + | impl ConstraintViolation {
|
257 + | pub(crate) fn as_validation_exception_field(
|
258 + | self,
|
259 + | path: ::std::string::String,
|
260 + | ) -> crate::model::ValidationExceptionField {
|
261 + | crate::model::ValidationExceptionField {
|
262 + | message: format!(
|
263 + | r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [FOO, BAR, BAZ]"#,
|
264 + | &path
|
265 + | ),
|
266 + | path,
|
267 + | }
|
268 + | }
|
269 + | }
|
270 + |
|
271 + | /* ServerEnumGenerator.kt:47 */
|
272 + | }
|
273 + | /* ServerEnumGenerator.kt:88 */
|
274 + | impl ::std::convert::TryFrom<&str> for TestEnum {
|
275 + | type Error = crate::model::test_enum::ConstraintViolation;
|
276 + | fn try_from(
|
277 + | s: &str,
|
278 + | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
|
279 + | match s {
|
280 + | "BAR" => Ok(TestEnum::Bar),
|
281 + | "BAZ" => Ok(TestEnum::Baz),
|
282 + | "FOO" => Ok(TestEnum::Foo),
|
283 + | _ => Err(crate::model::test_enum::ConstraintViolation(s.to_owned())),
|
284 + | }
|
285 + | }
|
286 + | }
|
287 + | impl ::std::convert::TryFrom<::std::string::String> for TestEnum {
|
288 + | type Error = crate::model::test_enum::ConstraintViolation;
|
289 + | fn try_from(
|
290 + | s: ::std::string::String,
|
291 + | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
|
292 + | {
|
293 + | s.as_str().try_into()
|
294 + | }
|
295 + | }
|
296 + | /* ServerEnumGenerator.kt:148 */
|
297 + | impl std::str::FromStr for TestEnum {
|
298 + | type Err = crate::model::test_enum::ConstraintViolation;
|
299 + | fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
|
300 + | Self::try_from(s)
|
301 + | }
|
302 + | }
|
303 + | /* EnumGenerator.kt:309 */
|
304 + | impl TestEnum {
|
305 + | /// Returns the `&str` value of the enum member.
|
306 + | pub fn as_str(&self) -> &str {
|
307 + | match self {
|
308 + | TestEnum::Bar => "BAR",
|
309 + | TestEnum::Baz => "BAZ",
|
310 + | TestEnum::Foo => "FOO",
|
311 + | }
|
312 + | }
|
313 + | /// Returns all the `&str` representations of the enum members.
|
314 + | pub const fn values() -> &'static [&'static str] {
|
315 + | &["BAR", "BAZ", "FOO"]
|
316 + | }
|
317 + | }
|
318 + | /* EnumGenerator.kt:254 */
|
319 + | impl ::std::convert::AsRef<str> for TestEnum {
|
320 + | fn as_ref(&self) -> &str {
|
321 + | self.as_str()
|
322 + | }
|
323 + | }
|
324 + | /* ConstrainedTraitForEnumGenerator.kt:36 */
|
325 + | impl crate::constrained::Constrained for TestEnum {
|
326 + | type Unconstrained = ::std::string::String;
|
327 + | }
|
328 + |
|
329 + | impl ::std::convert::From<::std::string::String>
|
330 + | for crate::constrained::MaybeConstrained<crate::model::TestEnum>
|
331 + | {
|
332 + | fn from(value: ::std::string::String) -> Self {
|
333 + | Self::Unconstrained(value)
|
334 + | }
|
335 + | }
|
336 + |
|
337 + | /* StructureGenerator.kt:197 */
|
338 + | #[allow(missing_docs)] // documentation missing in model
|
339 + | /* RustType.kt:534 */
|
340 + | #[derive(
|
341 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
342 + | )]
|
343 + | pub /* StructureGenerator.kt:201 */ struct ClientOptionalDefaults {
|
344 + | /* StructureGenerator.kt:231 */
|
345 + | #[allow(missing_docs)] // documentation missing in model
|
346 + | pub member: i32,
|
347 + | /* StructureGenerator.kt:201 */
|
348 + | }
|
349 + | /* StructureGenerator.kt:135 */
|
350 + | impl ClientOptionalDefaults {
|
351 + | /* StructureGenerator.kt:231 */
|
352 + | #[allow(missing_docs)] // documentation missing in model
|
353 + | /* StructureGenerator.kt:166 */
|
354 + | pub fn member(&self) -> i32 {
|
355 + | /* StructureGenerator.kt:168 */
|
356 + | self.member
|
357 + | /* StructureGenerator.kt:166 */
|
358 + | }
|
359 + | /* StructureGenerator.kt:135 */
|
360 + | }
|
361 + | /* ServerCodegenVisitor.kt:356 */
|
362 + | impl ClientOptionalDefaults {
|
363 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
364 + | /* ServerBuilderGenerator.kt:295 */
|
365 + | pub fn builder() -> crate::model::client_optional_defaults::Builder {
|
366 + | /* ServerBuilderGenerator.kt:296 */
|
367 + | crate::model::client_optional_defaults::Builder::default()
|
368 + | /* ServerBuilderGenerator.kt:295 */
|
369 + | }
|
370 + | /* ServerCodegenVisitor.kt:356 */
|
371 + | }
|
372 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
373 + | impl crate::constrained::Constrained for crate::model::ClientOptionalDefaults {
|
374 + | type Unconstrained = crate::model::client_optional_defaults::Builder;
|
375 + | }
|
376 + |
|
377 + | /* StructureGenerator.kt:197 */
|
378 + | #[allow(missing_docs)] // documentation missing in model
|
379 + | /* RustType.kt:534 */
|
380 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
381 + | pub /* StructureGenerator.kt:201 */ struct Defaults {
|
382 + | /* StructureGenerator.kt:231 */
|
383 + | #[allow(missing_docs)] // documentation missing in model
|
384 + | pub default_string: ::std::string::String,
|
385 + | /* StructureGenerator.kt:231 */
|
386 + | #[allow(missing_docs)] // documentation missing in model
|
387 + | pub default_boolean: bool,
|
388 + | /* StructureGenerator.kt:231 */
|
389 + | #[allow(missing_docs)] // documentation missing in model
|
390 + | pub default_list: ::std::vec::Vec<::std::string::String>,
|
391 + | /* StructureGenerator.kt:231 */
|
392 + | #[allow(missing_docs)] // documentation missing in model
|
393 + | pub default_document_map: ::aws_smithy_types::Document,
|
394 + | /* StructureGenerator.kt:231 */
|
395 + | #[allow(missing_docs)] // documentation missing in model
|
396 + | pub default_document_string: ::aws_smithy_types::Document,
|
397 + | /* StructureGenerator.kt:231 */
|
398 + | #[allow(missing_docs)] // documentation missing in model
|
399 + | pub default_document_boolean: ::aws_smithy_types::Document,
|
400 + | /* StructureGenerator.kt:231 */
|
401 + | #[allow(missing_docs)] // documentation missing in model
|
402 + | pub default_document_list: ::aws_smithy_types::Document,
|
403 + | /* StructureGenerator.kt:231 */
|
404 + | #[allow(missing_docs)] // documentation missing in model
|
405 + | pub default_null_document: ::std::option::Option<::aws_smithy_types::Document>,
|
406 + | /* StructureGenerator.kt:231 */
|
407 + | #[allow(missing_docs)] // documentation missing in model
|
408 + | pub default_timestamp: ::aws_smithy_types::DateTime,
|
409 + | /* StructureGenerator.kt:231 */
|
410 + | #[allow(missing_docs)] // documentation missing in model
|
411 + | pub default_blob: ::aws_smithy_types::Blob,
|
412 + | /* StructureGenerator.kt:231 */
|
413 + | #[allow(missing_docs)] // documentation missing in model
|
414 + | pub default_byte: i8,
|
415 + | /* StructureGenerator.kt:231 */
|
416 + | #[allow(missing_docs)] // documentation missing in model
|
417 + | pub default_short: i16,
|
418 + | /* StructureGenerator.kt:231 */
|
419 + | #[allow(missing_docs)] // documentation missing in model
|
420 + | pub default_integer: i32,
|
421 + | /* StructureGenerator.kt:231 */
|
422 + | #[allow(missing_docs)] // documentation missing in model
|
423 + | pub default_long: i64,
|
424 + | /* StructureGenerator.kt:231 */
|
425 + | #[allow(missing_docs)] // documentation missing in model
|
426 + | pub default_float: f32,
|
427 + | /* StructureGenerator.kt:231 */
|
428 + | #[allow(missing_docs)] // documentation missing in model
|
429 + | pub default_double: f64,
|
430 + | /* StructureGenerator.kt:231 */
|
431 + | #[allow(missing_docs)] // documentation missing in model
|
432 + | pub default_map: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
433 + | /* StructureGenerator.kt:231 */
|
434 + | #[allow(missing_docs)] // documentation missing in model
|
435 + | pub default_enum: crate::model::TestEnum,
|
436 + | /* StructureGenerator.kt:231 */
|
437 + | #[allow(missing_docs)] // documentation missing in model
|
438 + | pub default_int_enum: i32,
|
439 + | /* StructureGenerator.kt:231 */
|
440 + | #[allow(missing_docs)] // documentation missing in model
|
441 + | pub empty_string: ::std::string::String,
|
442 + | /* StructureGenerator.kt:231 */
|
443 + | #[allow(missing_docs)] // documentation missing in model
|
444 + | pub false_boolean: bool,
|
445 + | /* StructureGenerator.kt:231 */
|
446 + | #[allow(missing_docs)] // documentation missing in model
|
447 + | pub empty_blob: ::aws_smithy_types::Blob,
|
448 + | /* StructureGenerator.kt:231 */
|
449 + | #[allow(missing_docs)] // documentation missing in model
|
450 + | pub zero_byte: i8,
|
451 + | /* StructureGenerator.kt:231 */
|
452 + | #[allow(missing_docs)] // documentation missing in model
|
453 + | pub zero_short: i16,
|
454 + | /* StructureGenerator.kt:231 */
|
455 + | #[allow(missing_docs)] // documentation missing in model
|
456 + | pub zero_integer: i32,
|
457 + | /* StructureGenerator.kt:231 */
|
458 + | #[allow(missing_docs)] // documentation missing in model
|
459 + | pub zero_long: i64,
|
460 + | /* StructureGenerator.kt:231 */
|
461 + | #[allow(missing_docs)] // documentation missing in model
|
462 + | pub zero_float: f32,
|
463 + | /* StructureGenerator.kt:231 */
|
464 + | #[allow(missing_docs)] // documentation missing in model
|
465 + | pub zero_double: f64,
|
466 + | /* StructureGenerator.kt:201 */
|
467 + | }
|
468 + | /* StructureGenerator.kt:135 */
|
469 + | impl Defaults {
|
470 + | /* StructureGenerator.kt:231 */
|
471 + | #[allow(missing_docs)] // documentation missing in model
|
472 + | /* StructureGenerator.kt:166 */
|
473 + | pub fn default_string(&self) -> &str {
|
474 + | /* StructureGenerator.kt:171 */
|
475 + | use std::ops::Deref;
|
476 + | self.default_string.deref()
|
477 + | /* StructureGenerator.kt:166 */
|
478 + | }
|
479 + | /* StructureGenerator.kt:231 */
|
480 + | #[allow(missing_docs)] // documentation missing in model
|
481 + | /* StructureGenerator.kt:166 */
|
482 + | pub fn default_boolean(&self) -> bool {
|
483 + | /* StructureGenerator.kt:168 */
|
484 + | self.default_boolean
|
485 + | /* StructureGenerator.kt:166 */
|
486 + | }
|
487 + | /* StructureGenerator.kt:231 */
|
488 + | #[allow(missing_docs)] // documentation missing in model
|
489 + | /* StructureGenerator.kt:166 */
|
490 + | pub fn default_list(&self) -> &[::std::string::String] {
|
491 + | /* StructureGenerator.kt:171 */
|
492 + | use std::ops::Deref;
|
493 + | self.default_list.deref()
|
494 + | /* StructureGenerator.kt:166 */
|
495 + | }
|
496 + | /* StructureGenerator.kt:231 */
|
497 + | #[allow(missing_docs)] // documentation missing in model
|
498 + | /* StructureGenerator.kt:166 */
|
499 + | pub fn default_document_map(&self) -> &::aws_smithy_types::Document {
|
500 + | /* StructureGenerator.kt:172 */
|
501 + | &self.default_document_map
|
502 + | /* StructureGenerator.kt:166 */
|
503 + | }
|
504 + | /* StructureGenerator.kt:231 */
|
505 + | #[allow(missing_docs)] // documentation missing in model
|
506 + | /* StructureGenerator.kt:166 */
|
507 + | pub fn default_document_string(&self) -> &::aws_smithy_types::Document {
|
508 + | /* StructureGenerator.kt:172 */
|
509 + | &self.default_document_string
|
510 + | /* StructureGenerator.kt:166 */
|
511 + | }
|
512 + | /* StructureGenerator.kt:231 */
|
513 + | #[allow(missing_docs)] // documentation missing in model
|
514 + | /* StructureGenerator.kt:166 */
|
515 + | pub fn default_document_boolean(&self) -> &::aws_smithy_types::Document {
|
516 + | /* StructureGenerator.kt:172 */
|
517 + | &self.default_document_boolean
|
518 + | /* StructureGenerator.kt:166 */
|
519 + | }
|
520 + | /* StructureGenerator.kt:231 */
|
521 + | #[allow(missing_docs)] // documentation missing in model
|
522 + | /* StructureGenerator.kt:166 */
|
523 + | pub fn default_document_list(&self) -> &::aws_smithy_types::Document {
|
524 + | /* StructureGenerator.kt:172 */
|
525 + | &self.default_document_list
|
526 + | /* StructureGenerator.kt:166 */
|
527 + | }
|
528 + | /* StructureGenerator.kt:231 */
|
529 + | #[allow(missing_docs)] // documentation missing in model
|
530 + | /* StructureGenerator.kt:166 */
|
531 + | pub fn default_null_document(&self) -> ::std::option::Option<&::aws_smithy_types::Document> {
|
532 + | /* StructureGenerator.kt:170 */
|
533 + | self.default_null_document.as_ref()
|
534 + | /* StructureGenerator.kt:166 */
|
535 + | }
|
536 + | /* StructureGenerator.kt:231 */
|
537 + | #[allow(missing_docs)] // documentation missing in model
|
538 + | /* StructureGenerator.kt:166 */
|
539 + | pub fn default_timestamp(&self) -> &::aws_smithy_types::DateTime {
|
540 + | /* StructureGenerator.kt:172 */
|
541 + | &self.default_timestamp
|
542 + | /* StructureGenerator.kt:166 */
|
543 + | }
|
544 + | /* StructureGenerator.kt:231 */
|
545 + | #[allow(missing_docs)] // documentation missing in model
|
546 + | /* StructureGenerator.kt:166 */
|
547 + | pub fn default_blob(&self) -> &::aws_smithy_types::Blob {
|
548 + | /* StructureGenerator.kt:172 */
|
549 + | &self.default_blob
|
550 + | /* StructureGenerator.kt:166 */
|
551 + | }
|
552 + | /* StructureGenerator.kt:231 */
|
553 + | #[allow(missing_docs)] // documentation missing in model
|
554 + | /* StructureGenerator.kt:166 */
|
555 + | pub fn default_byte(&self) -> i8 {
|
556 + | /* StructureGenerator.kt:168 */
|
557 + | self.default_byte
|
558 + | /* StructureGenerator.kt:166 */
|
559 + | }
|
560 + | /* StructureGenerator.kt:231 */
|
561 + | #[allow(missing_docs)] // documentation missing in model
|
562 + | /* StructureGenerator.kt:166 */
|
563 + | pub fn default_short(&self) -> i16 {
|
564 + | /* StructureGenerator.kt:168 */
|
565 + | self.default_short
|
566 + | /* StructureGenerator.kt:166 */
|
567 + | }
|
568 + | /* StructureGenerator.kt:231 */
|
569 + | #[allow(missing_docs)] // documentation missing in model
|
570 + | /* StructureGenerator.kt:166 */
|
571 + | pub fn default_integer(&self) -> i32 {
|
572 + | /* StructureGenerator.kt:168 */
|
573 + | self.default_integer
|
574 + | /* StructureGenerator.kt:166 */
|
575 + | }
|
576 + | /* StructureGenerator.kt:231 */
|
577 + | #[allow(missing_docs)] // documentation missing in model
|
578 + | /* StructureGenerator.kt:166 */
|
579 + | pub fn default_long(&self) -> i64 {
|
580 + | /* StructureGenerator.kt:168 */
|
581 + | self.default_long
|
582 + | /* StructureGenerator.kt:166 */
|
583 + | }
|
584 + | /* StructureGenerator.kt:231 */
|
585 + | #[allow(missing_docs)] // documentation missing in model
|
586 + | /* StructureGenerator.kt:166 */
|
587 + | pub fn default_float(&self) -> f32 {
|
588 + | /* StructureGenerator.kt:168 */
|
589 + | self.default_float
|
590 + | /* StructureGenerator.kt:166 */
|
591 + | }
|
592 + | /* StructureGenerator.kt:231 */
|
593 + | #[allow(missing_docs)] // documentation missing in model
|
594 + | /* StructureGenerator.kt:166 */
|
595 + | pub fn default_double(&self) -> f64 {
|
596 + | /* StructureGenerator.kt:168 */
|
597 + | self.default_double
|
598 + | /* StructureGenerator.kt:166 */
|
599 + | }
|
600 + | /* StructureGenerator.kt:231 */
|
601 + | #[allow(missing_docs)] // documentation missing in model
|
602 + | /* StructureGenerator.kt:166 */
|
603 + | pub fn default_map(
|
604 + | &self,
|
605 + | ) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
|
606 + | /* StructureGenerator.kt:172 */
|
607 + | &self.default_map
|
608 + | /* StructureGenerator.kt:166 */
|
609 + | }
|
610 + | /* StructureGenerator.kt:231 */
|
611 + | #[allow(missing_docs)] // documentation missing in model
|
612 + | /* StructureGenerator.kt:166 */
|
613 + | pub fn default_enum(&self) -> &crate::model::TestEnum {
|
614 + | /* StructureGenerator.kt:172 */
|
615 + | &self.default_enum
|
616 + | /* StructureGenerator.kt:166 */
|
617 + | }
|
618 + | /* StructureGenerator.kt:231 */
|
619 + | #[allow(missing_docs)] // documentation missing in model
|
620 + | /* StructureGenerator.kt:166 */
|
621 + | pub fn default_int_enum(&self) -> i32 {
|
622 + | /* StructureGenerator.kt:168 */
|
623 + | self.default_int_enum
|
624 + | /* StructureGenerator.kt:166 */
|
625 + | }
|
626 + | /* StructureGenerator.kt:231 */
|
627 + | #[allow(missing_docs)] // documentation missing in model
|
628 + | /* StructureGenerator.kt:166 */
|
629 + | pub fn empty_string(&self) -> &str {
|
630 + | /* StructureGenerator.kt:171 */
|
631 + | use std::ops::Deref;
|
632 + | self.empty_string.deref()
|
633 + | /* StructureGenerator.kt:166 */
|
634 + | }
|
635 + | /* StructureGenerator.kt:231 */
|
636 + | #[allow(missing_docs)] // documentation missing in model
|
637 + | /* StructureGenerator.kt:166 */
|
638 + | pub fn false_boolean(&self) -> bool {
|
639 + | /* StructureGenerator.kt:168 */
|
640 + | self.false_boolean
|
641 + | /* StructureGenerator.kt:166 */
|
642 + | }
|
643 + | /* StructureGenerator.kt:231 */
|
644 + | #[allow(missing_docs)] // documentation missing in model
|
645 + | /* StructureGenerator.kt:166 */
|
646 + | pub fn empty_blob(&self) -> &::aws_smithy_types::Blob {
|
647 + | /* StructureGenerator.kt:172 */
|
648 + | &self.empty_blob
|
649 + | /* StructureGenerator.kt:166 */
|
650 + | }
|
651 + | /* StructureGenerator.kt:231 */
|
652 + | #[allow(missing_docs)] // documentation missing in model
|
653 + | /* StructureGenerator.kt:166 */
|
654 + | pub fn zero_byte(&self) -> i8 {
|
655 + | /* StructureGenerator.kt:168 */
|
656 + | self.zero_byte
|
657 + | /* StructureGenerator.kt:166 */
|
658 + | }
|
659 + | /* StructureGenerator.kt:231 */
|
660 + | #[allow(missing_docs)] // documentation missing in model
|
661 + | /* StructureGenerator.kt:166 */
|
662 + | pub fn zero_short(&self) -> i16 {
|
663 + | /* StructureGenerator.kt:168 */
|
664 + | self.zero_short
|
665 + | /* StructureGenerator.kt:166 */
|
666 + | }
|
667 + | /* StructureGenerator.kt:231 */
|
668 + | #[allow(missing_docs)] // documentation missing in model
|
669 + | /* StructureGenerator.kt:166 */
|
670 + | pub fn zero_integer(&self) -> i32 {
|
671 + | /* StructureGenerator.kt:168 */
|
672 + | self.zero_integer
|
673 + | /* StructureGenerator.kt:166 */
|
674 + | }
|
675 + | /* StructureGenerator.kt:231 */
|
676 + | #[allow(missing_docs)] // documentation missing in model
|
677 + | /* StructureGenerator.kt:166 */
|
678 + | pub fn zero_long(&self) -> i64 {
|
679 + | /* StructureGenerator.kt:168 */
|
680 + | self.zero_long
|
681 + | /* StructureGenerator.kt:166 */
|
682 + | }
|
683 + | /* StructureGenerator.kt:231 */
|
684 + | #[allow(missing_docs)] // documentation missing in model
|
685 + | /* StructureGenerator.kt:166 */
|
686 + | pub fn zero_float(&self) -> f32 {
|
687 + | /* StructureGenerator.kt:168 */
|
688 + | self.zero_float
|
689 + | /* StructureGenerator.kt:166 */
|
690 + | }
|
691 + | /* StructureGenerator.kt:231 */
|
692 + | #[allow(missing_docs)] // documentation missing in model
|
693 + | /* StructureGenerator.kt:166 */
|
694 + | pub fn zero_double(&self) -> f64 {
|
695 + | /* StructureGenerator.kt:168 */
|
696 + | self.zero_double
|
697 + | /* StructureGenerator.kt:166 */
|
698 + | }
|
699 + | /* StructureGenerator.kt:135 */
|
700 + | }
|
701 + | /* ServerCodegenVisitor.kt:356 */
|
702 + | impl Defaults {
|
703 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`Defaults`](crate::model::Defaults).
|
704 + | /* ServerBuilderGenerator.kt:295 */
|
705 + | pub fn builder() -> crate::model::defaults::Builder {
|
706 + | /* ServerBuilderGenerator.kt:296 */
|
707 + | crate::model::defaults::Builder::default()
|
708 + | /* ServerBuilderGenerator.kt:295 */
|
709 + | }
|
710 + | /* ServerCodegenVisitor.kt:356 */
|
711 + | }
|
712 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
713 + | impl crate::constrained::Constrained for crate::model::Defaults {
|
714 + | type Unconstrained = crate::model::defaults::Builder;
|
715 + | }
|
716 + |
|
717 + | /* StructureGenerator.kt:197 */
|
718 + | #[allow(missing_docs)] // documentation missing in model
|
719 + | /* RustType.kt:534 */
|
720 + | #[derive(
|
721 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
722 + | )]
|
723 + | pub /* StructureGenerator.kt:201 */ struct PayloadConfig {
|
724 + | /* StructureGenerator.kt:231 */
|
725 + | #[allow(missing_docs)] // documentation missing in model
|
726 + | pub data: ::std::option::Option<i32>,
|
727 + | /* StructureGenerator.kt:201 */
|
728 + | }
|
729 + | /* StructureGenerator.kt:135 */
|
730 + | impl PayloadConfig {
|
731 + | /* StructureGenerator.kt:231 */
|
732 + | #[allow(missing_docs)] // documentation missing in model
|
733 + | /* StructureGenerator.kt:166 */
|
734 + | pub fn data(&self) -> ::std::option::Option<i32> {
|
735 + | /* StructureGenerator.kt:168 */
|
736 + | self.data
|
737 + | /* StructureGenerator.kt:166 */
|
738 + | }
|
739 + | /* StructureGenerator.kt:135 */
|
740 + | }
|
741 + | /* ServerCodegenVisitor.kt:356 */
|
742 + | impl PayloadConfig {
|
743 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`PayloadConfig`](crate::model::PayloadConfig).
|
744 + | /* ServerBuilderGenerator.kt:295 */
|
745 + | pub fn builder() -> crate::model::payload_config::Builder {
|
746 + | /* ServerBuilderGenerator.kt:296 */
|
747 + | crate::model::payload_config::Builder::default()
|
748 + | /* ServerBuilderGenerator.kt:295 */
|
749 + | }
|
750 + | /* ServerCodegenVisitor.kt:356 */
|
751 + | }
|
752 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
753 + | impl crate::constrained::Constrained for crate::model::PayloadConfig {
|
754 + | type Unconstrained = crate::model::payload_config::Builder;
|
755 + | }
|
756 + |
|
757 + | /* StructureGenerator.kt:197 */
|
758 + | #[allow(missing_docs)] // documentation missing in model
|
759 + | /* RustType.kt:534 */
|
760 + | #[derive(
|
761 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
762 + | )]
|
763 + | pub /* StructureGenerator.kt:201 */ struct TestConfig {
|
764 + | /* StructureGenerator.kt:231 */
|
765 + | #[allow(missing_docs)] // documentation missing in model
|
766 + | pub timeout: ::std::option::Option<i32>,
|
767 + | /* StructureGenerator.kt:201 */
|
768 + | }
|
769 + | /* StructureGenerator.kt:135 */
|
770 + | impl TestConfig {
|
771 + | /* StructureGenerator.kt:231 */
|
772 + | #[allow(missing_docs)] // documentation missing in model
|
773 + | /* StructureGenerator.kt:166 */
|
774 + | pub fn timeout(&self) -> ::std::option::Option<i32> {
|
775 + | /* StructureGenerator.kt:168 */
|
776 + | self.timeout
|
777 + | /* StructureGenerator.kt:166 */
|
778 + | }
|
779 + | /* StructureGenerator.kt:135 */
|
780 + | }
|
781 + | /* ServerCodegenVisitor.kt:356 */
|
782 + | impl TestConfig {
|
783 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`TestConfig`](crate::model::TestConfig).
|
784 + | /* ServerBuilderGenerator.kt:295 */
|
785 + | pub fn builder() -> crate::model::test_config::Builder {
|
786 + | /* ServerBuilderGenerator.kt:296 */
|
787 + | crate::model::test_config::Builder::default()
|
788 + | /* ServerBuilderGenerator.kt:295 */
|
789 + | }
|
790 + | /* ServerCodegenVisitor.kt:356 */
|
791 + | }
|
792 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
793 + | impl crate::constrained::Constrained for crate::model::TestConfig {
|
794 + | type Unconstrained = crate::model::test_config::Builder;
|
795 + | }
|
796 + |
|
797 + | /* UnionGenerator.kt:67 */
|
798 + | #[allow(missing_docs)] // documentation missing in model
|
799 + | /* RustType.kt:534 */
|
800 + | #[derive(
|
801 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
802 + | )]
|
803 + | pub /* UnionGenerator.kt:85 */ enum SimpleUnion {
|
804 + | /* UnionGenerator.kt:90 */
|
805 + | #[allow(missing_docs)] // documentation missing in model
|
806 + | /* UnionGenerator.kt:190 */
|
807 + | Int(i32),
|
808 + | /* UnionGenerator.kt:90 */
|
809 + | #[allow(missing_docs)] // documentation missing in model
|
810 + | /* UnionGenerator.kt:190 */
|
811 + | String(::std::string::String),
|
812 + | /* UnionGenerator.kt:85 */
|
813 + | }
|
814 + | /* UnionGenerator.kt:111 */
|
815 + | impl SimpleUnion {
|
816 + | /* UnionGenerator.kt:217 */
|
817 + | /// Tries to convert the enum instance into [`Int`](crate::model::SimpleUnion::Int), extracting the inner [`i32`](i32).
|
818 + | /* UnionGenerator.kt:222 */
|
819 + | /// Returns `Err(&Self)` if it can't be converted.
|
820 + | /* UnionGenerator.kt:223 */
|
821 + | pub fn as_int(&self) -> ::std::result::Result<&i32, &Self> {
|
822 + | /* UnionGenerator.kt:227 */
|
823 + | if let SimpleUnion::Int(val) = &self {
|
824 + | ::std::result::Result::Ok(val)
|
825 + | } else {
|
826 + | ::std::result::Result::Err(self)
|
827 + | }
|
828 + | /* UnionGenerator.kt:223 */
|
829 + | }
|
830 + | /* UnionGenerator.kt:121 */
|
831 + | /// Returns true if this is a [`Int`](crate::model::SimpleUnion::Int).
|
832 + | /* UnionGenerator.kt:122 */
|
833 + | pub fn is_int(&self) -> bool {
|
834 + | /* UnionGenerator.kt:123 */
|
835 + | self.as_int().is_ok()
|
836 + | /* UnionGenerator.kt:122 */
|
837 + | }
|
838 + | /* UnionGenerator.kt:217 */
|
839 + | /// Tries to convert the enum instance into [`String`](crate::model::SimpleUnion::String), extracting the inner [`String`](::std::string::String).
|
840 + | /* UnionGenerator.kt:222 */
|
841 + | /// Returns `Err(&Self)` if it can't be converted.
|
842 + | /* UnionGenerator.kt:223 */
|
843 + | pub fn as_string(&self) -> ::std::result::Result<&::std::string::String, &Self> {
|
844 + | /* UnionGenerator.kt:227 */
|
845 + | if let SimpleUnion::String(val) = &self {
|
846 + | ::std::result::Result::Ok(val)
|
847 + | } else {
|
848 + | ::std::result::Result::Err(self)
|
849 + | }
|
850 + | /* UnionGenerator.kt:223 */
|
851 + | }
|
852 + | /* UnionGenerator.kt:121 */
|
853 + | /// Returns true if this is a [`String`](crate::model::SimpleUnion::String).
|
854 + | /* UnionGenerator.kt:122 */
|
855 + | pub fn is_string(&self) -> bool {
|
856 + | /* UnionGenerator.kt:123 */
|
857 + | self.as_string().is_ok()
|
858 + | /* UnionGenerator.kt:122 */
|
859 + | }
|
860 + | /* UnionGenerator.kt:111 */
|
861 + | }
|
862 + |
|
863 + | /* UnionGenerator.kt:67 */
|
864 + | #[allow(missing_docs)] // documentation missing in model
|
865 + | /* RustType.kt:534 */
|
866 + | #[derive(
|
867 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
868 + | )]
|
869 + | pub /* UnionGenerator.kt:85 */ enum UnionWithJsonName {
|
870 + | /* UnionGenerator.kt:90 */
|
871 + | #[allow(missing_docs)] // documentation missing in model
|
872 + | /* UnionGenerator.kt:190 */
|
873 + | Bar(::std::string::String),
|
874 + | /* UnionGenerator.kt:90 */
|
875 + | #[allow(missing_docs)] // documentation missing in model
|
876 + | /* UnionGenerator.kt:190 */
|
877 + | Baz(::std::string::String),
|
878 + | /* UnionGenerator.kt:90 */
|
879 + | #[allow(missing_docs)] // documentation missing in model
|
880 + | /* UnionGenerator.kt:190 */
|
881 + | Foo(::std::string::String),
|
882 + | /* UnionGenerator.kt:85 */
|
883 + | }
|
884 + | /* UnionGenerator.kt:111 */
|
885 + | impl UnionWithJsonName {
|
886 + | /* UnionGenerator.kt:217 */
|
887 + | /// Tries to convert the enum instance into [`Bar`](crate::model::UnionWithJsonName::Bar), extracting the inner [`String`](::std::string::String).
|
888 + | /* UnionGenerator.kt:222 */
|
889 + | /// Returns `Err(&Self)` if it can't be converted.
|
890 + | /* UnionGenerator.kt:223 */
|
891 + | pub fn as_bar(&self) -> ::std::result::Result<&::std::string::String, &Self> {
|
892 + | /* UnionGenerator.kt:227 */
|
893 + | if let UnionWithJsonName::Bar(val) = &self {
|
894 + | ::std::result::Result::Ok(val)
|
895 + | } else {
|
896 + | ::std::result::Result::Err(self)
|
897 + | }
|
898 + | /* UnionGenerator.kt:223 */
|
899 + | }
|
900 + | /* UnionGenerator.kt:121 */
|
901 + | /// Returns true if this is a [`Bar`](crate::model::UnionWithJsonName::Bar).
|
902 + | /* UnionGenerator.kt:122 */
|
903 + | pub fn is_bar(&self) -> bool {
|
904 + | /* UnionGenerator.kt:123 */
|
905 + | self.as_bar().is_ok()
|
906 + | /* UnionGenerator.kt:122 */
|
907 + | }
|
908 + | /* UnionGenerator.kt:217 */
|
909 + | /// Tries to convert the enum instance into [`Baz`](crate::model::UnionWithJsonName::Baz), extracting the inner [`String`](::std::string::String).
|
910 + | /* UnionGenerator.kt:222 */
|
911 + | /// Returns `Err(&Self)` if it can't be converted.
|
912 + | /* UnionGenerator.kt:223 */
|
913 + | pub fn as_baz(&self) -> ::std::result::Result<&::std::string::String, &Self> {
|
914 + | /* UnionGenerator.kt:227 */
|
915 + | if let UnionWithJsonName::Baz(val) = &self {
|
916 + | ::std::result::Result::Ok(val)
|
917 + | } else {
|
918 + | ::std::result::Result::Err(self)
|
919 + | }
|
920 + | /* UnionGenerator.kt:223 */
|
921 + | }
|
922 + | /* UnionGenerator.kt:121 */
|
923 + | /// Returns true if this is a [`Baz`](crate::model::UnionWithJsonName::Baz).
|
924 + | /* UnionGenerator.kt:122 */
|
925 + | pub fn is_baz(&self) -> bool {
|
926 + | /* UnionGenerator.kt:123 */
|
927 + | self.as_baz().is_ok()
|
928 + | /* UnionGenerator.kt:122 */
|
929 + | }
|
930 + | /* UnionGenerator.kt:217 */
|
931 + | /// Tries to convert the enum instance into [`Foo`](crate::model::UnionWithJsonName::Foo), extracting the inner [`String`](::std::string::String).
|
932 + | /* UnionGenerator.kt:222 */
|
933 + | /// Returns `Err(&Self)` if it can't be converted.
|
934 + | /* UnionGenerator.kt:223 */
|
935 + | pub fn as_foo(&self) -> ::std::result::Result<&::std::string::String, &Self> {
|
936 + | /* UnionGenerator.kt:227 */
|
937 + | if let UnionWithJsonName::Foo(val) = &self {
|
938 + | ::std::result::Result::Ok(val)
|
939 + | } else {
|
940 + | ::std::result::Result::Err(self)
|
941 + | }
|
942 + | /* UnionGenerator.kt:223 */
|
943 + | }
|
944 + | /* UnionGenerator.kt:121 */
|
945 + | /// Returns true if this is a [`Foo`](crate::model::UnionWithJsonName::Foo).
|
946 + | /* UnionGenerator.kt:122 */
|
947 + | pub fn is_foo(&self) -> bool {
|
948 + | /* UnionGenerator.kt:123 */
|
949 + | self.as_foo().is_ok()
|
950 + | /* UnionGenerator.kt:122 */
|
951 + | }
|
952 + | /* UnionGenerator.kt:111 */
|
953 + | }
|
954 + |
|
955 + | /* UnionGenerator.kt:67 */
|
956 + | #[allow(missing_docs)] // documentation missing in model
|
957 + | /* RustType.kt:534 */
|
958 + | #[derive(
|
959 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
960 + | )]
|
961 + | pub /* UnionGenerator.kt:85 */ enum PlayerAction {
|
962 + | /// /* UnionGenerator.kt:90 */Quit the game.
|
963 + | /* UnionGenerator.kt:188 */
|
964 + | Quit,
|
965 + | /* UnionGenerator.kt:85 */
|
966 + | }
|
967 + | /* UnionGenerator.kt:111 */
|
968 + | impl PlayerAction {
|
969 + | /* RustType.kt:534 */
|
970 + | #[allow(irrefutable_let_patterns)]
|
971 + | /* UnionGenerator.kt:203 */
|
972 + | /// Tries to convert the enum instance into [`Quit`](crate::model::PlayerAction::Quit), extracting the inner `()`.
|
973 + | /* UnionGenerator.kt:207 */
|
974 + | /// Returns `Err(&Self)` if it can't be converted.
|
975 + | /* UnionGenerator.kt:208 */
|
976 + | pub fn as_quit(&self) -> ::std::result::Result<(), &Self> {
|
977 + | /* UnionGenerator.kt:209 */
|
978 + | if let PlayerAction::Quit = &self {
|
979 + | ::std::result::Result::Ok(())
|
980 + | } else {
|
981 + | ::std::result::Result::Err(self)
|
982 + | }
|
983 + | /* UnionGenerator.kt:208 */
|
984 + | }
|
985 + | /* UnionGenerator.kt:121 */
|
986 + | /// Returns true if this is a [`Quit`](crate::model::PlayerAction::Quit).
|
987 + | /* UnionGenerator.kt:122 */
|
988 + | pub fn is_quit(&self) -> bool {
|
989 + | /* UnionGenerator.kt:123 */
|
990 + | self.as_quit().is_ok()
|
991 + | /* UnionGenerator.kt:122 */
|
992 + | }
|
993 + | /* UnionGenerator.kt:111 */
|
994 + | }
|
995 + |
|
996 + | /* StructureGenerator.kt:197 */
|
997 + | #[allow(missing_docs)] // documentation missing in model
|
998 + | /* RustType.kt:534 */
|
999 + | #[derive(
|
1000 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1001 + | )]
|
1002 + | pub /* StructureGenerator.kt:201 */ struct Unit {/* StructureGenerator.kt:201 */}
|
1003 + | /* ServerCodegenVisitor.kt:356 */
|
1004 + | impl Unit {
|
1005 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`Unit`](crate::model::Unit).
|
1006 + | /* ServerBuilderGenerator.kt:295 */
|
1007 + | pub fn builder() -> crate::model::unit::Builder {
|
1008 + | /* ServerBuilderGenerator.kt:296 */
|
1009 + | crate::model::unit::Builder::default()
|
1010 + | /* ServerBuilderGenerator.kt:295 */
|
1011 + | }
|
1012 + | /* ServerCodegenVisitor.kt:356 */
|
1013 + | }
|
1014 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
1015 + | impl crate::constrained::Constrained for crate::model::Unit {
|
1016 + | type Unconstrained = crate::model::unit::Builder;
|
1017 + | }
|
1018 + |
|
1019 + | /// /* UnionGenerator.kt:67 */A union with a representative set of types for members.
|
1020 + | /* RustType.kt:534 */
|
1021 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1022 + | pub /* UnionGenerator.kt:85 */ enum MyUnion {
|
1023 + | /* UnionGenerator.kt:90 */
|
1024 + | #[allow(missing_docs)] // documentation missing in model
|
1025 + | /* UnionGenerator.kt:190 */
|
1026 + | BlobValue(::aws_smithy_types::Blob),
|
1027 + | /* UnionGenerator.kt:90 */
|
1028 + | #[allow(missing_docs)] // documentation missing in model
|
1029 + | /* UnionGenerator.kt:190 */
|
1030 + | BooleanValue(bool),
|
1031 + | /* UnionGenerator.kt:90 */
|
1032 + | #[allow(missing_docs)] // documentation missing in model
|
1033 + | /* UnionGenerator.kt:190 */
|
1034 + | EnumValue(crate::model::FooEnum),
|
1035 + | /* UnionGenerator.kt:90 */
|
1036 + | #[allow(missing_docs)] // documentation missing in model
|
1037 + | /* UnionGenerator.kt:190 */
|
1038 + | ListValue(::std::vec::Vec<::std::string::String>),
|
1039 + | /* UnionGenerator.kt:90 */
|
1040 + | #[allow(missing_docs)] // documentation missing in model
|
1041 + | /* UnionGenerator.kt:190 */
|
1042 + | MapValue(::std::collections::HashMap<::std::string::String, ::std::string::String>),
|
1043 + | /* UnionGenerator.kt:90 */
|
1044 + | #[allow(missing_docs)] // documentation missing in model
|
1045 + | /* UnionGenerator.kt:190 */
|
1046 + | NumberValue(i32),
|
1047 + | /* UnionGenerator.kt:90 */
|
1048 + | #[allow(missing_docs)] // documentation missing in model
|
1049 + | /* UnionGenerator.kt:190 */
|
1050 + | RenamedStructureValue(crate::model::RenamedGreeting),
|
1051 + | /* UnionGenerator.kt:90 */
|
1052 + | #[allow(missing_docs)] // documentation missing in model
|
1053 + | /* UnionGenerator.kt:190 */
|
1054 + | StringValue(::std::string::String),
|
1055 + | /* UnionGenerator.kt:90 */
|
1056 + | #[allow(missing_docs)] // documentation missing in model
|
1057 + | /* UnionGenerator.kt:190 */
|
1058 + | StructureValue(crate::model::GreetingStruct),
|
1059 + | /* UnionGenerator.kt:90 */
|
1060 + | #[allow(missing_docs)] // documentation missing in model
|
1061 + | /* UnionGenerator.kt:190 */
|
1062 + | TimestampValue(::aws_smithy_types::DateTime),
|
1063 + | /* UnionGenerator.kt:85 */
|
1064 + | }
|
1065 + | /* UnionGenerator.kt:111 */
|
1066 + | impl MyUnion {
|
1067 + | /* UnionGenerator.kt:217 */
|
1068 + | /// Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_types::Blob).
|
1069 + | /* UnionGenerator.kt:222 */
|
1070 + | /// Returns `Err(&Self)` if it can't be converted.
|
1071 + | /* UnionGenerator.kt:223 */
|
1072 + | pub fn as_blob_value(&self) -> ::std::result::Result<&::aws_smithy_types::Blob, &Self> {
|
1073 + | /* UnionGenerator.kt:227 */
|
1074 + | if let MyUnion::BlobValue(val) = &self {
|
1075 + | ::std::result::Result::Ok(val)
|
1076 + | } else {
|
1077 + | ::std::result::Result::Err(self)
|
1078 + | }
|
1079 + | /* UnionGenerator.kt:223 */
|
1080 + | }
|
1081 + | /* UnionGenerator.kt:121 */
|
1082 + | /// Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
|
1083 + | /* UnionGenerator.kt:122 */
|
1084 + | pub fn is_blob_value(&self) -> bool {
|
1085 + | /* UnionGenerator.kt:123 */
|
1086 + | self.as_blob_value().is_ok()
|
1087 + | /* UnionGenerator.kt:122 */
|
1088 + | }
|
1089 + | /* UnionGenerator.kt:217 */
|
1090 + | /// Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
|
1091 + | /* UnionGenerator.kt:222 */
|
1092 + | /// Returns `Err(&Self)` if it can't be converted.
|
1093 + | /* UnionGenerator.kt:223 */
|
1094 + | pub fn as_boolean_value(&self) -> ::std::result::Result<&bool, &Self> {
|
1095 + | /* UnionGenerator.kt:227 */
|
1096 + | if let MyUnion::BooleanValue(val) = &self {
|
1097 + | ::std::result::Result::Ok(val)
|
1098 + | } else {
|
1099 + | ::std::result::Result::Err(self)
|
1100 + | }
|
1101 + | /* UnionGenerator.kt:223 */
|
1102 + | }
|
1103 + | /* UnionGenerator.kt:121 */
|
1104 + | /// Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
|
1105 + | /* UnionGenerator.kt:122 */
|
1106 + | pub fn is_boolean_value(&self) -> bool {
|
1107 + | /* UnionGenerator.kt:123 */
|
1108 + | self.as_boolean_value().is_ok()
|
1109 + | /* UnionGenerator.kt:122 */
|
1110 + | }
|
1111 + | /* UnionGenerator.kt:217 */
|
1112 + | /// Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
|
1113 + | /* UnionGenerator.kt:222 */
|
1114 + | /// Returns `Err(&Self)` if it can't be converted.
|
1115 + | /* UnionGenerator.kt:223 */
|
1116 + | pub fn as_enum_value(&self) -> ::std::result::Result<&crate::model::FooEnum, &Self> {
|
1117 + | /* UnionGenerator.kt:227 */
|
1118 + | if let MyUnion::EnumValue(val) = &self {
|
1119 + | ::std::result::Result::Ok(val)
|
1120 + | } else {
|
1121 + | ::std::result::Result::Err(self)
|
1122 + | }
|
1123 + | /* UnionGenerator.kt:223 */
|
1124 + | }
|
1125 + | /* UnionGenerator.kt:121 */
|
1126 + | /// Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
|
1127 + | /* UnionGenerator.kt:122 */
|
1128 + | pub fn is_enum_value(&self) -> bool {
|
1129 + | /* UnionGenerator.kt:123 */
|
1130 + | self.as_enum_value().is_ok()
|
1131 + | /* UnionGenerator.kt:122 */
|
1132 + | }
|
1133 + | /* UnionGenerator.kt:217 */
|
1134 + | /// Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
|
1135 + | /* UnionGenerator.kt:222 */
|
1136 + | /// Returns `Err(&Self)` if it can't be converted.
|
1137 + | /* UnionGenerator.kt:223 */
|
1138 + | pub fn as_list_value(
|
1139 + | &self,
|
1140 + | ) -> ::std::result::Result<&::std::vec::Vec<::std::string::String>, &Self> {
|
1141 + | /* UnionGenerator.kt:227 */
|
1142 + | if let MyUnion::ListValue(val) = &self {
|
1143 + | ::std::result::Result::Ok(val)
|
1144 + | } else {
|
1145 + | ::std::result::Result::Err(self)
|
1146 + | }
|
1147 + | /* UnionGenerator.kt:223 */
|
1148 + | }
|
1149 + | /* UnionGenerator.kt:121 */
|
1150 + | /// Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
|
1151 + | /* UnionGenerator.kt:122 */
|
1152 + | pub fn is_list_value(&self) -> bool {
|
1153 + | /* UnionGenerator.kt:123 */
|
1154 + | self.as_list_value().is_ok()
|
1155 + | /* UnionGenerator.kt:122 */
|
1156 + | }
|
1157 + | /* UnionGenerator.kt:217 */
|
1158 + | /// Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
|
1159 + | /* UnionGenerator.kt:222 */
|
1160 + | /// Returns `Err(&Self)` if it can't be converted.
|
1161 + | /* UnionGenerator.kt:223 */
|
1162 + | pub fn as_map_value(
|
1163 + | &self,
|
1164 + | ) -> ::std::result::Result<
|
1165 + | &::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1166 + | &Self,
|
1167 + | > {
|
1168 + | /* UnionGenerator.kt:227 */
|
1169 + | if let MyUnion::MapValue(val) = &self {
|
1170 + | ::std::result::Result::Ok(val)
|
1171 + | } else {
|
1172 + | ::std::result::Result::Err(self)
|
1173 + | }
|
1174 + | /* UnionGenerator.kt:223 */
|
1175 + | }
|
1176 + | /* UnionGenerator.kt:121 */
|
1177 + | /// Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
|
1178 + | /* UnionGenerator.kt:122 */
|
1179 + | pub fn is_map_value(&self) -> bool {
|
1180 + | /* UnionGenerator.kt:123 */
|
1181 + | self.as_map_value().is_ok()
|
1182 + | /* UnionGenerator.kt:122 */
|
1183 + | }
|
1184 + | /* UnionGenerator.kt:217 */
|
1185 + | /// Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
|
1186 + | /* UnionGenerator.kt:222 */
|
1187 + | /// Returns `Err(&Self)` if it can't be converted.
|
1188 + | /* UnionGenerator.kt:223 */
|
1189 + | pub fn as_number_value(&self) -> ::std::result::Result<&i32, &Self> {
|
1190 + | /* UnionGenerator.kt:227 */
|
1191 + | if let MyUnion::NumberValue(val) = &self {
|
1192 + | ::std::result::Result::Ok(val)
|
1193 + | } else {
|
1194 + | ::std::result::Result::Err(self)
|
1195 + | }
|
1196 + | /* UnionGenerator.kt:223 */
|
1197 + | }
|
1198 + | /* UnionGenerator.kt:121 */
|
1199 + | /// Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
|
1200 + | /* UnionGenerator.kt:122 */
|
1201 + | pub fn is_number_value(&self) -> bool {
|
1202 + | /* UnionGenerator.kt:123 */
|
1203 + | self.as_number_value().is_ok()
|
1204 + | /* UnionGenerator.kt:122 */
|
1205 + | }
|
1206 + | /* UnionGenerator.kt:217 */
|
1207 + | /// Tries to convert the enum instance into [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue), extracting the inner [`RenamedGreeting`](crate::model::RenamedGreeting).
|
1208 + | /* UnionGenerator.kt:222 */
|
1209 + | /// Returns `Err(&Self)` if it can't be converted.
|
1210 + | /* UnionGenerator.kt:223 */
|
1211 + | pub fn as_renamed_structure_value(
|
1212 + | &self,
|
1213 + | ) -> ::std::result::Result<&crate::model::RenamedGreeting, &Self> {
|
1214 + | /* UnionGenerator.kt:227 */
|
1215 + | if let MyUnion::RenamedStructureValue(val) = &self {
|
1216 + | ::std::result::Result::Ok(val)
|
1217 + | } else {
|
1218 + | ::std::result::Result::Err(self)
|
1219 + | }
|
1220 + | /* UnionGenerator.kt:223 */
|
1221 + | }
|
1222 + | /* UnionGenerator.kt:121 */
|
1223 + | /// Returns true if this is a [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue).
|
1224 + | /* UnionGenerator.kt:122 */
|
1225 + | pub fn is_renamed_structure_value(&self) -> bool {
|
1226 + | /* UnionGenerator.kt:123 */
|
1227 + | self.as_renamed_structure_value().is_ok()
|
1228 + | /* UnionGenerator.kt:122 */
|
1229 + | }
|
1230 + | /* UnionGenerator.kt:217 */
|
1231 + | /// Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
|
1232 + | /* UnionGenerator.kt:222 */
|
1233 + | /// Returns `Err(&Self)` if it can't be converted.
|
1234 + | /* UnionGenerator.kt:223 */
|
1235 + | pub fn as_string_value(&self) -> ::std::result::Result<&::std::string::String, &Self> {
|
1236 + | /* UnionGenerator.kt:227 */
|
1237 + | if let MyUnion::StringValue(val) = &self {
|
1238 + | ::std::result::Result::Ok(val)
|
1239 + | } else {
|
1240 + | ::std::result::Result::Err(self)
|
1241 + | }
|
1242 + | /* UnionGenerator.kt:223 */
|
1243 + | }
|
1244 + | /* UnionGenerator.kt:121 */
|
1245 + | /// Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
|
1246 + | /* UnionGenerator.kt:122 */
|
1247 + | pub fn is_string_value(&self) -> bool {
|
1248 + | /* UnionGenerator.kt:123 */
|
1249 + | self.as_string_value().is_ok()
|
1250 + | /* UnionGenerator.kt:122 */
|
1251 + | }
|
1252 + | /* UnionGenerator.kt:217 */
|
1253 + | /// Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
|
1254 + | /* UnionGenerator.kt:222 */
|
1255 + | /// Returns `Err(&Self)` if it can't be converted.
|
1256 + | /* UnionGenerator.kt:223 */
|
1257 + | pub fn as_structure_value(
|
1258 + | &self,
|
1259 + | ) -> ::std::result::Result<&crate::model::GreetingStruct, &Self> {
|
1260 + | /* UnionGenerator.kt:227 */
|
1261 + | if let MyUnion::StructureValue(val) = &self {
|
1262 + | ::std::result::Result::Ok(val)
|
1263 + | } else {
|
1264 + | ::std::result::Result::Err(self)
|
1265 + | }
|
1266 + | /* UnionGenerator.kt:223 */
|
1267 + | }
|
1268 + | /* UnionGenerator.kt:121 */
|
1269 + | /// Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
|
1270 + | /* UnionGenerator.kt:122 */
|
1271 + | pub fn is_structure_value(&self) -> bool {
|
1272 + | /* UnionGenerator.kt:123 */
|
1273 + | self.as_structure_value().is_ok()
|
1274 + | /* UnionGenerator.kt:122 */
|
1275 + | }
|
1276 + | /* UnionGenerator.kt:217 */
|
1277 + | /// Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_types::DateTime).
|
1278 + | /* UnionGenerator.kt:222 */
|
1279 + | /// Returns `Err(&Self)` if it can't be converted.
|
1280 + | /* UnionGenerator.kt:223 */
|
1281 + | pub fn as_timestamp_value(
|
1282 + | &self,
|
1283 + | ) -> ::std::result::Result<&::aws_smithy_types::DateTime, &Self> {
|
1284 + | /* UnionGenerator.kt:227 */
|
1285 + | if let MyUnion::TimestampValue(val) = &self {
|
1286 + | ::std::result::Result::Ok(val)
|
1287 + | } else {
|
1288 + | ::std::result::Result::Err(self)
|
1289 + | }
|
1290 + | /* UnionGenerator.kt:223 */
|
1291 + | }
|
1292 + | /* UnionGenerator.kt:121 */
|
1293 + | /// Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
|
1294 + | /* UnionGenerator.kt:122 */
|
1295 + | pub fn is_timestamp_value(&self) -> bool {
|
1296 + | /* UnionGenerator.kt:123 */
|
1297 + | self.as_timestamp_value().is_ok()
|
1298 + | /* UnionGenerator.kt:122 */
|
1299 + | }
|
1300 + | /* UnionGenerator.kt:111 */
|
1301 + | }
|
1302 + |
|
1303 + | /* StructureGenerator.kt:197 */
|
1304 + | #[allow(missing_docs)] // documentation missing in model
|
1305 + | /* RustType.kt:534 */
|
1306 + | #[derive(
|
1307 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1308 + | )]
|
1309 + | pub /* StructureGenerator.kt:201 */ struct RenamedGreeting {
|
1310 + | /* StructureGenerator.kt:231 */
|
1311 + | #[allow(missing_docs)] // documentation missing in model
|
1312 + | pub salutation: ::std::option::Option<::std::string::String>,
|
1313 + | /* StructureGenerator.kt:201 */
|
1314 + | }
|
1315 + | /* StructureGenerator.kt:135 */
|
1316 + | impl RenamedGreeting {
|
1317 + | /* StructureGenerator.kt:231 */
|
1318 + | #[allow(missing_docs)] // documentation missing in model
|
1319 + | /* StructureGenerator.kt:166 */
|
1320 + | pub fn salutation(&self) -> ::std::option::Option<&str> {
|
1321 + | /* StructureGenerator.kt:169 */
|
1322 + | self.salutation.as_deref()
|
1323 + | /* StructureGenerator.kt:166 */
|
1324 + | }
|
1325 + | /* StructureGenerator.kt:135 */
|
1326 + | }
|
1327 + | /* ServerCodegenVisitor.kt:356 */
|
1328 + | impl RenamedGreeting {
|
1329 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`RenamedGreeting`](crate::model::RenamedGreeting).
|
1330 + | /* ServerBuilderGenerator.kt:295 */
|
1331 + | pub fn builder() -> crate::model::renamed_greeting::Builder {
|
1332 + | /* ServerBuilderGenerator.kt:296 */
|
1333 + | crate::model::renamed_greeting::Builder::default()
|
1334 + | /* ServerBuilderGenerator.kt:295 */
|
1335 + | }
|
1336 + | /* ServerCodegenVisitor.kt:356 */
|
1337 + | }
|
1338 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
1339 + | impl crate::constrained::Constrained for crate::model::RenamedGreeting {
|
1340 + | type Unconstrained = crate::model::renamed_greeting::Builder;
|
1341 + | }
|
1342 + |
|
1343 + | /* StructureGenerator.kt:197 */
|
1344 + | #[allow(missing_docs)] // documentation missing in model
|
1345 + | /* RustType.kt:534 */
|
1346 + | #[derive(
|
1347 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1348 + | )]
|
1349 + | pub /* StructureGenerator.kt:201 */ struct GreetingStruct {
|
1350 + | /* StructureGenerator.kt:231 */
|
1351 + | #[allow(missing_docs)] // documentation missing in model
|
1352 + | pub hi: ::std::option::Option<::std::string::String>,
|
1353 + | /* StructureGenerator.kt:201 */
|
1354 + | }
|
1355 + | /* StructureGenerator.kt:135 */
|
1356 + | impl GreetingStruct {
|
1357 + | /* StructureGenerator.kt:231 */
|
1358 + | #[allow(missing_docs)] // documentation missing in model
|
1359 + | /* StructureGenerator.kt:166 */
|
1360 + | pub fn hi(&self) -> ::std::option::Option<&str> {
|
1361 + | /* StructureGenerator.kt:169 */
|
1362 + | self.hi.as_deref()
|
1363 + | /* StructureGenerator.kt:166 */
|
1364 + | }
|
1365 + | /* StructureGenerator.kt:135 */
|
1366 + | }
|
1367 + | /* ServerCodegenVisitor.kt:356 */
|
1368 + | impl GreetingStruct {
|
1369 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GreetingStruct`](crate::model::GreetingStruct).
|
1370 + | /* ServerBuilderGenerator.kt:295 */
|
1371 + | pub fn builder() -> crate::model::greeting_struct::Builder {
|
1372 + | /* ServerBuilderGenerator.kt:296 */
|
1373 + | crate::model::greeting_struct::Builder::default()
|
1374 + | /* ServerBuilderGenerator.kt:295 */
|
1375 + | }
|
1376 + | /* ServerCodegenVisitor.kt:356 */
|
1377 + | }
|
1378 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
1379 + | impl crate::constrained::Constrained for crate::model::GreetingStruct {
|
1380 + | type Unconstrained = crate::model::greeting_struct::Builder;
|
1381 + | }
|
1382 + |
|
1383 + | /* EnumGenerator.kt:181 */
|
1384 + | #[allow(missing_docs)] // documentation missing in model
|
1385 + | /* RustType.kt:534 */
|
1386 + | #[derive(
|
1387 + | ::std::clone::Clone,
|
1388 + | ::std::cmp::Eq,
|
1389 + | ::std::cmp::Ord,
|
1390 + | ::std::cmp::PartialEq,
|
1391 + | ::std::cmp::PartialOrd,
|
1392 + | ::std::fmt::Debug,
|
1393 + | ::std::hash::Hash,
|
1394 + | )]
|
1395 + | pub /* EnumGenerator.kt:298 */ enum FooEnum {
|
1396 + | /* EnumGenerator.kt:181 */
|
1397 + | #[allow(missing_docs)] // documentation missing in model
|
1398 + | /* EnumGenerator.kt:170 */
|
1399 + | Zero,
|
1400 + | /* EnumGenerator.kt:181 */
|
1401 + | #[allow(missing_docs)] // documentation missing in model
|
1402 + | /* EnumGenerator.kt:170 */
|
1403 + | One,
|
1404 + | /* EnumGenerator.kt:181 */
|
1405 + | #[allow(missing_docs)] // documentation missing in model
|
1406 + | /* EnumGenerator.kt:170 */
|
1407 + | Bar,
|
1408 + | /* EnumGenerator.kt:181 */
|
1409 + | #[allow(missing_docs)] // documentation missing in model
|
1410 + | /* EnumGenerator.kt:170 */
|
1411 + | Baz,
|
1412 + | /* EnumGenerator.kt:181 */
|
1413 + | #[allow(missing_docs)] // documentation missing in model
|
1414 + | /* EnumGenerator.kt:170 */
|
1415 + | Foo,
|
1416 + | /* EnumGenerator.kt:298 */
|
1417 + | }
|
1418 + | /// /* CodegenDelegator.kt:52 */See [`FooEnum`](crate::model::FooEnum).
|
1419 + | pub mod foo_enum {
|
1420 + | #[derive(Debug, PartialEq)]
|
1421 + | pub struct ConstraintViolation(pub(crate) ::std::string::String);
|
1422 + |
|
1423 + | impl ::std::fmt::Display for ConstraintViolation {
|
1424 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1425 + | write!(
|
1426 + | f,
|
1427 + | r#"Value provided for 'aws.protocoltests.shared#FooEnum' failed to satisfy constraint: Member must satisfy enum value set: [Foo, Baz, Bar, 1, 0]"#
|
1428 + | )
|
1429 + | }
|
1430 + | }
|
1431 + |
|
1432 + | impl ::std::error::Error for ConstraintViolation {}
|
1433 + | impl ConstraintViolation {
|
1434 + | pub(crate) fn as_validation_exception_field(
|
1435 + | self,
|
1436 + | path: ::std::string::String,
|
1437 + | ) -> crate::model::ValidationExceptionField {
|
1438 + | crate::model::ValidationExceptionField {
|
1439 + | message: format!(
|
1440 + | r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [Foo, Baz, Bar, 1, 0]"#,
|
1441 + | &path
|
1442 + | ),
|
1443 + | path,
|
1444 + | }
|
1445 + | }
|
1446 + | }
|
1447 + |
|
1448 + | /* ServerEnumGenerator.kt:47 */
|
1449 + | }
|
1450 + | /* ServerEnumGenerator.kt:88 */
|
1451 + | impl ::std::convert::TryFrom<&str> for FooEnum {
|
1452 + | type Error = crate::model::foo_enum::ConstraintViolation;
|
1453 + | fn try_from(
|
1454 + | s: &str,
|
1455 + | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
|
1456 + | match s {
|
1457 + | "0" => Ok(FooEnum::Zero),
|
1458 + | "1" => Ok(FooEnum::One),
|
1459 + | "Bar" => Ok(FooEnum::Bar),
|
1460 + | "Baz" => Ok(FooEnum::Baz),
|
1461 + | "Foo" => Ok(FooEnum::Foo),
|
1462 + | _ => Err(crate::model::foo_enum::ConstraintViolation(s.to_owned())),
|
1463 + | }
|
1464 + | }
|
1465 + | }
|
1466 + | impl ::std::convert::TryFrom<::std::string::String> for FooEnum {
|
1467 + | type Error = crate::model::foo_enum::ConstraintViolation;
|
1468 + | fn try_from(
|
1469 + | s: ::std::string::String,
|
1470 + | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
|
1471 + | {
|
1472 + | s.as_str().try_into()
|
1473 + | }
|
1474 + | }
|
1475 + | /* ServerEnumGenerator.kt:148 */
|
1476 + | impl std::str::FromStr for FooEnum {
|
1477 + | type Err = crate::model::foo_enum::ConstraintViolation;
|
1478 + | fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
|
1479 + | Self::try_from(s)
|
1480 + | }
|
1481 + | }
|
1482 + | /* EnumGenerator.kt:309 */
|
1483 + | impl FooEnum {
|
1484 + | /// Returns the `&str` value of the enum member.
|
1485 + | pub fn as_str(&self) -> &str {
|
1486 + | match self {
|
1487 + | FooEnum::Zero => "0",
|
1488 + | FooEnum::One => "1",
|
1489 + | FooEnum::Bar => "Bar",
|
1490 + | FooEnum::Baz => "Baz",
|
1491 + | FooEnum::Foo => "Foo",
|
1492 + | }
|
1493 + | }
|
1494 + | /// Returns all the `&str` representations of the enum members.
|
1495 + | pub const fn values() -> &'static [&'static str] {
|
1496 + | &["0", "1", "Bar", "Baz", "Foo"]
|
1497 + | }
|
1498 + | }
|
1499 + | /* EnumGenerator.kt:254 */
|
1500 + | impl ::std::convert::AsRef<str> for FooEnum {
|
1501 + | fn as_ref(&self) -> &str {
|
1502 + | self.as_str()
|
1503 + | }
|
1504 + | }
|
1505 + | /* ConstrainedTraitForEnumGenerator.kt:36 */
|
1506 + | impl crate::constrained::Constrained for FooEnum {
|
1507 + | type Unconstrained = ::std::string::String;
|
1508 + | }
|
1509 + |
|
1510 + | impl ::std::convert::From<::std::string::String>
|
1511 + | for crate::constrained::MaybeConstrained<crate::model::FooEnum>
|
1512 + | {
|
1513 + | fn from(value: ::std::string::String) -> Self {
|
1514 + | Self::Unconstrained(value)
|
1515 + | }
|
1516 + | }
|
1517 + |
|
1518 + | /* ConstrainedCollectionGenerator.kt:93 */
|
1519 + | #[allow(missing_docs)] // documentation missing in model
|
1520 + | /// /* ConstrainedCollectionGenerator.kt:94 */
|
1521 + | /// This is a constrained type because its corresponding modeled Smithy shape has one or more
|
1522 + | /// [constraint traits]. Use [`StringSet::try_from`] to construct values of this type.
|
1523 + | ///
|
1524 + | /// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
|
1525 + | ///
|
1526 + | /* RustType.kt:534 */
|
1527 + | #[derive(
|
1528 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1529 + | )]
|
1530 + | pub /* ConstrainedCollectionGenerator.kt:97 */ struct StringSet(
|
1531 + | pub(crate) ::std::vec::Vec<::std::string::String>,
|
1532 + | );
|
1533 + | /* ConstrainedCollectionGenerator.kt:104 */
|
1534 + | impl StringSet {
|
1535 + | /* ConstrainedCollectionGenerator.kt:106 */
|
1536 + | /// Returns an immutable reference to the underlying [`::std::vec::Vec<::std::string::String>`].
|
1537 + | pub fn inner(&self) -> &::std::vec::Vec<::std::string::String> {
|
1538 + | &self.0
|
1539 + | }
|
1540 + | /* ConstrainedCollectionGenerator.kt:116 */
|
1541 + | /// Consumes the value, returning the underlying [`::std::vec::Vec<::std::string::String>`].
|
1542 + | pub fn into_inner(self) -> ::std::vec::Vec<::std::string::String> {
|
1543 + | self.0
|
1544 + | }
|
1545 + |
|
1546 + | fn check_unique_items(
|
1547 + | items: ::std::vec::Vec<::std::string::String>,
|
1548 + | ) -> ::std::result::Result<
|
1549 + | ::std::vec::Vec<::std::string::String>,
|
1550 + | crate::model::string_set::ConstraintViolation,
|
1551 + | > {
|
1552 + | let mut seen = ::std::collections::HashMap::new();
|
1553 + | let mut duplicate_indices = ::std::vec::Vec::new();
|
1554 + | for (idx, item) in items.iter().enumerate() {
|
1555 + | if let Some(prev_idx) = seen.insert(item, idx) {
|
1556 + | duplicate_indices.push(prev_idx);
|
1557 + | }
|
1558 + | }
|
1559 + |
|
1560 + | let mut last_duplicate_indices = ::std::vec::Vec::new();
|
1561 + | for idx in &duplicate_indices {
|
1562 + | if let Some(prev_idx) = seen.remove(&items[*idx]) {
|
1563 + | last_duplicate_indices.push(prev_idx);
|
1564 + | }
|
1565 + | }
|
1566 + | duplicate_indices.extend(last_duplicate_indices);
|
1567 + |
|
1568 + | if !duplicate_indices.is_empty() {
|
1569 + | debug_assert!(duplicate_indices.len() >= 2);
|
1570 + | Err(crate::model::string_set::ConstraintViolation::UniqueItems {
|
1571 + | duplicate_indices,
|
1572 + | original: items,
|
1573 + | })
|
1574 + | } else {
|
1575 + | Ok(items)
|
1576 + | }
|
1577 + | }
|
1578 + | /* ConstrainedCollectionGenerator.kt:104 */
|
1579 + | }
|
1580 + | /* ConstrainedCollectionGenerator.kt:133 */
|
1581 + | impl ::std::convert::TryFrom<::std::vec::Vec<::std::string::String>> for StringSet {
|
1582 + | type Error = crate::model::string_set::ConstraintViolation;
|
1583 + |
|
1584 + | /// Constructs a `StringSet` from an [`::std::vec::Vec<::std::string::String>`], failing when the provided value does not satisfy the modeled constraints.
|
1585 + | fn try_from(
|
1586 + | value: ::std::vec::Vec<::std::string::String>,
|
1587 + | ) -> ::std::result::Result<Self, Self::Error> {
|
1588 + | let value = Self::check_unique_items(value)?;
|
1589 + |
|
1590 + | Ok(Self(value))
|
1591 + | }
|
1592 + | }
|
1593 + |
|
1594 + | impl ::std::convert::From<StringSet> for ::std::vec::Vec<::std::string::String> {
|
1595 + | fn from(value: StringSet) -> Self {
|
1596 + | value.into_inner()
|
1597 + | }
|
1598 + | }
|
1599 + | /* ConstrainedCollectionGenerator.kt:181 */
|
1600 + | impl crate::constrained::Constrained for StringSet {
|
1601 + | type Unconstrained = crate::unconstrained::string_set_unconstrained::StringSetUnconstrained;
|
1602 + | }
|
1603 + |
|
1604 + | /* StructureGenerator.kt:197 */
|
1605 + | #[allow(missing_docs)] // documentation missing in model
|
1606 + | /* RustType.kt:534 */
|
1607 + | #[derive(
|
1608 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1609 + | )]
|
1610 + | pub /* StructureGenerator.kt:201 */ struct StructureListMember {
|
1611 + | /* StructureGenerator.kt:231 */
|
1612 + | #[allow(missing_docs)] // documentation missing in model
|
1613 + | pub a: ::std::option::Option<::std::string::String>,
|
1614 + | /* StructureGenerator.kt:231 */
|
1615 + | #[allow(missing_docs)] // documentation missing in model
|
1616 + | pub b: ::std::option::Option<::std::string::String>,
|
1617 + | /* StructureGenerator.kt:201 */
|
1618 + | }
|
1619 + | /* StructureGenerator.kt:135 */
|
1620 + | impl StructureListMember {
|
1621 + | /* StructureGenerator.kt:231 */
|
1622 + | #[allow(missing_docs)] // documentation missing in model
|
1623 + | /* StructureGenerator.kt:166 */
|
1624 + | pub fn a(&self) -> ::std::option::Option<&str> {
|
1625 + | /* StructureGenerator.kt:169 */
|
1626 + | self.a.as_deref()
|
1627 + | /* StructureGenerator.kt:166 */
|
1628 + | }
|
1629 + | /* StructureGenerator.kt:231 */
|
1630 + | #[allow(missing_docs)] // documentation missing in model
|
1631 + | /* StructureGenerator.kt:166 */
|
1632 + | pub fn b(&self) -> ::std::option::Option<&str> {
|
1633 + | /* StructureGenerator.kt:169 */
|
1634 + | self.b.as_deref()
|
1635 + | /* StructureGenerator.kt:166 */
|
1636 + | }
|
1637 + | /* StructureGenerator.kt:135 */
|
1638 + | }
|
1639 + | /* ServerCodegenVisitor.kt:356 */
|
1640 + | impl StructureListMember {
|
1641 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`StructureListMember`](crate::model::StructureListMember).
|
1642 + | /* ServerBuilderGenerator.kt:295 */
|
1643 + | pub fn builder() -> crate::model::structure_list_member::Builder {
|
1644 + | /* ServerBuilderGenerator.kt:296 */
|
1645 + | crate::model::structure_list_member::Builder::default()
|
1646 + | /* ServerBuilderGenerator.kt:295 */
|
1647 + | }
|
1648 + | /* ServerCodegenVisitor.kt:356 */
|
1649 + | }
|
1650 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
1651 + | impl crate::constrained::Constrained for crate::model::StructureListMember {
|
1652 + | type Unconstrained = crate::model::structure_list_member::Builder;
|
1653 + | }
|
1654 + |
|
1655 + | /* StructureGenerator.kt:197 */
|
1656 + | #[allow(missing_docs)] // documentation missing in model
|
1657 + | /* RustType.kt:534 */
|
1658 + | #[derive(
|
1659 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1660 + | )]
|
1661 + | pub /* StructureGenerator.kt:201 */ struct RecursiveShapesInputOutputNested1 {
|
1662 + | /* StructureGenerator.kt:231 */
|
1663 + | #[allow(missing_docs)] // documentation missing in model
|
1664 + | pub foo: ::std::option::Option<::std::string::String>,
|
1665 + | /* StructureGenerator.kt:231 */
|
1666 + | #[allow(missing_docs)] // documentation missing in model
|
1667 + | pub nested:
|
1668 + | ::std::option::Option<::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>>,
|
1669 + | /* StructureGenerator.kt:201 */
|
1670 + | }
|
1671 + | /* StructureGenerator.kt:135 */
|
1672 + | impl RecursiveShapesInputOutputNested1 {
|
1673 + | /* StructureGenerator.kt:231 */
|
1674 + | #[allow(missing_docs)] // documentation missing in model
|
1675 + | /* StructureGenerator.kt:166 */
|
1676 + | pub fn foo(&self) -> ::std::option::Option<&str> {
|
1677 + | /* StructureGenerator.kt:169 */
|
1678 + | self.foo.as_deref()
|
1679 + | /* StructureGenerator.kt:166 */
|
1680 + | }
|
1681 + | /* StructureGenerator.kt:231 */
|
1682 + | #[allow(missing_docs)] // documentation missing in model
|
1683 + | /* StructureGenerator.kt:166 */
|
1684 + | pub fn nested(
|
1685 + | &self,
|
1686 + | ) -> ::std::option::Option<&crate::model::RecursiveShapesInputOutputNested2> {
|
1687 + | /* StructureGenerator.kt:169 */
|
1688 + | self.nested.as_deref()
|
1689 + | /* StructureGenerator.kt:166 */
|
1690 + | }
|
1691 + | /* StructureGenerator.kt:135 */
|
1692 + | }
|
1693 + | /* ServerCodegenVisitor.kt:356 */
|
1694 + | impl RecursiveShapesInputOutputNested1 {
|
1695 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
1696 + | /* ServerBuilderGenerator.kt:295 */
|
1697 + | pub fn builder() -> crate::model::recursive_shapes_input_output_nested1::Builder {
|
1698 + | /* ServerBuilderGenerator.kt:296 */
|
1699 + | crate::model::recursive_shapes_input_output_nested1::Builder::default()
|
1700 + | /* ServerBuilderGenerator.kt:295 */
|
1701 + | }
|
1702 + | /* ServerCodegenVisitor.kt:356 */
|
1703 + | }
|
1704 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
1705 + | impl crate::constrained::Constrained for crate::model::RecursiveShapesInputOutputNested1 {
|
1706 + | type Unconstrained = crate::model::recursive_shapes_input_output_nested1::Builder;
|
1707 + | }
|
1708 + |
|
1709 + | /* StructureGenerator.kt:197 */
|
1710 + | #[allow(missing_docs)] // documentation missing in model
|
1711 + | /* RustType.kt:534 */
|
1712 + | #[derive(
|
1713 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1714 + | )]
|
1715 + | pub /* StructureGenerator.kt:201 */ struct RecursiveShapesInputOutputNested2 {
|
1716 + | /* StructureGenerator.kt:231 */
|
1717 + | #[allow(missing_docs)] // documentation missing in model
|
1718 + | pub bar: ::std::option::Option<::std::string::String>,
|
1719 + | /* StructureGenerator.kt:231 */
|
1720 + | #[allow(missing_docs)] // documentation missing in model
|
1721 + | pub recursive_member: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
1722 + | /* StructureGenerator.kt:201 */
|
1723 + | }
|
1724 + | /* StructureGenerator.kt:135 */
|
1725 + | impl RecursiveShapesInputOutputNested2 {
|
1726 + | /* StructureGenerator.kt:231 */
|
1727 + | #[allow(missing_docs)] // documentation missing in model
|
1728 + | /* StructureGenerator.kt:166 */
|
1729 + | pub fn bar(&self) -> ::std::option::Option<&str> {
|
1730 + | /* StructureGenerator.kt:169 */
|
1731 + | self.bar.as_deref()
|
1732 + | /* StructureGenerator.kt:166 */
|
1733 + | }
|
1734 + | /* StructureGenerator.kt:231 */
|
1735 + | #[allow(missing_docs)] // documentation missing in model
|
1736 + | /* StructureGenerator.kt:166 */
|
1737 + | pub fn recursive_member(
|
1738 + | &self,
|
1739 + | ) -> ::std::option::Option<&crate::model::RecursiveShapesInputOutputNested1> {
|
1740 + | /* StructureGenerator.kt:170 */
|
1741 + | self.recursive_member.as_ref()
|
1742 + | /* StructureGenerator.kt:166 */
|
1743 + | }
|
1744 + | /* StructureGenerator.kt:135 */
|
1745 + | }
|
1746 + | /* ServerCodegenVisitor.kt:356 */
|
1747 + | impl RecursiveShapesInputOutputNested2 {
|
1748 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
1749 + | /* ServerBuilderGenerator.kt:295 */
|
1750 + | pub fn builder() -> crate::model::recursive_shapes_input_output_nested2::Builder {
|
1751 + | /* ServerBuilderGenerator.kt:296 */
|
1752 + | crate::model::recursive_shapes_input_output_nested2::Builder::default()
|
1753 + | /* ServerBuilderGenerator.kt:295 */
|
1754 + | }
|
1755 + | /* ServerCodegenVisitor.kt:356 */
|
1756 + | }
|
1757 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
1758 + | impl crate::constrained::Constrained for crate::model::RecursiveShapesInputOutputNested2 {
|
1759 + | type Unconstrained = crate::model::recursive_shapes_input_output_nested2::Builder;
|
1760 + | }
|
1761 + |
|
1762 + | /* ConstrainedCollectionGenerator.kt:93 */
|
1763 + | #[allow(missing_docs)] // documentation missing in model
|
1764 + | /// /* ConstrainedCollectionGenerator.kt:94 */
|
1765 + | /// This is a constrained type because its corresponding modeled Smithy shape has one or more
|
1766 + | /// [constraint traits]. Use [`IntegerEnumSet::try_from`] to construct values of this type.
|
1767 + | ///
|
1768 + | /// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
|
1769 + | ///
|
1770 + | /* RustType.kt:534 */
|
1771 + | #[derive(
|
1772 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1773 + | )]
|
1774 + | pub /* ConstrainedCollectionGenerator.kt:97 */ struct IntegerEnumSet(
|
1775 + | pub(crate) ::std::vec::Vec<i32>,
|
1776 + | );
|
1777 + | /* ConstrainedCollectionGenerator.kt:104 */
|
1778 + | impl IntegerEnumSet {
|
1779 + | /* ConstrainedCollectionGenerator.kt:106 */
|
1780 + | /// Returns an immutable reference to the underlying [`::std::vec::Vec<i32>`].
|
1781 + | pub fn inner(&self) -> &::std::vec::Vec<i32> {
|
1782 + | &self.0
|
1783 + | }
|
1784 + | /* ConstrainedCollectionGenerator.kt:116 */
|
1785 + | /// Consumes the value, returning the underlying [`::std::vec::Vec<i32>`].
|
1786 + | pub fn into_inner(self) -> ::std::vec::Vec<i32> {
|
1787 + | self.0
|
1788 + | }
|
1789 + |
|
1790 + | fn check_unique_items(
|
1791 + | items: ::std::vec::Vec<i32>,
|
1792 + | ) -> ::std::result::Result<
|
1793 + | ::std::vec::Vec<i32>,
|
1794 + | crate::model::integer_enum_set::ConstraintViolation,
|
1795 + | > {
|
1796 + | let mut seen = ::std::collections::HashMap::new();
|
1797 + | let mut duplicate_indices = ::std::vec::Vec::new();
|
1798 + | for (idx, item) in items.iter().enumerate() {
|
1799 + | if let Some(prev_idx) = seen.insert(item, idx) {
|
1800 + | duplicate_indices.push(prev_idx);
|
1801 + | }
|
1802 + | }
|
1803 + |
|
1804 + | let mut last_duplicate_indices = ::std::vec::Vec::new();
|
1805 + | for idx in &duplicate_indices {
|
1806 + | if let Some(prev_idx) = seen.remove(&items[*idx]) {
|
1807 + | last_duplicate_indices.push(prev_idx);
|
1808 + | }
|
1809 + | }
|
1810 + | duplicate_indices.extend(last_duplicate_indices);
|
1811 + |
|
1812 + | if !duplicate_indices.is_empty() {
|
1813 + | debug_assert!(duplicate_indices.len() >= 2);
|
1814 + | Err(
|
1815 + | crate::model::integer_enum_set::ConstraintViolation::UniqueItems {
|
1816 + | duplicate_indices,
|
1817 + | original: items,
|
1818 + | },
|
1819 + | )
|
1820 + | } else {
|
1821 + | Ok(items)
|
1822 + | }
|
1823 + | }
|
1824 + | /* ConstrainedCollectionGenerator.kt:104 */
|
1825 + | }
|
1826 + | /* ConstrainedCollectionGenerator.kt:133 */
|
1827 + | impl ::std::convert::TryFrom<::std::vec::Vec<i32>> for IntegerEnumSet {
|
1828 + | type Error = crate::model::integer_enum_set::ConstraintViolation;
|
1829 + |
|
1830 + | /// Constructs a `IntegerEnumSet` from an [`::std::vec::Vec<i32>`], failing when the provided value does not satisfy the modeled constraints.
|
1831 + | fn try_from(value: ::std::vec::Vec<i32>) -> ::std::result::Result<Self, Self::Error> {
|
1832 + | let value = Self::check_unique_items(value)?;
|
1833 + |
|
1834 + | Ok(Self(value))
|
1835 + | }
|
1836 + | }
|
1837 + |
|
1838 + | impl ::std::convert::From<IntegerEnumSet> for ::std::vec::Vec<i32> {
|
1839 + | fn from(value: IntegerEnumSet) -> Self {
|
1840 + | value.into_inner()
|
1841 + | }
|
1842 + | }
|
1843 + | /* ConstrainedCollectionGenerator.kt:181 */
|
1844 + | impl crate::constrained::Constrained for IntegerEnumSet {
|
1845 + | type Unconstrained =
|
1846 + | crate::unconstrained::integer_enum_set_unconstrained::IntegerEnumSetUnconstrained;
|
1847 + | }
|
1848 + |
|
1849 + | /* ConstrainedCollectionGenerator.kt:93 */
|
1850 + | #[allow(missing_docs)] // documentation missing in model
|
1851 + | /// /* ConstrainedCollectionGenerator.kt:94 */
|
1852 + | /// This is a constrained type because its corresponding modeled Smithy shape has one or more
|
1853 + | /// [constraint traits]. Use [`FooEnumSet::try_from`] to construct values of this type.
|
1854 + | ///
|
1855 + | /// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
|
1856 + | ///
|
1857 + | /* RustType.kt:534 */
|
1858 + | #[derive(
|
1859 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1860 + | )]
|
1861 + | pub /* ConstrainedCollectionGenerator.kt:97 */ struct FooEnumSet(
|
1862 + | pub(crate) ::std::vec::Vec<crate::model::FooEnum>,
|
1863 + | );
|
1864 + | /* ConstrainedCollectionGenerator.kt:104 */
|
1865 + | impl FooEnumSet {
|
1866 + | /* ConstrainedCollectionGenerator.kt:106 */
|
1867 + | /// Returns an immutable reference to the underlying [`::std::vec::Vec<crate::model::FooEnum>`].
|
1868 + | pub fn inner(&self) -> &::std::vec::Vec<crate::model::FooEnum> {
|
1869 + | &self.0
|
1870 + | }
|
1871 + | /* ConstrainedCollectionGenerator.kt:116 */
|
1872 + | /// Consumes the value, returning the underlying [`::std::vec::Vec<crate::model::FooEnum>`].
|
1873 + | pub fn into_inner(self) -> ::std::vec::Vec<crate::model::FooEnum> {
|
1874 + | self.0
|
1875 + | }
|
1876 + |
|
1877 + | fn check_unique_items(
|
1878 + | items: ::std::vec::Vec<crate::model::FooEnum>,
|
1879 + | ) -> ::std::result::Result<
|
1880 + | ::std::vec::Vec<crate::model::FooEnum>,
|
1881 + | crate::model::foo_enum_set::ConstraintViolation,
|
1882 + | > {
|
1883 + | let mut seen = ::std::collections::HashMap::new();
|
1884 + | let mut duplicate_indices = ::std::vec::Vec::new();
|
1885 + | for (idx, item) in items.iter().enumerate() {
|
1886 + | if let Some(prev_idx) = seen.insert(item, idx) {
|
1887 + | duplicate_indices.push(prev_idx);
|
1888 + | }
|
1889 + | }
|
1890 + |
|
1891 + | let mut last_duplicate_indices = ::std::vec::Vec::new();
|
1892 + | for idx in &duplicate_indices {
|
1893 + | if let Some(prev_idx) = seen.remove(&items[*idx]) {
|
1894 + | last_duplicate_indices.push(prev_idx);
|
1895 + | }
|
1896 + | }
|
1897 + | duplicate_indices.extend(last_duplicate_indices);
|
1898 + |
|
1899 + | if !duplicate_indices.is_empty() {
|
1900 + | debug_assert!(duplicate_indices.len() >= 2);
|
1901 + | Err(
|
1902 + | crate::model::foo_enum_set::ConstraintViolation::UniqueItems {
|
1903 + | duplicate_indices,
|
1904 + | original: items,
|
1905 + | },
|
1906 + | )
|
1907 + | } else {
|
1908 + | Ok(items)
|
1909 + | }
|
1910 + | }
|
1911 + | /* ConstrainedCollectionGenerator.kt:104 */
|
1912 + | }
|
1913 + | /* ConstrainedCollectionGenerator.kt:133 */
|
1914 + | impl ::std::convert::TryFrom<::std::vec::Vec<crate::model::FooEnum>> for FooEnumSet {
|
1915 + | type Error = crate::model::foo_enum_set::ConstraintViolation;
|
1916 + |
|
1917 + | /// Constructs a `FooEnumSet` from an [`::std::vec::Vec<crate::model::FooEnum>`], failing when the provided value does not satisfy the modeled constraints.
|
1918 + | fn try_from(
|
1919 + | value: ::std::vec::Vec<crate::model::FooEnum>,
|
1920 + | ) -> ::std::result::Result<Self, Self::Error> {
|
1921 + | let value = Self::check_unique_items(value)?;
|
1922 + |
|
1923 + | Ok(Self(value))
|
1924 + | }
|
1925 + | }
|
1926 + |
|
1927 + | impl ::std::convert::From<FooEnumSet> for ::std::vec::Vec<crate::model::FooEnum> {
|
1928 + | fn from(value: FooEnumSet) -> Self {
|
1929 + | value.into_inner()
|
1930 + | }
|
1931 + | }
|
1932 + | /* ConstrainedCollectionGenerator.kt:181 */
|
1933 + | impl crate::constrained::Constrained for FooEnumSet {
|
1934 + | type Unconstrained = crate::unconstrained::foo_enum_set_unconstrained::FooEnumSetUnconstrained;
|
1935 + | }
|
1936 + |
|
1937 + | /* StructureGenerator.kt:197 */
|
1938 + | #[allow(missing_docs)] // documentation missing in model
|
1939 + | /* RustType.kt:534 */
|
1940 + | #[derive(
|
1941 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1942 + | )]
|
1943 + | pub /* StructureGenerator.kt:201 */ struct ComplexNestedErrorData {
|
1944 + | /* StructureGenerator.kt:231 */
|
1945 + | #[allow(missing_docs)] // documentation missing in model
|
1946 + | pub foo: ::std::option::Option<::std::string::String>,
|
1947 + | /* StructureGenerator.kt:201 */
|
1948 + | }
|
1949 + | /* StructureGenerator.kt:135 */
|
1950 + | impl ComplexNestedErrorData {
|
1951 + | /* StructureGenerator.kt:231 */
|
1952 + | #[allow(missing_docs)] // documentation missing in model
|
1953 + | /* StructureGenerator.kt:166 */
|
1954 + | pub fn foo(&self) -> ::std::option::Option<&str> {
|
1955 + | /* StructureGenerator.kt:169 */
|
1956 + | self.foo.as_deref()
|
1957 + | /* StructureGenerator.kt:166 */
|
1958 + | }
|
1959 + | /* StructureGenerator.kt:135 */
|
1960 + | }
|
1961 + | /* ServerCodegenVisitor.kt:356 */
|
1962 + | impl ComplexNestedErrorData {
|
1963 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
1964 + | /* ServerBuilderGenerator.kt:295 */
|
1965 + | pub fn builder() -> crate::model::complex_nested_error_data::Builder {
|
1966 + | /* ServerBuilderGenerator.kt:296 */
|
1967 + | crate::model::complex_nested_error_data::Builder::default()
|
1968 + | /* ServerBuilderGenerator.kt:295 */
|
1969 + | }
|
1970 + | /* ServerCodegenVisitor.kt:356 */
|
1971 + | }
|
1972 + |
|
1973 + | /* UnionGenerator.kt:67 */
|
1974 + | #[allow(missing_docs)] // documentation missing in model
|
1975 + | /* RustType.kt:534 */
|
1976 + | #[derive(
|
1977 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1978 + | )]
|
1979 + | pub /* UnionGenerator.kt:85 */ enum UnionPayload {
|
1980 + | /* UnionGenerator.kt:90 */
|
1981 + | #[allow(missing_docs)] // documentation missing in model
|
1982 + | /* UnionGenerator.kt:190 */
|
1983 + | Greeting(::std::string::String),
|
1984 + | /* UnionGenerator.kt:85 */
|
1985 + | }
|
1986 + | /* UnionGenerator.kt:111 */
|
1987 + | impl UnionPayload {
|
1988 + | /* RustType.kt:534 */
|
1989 + | #[allow(irrefutable_let_patterns)]
|
1990 + | /* UnionGenerator.kt:217 */
|
1991 + | /// Tries to convert the enum instance into [`Greeting`](crate::model::UnionPayload::Greeting), extracting the inner [`String`](::std::string::String).
|
1992 + | /* UnionGenerator.kt:222 */
|
1993 + | /// Returns `Err(&Self)` if it can't be converted.
|
1994 + | /* UnionGenerator.kt:223 */
|
1995 + | pub fn as_greeting(&self) -> ::std::result::Result<&::std::string::String, &Self> {
|
1996 + | /* UnionGenerator.kt:227 */
|
1997 + | if let UnionPayload::Greeting(val) = &self {
|
1998 + | ::std::result::Result::Ok(val)
|
1999 + | } else {
|
2000 + | ::std::result::Result::Err(self)
|
2001 + | }
|
2002 + | /* UnionGenerator.kt:223 */
|
2003 + | }
|
2004 + | /* UnionGenerator.kt:121 */
|
2005 + | /// Returns true if this is a [`Greeting`](crate::model::UnionPayload::Greeting).
|
2006 + | /* UnionGenerator.kt:122 */
|
2007 + | pub fn is_greeting(&self) -> bool {
|
2008 + | /* UnionGenerator.kt:123 */
|
2009 + | self.as_greeting().is_ok()
|
2010 + | /* UnionGenerator.kt:122 */
|
2011 + | }
|
2012 + | /* UnionGenerator.kt:111 */
|
2013 + | }
|
2014 + |
|
2015 + | /* EnumGenerator.kt:181 */
|
2016 + | #[allow(missing_docs)] // documentation missing in model
|
2017 + | /* RustType.kt:534 */
|
2018 + | #[derive(
|
2019 + | ::std::clone::Clone,
|
2020 + | ::std::cmp::Eq,
|
2021 + | ::std::cmp::Ord,
|
2022 + | ::std::cmp::PartialEq,
|
2023 + | ::std::cmp::PartialOrd,
|
2024 + | ::std::fmt::Debug,
|
2025 + | ::std::hash::Hash,
|
2026 + | )]
|
2027 + | pub /* EnumGenerator.kt:298 */ enum StringEnum {
|
2028 + | /* EnumGenerator.kt:181 */
|
2029 + | #[allow(missing_docs)] // documentation missing in model
|
2030 + | /* EnumGenerator.kt:170 */
|
2031 + | V,
|
2032 + | /* EnumGenerator.kt:298 */
|
2033 + | }
|
2034 + | /// /* CodegenDelegator.kt:52 */See [`StringEnum`](crate::model::StringEnum).
|
2035 + | pub mod string_enum {
|
2036 + | #[derive(Debug, PartialEq)]
|
2037 + | pub struct ConstraintViolation(pub(crate) ::std::string::String);
|
2038 + |
|
2039 + | impl ::std::fmt::Display for ConstraintViolation {
|
2040 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2041 + | write!(
|
2042 + | f,
|
2043 + | r#"Value provided for 'aws.protocoltests.restjson#StringEnum' failed to satisfy constraint: Member must satisfy enum value set: [enumvalue]"#
|
2044 + | )
|
2045 + | }
|
2046 + | }
|
2047 + |
|
2048 + | impl ::std::error::Error for ConstraintViolation {}
|
2049 + | impl ConstraintViolation {
|
2050 + | pub(crate) fn as_validation_exception_field(
|
2051 + | self,
|
2052 + | path: ::std::string::String,
|
2053 + | ) -> crate::model::ValidationExceptionField {
|
2054 + | crate::model::ValidationExceptionField {
|
2055 + | message: format!(
|
2056 + | r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [enumvalue]"#,
|
2057 + | &path
|
2058 + | ),
|
2059 + | path,
|
2060 + | }
|
2061 + | }
|
2062 + | }
|
2063 + |
|
2064 + | /* ServerEnumGenerator.kt:47 */
|
2065 + | }
|
2066 + | /* ServerEnumGenerator.kt:88 */
|
2067 + | impl ::std::convert::TryFrom<&str> for StringEnum {
|
2068 + | type Error = crate::model::string_enum::ConstraintViolation;
|
2069 + | fn try_from(
|
2070 + | s: &str,
|
2071 + | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
|
2072 + | match s {
|
2073 + | "enumvalue" => Ok(StringEnum::V),
|
2074 + | _ => Err(crate::model::string_enum::ConstraintViolation(s.to_owned())),
|
2075 + | }
|
2076 + | }
|
2077 + | }
|
2078 + | impl ::std::convert::TryFrom<::std::string::String> for StringEnum {
|
2079 + | type Error = crate::model::string_enum::ConstraintViolation;
|
2080 + | fn try_from(
|
2081 + | s: ::std::string::String,
|
2082 + | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
|
2083 + | {
|
2084 + | s.as_str().try_into()
|
2085 + | }
|
2086 + | }
|
2087 + | /* ServerEnumGenerator.kt:148 */
|
2088 + | impl std::str::FromStr for StringEnum {
|
2089 + | type Err = crate::model::string_enum::ConstraintViolation;
|
2090 + | fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
|
2091 + | Self::try_from(s)
|
2092 + | }
|
2093 + | }
|
2094 + | /* EnumGenerator.kt:309 */
|
2095 + | impl StringEnum {
|
2096 + | /// Returns the `&str` value of the enum member.
|
2097 + | pub fn as_str(&self) -> &str {
|
2098 + | match self {
|
2099 + | StringEnum::V => "enumvalue",
|
2100 + | }
|
2101 + | }
|
2102 + | /// Returns all the `&str` representations of the enum members.
|
2103 + | pub const fn values() -> &'static [&'static str] {
|
2104 + | &["enumvalue"]
|
2105 + | }
|
2106 + | }
|
2107 + | /* EnumGenerator.kt:254 */
|
2108 + | impl ::std::convert::AsRef<str> for StringEnum {
|
2109 + | fn as_ref(&self) -> &str {
|
2110 + | self.as_str()
|
2111 + | }
|
2112 + | }
|
2113 + | /* ConstrainedTraitForEnumGenerator.kt:36 */
|
2114 + | impl crate::constrained::Constrained for StringEnum {
|
2115 + | type Unconstrained = ::std::string::String;
|
2116 + | }
|
2117 + |
|
2118 + | impl ::std::convert::From<::std::string::String>
|
2119 + | for crate::constrained::MaybeConstrained<crate::model::StringEnum>
|
2120 + | {
|
2121 + | fn from(value: ::std::string::String) -> Self {
|
2122 + | Self::Unconstrained(value)
|
2123 + | }
|
2124 + | }
|
2125 + |
|
2126 + | /* StructureGenerator.kt:197 */
|
2127 + | #[allow(missing_docs)] // documentation missing in model
|
2128 + | /* RustType.kt:534 */
|
2129 + | #[derive(
|
2130 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
2131 + | )]
|
2132 + | pub /* StructureGenerator.kt:201 */ struct NestedPayload {
|
2133 + | /* StructureGenerator.kt:231 */
|
2134 + | #[allow(missing_docs)] // documentation missing in model
|
2135 + | pub greeting: ::std::option::Option<::std::string::String>,
|
2136 + | /* StructureGenerator.kt:231 */
|
2137 + | #[allow(missing_docs)] // documentation missing in model
|
2138 + | pub name: ::std::option::Option<::std::string::String>,
|
2139 + | /* StructureGenerator.kt:201 */
|
2140 + | }
|
2141 + | /* StructureGenerator.kt:135 */
|
2142 + | impl NestedPayload {
|
2143 + | /* StructureGenerator.kt:231 */
|
2144 + | #[allow(missing_docs)] // documentation missing in model
|
2145 + | /* StructureGenerator.kt:166 */
|
2146 + | pub fn greeting(&self) -> ::std::option::Option<&str> {
|
2147 + | /* StructureGenerator.kt:169 */
|
2148 + | self.greeting.as_deref()
|
2149 + | /* StructureGenerator.kt:166 */
|
2150 + | }
|
2151 + | /* StructureGenerator.kt:231 */
|
2152 + | #[allow(missing_docs)] // documentation missing in model
|
2153 + | /* StructureGenerator.kt:166 */
|
2154 + | pub fn name(&self) -> ::std::option::Option<&str> {
|
2155 + | /* StructureGenerator.kt:169 */
|
2156 + | self.name.as_deref()
|
2157 + | /* StructureGenerator.kt:166 */
|
2158 + | }
|
2159 + | /* StructureGenerator.kt:135 */
|
2160 + | }
|
2161 + | /* ServerCodegenVisitor.kt:356 */
|
2162 + | impl NestedPayload {
|
2163 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`NestedPayload`](crate::model::NestedPayload).
|
2164 + | /* ServerBuilderGenerator.kt:295 */
|
2165 + | pub fn builder() -> crate::model::nested_payload::Builder {
|
2166 + | /* ServerBuilderGenerator.kt:296 */
|
2167 + | crate::model::nested_payload::Builder::default()
|
2168 + | /* ServerBuilderGenerator.kt:295 */
|
2169 + | }
|
2170 + | /* ServerCodegenVisitor.kt:356 */
|
2171 + | }
|
2172 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
2173 + | impl crate::constrained::Constrained for crate::model::NestedPayload {
|
2174 + | type Unconstrained = crate::model::nested_payload::Builder;
|
2175 + | }
|
2176 + |
|
2177 + | /* ConstrainedCollectionGenerator.kt:93 */
|
2178 + | #[allow(missing_docs)] // documentation missing in model
|
2179 + | /// /* ConstrainedCollectionGenerator.kt:94 */
|
2180 + | /// This is a constrained type because its corresponding modeled Smithy shape has one or more
|
2181 + | /// [constraint traits]. Use [`IntegerSet::try_from`] to construct values of this type.
|
2182 + | ///
|
2183 + | /// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
|
2184 + | ///
|
2185 + | /* RustType.kt:534 */
|
2186 + | #[derive(
|
2187 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
2188 + | )]
|
2189 + | pub /* ConstrainedCollectionGenerator.kt:97 */ struct IntegerSet(pub(crate) ::std::vec::Vec<i32>);
|
2190 + | /* ConstrainedCollectionGenerator.kt:104 */
|
2191 + | impl IntegerSet {
|
2192 + | /* ConstrainedCollectionGenerator.kt:106 */
|
2193 + | /// Returns an immutable reference to the underlying [`::std::vec::Vec<i32>`].
|
2194 + | pub fn inner(&self) -> &::std::vec::Vec<i32> {
|
2195 + | &self.0
|
2196 + | }
|
2197 + | /* ConstrainedCollectionGenerator.kt:116 */
|
2198 + | /// Consumes the value, returning the underlying [`::std::vec::Vec<i32>`].
|
2199 + | pub fn into_inner(self) -> ::std::vec::Vec<i32> {
|
2200 + | self.0
|
2201 + | }
|
2202 + |
|
2203 + | fn check_unique_items(
|
2204 + | items: ::std::vec::Vec<i32>,
|
2205 + | ) -> ::std::result::Result<::std::vec::Vec<i32>, crate::model::integer_set::ConstraintViolation>
|
2206 + | {
|
2207 + | let mut seen = ::std::collections::HashMap::new();
|
2208 + | let mut duplicate_indices = ::std::vec::Vec::new();
|
2209 + | for (idx, item) in items.iter().enumerate() {
|
2210 + | if let Some(prev_idx) = seen.insert(item, idx) {
|
2211 + | duplicate_indices.push(prev_idx);
|
2212 + | }
|
2213 + | }
|
2214 + |
|
2215 + | let mut last_duplicate_indices = ::std::vec::Vec::new();
|
2216 + | for idx in &duplicate_indices {
|
2217 + | if let Some(prev_idx) = seen.remove(&items[*idx]) {
|
2218 + | last_duplicate_indices.push(prev_idx);
|
2219 + | }
|
2220 + | }
|
2221 + | duplicate_indices.extend(last_duplicate_indices);
|
2222 + |
|
2223 + | if !duplicate_indices.is_empty() {
|
2224 + | debug_assert!(duplicate_indices.len() >= 2);
|
2225 + | Err(
|
2226 + | crate::model::integer_set::ConstraintViolation::UniqueItems {
|
2227 + | duplicate_indices,
|
2228 + | original: items,
|
2229 + | },
|
2230 + | )
|
2231 + | } else {
|
2232 + | Ok(items)
|
2233 + | }
|
2234 + | }
|
2235 + | /* ConstrainedCollectionGenerator.kt:104 */
|
2236 + | }
|
2237 + | /* ConstrainedCollectionGenerator.kt:133 */
|
2238 + | impl ::std::convert::TryFrom<::std::vec::Vec<i32>> for IntegerSet {
|
2239 + | type Error = crate::model::integer_set::ConstraintViolation;
|
2240 + |
|
2241 + | /// Constructs a `IntegerSet` from an [`::std::vec::Vec<i32>`], failing when the provided value does not satisfy the modeled constraints.
|
2242 + | fn try_from(value: ::std::vec::Vec<i32>) -> ::std::result::Result<Self, Self::Error> {
|
2243 + | let value = Self::check_unique_items(value)?;
|
2244 + |
|
2245 + | Ok(Self(value))
|
2246 + | }
|
2247 + | }
|
2248 + |
|
2249 + | impl ::std::convert::From<IntegerSet> for ::std::vec::Vec<i32> {
|
2250 + | fn from(value: IntegerSet) -> Self {
|
2251 + | value.into_inner()
|
2252 + | }
|
2253 + | }
|
2254 + | /* ConstrainedCollectionGenerator.kt:181 */
|
2255 + | impl crate::constrained::Constrained for IntegerSet {
|
2256 + | type Unconstrained = crate::unconstrained::integer_set_unconstrained::IntegerSetUnconstrained;
|
2257 + | }
|
2258 + |
|
2259 + | /// /* ServerBuilderGenerator.kt:171 */See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
2260 + | pub mod validation_exception_field {
|
2261 + |
|
2262 + | /* RustType.kt:534 */
|
2263 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2264 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2265 + | /* RustType.kt:534 */
|
2266 + | #[non_exhaustive]
|
2267 + | /* ServerBuilderConstraintViolations.kt:75 */
|
2268 + | #[allow(clippy::enum_variant_names)]
|
2269 + | pub enum ConstraintViolation {
|
2270 + | /// /* ServerBuilderConstraintViolations.kt:137 */`path` was not provided but it is required when building `ValidationExceptionField`.
|
2271 + | /* ServerBuilderConstraintViolations.kt:144 */
|
2272 + | MissingPath,
|
2273 + | /// /* ServerBuilderConstraintViolations.kt:137 */`message` was not provided but it is required when building `ValidationExceptionField`.
|
2274 + | /* ServerBuilderConstraintViolations.kt:144 */
|
2275 + | MissingMessage,
|
2276 + | /* ServerBuilderConstraintViolations.kt:75 */
|
2277 + | }
|
2278 + | /* ServerBuilderConstraintViolations.kt:116 */
|
2279 + | impl ::std::fmt::Display for ConstraintViolation {
|
2280 + | /* ServerBuilderConstraintViolations.kt:117 */
|
2281 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2282 + | /* ServerBuilderConstraintViolations.kt:118 */
|
2283 + | match self {
|
2284 + | /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
|
2285 + | /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
|
2286 + | /* ServerBuilderConstraintViolations.kt:118 */}
|
2287 + | /* ServerBuilderConstraintViolations.kt:117 */
|
2288 + | }
|
2289 + | /* ServerBuilderConstraintViolations.kt:116 */
|
2290 + | }
|
2291 + | /* ServerBuilderConstraintViolations.kt:83 */
|
2292 + | impl ::std::error::Error for ConstraintViolation {}
|
2293 + | /* ServerBuilderGenerator.kt:446 */
|
2294 + | impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
|
2295 + | type Error = ConstraintViolation;
|
2296 + |
|
2297 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2298 + | builder.build()
|
2299 + | }
|
2300 + | }
|
2301 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
2302 + | /* RustType.kt:534 */
|
2303 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2304 + | /* ServerBuilderGenerator.kt:211 */
|
2305 + | pub struct Builder {
|
2306 + | /* ServerBuilderGenerator.kt:308 */
|
2307 + | pub(crate) path: ::std::option::Option<::std::string::String>,
|
2308 + | /* ServerBuilderGenerator.kt:308 */
|
2309 + | pub(crate) message: ::std::option::Option<::std::string::String>,
|
2310 + | /* ServerBuilderGenerator.kt:211 */
|
2311 + | }
|
2312 + | /* ServerBuilderGenerator.kt:215 */
|
2313 + | impl Builder {
|
2314 + | /// /* ServerBuilderGenerator.kt:331 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
2315 + | /* ServerBuilderGenerator.kt:343 */
|
2316 + | pub fn path(mut self, input: ::std::string::String) -> Self {
|
2317 + | /* ServerBuilderGenerator.kt:344 */
|
2318 + | self.path =
|
2319 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2320 + | /* ServerBuilderGenerator.kt:376 */input
|
2321 + | /* ServerBuilderGenerator.kt:345 */)
|
2322 + | /* ServerBuilderGenerator.kt:344 */;
|
2323 + | self
|
2324 + | /* ServerBuilderGenerator.kt:343 */
|
2325 + | }
|
2326 + | /// /* ServerBuilderGenerator.kt:331 */A detailed description of the validation failure.
|
2327 + | /* ServerBuilderGenerator.kt:343 */
|
2328 + | pub fn message(mut self, input: ::std::string::String) -> Self {
|
2329 + | /* ServerBuilderGenerator.kt:344 */
|
2330 + | self.message =
|
2331 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2332 + | /* ServerBuilderGenerator.kt:376 */input
|
2333 + | /* ServerBuilderGenerator.kt:345 */)
|
2334 + | /* ServerBuilderGenerator.kt:344 */;
|
2335 + | self
|
2336 + | /* ServerBuilderGenerator.kt:343 */
|
2337 + | }
|
2338 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
2339 + | /// /* ServerBuilderGenerator.kt:260 */
|
2340 + | /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if a [`ConstraintViolation`] occurs.
|
2341 + | ///
|
2342 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
2343 + | /* ServerBuilderGenerator.kt:271 */
|
2344 + | pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
|
2345 + | self.build_enforcing_all_constraints()
|
2346 + | }
|
2347 + | /* ServerBuilderGenerator.kt:283 */
|
2348 + | fn build_enforcing_all_constraints(
|
2349 + | self,
|
2350 + | ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
|
2351 + | /* ServerBuilderGenerator.kt:287 */
|
2352 + | Ok(
|
2353 + | /* ServerBuilderGenerator.kt:542 */
|
2354 + | crate::model::ValidationExceptionField {
|
2355 + | /* ServerBuilderGenerator.kt:546 */
|
2356 + | path: self
|
2357 + | .path
|
2358 + | /* ServerBuilderGenerator.kt:569 */
|
2359 + | .ok_or(ConstraintViolation::MissingPath)?,
|
2360 + | /* ServerBuilderGenerator.kt:546 */
|
2361 + | message: self
|
2362 + | .message
|
2363 + | /* ServerBuilderGenerator.kt:569 */
|
2364 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
2365 + | /* ServerBuilderGenerator.kt:542 */
|
2366 + | }, /* ServerBuilderGenerator.kt:287 */
|
2367 + | )
|
2368 + | /* ServerBuilderGenerator.kt:283 */
|
2369 + | }
|
2370 + | /* ServerBuilderGenerator.kt:215 */
|
2371 + | }
|
2372 + |
|
2373 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2374 + | }
|
2375 + | /// /* ServerBuilderGenerator.kt:171 */See [`Dialog`](crate::model::Dialog).
|
2376 + | pub mod dialog {
|
2377 + |
|
2378 + | /* ServerBuilderGenerator.kt:461 */
|
2379 + | impl ::std::convert::From<Builder> for crate::model::Dialog {
|
2380 + | fn from(builder: Builder) -> Self {
|
2381 + | builder.build()
|
2382 + | }
|
2383 + | }
|
2384 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Dialog`](crate::model::Dialog).
|
2385 + | /* RustType.kt:534 */
|
2386 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2387 + | /* ServerBuilderGenerator.kt:211 */
|
2388 + | pub struct Builder {
|
2389 + | /* ServerBuilderGenerator.kt:308 */
|
2390 + | pub(crate) language: ::std::option::Option<::std::string::String>,
|
2391 + | /* ServerBuilderGenerator.kt:308 */
|
2392 + | pub(crate) greeting: ::std::option::Option<::std::string::String>,
|
2393 + | /* ServerBuilderGenerator.kt:308 */
|
2394 + | pub(crate) farewell: ::std::option::Option<crate::model::Farewell>,
|
2395 + | /* ServerBuilderGenerator.kt:211 */
|
2396 + | }
|
2397 + | /* ServerBuilderGenerator.kt:215 */
|
2398 + | impl Builder {
|
2399 + | /* ServerBuilderGenerator.kt:331 */
|
2400 + | #[allow(missing_docs)] // documentation missing in model
|
2401 + | /* ServerBuilderGenerator.kt:343 */
|
2402 + | pub fn language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
2403 + | /* ServerBuilderGenerator.kt:344 */
|
2404 + | self.language =
|
2405 + | /* ServerBuilderGenerator.kt:376 */input
|
2406 + | /* ServerBuilderGenerator.kt:344 */;
|
2407 + | self
|
2408 + | /* ServerBuilderGenerator.kt:343 */
|
2409 + | }
|
2410 + | /* ServerBuilderGenerator.kt:426 */
|
2411 + | #[allow(missing_docs)] // documentation missing in model
|
2412 + | /* ServerBuilderGenerator.kt:428 */
|
2413 + | pub(crate) fn set_language(
|
2414 + | mut self,
|
2415 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
2416 + | ) -> Self {
|
2417 + | /* ServerBuilderGenerator.kt:429 */
|
2418 + | self.language = input.map(|v| v.into());
|
2419 + | self
|
2420 + | /* ServerBuilderGenerator.kt:428 */
|
2421 + | }
|
2422 + | /* ServerBuilderGenerator.kt:331 */
|
2423 + | #[allow(missing_docs)] // documentation missing in model
|
2424 + | /* ServerBuilderGenerator.kt:343 */
|
2425 + | pub fn greeting(mut self, input: ::std::string::String) -> Self {
|
2426 + | /* ServerBuilderGenerator.kt:344 */
|
2427 + | self.greeting =
|
2428 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2429 + | /* ServerBuilderGenerator.kt:376 */input
|
2430 + | /* ServerBuilderGenerator.kt:345 */)
|
2431 + | /* ServerBuilderGenerator.kt:344 */;
|
2432 + | self
|
2433 + | /* ServerBuilderGenerator.kt:343 */
|
2434 + | }
|
2435 + | /* ServerBuilderGenerator.kt:426 */
|
2436 + | #[allow(missing_docs)] // documentation missing in model
|
2437 + | /* ServerBuilderGenerator.kt:428 */
|
2438 + | pub(crate) fn set_greeting(
|
2439 + | mut self,
|
2440 + | input: impl ::std::convert::Into<::std::string::String>,
|
2441 + | ) -> Self {
|
2442 + | /* ServerBuilderGenerator.kt:429 */
|
2443 + | self.greeting = Some(input.into());
|
2444 + | self
|
2445 + | /* ServerBuilderGenerator.kt:428 */
|
2446 + | }
|
2447 + | /* ServerBuilderGenerator.kt:331 */
|
2448 + | #[allow(missing_docs)] // documentation missing in model
|
2449 + | /* ServerBuilderGenerator.kt:343 */
|
2450 + | pub fn farewell(mut self, input: ::std::option::Option<crate::model::Farewell>) -> Self {
|
2451 + | /* ServerBuilderGenerator.kt:344 */
|
2452 + | self.farewell =
|
2453 + | /* ServerBuilderGenerator.kt:376 */input
|
2454 + | /* ServerBuilderGenerator.kt:344 */;
|
2455 + | self
|
2456 + | /* ServerBuilderGenerator.kt:343 */
|
2457 + | }
|
2458 + | /* ServerBuilderGenerator.kt:426 */
|
2459 + | #[allow(missing_docs)] // documentation missing in model
|
2460 + | /* ServerBuilderGenerator.kt:428 */
|
2461 + | pub(crate) fn set_farewell(
|
2462 + | mut self,
|
2463 + | input: Option<impl ::std::convert::Into<crate::model::Farewell>>,
|
2464 + | ) -> Self {
|
2465 + | /* ServerBuilderGenerator.kt:429 */
|
2466 + | self.farewell = input.map(|v| v.into());
|
2467 + | self
|
2468 + | /* ServerBuilderGenerator.kt:428 */
|
2469 + | }
|
2470 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Dialog`](crate::model::Dialog).
|
2471 + | /* ServerBuilderGenerator.kt:271 */
|
2472 + | pub fn build(self) -> crate::model::Dialog {
|
2473 + | self.build_enforcing_all_constraints()
|
2474 + | }
|
2475 + | /* ServerBuilderGenerator.kt:283 */
|
2476 + | fn build_enforcing_all_constraints(self) -> crate::model::Dialog {
|
2477 + | /* ServerBuilderGenerator.kt:542 */
|
2478 + | crate::model::Dialog {
|
2479 + | /* ServerBuilderGenerator.kt:546 */
|
2480 + | language: self.language,
|
2481 + | /* ServerBuilderGenerator.kt:546 */
|
2482 + | greeting: self
|
2483 + | .greeting
|
2484 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
2485 + | .unwrap_or_else(|| String::from("hi")),
|
2486 + | /* ServerBuilderGenerator.kt:546 */
|
2487 + | farewell: self.farewell,
|
2488 + | /* ServerBuilderGenerator.kt:542 */
|
2489 + | }
|
2490 + | /* ServerBuilderGenerator.kt:283 */
|
2491 + | }
|
2492 + | /* ServerBuilderGenerator.kt:215 */
|
2493 + | }
|
2494 + |
|
2495 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2496 + | }
|
2497 + | /// /* ServerBuilderGenerator.kt:171 */See [`Farewell`](crate::model::Farewell).
|
2498 + | pub mod farewell {
|
2499 + |
|
2500 + | /* ServerBuilderGenerator.kt:461 */
|
2501 + | impl ::std::convert::From<Builder> for crate::model::Farewell {
|
2502 + | fn from(builder: Builder) -> Self {
|
2503 + | builder.build()
|
2504 + | }
|
2505 + | }
|
2506 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Farewell`](crate::model::Farewell).
|
2507 + | /* RustType.kt:534 */
|
2508 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2509 + | /* ServerBuilderGenerator.kt:211 */
|
2510 + | pub struct Builder {
|
2511 + | /* ServerBuilderGenerator.kt:308 */
|
2512 + | pub(crate) phrase: ::std::option::Option<::std::string::String>,
|
2513 + | /* ServerBuilderGenerator.kt:211 */
|
2514 + | }
|
2515 + | /* ServerBuilderGenerator.kt:215 */
|
2516 + | impl Builder {
|
2517 + | /* ServerBuilderGenerator.kt:331 */
|
2518 + | #[allow(missing_docs)] // documentation missing in model
|
2519 + | /* ServerBuilderGenerator.kt:343 */
|
2520 + | pub fn phrase(mut self, input: ::std::string::String) -> Self {
|
2521 + | /* ServerBuilderGenerator.kt:344 */
|
2522 + | self.phrase =
|
2523 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2524 + | /* ServerBuilderGenerator.kt:376 */input
|
2525 + | /* ServerBuilderGenerator.kt:345 */)
|
2526 + | /* ServerBuilderGenerator.kt:344 */;
|
2527 + | self
|
2528 + | /* ServerBuilderGenerator.kt:343 */
|
2529 + | }
|
2530 + | /* ServerBuilderGenerator.kt:426 */
|
2531 + | #[allow(missing_docs)] // documentation missing in model
|
2532 + | /* ServerBuilderGenerator.kt:428 */
|
2533 + | pub(crate) fn set_phrase(
|
2534 + | mut self,
|
2535 + | input: impl ::std::convert::Into<::std::string::String>,
|
2536 + | ) -> Self {
|
2537 + | /* ServerBuilderGenerator.kt:429 */
|
2538 + | self.phrase = Some(input.into());
|
2539 + | self
|
2540 + | /* ServerBuilderGenerator.kt:428 */
|
2541 + | }
|
2542 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
|
2543 + | /* ServerBuilderGenerator.kt:271 */
|
2544 + | pub fn build(self) -> crate::model::Farewell {
|
2545 + | self.build_enforcing_all_constraints()
|
2546 + | }
|
2547 + | /* ServerBuilderGenerator.kt:283 */
|
2548 + | fn build_enforcing_all_constraints(self) -> crate::model::Farewell {
|
2549 + | /* ServerBuilderGenerator.kt:542 */
|
2550 + | crate::model::Farewell {
|
2551 + | /* ServerBuilderGenerator.kt:546 */
|
2552 + | phrase: self
|
2553 + | .phrase
|
2554 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
2555 + | .unwrap_or_else(|| String::from("bye")),
|
2556 + | /* ServerBuilderGenerator.kt:542 */
|
2557 + | }
|
2558 + | /* ServerBuilderGenerator.kt:283 */
|
2559 + | }
|
2560 + | /* ServerBuilderGenerator.kt:215 */
|
2561 + | }
|
2562 + |
|
2563 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2564 + | }
|
2565 + | /// /* ServerBuilderGenerator.kt:171 */See [`TopLevel`](crate::model::TopLevel).
|
2566 + | pub mod top_level {
|
2567 + |
|
2568 + | /* RustType.kt:534 */
|
2569 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2570 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2571 + | /* RustType.kt:534 */
|
2572 + | #[non_exhaustive]
|
2573 + | /* ServerBuilderConstraintViolations.kt:75 */
|
2574 + | #[allow(clippy::enum_variant_names)]
|
2575 + | pub enum ConstraintViolation {
|
2576 + | /// /* ServerBuilderConstraintViolations.kt:137 */`dialog` was not provided but it is required when building `TopLevel`.
|
2577 + | /* ServerBuilderConstraintViolations.kt:144 */
|
2578 + | MissingDialog,
|
2579 + | /* ServerBuilderConstraintViolations.kt:75 */
|
2580 + | }
|
2581 + | /* ServerBuilderConstraintViolations.kt:116 */
|
2582 + | impl ::std::fmt::Display for ConstraintViolation {
|
2583 + | /* ServerBuilderConstraintViolations.kt:117 */
|
2584 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2585 + | /* ServerBuilderConstraintViolations.kt:118 */
|
2586 + | match self {
|
2587 + | /* ServerBuilderConstraintViolations.kt:126 */
|
2588 + | ConstraintViolation::MissingDialog => write!(
|
2589 + | f,
|
2590 + | "`dialog` was not provided but it is required when building `TopLevel`"
|
2591 + | ),
|
2592 + | /* ServerBuilderConstraintViolations.kt:118 */
|
2593 + | }
|
2594 + | /* ServerBuilderConstraintViolations.kt:117 */
|
2595 + | }
|
2596 + | /* ServerBuilderConstraintViolations.kt:116 */
|
2597 + | }
|
2598 + | /* ServerBuilderConstraintViolations.kt:83 */
|
2599 + | impl ::std::error::Error for ConstraintViolation {}
|
2600 + | /* ServerBuilderConstraintViolations.kt:172 */
|
2601 + | impl ConstraintViolation {
|
2602 + | pub(crate) fn as_validation_exception_field(
|
2603 + | self,
|
2604 + | path: ::std::string::String,
|
2605 + | ) -> crate::model::ValidationExceptionField {
|
2606 + | match self {
|
2607 + | ConstraintViolation::MissingDialog => crate::model::ValidationExceptionField {
|
2608 + | message: format!("Value at '{}/dialog' failed to satisfy constraint: Member must not be null", path),
|
2609 + | path: path + "/dialog",
|
2610 + | },
|
2611 + | }
|
2612 + | }
|
2613 + | }
|
2614 + | /* ServerBuilderGenerator.kt:244 */
|
2615 + | impl ::std::convert::From<Builder>
|
2616 + | for crate::constrained::MaybeConstrained<crate::model::TopLevel>
|
2617 + | {
|
2618 + | fn from(builder: Builder) -> Self {
|
2619 + | Self::Unconstrained(builder)
|
2620 + | }
|
2621 + | }
|
2622 + | /* ServerBuilderGenerator.kt:446 */
|
2623 + | impl ::std::convert::TryFrom<Builder> for crate::model::TopLevel {
|
2624 + | type Error = ConstraintViolation;
|
2625 + |
|
2626 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2627 + | builder.build()
|
2628 + | }
|
2629 + | }
|
2630 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`TopLevel`](crate::model::TopLevel).
|
2631 + | /* RustType.kt:534 */
|
2632 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2633 + | /* ServerBuilderGenerator.kt:211 */
|
2634 + | pub struct Builder {
|
2635 + | /* ServerBuilderGenerator.kt:308 */
|
2636 + | pub(crate) dialog: ::std::option::Option<crate::model::Dialog>,
|
2637 + | /* ServerBuilderGenerator.kt:308 */
|
2638 + | pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::model::Dialog>>,
|
2639 + | /* ServerBuilderGenerator.kt:308 */
|
2640 + | pub(crate) dialog_map: ::std::option::Option<
|
2641 + | ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
2642 + | >,
|
2643 + | /* ServerBuilderGenerator.kt:211 */
|
2644 + | }
|
2645 + | /* ServerBuilderGenerator.kt:215 */
|
2646 + | impl Builder {
|
2647 + | /* ServerBuilderGenerator.kt:331 */
|
2648 + | #[allow(missing_docs)] // documentation missing in model
|
2649 + | /* ServerBuilderGenerator.kt:343 */
|
2650 + | pub fn dialog(mut self, input: crate::model::Dialog) -> Self {
|
2651 + | /* ServerBuilderGenerator.kt:344 */
|
2652 + | self.dialog =
|
2653 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2654 + | /* ServerBuilderGenerator.kt:376 */input
|
2655 + | /* ServerBuilderGenerator.kt:345 */)
|
2656 + | /* ServerBuilderGenerator.kt:344 */;
|
2657 + | self
|
2658 + | /* ServerBuilderGenerator.kt:343 */
|
2659 + | }
|
2660 + | /* ServerBuilderGenerator.kt:426 */
|
2661 + | #[allow(missing_docs)] // documentation missing in model
|
2662 + | /* ServerBuilderGenerator.kt:428 */
|
2663 + | pub(crate) fn set_dialog(
|
2664 + | mut self,
|
2665 + | input: impl ::std::convert::Into<crate::model::Dialog>,
|
2666 + | ) -> Self {
|
2667 + | /* ServerBuilderGenerator.kt:429 */
|
2668 + | self.dialog = Some(input.into());
|
2669 + | self
|
2670 + | /* ServerBuilderGenerator.kt:428 */
|
2671 + | }
|
2672 + | /* ServerBuilderGenerator.kt:331 */
|
2673 + | #[allow(missing_docs)] // documentation missing in model
|
2674 + | /* ServerBuilderGenerator.kt:343 */
|
2675 + | pub fn dialog_list(mut self, input: ::std::vec::Vec<crate::model::Dialog>) -> Self {
|
2676 + | /* ServerBuilderGenerator.kt:344 */
|
2677 + | self.dialog_list =
|
2678 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2679 + | /* ServerBuilderGenerator.kt:376 */input
|
2680 + | /* ServerBuilderGenerator.kt:345 */)
|
2681 + | /* ServerBuilderGenerator.kt:344 */;
|
2682 + | self
|
2683 + | /* ServerBuilderGenerator.kt:343 */
|
2684 + | }
|
2685 + | /* ServerBuilderGenerator.kt:426 */
|
2686 + | #[allow(missing_docs)] // documentation missing in model
|
2687 + | /* ServerBuilderGenerator.kt:428 */
|
2688 + | pub(crate) fn set_dialog_list(
|
2689 + | mut self,
|
2690 + | input: impl ::std::convert::Into<::std::vec::Vec<crate::model::Dialog>>,
|
2691 + | ) -> Self {
|
2692 + | /* ServerBuilderGenerator.kt:429 */
|
2693 + | self.dialog_list = Some(input.into());
|
2694 + | self
|
2695 + | /* ServerBuilderGenerator.kt:428 */
|
2696 + | }
|
2697 + | /* ServerBuilderGenerator.kt:331 */
|
2698 + | #[allow(missing_docs)] // documentation missing in model
|
2699 + | /* ServerBuilderGenerator.kt:343 */
|
2700 + | pub fn dialog_map(
|
2701 + | mut self,
|
2702 + | input: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
2703 + | ) -> Self {
|
2704 + | /* ServerBuilderGenerator.kt:344 */
|
2705 + | self.dialog_map =
|
2706 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2707 + | /* ServerBuilderGenerator.kt:376 */input
|
2708 + | /* ServerBuilderGenerator.kt:345 */)
|
2709 + | /* ServerBuilderGenerator.kt:344 */;
|
2710 + | self
|
2711 + | /* ServerBuilderGenerator.kt:343 */
|
2712 + | }
|
2713 + | /* ServerBuilderGenerator.kt:426 */
|
2714 + | #[allow(missing_docs)] // documentation missing in model
|
2715 + | /* ServerBuilderGenerator.kt:428 */
|
2716 + | pub(crate) fn set_dialog_map(
|
2717 + | mut self,
|
2718 + | input: impl ::std::convert::Into<
|
2719 + | ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
2720 + | >,
|
2721 + | ) -> Self {
|
2722 + | /* ServerBuilderGenerator.kt:429 */
|
2723 + | self.dialog_map = Some(input.into());
|
2724 + | self
|
2725 + | /* ServerBuilderGenerator.kt:428 */
|
2726 + | }
|
2727 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
|
2728 + | /// /* ServerBuilderGenerator.kt:260 */
|
2729 + | /// The builder fails to construct a [`TopLevel`](crate::model::TopLevel) if a [`ConstraintViolation`] occurs.
|
2730 + | ///
|
2731 + | /* ServerBuilderGenerator.kt:271 */
|
2732 + | pub fn build(self) -> Result<crate::model::TopLevel, ConstraintViolation> {
|
2733 + | self.build_enforcing_all_constraints()
|
2734 + | }
|
2735 + | /* ServerBuilderGenerator.kt:283 */
|
2736 + | fn build_enforcing_all_constraints(
|
2737 + | self,
|
2738 + | ) -> Result<crate::model::TopLevel, ConstraintViolation> {
|
2739 + | /* ServerBuilderGenerator.kt:287 */
|
2740 + | Ok(
|
2741 + | /* ServerBuilderGenerator.kt:542 */
|
2742 + | crate::model::TopLevel {
|
2743 + | /* ServerBuilderGenerator.kt:546 */
|
2744 + | dialog: self
|
2745 + | .dialog
|
2746 + | /* ServerBuilderGenerator.kt:569 */
|
2747 + | .ok_or(ConstraintViolation::MissingDialog)?,
|
2748 + | /* ServerBuilderGenerator.kt:546 */
|
2749 + | dialog_list: self
|
2750 + | .dialog_list
|
2751 + | /* ServerBuilderGeneratorCommon.kt:95 */
|
2752 + | .unwrap_or_default(),
|
2753 + | /* ServerBuilderGenerator.kt:546 */
|
2754 + | dialog_map: self
|
2755 + | .dialog_map
|
2756 + | /* ServerBuilderGeneratorCommon.kt:95 */
|
2757 + | .unwrap_or_default(),
|
2758 + | /* ServerBuilderGenerator.kt:542 */
|
2759 + | }, /* ServerBuilderGenerator.kt:287 */
|
2760 + | )
|
2761 + | /* ServerBuilderGenerator.kt:283 */
|
2762 + | }
|
2763 + | /* ServerBuilderGenerator.kt:215 */
|
2764 + | }
|
2765 + |
|
2766 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2767 + | }
|
2768 + | /// /* ServerBuilderGenerator.kt:171 */See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
2769 + | pub mod client_optional_defaults {
|
2770 + |
|
2771 + | /* ServerBuilderGenerator.kt:461 */
|
2772 + | impl ::std::convert::From<Builder> for crate::model::ClientOptionalDefaults {
|
2773 + | fn from(builder: Builder) -> Self {
|
2774 + | builder.build()
|
2775 + | }
|
2776 + | }
|
2777 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
2778 + | /* RustType.kt:534 */
|
2779 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2780 + | /* ServerBuilderGenerator.kt:211 */
|
2781 + | pub struct Builder {
|
2782 + | /* ServerBuilderGenerator.kt:308 */
|
2783 + | pub(crate) member: ::std::option::Option<i32>,
|
2784 + | /* ServerBuilderGenerator.kt:211 */
|
2785 + | }
|
2786 + | /* ServerBuilderGenerator.kt:215 */
|
2787 + | impl Builder {
|
2788 + | /* ServerBuilderGenerator.kt:331 */
|
2789 + | #[allow(missing_docs)] // documentation missing in model
|
2790 + | /* ServerBuilderGenerator.kt:343 */
|
2791 + | pub fn member(mut self, input: i32) -> Self {
|
2792 + | /* ServerBuilderGenerator.kt:344 */
|
2793 + | self.member =
|
2794 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2795 + | /* ServerBuilderGenerator.kt:376 */input
|
2796 + | /* ServerBuilderGenerator.kt:345 */)
|
2797 + | /* ServerBuilderGenerator.kt:344 */;
|
2798 + | self
|
2799 + | /* ServerBuilderGenerator.kt:343 */
|
2800 + | }
|
2801 + | /* ServerBuilderGenerator.kt:426 */
|
2802 + | #[allow(missing_docs)] // documentation missing in model
|
2803 + | /* ServerBuilderGenerator.kt:428 */
|
2804 + | pub(crate) fn set_member(mut self, input: impl ::std::convert::Into<i32>) -> Self {
|
2805 + | /* ServerBuilderGenerator.kt:429 */
|
2806 + | self.member = Some(input.into());
|
2807 + | self
|
2808 + | /* ServerBuilderGenerator.kt:428 */
|
2809 + | }
|
2810 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
2811 + | /* ServerBuilderGenerator.kt:271 */
|
2812 + | pub fn build(self) -> crate::model::ClientOptionalDefaults {
|
2813 + | self.build_enforcing_all_constraints()
|
2814 + | }
|
2815 + | /* ServerBuilderGenerator.kt:283 */
|
2816 + | fn build_enforcing_all_constraints(self) -> crate::model::ClientOptionalDefaults {
|
2817 + | /* ServerBuilderGenerator.kt:542 */
|
2818 + | crate::model::ClientOptionalDefaults {
|
2819 + | /* ServerBuilderGenerator.kt:546 */
|
2820 + | member: self
|
2821 + | .member
|
2822 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
2823 + | .unwrap_or(0i32),
|
2824 + | /* ServerBuilderGenerator.kt:542 */
|
2825 + | }
|
2826 + | /* ServerBuilderGenerator.kt:283 */
|
2827 + | }
|
2828 + | /* ServerBuilderGenerator.kt:215 */
|
2829 + | }
|
2830 + |
|
2831 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2832 + | }
|
2833 + | /// /* ServerBuilderGenerator.kt:171 */See [`Defaults`](crate::model::Defaults).
|
2834 + | pub mod defaults {
|
2835 + |
|
2836 + | /* RustType.kt:534 */
|
2837 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2838 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2839 + | /* RustType.kt:534 */
|
2840 + | #[non_exhaustive]
|
2841 + | /* ServerBuilderConstraintViolations.kt:75 */
|
2842 + | #[allow(clippy::enum_variant_names)]
|
2843 + | pub enum ConstraintViolation {
|
2844 + | /// /* ServerBuilderConstraintViolations.kt:159 */Constraint violation occurred building member `default_enum` when building `Defaults`.
|
2845 + | /* RustType.kt:534 */
|
2846 + | #[doc(hidden)]
|
2847 + | /* ServerBuilderConstraintViolations.kt:165 */
|
2848 + | DefaultEnum(crate::model::test_enum::ConstraintViolation),
|
2849 + | /* ServerBuilderConstraintViolations.kt:75 */
|
2850 + | }
|
2851 + | /* ServerBuilderConstraintViolations.kt:116 */
|
2852 + | impl ::std::fmt::Display for ConstraintViolation {
|
2853 + | /* ServerBuilderConstraintViolations.kt:117 */
|
2854 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2855 + | /* ServerBuilderConstraintViolations.kt:118 */
|
2856 + | match self {
|
2857 + | /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::DefaultEnum(_) => write!(f, "constraint violation occurred building member `default_enum` when building `Defaults`"),
|
2858 + | /* ServerBuilderConstraintViolations.kt:118 */}
|
2859 + | /* ServerBuilderConstraintViolations.kt:117 */
|
2860 + | }
|
2861 + | /* ServerBuilderConstraintViolations.kt:116 */
|
2862 + | }
|
2863 + | /* ServerBuilderConstraintViolations.kt:83 */
|
2864 + | impl ::std::error::Error for ConstraintViolation {}
|
2865 + | /* ServerBuilderConstraintViolations.kt:172 */
|
2866 + | impl ConstraintViolation {
|
2867 + | pub(crate) fn as_validation_exception_field(
|
2868 + | self,
|
2869 + | path: ::std::string::String,
|
2870 + | ) -> crate::model::ValidationExceptionField {
|
2871 + | match self {
|
2872 + | ConstraintViolation::DefaultEnum(inner) => {
|
2873 + | inner.as_validation_exception_field(path + "/defaultEnum")
|
2874 + | }
|
2875 + | }
|
2876 + | }
|
2877 + | }
|
2878 + | /* ServerBuilderGenerator.kt:244 */
|
2879 + | impl ::std::convert::From<Builder>
|
2880 + | for crate::constrained::MaybeConstrained<crate::model::Defaults>
|
2881 + | {
|
2882 + | fn from(builder: Builder) -> Self {
|
2883 + | Self::Unconstrained(builder)
|
2884 + | }
|
2885 + | }
|
2886 + | /* ServerBuilderGenerator.kt:446 */
|
2887 + | impl ::std::convert::TryFrom<Builder> for crate::model::Defaults {
|
2888 + | type Error = ConstraintViolation;
|
2889 + |
|
2890 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2891 + | builder.build()
|
2892 + | }
|
2893 + | }
|
2894 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Defaults`](crate::model::Defaults).
|
2895 + | /* RustType.kt:534 */
|
2896 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2897 + | /* ServerBuilderGenerator.kt:211 */
|
2898 + | pub struct Builder {
|
2899 + | /* ServerBuilderGenerator.kt:308 */
|
2900 + | pub(crate) default_string: ::std::option::Option<::std::string::String>,
|
2901 + | /* ServerBuilderGenerator.kt:308 */
|
2902 + | pub(crate) default_boolean: ::std::option::Option<bool>,
|
2903 + | /* ServerBuilderGenerator.kt:308 */
|
2904 + | pub(crate) default_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2905 + | /* ServerBuilderGenerator.kt:308 */
|
2906 + | pub(crate) default_document_map: ::std::option::Option<::aws_smithy_types::Document>,
|
2907 + | /* ServerBuilderGenerator.kt:308 */
|
2908 + | pub(crate) default_document_string: ::std::option::Option<::aws_smithy_types::Document>,
|
2909 + | /* ServerBuilderGenerator.kt:308 */
|
2910 + | pub(crate) default_document_boolean: ::std::option::Option<::aws_smithy_types::Document>,
|
2911 + | /* ServerBuilderGenerator.kt:308 */
|
2912 + | pub(crate) default_document_list: ::std::option::Option<::aws_smithy_types::Document>,
|
2913 + | /* ServerBuilderGenerator.kt:308 */
|
2914 + | pub(crate) default_null_document: ::std::option::Option<::aws_smithy_types::Document>,
|
2915 + | /* ServerBuilderGenerator.kt:308 */
|
2916 + | pub(crate) default_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
2917 + | /* ServerBuilderGenerator.kt:308 */
|
2918 + | pub(crate) default_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
2919 + | /* ServerBuilderGenerator.kt:308 */
|
2920 + | pub(crate) default_byte: ::std::option::Option<i8>,
|
2921 + | /* ServerBuilderGenerator.kt:308 */
|
2922 + | pub(crate) default_short: ::std::option::Option<i16>,
|
2923 + | /* ServerBuilderGenerator.kt:308 */
|
2924 + | pub(crate) default_integer: ::std::option::Option<i32>,
|
2925 + | /* ServerBuilderGenerator.kt:308 */
|
2926 + | pub(crate) default_long: ::std::option::Option<i64>,
|
2927 + | /* ServerBuilderGenerator.kt:308 */
|
2928 + | pub(crate) default_float: ::std::option::Option<f32>,
|
2929 + | /* ServerBuilderGenerator.kt:308 */
|
2930 + | pub(crate) default_double: ::std::option::Option<f64>,
|
2931 + | /* ServerBuilderGenerator.kt:308 */
|
2932 + | pub(crate) default_map: ::std::option::Option<
|
2933 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2934 + | >,
|
2935 + | /* ServerBuilderGenerator.kt:308 */
|
2936 + | pub(crate) default_enum:
|
2937 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::TestEnum>>,
|
2938 + | /* ServerBuilderGenerator.kt:308 */
|
2939 + | pub(crate) default_int_enum: ::std::option::Option<i32>,
|
2940 + | /* ServerBuilderGenerator.kt:308 */
|
2941 + | pub(crate) empty_string: ::std::option::Option<::std::string::String>,
|
2942 + | /* ServerBuilderGenerator.kt:308 */
|
2943 + | pub(crate) false_boolean: ::std::option::Option<bool>,
|
2944 + | /* ServerBuilderGenerator.kt:308 */
|
2945 + | pub(crate) empty_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
2946 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) zero_byte: ::std::option::Option<i8>,
|
2947 + | /* ServerBuilderGenerator.kt:308 */
|
2948 + | pub(crate) zero_short: ::std::option::Option<i16>,
|
2949 + | /* ServerBuilderGenerator.kt:308 */
|
2950 + | pub(crate) zero_integer: ::std::option::Option<i32>,
|
2951 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) zero_long: ::std::option::Option<i64>,
|
2952 + | /* ServerBuilderGenerator.kt:308 */
|
2953 + | pub(crate) zero_float: ::std::option::Option<f32>,
|
2954 + | /* ServerBuilderGenerator.kt:308 */
|
2955 + | pub(crate) zero_double: ::std::option::Option<f64>,
|
2956 + | /* ServerBuilderGenerator.kt:211 */
|
2957 + | }
|
2958 + | /* ServerBuilderGenerator.kt:215 */
|
2959 + | impl Builder {
|
2960 + | /* ServerBuilderGenerator.kt:331 */
|
2961 + | #[allow(missing_docs)] // documentation missing in model
|
2962 + | /* ServerBuilderGenerator.kt:343 */
|
2963 + | pub fn default_string(mut self, input: ::std::string::String) -> Self {
|
2964 + | /* ServerBuilderGenerator.kt:344 */
|
2965 + | self.default_string =
|
2966 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2967 + | /* ServerBuilderGenerator.kt:376 */input
|
2968 + | /* ServerBuilderGenerator.kt:345 */)
|
2969 + | /* ServerBuilderGenerator.kt:344 */;
|
2970 + | self
|
2971 + | /* ServerBuilderGenerator.kt:343 */
|
2972 + | }
|
2973 + | /* ServerBuilderGenerator.kt:426 */
|
2974 + | #[allow(missing_docs)] // documentation missing in model
|
2975 + | /* ServerBuilderGenerator.kt:428 */
|
2976 + | pub(crate) fn set_default_string(
|
2977 + | mut self,
|
2978 + | input: impl ::std::convert::Into<::std::string::String>,
|
2979 + | ) -> Self {
|
2980 + | /* ServerBuilderGenerator.kt:429 */
|
2981 + | self.default_string = Some(input.into());
|
2982 + | self
|
2983 + | /* ServerBuilderGenerator.kt:428 */
|
2984 + | }
|
2985 + | /* ServerBuilderGenerator.kt:331 */
|
2986 + | #[allow(missing_docs)] // documentation missing in model
|
2987 + | /* ServerBuilderGenerator.kt:343 */
|
2988 + | pub fn default_boolean(mut self, input: bool) -> Self {
|
2989 + | /* ServerBuilderGenerator.kt:344 */
|
2990 + | self.default_boolean =
|
2991 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2992 + | /* ServerBuilderGenerator.kt:376 */input
|
2993 + | /* ServerBuilderGenerator.kt:345 */)
|
2994 + | /* ServerBuilderGenerator.kt:344 */;
|
2995 + | self
|
2996 + | /* ServerBuilderGenerator.kt:343 */
|
2997 + | }
|
2998 + | /* ServerBuilderGenerator.kt:426 */
|
2999 + | #[allow(missing_docs)] // documentation missing in model
|
3000 + | /* ServerBuilderGenerator.kt:428 */
|
3001 + | pub(crate) fn set_default_boolean(
|
3002 + | mut self,
|
3003 + | input: impl ::std::convert::Into<bool>,
|
3004 + | ) -> Self {
|
3005 + | /* ServerBuilderGenerator.kt:429 */
|
3006 + | self.default_boolean = Some(input.into());
|
3007 + | self
|
3008 + | /* ServerBuilderGenerator.kt:428 */
|
3009 + | }
|
3010 + | /* ServerBuilderGenerator.kt:331 */
|
3011 + | #[allow(missing_docs)] // documentation missing in model
|
3012 + | /* ServerBuilderGenerator.kt:343 */
|
3013 + | pub fn default_list(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
|
3014 + | /* ServerBuilderGenerator.kt:344 */
|
3015 + | self.default_list =
|
3016 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3017 + | /* ServerBuilderGenerator.kt:376 */input
|
3018 + | /* ServerBuilderGenerator.kt:345 */)
|
3019 + | /* ServerBuilderGenerator.kt:344 */;
|
3020 + | self
|
3021 + | /* ServerBuilderGenerator.kt:343 */
|
3022 + | }
|
3023 + | /* ServerBuilderGenerator.kt:426 */
|
3024 + | #[allow(missing_docs)] // documentation missing in model
|
3025 + | /* ServerBuilderGenerator.kt:428 */
|
3026 + | pub(crate) fn set_default_list(
|
3027 + | mut self,
|
3028 + | input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>,
|
3029 + | ) -> Self {
|
3030 + | /* ServerBuilderGenerator.kt:429 */
|
3031 + | self.default_list = Some(input.into());
|
3032 + | self
|
3033 + | /* ServerBuilderGenerator.kt:428 */
|
3034 + | }
|
3035 + | /* ServerBuilderGenerator.kt:331 */
|
3036 + | #[allow(missing_docs)] // documentation missing in model
|
3037 + | /* ServerBuilderGenerator.kt:343 */
|
3038 + | pub fn default_document_map(mut self, input: ::aws_smithy_types::Document) -> Self {
|
3039 + | /* ServerBuilderGenerator.kt:344 */
|
3040 + | self.default_document_map =
|
3041 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3042 + | /* ServerBuilderGenerator.kt:376 */input
|
3043 + | /* ServerBuilderGenerator.kt:345 */)
|
3044 + | /* ServerBuilderGenerator.kt:344 */;
|
3045 + | self
|
3046 + | /* ServerBuilderGenerator.kt:343 */
|
3047 + | }
|
3048 + | /* ServerBuilderGenerator.kt:426 */
|
3049 + | #[allow(missing_docs)] // documentation missing in model
|
3050 + | /* ServerBuilderGenerator.kt:428 */
|
3051 + | pub(crate) fn set_default_document_map(
|
3052 + | mut self,
|
3053 + | input: impl ::std::convert::Into<::aws_smithy_types::Document>,
|
3054 + | ) -> Self {
|
3055 + | /* ServerBuilderGenerator.kt:429 */
|
3056 + | self.default_document_map = Some(input.into());
|
3057 + | self
|
3058 + | /* ServerBuilderGenerator.kt:428 */
|
3059 + | }
|
3060 + | /* ServerBuilderGenerator.kt:331 */
|
3061 + | #[allow(missing_docs)] // documentation missing in model
|
3062 + | /* ServerBuilderGenerator.kt:343 */
|
3063 + | pub fn default_document_string(mut self, input: ::aws_smithy_types::Document) -> Self {
|
3064 + | /* ServerBuilderGenerator.kt:344 */
|
3065 + | self.default_document_string =
|
3066 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3067 + | /* ServerBuilderGenerator.kt:376 */input
|
3068 + | /* ServerBuilderGenerator.kt:345 */)
|
3069 + | /* ServerBuilderGenerator.kt:344 */;
|
3070 + | self
|
3071 + | /* ServerBuilderGenerator.kt:343 */
|
3072 + | }
|
3073 + | /* ServerBuilderGenerator.kt:426 */
|
3074 + | #[allow(missing_docs)] // documentation missing in model
|
3075 + | /* ServerBuilderGenerator.kt:428 */
|
3076 + | pub(crate) fn set_default_document_string(
|
3077 + | mut self,
|
3078 + | input: impl ::std::convert::Into<::aws_smithy_types::Document>,
|
3079 + | ) -> Self {
|
3080 + | /* ServerBuilderGenerator.kt:429 */
|
3081 + | self.default_document_string = Some(input.into());
|
3082 + | self
|
3083 + | /* ServerBuilderGenerator.kt:428 */
|
3084 + | }
|
3085 + | /* ServerBuilderGenerator.kt:331 */
|
3086 + | #[allow(missing_docs)] // documentation missing in model
|
3087 + | /* ServerBuilderGenerator.kt:343 */
|
3088 + | pub fn default_document_boolean(mut self, input: ::aws_smithy_types::Document) -> Self {
|
3089 + | /* ServerBuilderGenerator.kt:344 */
|
3090 + | self.default_document_boolean =
|
3091 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3092 + | /* ServerBuilderGenerator.kt:376 */input
|
3093 + | /* ServerBuilderGenerator.kt:345 */)
|
3094 + | /* ServerBuilderGenerator.kt:344 */;
|
3095 + | self
|
3096 + | /* ServerBuilderGenerator.kt:343 */
|
3097 + | }
|
3098 + | /* ServerBuilderGenerator.kt:426 */
|
3099 + | #[allow(missing_docs)] // documentation missing in model
|
3100 + | /* ServerBuilderGenerator.kt:428 */
|
3101 + | pub(crate) fn set_default_document_boolean(
|
3102 + | mut self,
|
3103 + | input: impl ::std::convert::Into<::aws_smithy_types::Document>,
|
3104 + | ) -> Self {
|
3105 + | /* ServerBuilderGenerator.kt:429 */
|
3106 + | self.default_document_boolean = Some(input.into());
|
3107 + | self
|
3108 + | /* ServerBuilderGenerator.kt:428 */
|
3109 + | }
|
3110 + | /* ServerBuilderGenerator.kt:331 */
|
3111 + | #[allow(missing_docs)] // documentation missing in model
|
3112 + | /* ServerBuilderGenerator.kt:343 */
|
3113 + | pub fn default_document_list(mut self, input: ::aws_smithy_types::Document) -> Self {
|
3114 + | /* ServerBuilderGenerator.kt:344 */
|
3115 + | self.default_document_list =
|
3116 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3117 + | /* ServerBuilderGenerator.kt:376 */input
|
3118 + | /* ServerBuilderGenerator.kt:345 */)
|
3119 + | /* ServerBuilderGenerator.kt:344 */;
|
3120 + | self
|
3121 + | /* ServerBuilderGenerator.kt:343 */
|
3122 + | }
|
3123 + | /* ServerBuilderGenerator.kt:426 */
|
3124 + | #[allow(missing_docs)] // documentation missing in model
|
3125 + | /* ServerBuilderGenerator.kt:428 */
|
3126 + | pub(crate) fn set_default_document_list(
|
3127 + | mut self,
|
3128 + | input: impl ::std::convert::Into<::aws_smithy_types::Document>,
|
3129 + | ) -> Self {
|
3130 + | /* ServerBuilderGenerator.kt:429 */
|
3131 + | self.default_document_list = Some(input.into());
|
3132 + | self
|
3133 + | /* ServerBuilderGenerator.kt:428 */
|
3134 + | }
|
3135 + | /* ServerBuilderGenerator.kt:331 */
|
3136 + | #[allow(missing_docs)] // documentation missing in model
|
3137 + | /* ServerBuilderGenerator.kt:343 */
|
3138 + | pub fn default_null_document(
|
3139 + | mut self,
|
3140 + | input: ::std::option::Option<::aws_smithy_types::Document>,
|
3141 + | ) -> Self {
|
3142 + | /* ServerBuilderGenerator.kt:344 */
|
3143 + | self.default_null_document =
|
3144 + | /* ServerBuilderGenerator.kt:376 */input
|
3145 + | /* ServerBuilderGenerator.kt:344 */;
|
3146 + | self
|
3147 + | /* ServerBuilderGenerator.kt:343 */
|
3148 + | }
|
3149 + | /* ServerBuilderGenerator.kt:426 */
|
3150 + | #[allow(missing_docs)] // documentation missing in model
|
3151 + | /* ServerBuilderGenerator.kt:428 */
|
3152 + | pub(crate) fn set_default_null_document(
|
3153 + | mut self,
|
3154 + | input: Option<impl ::std::convert::Into<::aws_smithy_types::Document>>,
|
3155 + | ) -> Self {
|
3156 + | /* ServerBuilderGenerator.kt:429 */
|
3157 + | self.default_null_document = input.map(|v| v.into());
|
3158 + | self
|
3159 + | /* ServerBuilderGenerator.kt:428 */
|
3160 + | }
|
3161 + | /* ServerBuilderGenerator.kt:331 */
|
3162 + | #[allow(missing_docs)] // documentation missing in model
|
3163 + | /* ServerBuilderGenerator.kt:343 */
|
3164 + | pub fn default_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
3165 + | /* ServerBuilderGenerator.kt:344 */
|
3166 + | self.default_timestamp =
|
3167 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3168 + | /* ServerBuilderGenerator.kt:376 */input
|
3169 + | /* ServerBuilderGenerator.kt:345 */)
|
3170 + | /* ServerBuilderGenerator.kt:344 */;
|
3171 + | self
|
3172 + | /* ServerBuilderGenerator.kt:343 */
|
3173 + | }
|
3174 + | /* ServerBuilderGenerator.kt:426 */
|
3175 + | #[allow(missing_docs)] // documentation missing in model
|
3176 + | /* ServerBuilderGenerator.kt:428 */
|
3177 + | pub(crate) fn set_default_timestamp(
|
3178 + | mut self,
|
3179 + | input: impl ::std::convert::Into<::aws_smithy_types::DateTime>,
|
3180 + | ) -> Self {
|
3181 + | /* ServerBuilderGenerator.kt:429 */
|
3182 + | self.default_timestamp = Some(input.into());
|
3183 + | self
|
3184 + | /* ServerBuilderGenerator.kt:428 */
|
3185 + | }
|
3186 + | /* ServerBuilderGenerator.kt:331 */
|
3187 + | #[allow(missing_docs)] // documentation missing in model
|
3188 + | /* ServerBuilderGenerator.kt:343 */
|
3189 + | pub fn default_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
|
3190 + | /* ServerBuilderGenerator.kt:344 */
|
3191 + | self.default_blob =
|
3192 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3193 + | /* ServerBuilderGenerator.kt:376 */input
|
3194 + | /* ServerBuilderGenerator.kt:345 */)
|
3195 + | /* ServerBuilderGenerator.kt:344 */;
|
3196 + | self
|
3197 + | /* ServerBuilderGenerator.kt:343 */
|
3198 + | }
|
3199 + | /* ServerBuilderGenerator.kt:426 */
|
3200 + | #[allow(missing_docs)] // documentation missing in model
|
3201 + | /* ServerBuilderGenerator.kt:428 */
|
3202 + | pub(crate) fn set_default_blob(
|
3203 + | mut self,
|
3204 + | input: impl ::std::convert::Into<::aws_smithy_types::Blob>,
|
3205 + | ) -> Self {
|
3206 + | /* ServerBuilderGenerator.kt:429 */
|
3207 + | self.default_blob = Some(input.into());
|
3208 + | self
|
3209 + | /* ServerBuilderGenerator.kt:428 */
|
3210 + | }
|
3211 + | /* ServerBuilderGenerator.kt:331 */
|
3212 + | #[allow(missing_docs)] // documentation missing in model
|
3213 + | /* ServerBuilderGenerator.kt:343 */
|
3214 + | pub fn default_byte(mut self, input: i8) -> Self {
|
3215 + | /* ServerBuilderGenerator.kt:344 */
|
3216 + | self.default_byte =
|
3217 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3218 + | /* ServerBuilderGenerator.kt:376 */input
|
3219 + | /* ServerBuilderGenerator.kt:345 */)
|
3220 + | /* ServerBuilderGenerator.kt:344 */;
|
3221 + | self
|
3222 + | /* ServerBuilderGenerator.kt:343 */
|
3223 + | }
|
3224 + | /* ServerBuilderGenerator.kt:426 */
|
3225 + | #[allow(missing_docs)] // documentation missing in model
|
3226 + | /* ServerBuilderGenerator.kt:428 */
|
3227 + | pub(crate) fn set_default_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
|
3228 + | /* ServerBuilderGenerator.kt:429 */
|
3229 + | self.default_byte = Some(input.into());
|
3230 + | self
|
3231 + | /* ServerBuilderGenerator.kt:428 */
|
3232 + | }
|
3233 + | /* ServerBuilderGenerator.kt:331 */
|
3234 + | #[allow(missing_docs)] // documentation missing in model
|
3235 + | /* ServerBuilderGenerator.kt:343 */
|
3236 + | pub fn default_short(mut self, input: i16) -> Self {
|
3237 + | /* ServerBuilderGenerator.kt:344 */
|
3238 + | self.default_short =
|
3239 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3240 + | /* ServerBuilderGenerator.kt:376 */input
|
3241 + | /* ServerBuilderGenerator.kt:345 */)
|
3242 + | /* ServerBuilderGenerator.kt:344 */;
|
3243 + | self
|
3244 + | /* ServerBuilderGenerator.kt:343 */
|
3245 + | }
|
3246 + | /* ServerBuilderGenerator.kt:426 */
|
3247 + | #[allow(missing_docs)] // documentation missing in model
|
3248 + | /* ServerBuilderGenerator.kt:428 */
|
3249 + | pub(crate) fn set_default_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
|
3250 + | /* ServerBuilderGenerator.kt:429 */
|
3251 + | self.default_short = Some(input.into());
|
3252 + | self
|
3253 + | /* ServerBuilderGenerator.kt:428 */
|
3254 + | }
|
3255 + | /* ServerBuilderGenerator.kt:331 */
|
3256 + | #[allow(missing_docs)] // documentation missing in model
|
3257 + | /* ServerBuilderGenerator.kt:343 */
|
3258 + | pub fn default_integer(mut self, input: i32) -> Self {
|
3259 + | /* ServerBuilderGenerator.kt:344 */
|
3260 + | self.default_integer =
|
3261 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3262 + | /* ServerBuilderGenerator.kt:376 */input
|
3263 + | /* ServerBuilderGenerator.kt:345 */)
|
3264 + | /* ServerBuilderGenerator.kt:344 */;
|
3265 + | self
|
3266 + | /* ServerBuilderGenerator.kt:343 */
|
3267 + | }
|
3268 + | /* ServerBuilderGenerator.kt:426 */
|
3269 + | #[allow(missing_docs)] // documentation missing in model
|
3270 + | /* ServerBuilderGenerator.kt:428 */
|
3271 + | pub(crate) fn set_default_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
|
3272 + | /* ServerBuilderGenerator.kt:429 */
|
3273 + | self.default_integer = Some(input.into());
|
3274 + | self
|
3275 + | /* ServerBuilderGenerator.kt:428 */
|
3276 + | }
|
3277 + | /* ServerBuilderGenerator.kt:331 */
|
3278 + | #[allow(missing_docs)] // documentation missing in model
|
3279 + | /* ServerBuilderGenerator.kt:343 */
|
3280 + | pub fn default_long(mut self, input: i64) -> Self {
|
3281 + | /* ServerBuilderGenerator.kt:344 */
|
3282 + | self.default_long =
|
3283 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3284 + | /* ServerBuilderGenerator.kt:376 */input
|
3285 + | /* ServerBuilderGenerator.kt:345 */)
|
3286 + | /* ServerBuilderGenerator.kt:344 */;
|
3287 + | self
|
3288 + | /* ServerBuilderGenerator.kt:343 */
|
3289 + | }
|
3290 + | /* ServerBuilderGenerator.kt:426 */
|
3291 + | #[allow(missing_docs)] // documentation missing in model
|
3292 + | /* ServerBuilderGenerator.kt:428 */
|
3293 + | pub(crate) fn set_default_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
|
3294 + | /* ServerBuilderGenerator.kt:429 */
|
3295 + | self.default_long = Some(input.into());
|
3296 + | self
|
3297 + | /* ServerBuilderGenerator.kt:428 */
|
3298 + | }
|
3299 + | /* ServerBuilderGenerator.kt:331 */
|
3300 + | #[allow(missing_docs)] // documentation missing in model
|
3301 + | /* ServerBuilderGenerator.kt:343 */
|
3302 + | pub fn default_float(mut self, input: f32) -> Self {
|
3303 + | /* ServerBuilderGenerator.kt:344 */
|
3304 + | self.default_float =
|
3305 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3306 + | /* ServerBuilderGenerator.kt:376 */input
|
3307 + | /* ServerBuilderGenerator.kt:345 */)
|
3308 + | /* ServerBuilderGenerator.kt:344 */;
|
3309 + | self
|
3310 + | /* ServerBuilderGenerator.kt:343 */
|
3311 + | }
|
3312 + | /* ServerBuilderGenerator.kt:426 */
|
3313 + | #[allow(missing_docs)] // documentation missing in model
|
3314 + | /* ServerBuilderGenerator.kt:428 */
|
3315 + | pub(crate) fn set_default_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
|
3316 + | /* ServerBuilderGenerator.kt:429 */
|
3317 + | self.default_float = Some(input.into());
|
3318 + | self
|
3319 + | /* ServerBuilderGenerator.kt:428 */
|
3320 + | }
|
3321 + | /* ServerBuilderGenerator.kt:331 */
|
3322 + | #[allow(missing_docs)] // documentation missing in model
|
3323 + | /* ServerBuilderGenerator.kt:343 */
|
3324 + | pub fn default_double(mut self, input: f64) -> Self {
|
3325 + | /* ServerBuilderGenerator.kt:344 */
|
3326 + | self.default_double =
|
3327 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3328 + | /* ServerBuilderGenerator.kt:376 */input
|
3329 + | /* ServerBuilderGenerator.kt:345 */)
|
3330 + | /* ServerBuilderGenerator.kt:344 */;
|
3331 + | self
|
3332 + | /* ServerBuilderGenerator.kt:343 */
|
3333 + | }
|
3334 + | /* ServerBuilderGenerator.kt:426 */
|
3335 + | #[allow(missing_docs)] // documentation missing in model
|
3336 + | /* ServerBuilderGenerator.kt:428 */
|
3337 + | pub(crate) fn set_default_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
|
3338 + | /* ServerBuilderGenerator.kt:429 */
|
3339 + | self.default_double = Some(input.into());
|
3340 + | self
|
3341 + | /* ServerBuilderGenerator.kt:428 */
|
3342 + | }
|
3343 + | /* ServerBuilderGenerator.kt:331 */
|
3344 + | #[allow(missing_docs)] // documentation missing in model
|
3345 + | /* ServerBuilderGenerator.kt:343 */
|
3346 + | pub fn default_map(
|
3347 + | mut self,
|
3348 + | input: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
3349 + | ) -> Self {
|
3350 + | /* ServerBuilderGenerator.kt:344 */
|
3351 + | self.default_map =
|
3352 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3353 + | /* ServerBuilderGenerator.kt:376 */input
|
3354 + | /* ServerBuilderGenerator.kt:345 */)
|
3355 + | /* ServerBuilderGenerator.kt:344 */;
|
3356 + | self
|
3357 + | /* ServerBuilderGenerator.kt:343 */
|
3358 + | }
|
3359 + | /* ServerBuilderGenerator.kt:426 */
|
3360 + | #[allow(missing_docs)] // documentation missing in model
|
3361 + | /* ServerBuilderGenerator.kt:428 */
|
3362 + | pub(crate) fn set_default_map(
|
3363 + | mut self,
|
3364 + | input: impl ::std::convert::Into<
|
3365 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
3366 + | >,
|
3367 + | ) -> Self {
|
3368 + | /* ServerBuilderGenerator.kt:429 */
|
3369 + | self.default_map = Some(input.into());
|
3370 + | self
|
3371 + | /* ServerBuilderGenerator.kt:428 */
|
3372 + | }
|
3373 + | /* ServerBuilderGenerator.kt:331 */
|
3374 + | #[allow(missing_docs)] // documentation missing in model
|
3375 + | /* ServerBuilderGenerator.kt:343 */
|
3376 + | pub fn default_enum(mut self, input: crate::model::TestEnum) -> Self {
|
3377 + | /* ServerBuilderGenerator.kt:344 */
|
3378 + | self.default_enum =
|
3379 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3380 + | /* ServerBuilderGenerator.kt:372 */crate::constrained::MaybeConstrained::Constrained(input)
|
3381 + | /* ServerBuilderGenerator.kt:345 */)
|
3382 + | /* ServerBuilderGenerator.kt:344 */;
|
3383 + | self
|
3384 + | /* ServerBuilderGenerator.kt:343 */
|
3385 + | }
|
3386 + | /* ServerBuilderGenerator.kt:426 */
|
3387 + | #[allow(missing_docs)] // documentation missing in model
|
3388 + | /* ServerBuilderGenerator.kt:428 */
|
3389 + | pub(crate) fn set_default_enum(
|
3390 + | mut self,
|
3391 + | input: impl ::std::convert::Into<
|
3392 + | crate::constrained::MaybeConstrained<crate::model::TestEnum>,
|
3393 + | >,
|
3394 + | ) -> Self {
|
3395 + | /* ServerBuilderGenerator.kt:429 */
|
3396 + | self.default_enum = Some(input.into());
|
3397 + | self
|
3398 + | /* ServerBuilderGenerator.kt:428 */
|
3399 + | }
|
3400 + | /* ServerBuilderGenerator.kt:331 */
|
3401 + | #[allow(missing_docs)] // documentation missing in model
|
3402 + | /* ServerBuilderGenerator.kt:343 */
|
3403 + | pub fn default_int_enum(mut self, input: i32) -> Self {
|
3404 + | /* ServerBuilderGenerator.kt:344 */
|
3405 + | self.default_int_enum =
|
3406 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3407 + | /* ServerBuilderGenerator.kt:376 */input
|
3408 + | /* ServerBuilderGenerator.kt:345 */)
|
3409 + | /* ServerBuilderGenerator.kt:344 */;
|
3410 + | self
|
3411 + | /* ServerBuilderGenerator.kt:343 */
|
3412 + | }
|
3413 + | /* ServerBuilderGenerator.kt:426 */
|
3414 + | #[allow(missing_docs)] // documentation missing in model
|
3415 + | /* ServerBuilderGenerator.kt:428 */
|
3416 + | pub(crate) fn set_default_int_enum(
|
3417 + | mut self,
|
3418 + | input: impl ::std::convert::Into<i32>,
|
3419 + | ) -> Self {
|
3420 + | /* ServerBuilderGenerator.kt:429 */
|
3421 + | self.default_int_enum = Some(input.into());
|
3422 + | self
|
3423 + | /* ServerBuilderGenerator.kt:428 */
|
3424 + | }
|
3425 + | /* ServerBuilderGenerator.kt:331 */
|
3426 + | #[allow(missing_docs)] // documentation missing in model
|
3427 + | /* ServerBuilderGenerator.kt:343 */
|
3428 + | pub fn empty_string(mut self, input: ::std::string::String) -> Self {
|
3429 + | /* ServerBuilderGenerator.kt:344 */
|
3430 + | self.empty_string =
|
3431 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3432 + | /* ServerBuilderGenerator.kt:376 */input
|
3433 + | /* ServerBuilderGenerator.kt:345 */)
|
3434 + | /* ServerBuilderGenerator.kt:344 */;
|
3435 + | self
|
3436 + | /* ServerBuilderGenerator.kt:343 */
|
3437 + | }
|
3438 + | /* ServerBuilderGenerator.kt:426 */
|
3439 + | #[allow(missing_docs)] // documentation missing in model
|
3440 + | /* ServerBuilderGenerator.kt:428 */
|
3441 + | pub(crate) fn set_empty_string(
|
3442 + | mut self,
|
3443 + | input: impl ::std::convert::Into<::std::string::String>,
|
3444 + | ) -> Self {
|
3445 + | /* ServerBuilderGenerator.kt:429 */
|
3446 + | self.empty_string = Some(input.into());
|
3447 + | self
|
3448 + | /* ServerBuilderGenerator.kt:428 */
|
3449 + | }
|
3450 + | /* ServerBuilderGenerator.kt:331 */
|
3451 + | #[allow(missing_docs)] // documentation missing in model
|
3452 + | /* ServerBuilderGenerator.kt:343 */
|
3453 + | pub fn false_boolean(mut self, input: bool) -> Self {
|
3454 + | /* ServerBuilderGenerator.kt:344 */
|
3455 + | self.false_boolean =
|
3456 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3457 + | /* ServerBuilderGenerator.kt:376 */input
|
3458 + | /* ServerBuilderGenerator.kt:345 */)
|
3459 + | /* ServerBuilderGenerator.kt:344 */;
|
3460 + | self
|
3461 + | /* ServerBuilderGenerator.kt:343 */
|
3462 + | }
|
3463 + | /* ServerBuilderGenerator.kt:426 */
|
3464 + | #[allow(missing_docs)] // documentation missing in model
|
3465 + | /* ServerBuilderGenerator.kt:428 */
|
3466 + | pub(crate) fn set_false_boolean(mut self, input: impl ::std::convert::Into<bool>) -> Self {
|
3467 + | /* ServerBuilderGenerator.kt:429 */
|
3468 + | self.false_boolean = Some(input.into());
|
3469 + | self
|
3470 + | /* ServerBuilderGenerator.kt:428 */
|
3471 + | }
|
3472 + | /* ServerBuilderGenerator.kt:331 */
|
3473 + | #[allow(missing_docs)] // documentation missing in model
|
3474 + | /* ServerBuilderGenerator.kt:343 */
|
3475 + | pub fn empty_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
|
3476 + | /* ServerBuilderGenerator.kt:344 */
|
3477 + | self.empty_blob =
|
3478 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3479 + | /* ServerBuilderGenerator.kt:376 */input
|
3480 + | /* ServerBuilderGenerator.kt:345 */)
|
3481 + | /* ServerBuilderGenerator.kt:344 */;
|
3482 + | self
|
3483 + | /* ServerBuilderGenerator.kt:343 */
|
3484 + | }
|
3485 + | /* ServerBuilderGenerator.kt:426 */
|
3486 + | #[allow(missing_docs)] // documentation missing in model
|
3487 + | /* ServerBuilderGenerator.kt:428 */
|
3488 + | pub(crate) fn set_empty_blob(
|
3489 + | mut self,
|
3490 + | input: impl ::std::convert::Into<::aws_smithy_types::Blob>,
|
3491 + | ) -> Self {
|
3492 + | /* ServerBuilderGenerator.kt:429 */
|
3493 + | self.empty_blob = Some(input.into());
|
3494 + | self
|
3495 + | /* ServerBuilderGenerator.kt:428 */
|
3496 + | }
|
3497 + | /* ServerBuilderGenerator.kt:331 */
|
3498 + | #[allow(missing_docs)] // documentation missing in model
|
3499 + | /* ServerBuilderGenerator.kt:343 */
|
3500 + | pub fn zero_byte(mut self, input: i8) -> Self {
|
3501 + | /* ServerBuilderGenerator.kt:344 */
|
3502 + | self.zero_byte =
|
3503 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3504 + | /* ServerBuilderGenerator.kt:376 */input
|
3505 + | /* ServerBuilderGenerator.kt:345 */)
|
3506 + | /* ServerBuilderGenerator.kt:344 */;
|
3507 + | self
|
3508 + | /* ServerBuilderGenerator.kt:343 */
|
3509 + | }
|
3510 + | /* ServerBuilderGenerator.kt:426 */
|
3511 + | #[allow(missing_docs)] // documentation missing in model
|
3512 + | /* ServerBuilderGenerator.kt:428 */
|
3513 + | pub(crate) fn set_zero_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
|
3514 + | /* ServerBuilderGenerator.kt:429 */
|
3515 + | self.zero_byte = Some(input.into());
|
3516 + | self
|
3517 + | /* ServerBuilderGenerator.kt:428 */
|
3518 + | }
|
3519 + | /* ServerBuilderGenerator.kt:331 */
|
3520 + | #[allow(missing_docs)] // documentation missing in model
|
3521 + | /* ServerBuilderGenerator.kt:343 */
|
3522 + | pub fn zero_short(mut self, input: i16) -> Self {
|
3523 + | /* ServerBuilderGenerator.kt:344 */
|
3524 + | self.zero_short =
|
3525 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3526 + | /* ServerBuilderGenerator.kt:376 */input
|
3527 + | /* ServerBuilderGenerator.kt:345 */)
|
3528 + | /* ServerBuilderGenerator.kt:344 */;
|
3529 + | self
|
3530 + | /* ServerBuilderGenerator.kt:343 */
|
3531 + | }
|
3532 + | /* ServerBuilderGenerator.kt:426 */
|
3533 + | #[allow(missing_docs)] // documentation missing in model
|
3534 + | /* ServerBuilderGenerator.kt:428 */
|
3535 + | pub(crate) fn set_zero_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
|
3536 + | /* ServerBuilderGenerator.kt:429 */
|
3537 + | self.zero_short = Some(input.into());
|
3538 + | self
|
3539 + | /* ServerBuilderGenerator.kt:428 */
|
3540 + | }
|
3541 + | /* ServerBuilderGenerator.kt:331 */
|
3542 + | #[allow(missing_docs)] // documentation missing in model
|
3543 + | /* ServerBuilderGenerator.kt:343 */
|
3544 + | pub fn zero_integer(mut self, input: i32) -> Self {
|
3545 + | /* ServerBuilderGenerator.kt:344 */
|
3546 + | self.zero_integer =
|
3547 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3548 + | /* ServerBuilderGenerator.kt:376 */input
|
3549 + | /* ServerBuilderGenerator.kt:345 */)
|
3550 + | /* ServerBuilderGenerator.kt:344 */;
|
3551 + | self
|
3552 + | /* ServerBuilderGenerator.kt:343 */
|
3553 + | }
|
3554 + | /* ServerBuilderGenerator.kt:426 */
|
3555 + | #[allow(missing_docs)] // documentation missing in model
|
3556 + | /* ServerBuilderGenerator.kt:428 */
|
3557 + | pub(crate) fn set_zero_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
|
3558 + | /* ServerBuilderGenerator.kt:429 */
|
3559 + | self.zero_integer = Some(input.into());
|
3560 + | self
|
3561 + | /* ServerBuilderGenerator.kt:428 */
|
3562 + | }
|
3563 + | /* ServerBuilderGenerator.kt:331 */
|
3564 + | #[allow(missing_docs)] // documentation missing in model
|
3565 + | /* ServerBuilderGenerator.kt:343 */
|
3566 + | pub fn zero_long(mut self, input: i64) -> Self {
|
3567 + | /* ServerBuilderGenerator.kt:344 */
|
3568 + | self.zero_long =
|
3569 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3570 + | /* ServerBuilderGenerator.kt:376 */input
|
3571 + | /* ServerBuilderGenerator.kt:345 */)
|
3572 + | /* ServerBuilderGenerator.kt:344 */;
|
3573 + | self
|
3574 + | /* ServerBuilderGenerator.kt:343 */
|
3575 + | }
|
3576 + | /* ServerBuilderGenerator.kt:426 */
|
3577 + | #[allow(missing_docs)] // documentation missing in model
|
3578 + | /* ServerBuilderGenerator.kt:428 */
|
3579 + | pub(crate) fn set_zero_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
|
3580 + | /* ServerBuilderGenerator.kt:429 */
|
3581 + | self.zero_long = Some(input.into());
|
3582 + | self
|
3583 + | /* ServerBuilderGenerator.kt:428 */
|
3584 + | }
|
3585 + | /* ServerBuilderGenerator.kt:331 */
|
3586 + | #[allow(missing_docs)] // documentation missing in model
|
3587 + | /* ServerBuilderGenerator.kt:343 */
|
3588 + | pub fn zero_float(mut self, input: f32) -> Self {
|
3589 + | /* ServerBuilderGenerator.kt:344 */
|
3590 + | self.zero_float =
|
3591 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3592 + | /* ServerBuilderGenerator.kt:376 */input
|
3593 + | /* ServerBuilderGenerator.kt:345 */)
|
3594 + | /* ServerBuilderGenerator.kt:344 */;
|
3595 + | self
|
3596 + | /* ServerBuilderGenerator.kt:343 */
|
3597 + | }
|
3598 + | /* ServerBuilderGenerator.kt:426 */
|
3599 + | #[allow(missing_docs)] // documentation missing in model
|
3600 + | /* ServerBuilderGenerator.kt:428 */
|
3601 + | pub(crate) fn set_zero_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
|
3602 + | /* ServerBuilderGenerator.kt:429 */
|
3603 + | self.zero_float = Some(input.into());
|
3604 + | self
|
3605 + | /* ServerBuilderGenerator.kt:428 */
|
3606 + | }
|
3607 + | /* ServerBuilderGenerator.kt:331 */
|
3608 + | #[allow(missing_docs)] // documentation missing in model
|
3609 + | /* ServerBuilderGenerator.kt:343 */
|
3610 + | pub fn zero_double(mut self, input: f64) -> Self {
|
3611 + | /* ServerBuilderGenerator.kt:344 */
|
3612 + | self.zero_double =
|
3613 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3614 + | /* ServerBuilderGenerator.kt:376 */input
|
3615 + | /* ServerBuilderGenerator.kt:345 */)
|
3616 + | /* ServerBuilderGenerator.kt:344 */;
|
3617 + | self
|
3618 + | /* ServerBuilderGenerator.kt:343 */
|
3619 + | }
|
3620 + | /* ServerBuilderGenerator.kt:426 */
|
3621 + | #[allow(missing_docs)] // documentation missing in model
|
3622 + | /* ServerBuilderGenerator.kt:428 */
|
3623 + | pub(crate) fn set_zero_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
|
3624 + | /* ServerBuilderGenerator.kt:429 */
|
3625 + | self.zero_double = Some(input.into());
|
3626 + | self
|
3627 + | /* ServerBuilderGenerator.kt:428 */
|
3628 + | }
|
3629 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
|
3630 + | /// /* ServerBuilderGenerator.kt:260 */
|
3631 + | /// The builder fails to construct a [`Defaults`](crate::model::Defaults) if a [`ConstraintViolation`] occurs.
|
3632 + | ///
|
3633 + | /* ServerBuilderGenerator.kt:271 */
|
3634 + | pub fn build(self) -> Result<crate::model::Defaults, ConstraintViolation> {
|
3635 + | self.build_enforcing_all_constraints()
|
3636 + | }
|
3637 + | /* ServerBuilderGenerator.kt:283 */
|
3638 + | fn build_enforcing_all_constraints(
|
3639 + | self,
|
3640 + | ) -> Result<crate::model::Defaults, ConstraintViolation> {
|
3641 + | /* ServerBuilderGenerator.kt:287 */
|
3642 + | Ok(
|
3643 + | /* ServerBuilderGenerator.kt:542 */
|
3644 + | crate::model::Defaults {
|
3645 + | /* ServerBuilderGenerator.kt:546 */
|
3646 + | default_string: self
|
3647 + | .default_string
|
3648 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3649 + | .unwrap_or_else(|| String::from("hi")),
|
3650 + | /* ServerBuilderGenerator.kt:546 */
|
3651 + | default_boolean: self
|
3652 + | .default_boolean
|
3653 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3654 + | .unwrap_or(true),
|
3655 + | /* ServerBuilderGenerator.kt:546 */
|
3656 + | default_list: self
|
3657 + | .default_list
|
3658 + | /* ServerBuilderGeneratorCommon.kt:95 */
|
3659 + | .unwrap_or_default(),
|
3660 + | /* ServerBuilderGenerator.kt:546 */
|
3661 + | default_document_map: self
|
3662 + | .default_document_map
|
3663 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3664 + | .unwrap_or_else(|| {
|
3665 + | ::aws_smithy_types::Document::Object(::std::collections::HashMap::new())
|
3666 + | }),
|
3667 + | /* ServerBuilderGenerator.kt:546 */
|
3668 + | default_document_string: self
|
3669 + | .default_document_string
|
3670 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3671 + | .unwrap_or_else(|| {
|
3672 + | ::aws_smithy_types::Document::String(::std::string::String::from("hi"))
|
3673 + | }),
|
3674 + | /* ServerBuilderGenerator.kt:546 */
|
3675 + | default_document_boolean: self
|
3676 + | .default_document_boolean
|
3677 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3678 + | .unwrap_or(::aws_smithy_types::Document::Bool(true)),
|
3679 + | /* ServerBuilderGenerator.kt:546 */
|
3680 + | default_document_list: self
|
3681 + | .default_document_list
|
3682 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3683 + | .unwrap_or_else(|| {
|
3684 + | ::aws_smithy_types::Document::Array(::std::vec::Vec::new())
|
3685 + | }),
|
3686 + | /* ServerBuilderGenerator.kt:546 */
|
3687 + | default_null_document: self.default_null_document,
|
3688 + | /* ServerBuilderGenerator.kt:546 */
|
3689 + | default_timestamp: self
|
3690 + | .default_timestamp
|
3691 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3692 + | .unwrap_or_else(|| {
|
3693 + | ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)
|
3694 + | }),
|
3695 + | /* ServerBuilderGenerator.kt:546 */
|
3696 + | default_blob: self
|
3697 + | .default_blob
|
3698 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3699 + | .unwrap_or_else(|| ::aws_smithy_types::Blob::new("YWJj")),
|
3700 + | /* ServerBuilderGenerator.kt:546 */
|
3701 + | default_byte: self
|
3702 + | .default_byte
|
3703 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3704 + | .unwrap_or(1i8),
|
3705 + | /* ServerBuilderGenerator.kt:546 */
|
3706 + | default_short: self
|
3707 + | .default_short
|
3708 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3709 + | .unwrap_or(1i16),
|
3710 + | /* ServerBuilderGenerator.kt:546 */
|
3711 + | default_integer: self
|
3712 + | .default_integer
|
3713 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3714 + | .unwrap_or(10i32),
|
3715 + | /* ServerBuilderGenerator.kt:546 */
|
3716 + | default_long: self
|
3717 + | .default_long
|
3718 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3719 + | .unwrap_or(100i64),
|
3720 + | /* ServerBuilderGenerator.kt:546 */
|
3721 + | default_float: self
|
3722 + | .default_float
|
3723 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3724 + | .unwrap_or(1.0f32),
|
3725 + | /* ServerBuilderGenerator.kt:546 */
|
3726 + | default_double: self
|
3727 + | .default_double
|
3728 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3729 + | .unwrap_or(1.0f64),
|
3730 + | /* ServerBuilderGenerator.kt:546 */
|
3731 + | default_map: self
|
3732 + | .default_map
|
3733 + | /* ServerBuilderGeneratorCommon.kt:95 */
|
3734 + | .unwrap_or_default(),
|
3735 + | /* ServerBuilderGenerator.kt:546 */
|
3736 + | default_enum: self
|
3737 + | .default_enum
|
3738 + | /* ServerBuilderGenerator.kt:602 */
|
3739 + | .map(|v| match v {
|
3740 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
3741 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3742 + | })
|
3743 + | /* ServerBuilderGenerator.kt:614 */
|
3744 + | .map(|res| res.map_err(ConstraintViolation::DefaultEnum))
|
3745 + | .transpose()?
|
3746 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3747 + | .unwrap_or(
|
3748 + | "FOO"
|
3749 + | .parse::<crate::model::TestEnum>()
|
3750 + | .expect("static value validated to member"),
|
3751 + | ),
|
3752 + | /* ServerBuilderGenerator.kt:546 */
|
3753 + | default_int_enum: self
|
3754 + | .default_int_enum
|
3755 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3756 + | .unwrap_or(1i32),
|
3757 + | /* ServerBuilderGenerator.kt:546 */
|
3758 + | empty_string: self
|
3759 + | .empty_string
|
3760 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3761 + | .unwrap_or_else(|| String::from("")),
|
3762 + | /* ServerBuilderGenerator.kt:546 */
|
3763 + | false_boolean: self
|
3764 + | .false_boolean
|
3765 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3766 + | .unwrap_or(false),
|
3767 + | /* ServerBuilderGenerator.kt:546 */
|
3768 + | empty_blob: self
|
3769 + | .empty_blob
|
3770 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3771 + | .unwrap_or_else(|| ::aws_smithy_types::Blob::new("")),
|
3772 + | /* ServerBuilderGenerator.kt:546 */
|
3773 + | zero_byte: self
|
3774 + | .zero_byte
|
3775 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3776 + | .unwrap_or(0i8),
|
3777 + | /* ServerBuilderGenerator.kt:546 */
|
3778 + | zero_short: self
|
3779 + | .zero_short
|
3780 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3781 + | .unwrap_or(0i16),
|
3782 + | /* ServerBuilderGenerator.kt:546 */
|
3783 + | zero_integer: self
|
3784 + | .zero_integer
|
3785 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3786 + | .unwrap_or(0i32),
|
3787 + | /* ServerBuilderGenerator.kt:546 */
|
3788 + | zero_long: self
|
3789 + | .zero_long
|
3790 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3791 + | .unwrap_or(0i64),
|
3792 + | /* ServerBuilderGenerator.kt:546 */
|
3793 + | zero_float: self
|
3794 + | .zero_float
|
3795 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3796 + | .unwrap_or(0.0f32),
|
3797 + | /* ServerBuilderGenerator.kt:546 */
|
3798 + | zero_double: self
|
3799 + | .zero_double
|
3800 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3801 + | .unwrap_or(0.0f64),
|
3802 + | /* ServerBuilderGenerator.kt:542 */
|
3803 + | }, /* ServerBuilderGenerator.kt:287 */
|
3804 + | )
|
3805 + | /* ServerBuilderGenerator.kt:283 */
|
3806 + | }
|
3807 + | /* ServerBuilderGenerator.kt:215 */
|
3808 + | }
|
3809 + |
|
3810 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3811 + | }
|
3812 + | /// /* ServerBuilderGenerator.kt:171 */See [`PayloadConfig`](crate::model::PayloadConfig).
|
3813 + | pub mod payload_config {
|
3814 + |
|
3815 + | /* ServerBuilderGenerator.kt:461 */
|
3816 + | impl ::std::convert::From<Builder> for crate::model::PayloadConfig {
|
3817 + | fn from(builder: Builder) -> Self {
|
3818 + | builder.build()
|
3819 + | }
|
3820 + | }
|
3821 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`PayloadConfig`](crate::model::PayloadConfig).
|
3822 + | /* RustType.kt:534 */
|
3823 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3824 + | /* ServerBuilderGenerator.kt:211 */
|
3825 + | pub struct Builder {
|
3826 + | /* ServerBuilderGenerator.kt:308 */
|
3827 + | pub(crate) data: ::std::option::Option<i32>,
|
3828 + | /* ServerBuilderGenerator.kt:211 */
|
3829 + | }
|
3830 + | /* ServerBuilderGenerator.kt:215 */
|
3831 + | impl Builder {
|
3832 + | /* ServerBuilderGenerator.kt:331 */
|
3833 + | #[allow(missing_docs)] // documentation missing in model
|
3834 + | /* ServerBuilderGenerator.kt:343 */
|
3835 + | pub fn data(mut self, input: ::std::option::Option<i32>) -> Self {
|
3836 + | /* ServerBuilderGenerator.kt:344 */
|
3837 + | self.data =
|
3838 + | /* ServerBuilderGenerator.kt:376 */input
|
3839 + | /* ServerBuilderGenerator.kt:344 */;
|
3840 + | self
|
3841 + | /* ServerBuilderGenerator.kt:343 */
|
3842 + | }
|
3843 + | /* ServerBuilderGenerator.kt:426 */
|
3844 + | #[allow(missing_docs)] // documentation missing in model
|
3845 + | /* ServerBuilderGenerator.kt:428 */
|
3846 + | pub(crate) fn set_data(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
3847 + | /* ServerBuilderGenerator.kt:429 */
|
3848 + | self.data = input.map(|v| v.into());
|
3849 + | self
|
3850 + | /* ServerBuilderGenerator.kt:428 */
|
3851 + | }
|
3852 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`PayloadConfig`](crate::model::PayloadConfig).
|
3853 + | /* ServerBuilderGenerator.kt:271 */
|
3854 + | pub fn build(self) -> crate::model::PayloadConfig {
|
3855 + | self.build_enforcing_all_constraints()
|
3856 + | }
|
3857 + | /* ServerBuilderGenerator.kt:283 */
|
3858 + | fn build_enforcing_all_constraints(self) -> crate::model::PayloadConfig {
|
3859 + | /* ServerBuilderGenerator.kt:542 */
|
3860 + | crate::model::PayloadConfig {
|
3861 + | /* ServerBuilderGenerator.kt:546 */
|
3862 + | data: self.data,
|
3863 + | /* ServerBuilderGenerator.kt:542 */
|
3864 + | }
|
3865 + | /* ServerBuilderGenerator.kt:283 */
|
3866 + | }
|
3867 + | /* ServerBuilderGenerator.kt:215 */
|
3868 + | }
|
3869 + |
|
3870 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3871 + | }
|
3872 + | /// /* ServerBuilderGenerator.kt:171 */See [`TestConfig`](crate::model::TestConfig).
|
3873 + | pub mod test_config {
|
3874 + |
|
3875 + | /* ServerBuilderGenerator.kt:461 */
|
3876 + | impl ::std::convert::From<Builder> for crate::model::TestConfig {
|
3877 + | fn from(builder: Builder) -> Self {
|
3878 + | builder.build()
|
3879 + | }
|
3880 + | }
|
3881 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`TestConfig`](crate::model::TestConfig).
|
3882 + | /* RustType.kt:534 */
|
3883 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3884 + | /* ServerBuilderGenerator.kt:211 */
|
3885 + | pub struct Builder {
|
3886 + | /* ServerBuilderGenerator.kt:308 */
|
3887 + | pub(crate) timeout: ::std::option::Option<i32>,
|
3888 + | /* ServerBuilderGenerator.kt:211 */
|
3889 + | }
|
3890 + | /* ServerBuilderGenerator.kt:215 */
|
3891 + | impl Builder {
|
3892 + | /* ServerBuilderGenerator.kt:331 */
|
3893 + | #[allow(missing_docs)] // documentation missing in model
|
3894 + | /* ServerBuilderGenerator.kt:343 */
|
3895 + | pub fn timeout(mut self, input: ::std::option::Option<i32>) -> Self {
|
3896 + | /* ServerBuilderGenerator.kt:344 */
|
3897 + | self.timeout =
|
3898 + | /* ServerBuilderGenerator.kt:376 */input
|
3899 + | /* ServerBuilderGenerator.kt:344 */;
|
3900 + | self
|
3901 + | /* ServerBuilderGenerator.kt:343 */
|
3902 + | }
|
3903 + | /* ServerBuilderGenerator.kt:426 */
|
3904 + | #[allow(missing_docs)] // documentation missing in model
|
3905 + | /* ServerBuilderGenerator.kt:428 */
|
3906 + | pub(crate) fn set_timeout(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
3907 + | /* ServerBuilderGenerator.kt:429 */
|
3908 + | self.timeout = input.map(|v| v.into());
|
3909 + | self
|
3910 + | /* ServerBuilderGenerator.kt:428 */
|
3911 + | }
|
3912 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`TestConfig`](crate::model::TestConfig).
|
3913 + | /* ServerBuilderGenerator.kt:271 */
|
3914 + | pub fn build(self) -> crate::model::TestConfig {
|
3915 + | self.build_enforcing_all_constraints()
|
3916 + | }
|
3917 + | /* ServerBuilderGenerator.kt:283 */
|
3918 + | fn build_enforcing_all_constraints(self) -> crate::model::TestConfig {
|
3919 + | /* ServerBuilderGenerator.kt:542 */
|
3920 + | crate::model::TestConfig {
|
3921 + | /* ServerBuilderGenerator.kt:546 */
|
3922 + | timeout: self.timeout,
|
3923 + | /* ServerBuilderGenerator.kt:542 */
|
3924 + | }
|
3925 + | /* ServerBuilderGenerator.kt:283 */
|
3926 + | }
|
3927 + | /* ServerBuilderGenerator.kt:215 */
|
3928 + | }
|
3929 + |
|
3930 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3931 + | }
|
3932 + | /// /* ServerBuilderGenerator.kt:171 */See [`Unit`](crate::model::Unit).
|
3933 + | pub mod unit {
|
3934 + |
|
3935 + | /* ServerBuilderGenerator.kt:461 */
|
3936 + | impl ::std::convert::From<Builder> for crate::model::Unit {
|
3937 + | fn from(builder: Builder) -> Self {
|
3938 + | builder.build()
|
3939 + | }
|
3940 + | }
|
3941 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Unit`](crate::model::Unit).
|
3942 + | /* RustType.kt:534 */
|
3943 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3944 + | /* ServerBuilderGenerator.kt:211 */
|
3945 + | pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
3946 + | /* ServerBuilderGenerator.kt:215 */
|
3947 + | impl Builder {
|
3948 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Unit`](crate::model::Unit).
|
3949 + | /* ServerBuilderGenerator.kt:271 */
|
3950 + | pub fn build(self) -> crate::model::Unit {
|
3951 + | self.build_enforcing_all_constraints()
|
3952 + | }
|
3953 + | /* ServerBuilderGenerator.kt:283 */
|
3954 + | fn build_enforcing_all_constraints(self) -> crate::model::Unit {
|
3955 + | /* ServerBuilderGenerator.kt:542 */
|
3956 + | crate::model::Unit {
|
3957 + | /* ServerBuilderGenerator.kt:542 */}
|
3958 + | /* ServerBuilderGenerator.kt:283 */
|
3959 + | }
|
3960 + | /* ServerBuilderGenerator.kt:215 */
|
3961 + | }
|
3962 + |
|
3963 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3964 + | }
|
3965 + | pub mod my_union {
|
3966 + |
|
3967 + | /* RustType.kt:534 */
|
3968 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3969 + | /* UnconstrainedUnionGenerator.kt:150 */
|
3970 + | #[allow(clippy::enum_variant_names)]
|
3971 + | pub enum ConstraintViolation {
|
3972 + | /* UnconstrainedUnionGenerator.kt:218 */
|
3973 + | EnumValue(crate::model::foo_enum::ConstraintViolation),
|
3974 + | /* UnconstrainedUnionGenerator.kt:150 */
|
3975 + | }
|
3976 + | /* UnconstrainedUnionGenerator.kt:158 */
|
3977 + | impl ::std::fmt::Display for ConstraintViolation {
|
3978 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3979 + | match self {
|
3980 + | Self::EnumValue(inner) => write!(f, "{inner}"),
|
3981 + | }
|
3982 + | }
|
3983 + | }
|
3984 + |
|
3985 + | impl ::std::error::Error for ConstraintViolation {}
|
3986 + | /* UnconstrainedUnionGenerator.kt:176 */
|
3987 + | impl ConstraintViolation {
|
3988 + | pub(crate) fn as_validation_exception_field(
|
3989 + | self,
|
3990 + | path: ::std::string::String,
|
3991 + | ) -> crate::model::ValidationExceptionField {
|
3992 + | match self {
|
3993 + | Self::EnumValue(inner) => inner.as_validation_exception_field(path + "/enumValue"),
|
3994 + | }
|
3995 + | }
|
3996 + | }
|
3997 + |
|
3998 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3999 + | }
|
4000 + | /// /* ServerBuilderGenerator.kt:171 */See [`RenamedGreeting`](crate::model::RenamedGreeting).
|
4001 + | pub mod renamed_greeting {
|
4002 + |
|
4003 + | /* ServerBuilderGenerator.kt:461 */
|
4004 + | impl ::std::convert::From<Builder> for crate::model::RenamedGreeting {
|
4005 + | fn from(builder: Builder) -> Self {
|
4006 + | builder.build()
|
4007 + | }
|
4008 + | }
|
4009 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`RenamedGreeting`](crate::model::RenamedGreeting).
|
4010 + | /* RustType.kt:534 */
|
4011 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4012 + | /* ServerBuilderGenerator.kt:211 */
|
4013 + | pub struct Builder {
|
4014 + | /* ServerBuilderGenerator.kt:308 */
|
4015 + | pub(crate) salutation: ::std::option::Option<::std::string::String>,
|
4016 + | /* ServerBuilderGenerator.kt:211 */
|
4017 + | }
|
4018 + | /* ServerBuilderGenerator.kt:215 */
|
4019 + | impl Builder {
|
4020 + | /* ServerBuilderGenerator.kt:331 */
|
4021 + | #[allow(missing_docs)] // documentation missing in model
|
4022 + | /* ServerBuilderGenerator.kt:343 */
|
4023 + | pub fn salutation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4024 + | /* ServerBuilderGenerator.kt:344 */
|
4025 + | self.salutation =
|
4026 + | /* ServerBuilderGenerator.kt:376 */input
|
4027 + | /* ServerBuilderGenerator.kt:344 */;
|
4028 + | self
|
4029 + | /* ServerBuilderGenerator.kt:343 */
|
4030 + | }
|
4031 + | /* ServerBuilderGenerator.kt:426 */
|
4032 + | #[allow(missing_docs)] // documentation missing in model
|
4033 + | /* ServerBuilderGenerator.kt:428 */
|
4034 + | pub(crate) fn set_salutation(
|
4035 + | mut self,
|
4036 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4037 + | ) -> Self {
|
4038 + | /* ServerBuilderGenerator.kt:429 */
|
4039 + | self.salutation = input.map(|v| v.into());
|
4040 + | self
|
4041 + | /* ServerBuilderGenerator.kt:428 */
|
4042 + | }
|
4043 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RenamedGreeting`](crate::model::RenamedGreeting).
|
4044 + | /* ServerBuilderGenerator.kt:271 */
|
4045 + | pub fn build(self) -> crate::model::RenamedGreeting {
|
4046 + | self.build_enforcing_all_constraints()
|
4047 + | }
|
4048 + | /* ServerBuilderGenerator.kt:283 */
|
4049 + | fn build_enforcing_all_constraints(self) -> crate::model::RenamedGreeting {
|
4050 + | /* ServerBuilderGenerator.kt:542 */
|
4051 + | crate::model::RenamedGreeting {
|
4052 + | /* ServerBuilderGenerator.kt:546 */
|
4053 + | salutation: self.salutation,
|
4054 + | /* ServerBuilderGenerator.kt:542 */
|
4055 + | }
|
4056 + | /* ServerBuilderGenerator.kt:283 */
|
4057 + | }
|
4058 + | /* ServerBuilderGenerator.kt:215 */
|
4059 + | }
|
4060 + |
|
4061 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4062 + | }
|
4063 + | /// /* ServerBuilderGenerator.kt:171 */See [`GreetingStruct`](crate::model::GreetingStruct).
|
4064 + | pub mod greeting_struct {
|
4065 + |
|
4066 + | /* ServerBuilderGenerator.kt:461 */
|
4067 + | impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
|
4068 + | fn from(builder: Builder) -> Self {
|
4069 + | builder.build()
|
4070 + | }
|
4071 + | }
|
4072 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`GreetingStruct`](crate::model::GreetingStruct).
|
4073 + | /* RustType.kt:534 */
|
4074 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4075 + | /* ServerBuilderGenerator.kt:211 */
|
4076 + | pub struct Builder {
|
4077 + | /* ServerBuilderGenerator.kt:308 */
|
4078 + | pub(crate) hi: ::std::option::Option<::std::string::String>,
|
4079 + | /* ServerBuilderGenerator.kt:211 */
|
4080 + | }
|
4081 + | /* ServerBuilderGenerator.kt:215 */
|
4082 + | impl Builder {
|
4083 + | /* ServerBuilderGenerator.kt:331 */
|
4084 + | #[allow(missing_docs)] // documentation missing in model
|
4085 + | /* ServerBuilderGenerator.kt:343 */
|
4086 + | pub fn hi(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4087 + | /* ServerBuilderGenerator.kt:344 */
|
4088 + | self.hi =
|
4089 + | /* ServerBuilderGenerator.kt:376 */input
|
4090 + | /* ServerBuilderGenerator.kt:344 */;
|
4091 + | self
|
4092 + | /* ServerBuilderGenerator.kt:343 */
|
4093 + | }
|
4094 + | /* ServerBuilderGenerator.kt:426 */
|
4095 + | #[allow(missing_docs)] // documentation missing in model
|
4096 + | /* ServerBuilderGenerator.kt:428 */
|
4097 + | pub(crate) fn set_hi(
|
4098 + | mut self,
|
4099 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4100 + | ) -> Self {
|
4101 + | /* ServerBuilderGenerator.kt:429 */
|
4102 + | self.hi = input.map(|v| v.into());
|
4103 + | self
|
4104 + | /* ServerBuilderGenerator.kt:428 */
|
4105 + | }
|
4106 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
|
4107 + | /* ServerBuilderGenerator.kt:271 */
|
4108 + | pub fn build(self) -> crate::model::GreetingStruct {
|
4109 + | self.build_enforcing_all_constraints()
|
4110 + | }
|
4111 + | /* ServerBuilderGenerator.kt:283 */
|
4112 + | fn build_enforcing_all_constraints(self) -> crate::model::GreetingStruct {
|
4113 + | /* ServerBuilderGenerator.kt:542 */
|
4114 + | crate::model::GreetingStruct {
|
4115 + | /* ServerBuilderGenerator.kt:546 */
|
4116 + | hi: self.hi,
|
4117 + | /* ServerBuilderGenerator.kt:542 */
|
4118 + | }
|
4119 + | /* ServerBuilderGenerator.kt:283 */
|
4120 + | }
|
4121 + | /* ServerBuilderGenerator.kt:215 */
|
4122 + | }
|
4123 + |
|
4124 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4125 + | }
|
4126 + | pub mod sparse_set_map {
|
4127 + |
|
4128 + | /* MapConstraintViolationGenerator.kt:82 */
|
4129 + | #[allow(clippy::enum_variant_names)]
|
4130 + | #[derive(Debug, PartialEq)]
|
4131 + | pub enum ConstraintViolation {
|
4132 + | #[doc(hidden)]
|
4133 + | Value(
|
4134 + | ::std::string::String,
|
4135 + | crate::model::string_set::ConstraintViolation,
|
4136 + | ),
|
4137 + | }
|
4138 + |
|
4139 + | impl ::std::fmt::Display for ConstraintViolation {
|
4140 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4141 + | match self {
|
4142 + | Self::Value(_, value_constraint_violation) => {
|
4143 + | write!(f, "{}", value_constraint_violation)
|
4144 + | }
|
4145 + | }
|
4146 + | }
|
4147 + | }
|
4148 + |
|
4149 + | impl ::std::error::Error for ConstraintViolation {}
|
4150 + | /* MapConstraintViolationGenerator.kt:111 */
|
4151 + | impl ConstraintViolation {
|
4152 + | pub(crate) fn as_validation_exception_field(
|
4153 + | self,
|
4154 + | path: ::std::string::String,
|
4155 + | ) -> crate::model::ValidationExceptionField {
|
4156 + | match self {
|
4157 + | Self::Value(key, value_constraint_violation) => value_constraint_violation
|
4158 + | .as_validation_exception_field(path + "/" + key.as_str()),
|
4159 + | }
|
4160 + | }
|
4161 + | }
|
4162 + |
|
4163 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4164 + | }
|
4165 + | /// /* CodegenDelegator.kt:52 */See [`StringSet`](crate::model::StringSet).
|
4166 + | pub mod string_set {
|
4167 + |
|
4168 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
4169 + | #[allow(clippy::enum_variant_names)]
|
4170 + | #[derive(Debug, PartialEq)]
|
4171 + | pub enum ConstraintViolation {
|
4172 + | /// Constraint violation error when the list does not contain unique items
|
4173 + | UniqueItems {
|
4174 + | /// A vector of indices into `original` pointing to all duplicate items. This vector has
|
4175 + | /// at least two elements.
|
4176 + | /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
|
4177 + | /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
|
4178 + | /// Nothing is guaranteed about the order of the indices.
|
4179 + | duplicate_indices: ::std::vec::Vec<usize>,
|
4180 + | /// The original vector, that contains duplicate items.
|
4181 + | original: ::std::vec::Vec<::std::string::String>,
|
4182 + | },
|
4183 + | }
|
4184 + |
|
4185 + | impl ::std::fmt::Display for ConstraintViolation {
|
4186 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4187 + | let message = match self {
|
4188 + | Self::UniqueItems { duplicate_indices, .. } =>
|
4189 + | format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#StringSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
|
4190 + | };
|
4191 + | write!(f, "{message}")
|
4192 + | }
|
4193 + | }
|
4194 + |
|
4195 + | impl ::std::error::Error for ConstraintViolation {}
|
4196 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
4197 + | impl ConstraintViolation {
|
4198 + | pub(crate) fn as_validation_exception_field(
|
4199 + | self,
|
4200 + | path: ::std::string::String,
|
4201 + | ) -> crate::model::ValidationExceptionField {
|
4202 + | match self {
|
4203 + | Self::UniqueItems { duplicate_indices, .. } =>
|
4204 + | crate::model::ValidationExceptionField {
|
4205 + | message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
|
4206 + | path,
|
4207 + | },
|
4208 + | }
|
4209 + | }
|
4210 + | }
|
4211 + |
|
4212 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4213 + | }
|
4214 + | pub mod dense_set_map {
|
4215 + |
|
4216 + | /* MapConstraintViolationGenerator.kt:82 */
|
4217 + | #[allow(clippy::enum_variant_names)]
|
4218 + | #[derive(Debug, PartialEq)]
|
4219 + | pub enum ConstraintViolation {
|
4220 + | #[doc(hidden)]
|
4221 + | Value(
|
4222 + | ::std::string::String,
|
4223 + | crate::model::string_set::ConstraintViolation,
|
4224 + | ),
|
4225 + | }
|
4226 + |
|
4227 + | impl ::std::fmt::Display for ConstraintViolation {
|
4228 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4229 + | match self {
|
4230 + | Self::Value(_, value_constraint_violation) => {
|
4231 + | write!(f, "{}", value_constraint_violation)
|
4232 + | }
|
4233 + | }
|
4234 + | }
|
4235 + | }
|
4236 + |
|
4237 + | impl ::std::error::Error for ConstraintViolation {}
|
4238 + | /* MapConstraintViolationGenerator.kt:111 */
|
4239 + | impl ConstraintViolation {
|
4240 + | pub(crate) fn as_validation_exception_field(
|
4241 + | self,
|
4242 + | path: ::std::string::String,
|
4243 + | ) -> crate::model::ValidationExceptionField {
|
4244 + | match self {
|
4245 + | Self::Value(key, value_constraint_violation) => value_constraint_violation
|
4246 + | .as_validation_exception_field(path + "/" + key.as_str()),
|
4247 + | }
|
4248 + | }
|
4249 + | }
|
4250 + |
|
4251 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4252 + | }
|
4253 + | /// /* ServerBuilderGenerator.kt:171 */See [`StructureListMember`](crate::model::StructureListMember).
|
4254 + | pub mod structure_list_member {
|
4255 + |
|
4256 + | /* ServerBuilderGenerator.kt:461 */
|
4257 + | impl ::std::convert::From<Builder> for crate::model::StructureListMember {
|
4258 + | fn from(builder: Builder) -> Self {
|
4259 + | builder.build()
|
4260 + | }
|
4261 + | }
|
4262 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`StructureListMember`](crate::model::StructureListMember).
|
4263 + | /* RustType.kt:534 */
|
4264 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4265 + | /* ServerBuilderGenerator.kt:211 */
|
4266 + | pub struct Builder {
|
4267 + | /* ServerBuilderGenerator.kt:308 */
|
4268 + | pub(crate) a: ::std::option::Option<::std::string::String>,
|
4269 + | /* ServerBuilderGenerator.kt:308 */
|
4270 + | pub(crate) b: ::std::option::Option<::std::string::String>,
|
4271 + | /* ServerBuilderGenerator.kt:211 */
|
4272 + | }
|
4273 + | /* ServerBuilderGenerator.kt:215 */
|
4274 + | impl Builder {
|
4275 + | /* ServerBuilderGenerator.kt:331 */
|
4276 + | #[allow(missing_docs)] // documentation missing in model
|
4277 + | /* ServerBuilderGenerator.kt:343 */
|
4278 + | pub fn a(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4279 + | /* ServerBuilderGenerator.kt:344 */
|
4280 + | self.a =
|
4281 + | /* ServerBuilderGenerator.kt:376 */input
|
4282 + | /* ServerBuilderGenerator.kt:344 */;
|
4283 + | self
|
4284 + | /* ServerBuilderGenerator.kt:343 */
|
4285 + | }
|
4286 + | /* ServerBuilderGenerator.kt:426 */
|
4287 + | #[allow(missing_docs)] // documentation missing in model
|
4288 + | /* ServerBuilderGenerator.kt:428 */
|
4289 + | pub(crate) fn set_a(
|
4290 + | mut self,
|
4291 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4292 + | ) -> Self {
|
4293 + | /* ServerBuilderGenerator.kt:429 */
|
4294 + | self.a = input.map(|v| v.into());
|
4295 + | self
|
4296 + | /* ServerBuilderGenerator.kt:428 */
|
4297 + | }
|
4298 + | /* ServerBuilderGenerator.kt:331 */
|
4299 + | #[allow(missing_docs)] // documentation missing in model
|
4300 + | /* ServerBuilderGenerator.kt:343 */
|
4301 + | pub fn b(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4302 + | /* ServerBuilderGenerator.kt:344 */
|
4303 + | self.b =
|
4304 + | /* ServerBuilderGenerator.kt:376 */input
|
4305 + | /* ServerBuilderGenerator.kt:344 */;
|
4306 + | self
|
4307 + | /* ServerBuilderGenerator.kt:343 */
|
4308 + | }
|
4309 + | /* ServerBuilderGenerator.kt:426 */
|
4310 + | #[allow(missing_docs)] // documentation missing in model
|
4311 + | /* ServerBuilderGenerator.kt:428 */
|
4312 + | pub(crate) fn set_b(
|
4313 + | mut self,
|
4314 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4315 + | ) -> Self {
|
4316 + | /* ServerBuilderGenerator.kt:429 */
|
4317 + | self.b = input.map(|v| v.into());
|
4318 + | self
|
4319 + | /* ServerBuilderGenerator.kt:428 */
|
4320 + | }
|
4321 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StructureListMember`](crate::model::StructureListMember).
|
4322 + | /* ServerBuilderGenerator.kt:271 */
|
4323 + | pub fn build(self) -> crate::model::StructureListMember {
|
4324 + | self.build_enforcing_all_constraints()
|
4325 + | }
|
4326 + | /* ServerBuilderGenerator.kt:283 */
|
4327 + | fn build_enforcing_all_constraints(self) -> crate::model::StructureListMember {
|
4328 + | /* ServerBuilderGenerator.kt:542 */
|
4329 + | crate::model::StructureListMember {
|
4330 + | /* ServerBuilderGenerator.kt:546 */
|
4331 + | a: self.a,
|
4332 + | /* ServerBuilderGenerator.kt:546 */
|
4333 + | b: self.b,
|
4334 + | /* ServerBuilderGenerator.kt:542 */
|
4335 + | }
|
4336 + | /* ServerBuilderGenerator.kt:283 */
|
4337 + | }
|
4338 + | /* ServerBuilderGenerator.kt:215 */
|
4339 + | }
|
4340 + |
|
4341 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4342 + | }
|
4343 + | pub mod foo_enum_list {
|
4344 + |
|
4345 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
4346 + | #[allow(clippy::enum_variant_names)]
|
4347 + | #[derive(Debug, PartialEq)]
|
4348 + | pub enum ConstraintViolation {
|
4349 + | /// Constraint violation error when an element doesn't satisfy its own constraints.
|
4350 + | /// The first component of the tuple is the index in the collection where the
|
4351 + | /// first constraint violation was found.
|
4352 + | #[doc(hidden)]
|
4353 + | Member(usize, crate::model::foo_enum::ConstraintViolation),
|
4354 + | }
|
4355 + |
|
4356 + | impl ::std::fmt::Display for ConstraintViolation {
|
4357 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4358 + | let message = match self {
|
4359 + | Self::Member(index, failing_member) => format!(
|
4360 + | "Value at index {index} failed to satisfy constraint. {}",
|
4361 + | failing_member
|
4362 + | ),
|
4363 + | };
|
4364 + | write!(f, "{message}")
|
4365 + | }
|
4366 + | }
|
4367 + |
|
4368 + | impl ::std::error::Error for ConstraintViolation {}
|
4369 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
4370 + | impl ConstraintViolation {
|
4371 + | pub(crate) fn as_validation_exception_field(
|
4372 + | self,
|
4373 + | path: ::std::string::String,
|
4374 + | ) -> crate::model::ValidationExceptionField {
|
4375 + | match self {
|
4376 + | Self::Member(index, member_constraint_violation) => member_constraint_violation
|
4377 + | .as_validation_exception_field(path + "/" + &index.to_string()),
|
4378 + | }
|
4379 + | }
|
4380 + | }
|
4381 + |
|
4382 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4383 + | }
|
4384 + | /// /* ServerBuilderGenerator.kt:171 */See [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
4385 + | pub mod recursive_shapes_input_output_nested1 {
|
4386 + |
|
4387 + | /* ServerBuilderGenerator.kt:461 */
|
4388 + | impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested1 {
|
4389 + | fn from(builder: Builder) -> Self {
|
4390 + | builder.build()
|
4391 + | }
|
4392 + | }
|
4393 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
4394 + | /* RustType.kt:534 */
|
4395 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4396 + | /* ServerBuilderGenerator.kt:211 */
|
4397 + | pub struct Builder {
|
4398 + | /* ServerBuilderGenerator.kt:308 */
|
4399 + | pub(crate) foo: ::std::option::Option<::std::string::String>,
|
4400 + | /* ServerBuilderGenerator.kt:308 */
|
4401 + | pub(crate) nested: ::std::option::Option<
|
4402 + | ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
|
4403 + | >,
|
4404 + | /* ServerBuilderGenerator.kt:211 */
|
4405 + | }
|
4406 + | /* ServerBuilderGenerator.kt:215 */
|
4407 + | impl Builder {
|
4408 + | /* ServerBuilderGenerator.kt:331 */
|
4409 + | #[allow(missing_docs)] // documentation missing in model
|
4410 + | /* ServerBuilderGenerator.kt:343 */
|
4411 + | pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4412 + | /* ServerBuilderGenerator.kt:344 */
|
4413 + | self.foo =
|
4414 + | /* ServerBuilderGenerator.kt:376 */input
|
4415 + | /* ServerBuilderGenerator.kt:344 */;
|
4416 + | self
|
4417 + | /* ServerBuilderGenerator.kt:343 */
|
4418 + | }
|
4419 + | /* ServerBuilderGenerator.kt:426 */
|
4420 + | #[allow(missing_docs)] // documentation missing in model
|
4421 + | /* ServerBuilderGenerator.kt:428 */
|
4422 + | pub(crate) fn set_foo(
|
4423 + | mut self,
|
4424 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4425 + | ) -> Self {
|
4426 + | /* ServerBuilderGenerator.kt:429 */
|
4427 + | self.foo = input.map(|v| v.into());
|
4428 + | self
|
4429 + | /* ServerBuilderGenerator.kt:428 */
|
4430 + | }
|
4431 + | /* ServerBuilderGenerator.kt:331 */
|
4432 + | #[allow(missing_docs)] // documentation missing in model
|
4433 + | /* ServerBuilderGenerator.kt:343 */
|
4434 + | pub fn nested(
|
4435 + | mut self,
|
4436 + | input: ::std::option::Option<
|
4437 + | ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
|
4438 + | >,
|
4439 + | ) -> Self {
|
4440 + | /* ServerBuilderGenerator.kt:344 */
|
4441 + | self.nested =
|
4442 + | /* ServerBuilderGenerator.kt:376 */input
|
4443 + | /* ServerBuilderGenerator.kt:344 */;
|
4444 + | self
|
4445 + | /* ServerBuilderGenerator.kt:343 */
|
4446 + | }
|
4447 + | /* ServerBuilderGenerator.kt:426 */
|
4448 + | #[allow(missing_docs)] // documentation missing in model
|
4449 + | /* ServerBuilderGenerator.kt:428 */
|
4450 + | pub(crate) fn set_nested(
|
4451 + | mut self,
|
4452 + | input: Option<
|
4453 + | impl ::std::convert::Into<
|
4454 + | ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
|
4455 + | >,
|
4456 + | >,
|
4457 + | ) -> Self {
|
4458 + | /* ServerBuilderGenerator.kt:429 */
|
4459 + | self.nested = input.map(|v| v.into());
|
4460 + | self
|
4461 + | /* ServerBuilderGenerator.kt:428 */
|
4462 + | }
|
4463 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
4464 + | /* ServerBuilderGenerator.kt:271 */
|
4465 + | pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested1 {
|
4466 + | self.build_enforcing_all_constraints()
|
4467 + | }
|
4468 + | /* ServerBuilderGenerator.kt:283 */
|
4469 + | fn build_enforcing_all_constraints(
|
4470 + | self,
|
4471 + | ) -> crate::model::RecursiveShapesInputOutputNested1 {
|
4472 + | /* ServerBuilderGenerator.kt:542 */
|
4473 + | crate::model::RecursiveShapesInputOutputNested1 {
|
4474 + | /* ServerBuilderGenerator.kt:546 */
|
4475 + | foo: self.foo,
|
4476 + | /* ServerBuilderGenerator.kt:546 */
|
4477 + | nested: self.nested,
|
4478 + | /* ServerBuilderGenerator.kt:542 */
|
4479 + | }
|
4480 + | /* ServerBuilderGenerator.kt:283 */
|
4481 + | }
|
4482 + | /* ServerBuilderGenerator.kt:215 */
|
4483 + | }
|
4484 + |
|
4485 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4486 + | }
|
4487 + | /// /* ServerBuilderGenerator.kt:171 */See [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
4488 + | pub mod recursive_shapes_input_output_nested2 {
|
4489 + |
|
4490 + | /* ServerBuilderGenerator.kt:461 */
|
4491 + | impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested2 {
|
4492 + | fn from(builder: Builder) -> Self {
|
4493 + | builder.build()
|
4494 + | }
|
4495 + | }
|
4496 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
4497 + | /* RustType.kt:534 */
|
4498 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4499 + | /* ServerBuilderGenerator.kt:211 */
|
4500 + | pub struct Builder {
|
4501 + | /* ServerBuilderGenerator.kt:308 */
|
4502 + | pub(crate) bar: ::std::option::Option<::std::string::String>,
|
4503 + | /* ServerBuilderGenerator.kt:308 */
|
4504 + | pub(crate) recursive_member:
|
4505 + | ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
4506 + | /* ServerBuilderGenerator.kt:211 */
|
4507 + | }
|
4508 + | /* ServerBuilderGenerator.kt:215 */
|
4509 + | impl Builder {
|
4510 + | /* ServerBuilderGenerator.kt:331 */
|
4511 + | #[allow(missing_docs)] // documentation missing in model
|
4512 + | /* ServerBuilderGenerator.kt:343 */
|
4513 + | pub fn bar(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4514 + | /* ServerBuilderGenerator.kt:344 */
|
4515 + | self.bar =
|
4516 + | /* ServerBuilderGenerator.kt:376 */input
|
4517 + | /* ServerBuilderGenerator.kt:344 */;
|
4518 + | self
|
4519 + | /* ServerBuilderGenerator.kt:343 */
|
4520 + | }
|
4521 + | /* ServerBuilderGenerator.kt:426 */
|
4522 + | #[allow(missing_docs)] // documentation missing in model
|
4523 + | /* ServerBuilderGenerator.kt:428 */
|
4524 + | pub(crate) fn set_bar(
|
4525 + | mut self,
|
4526 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4527 + | ) -> Self {
|
4528 + | /* ServerBuilderGenerator.kt:429 */
|
4529 + | self.bar = input.map(|v| v.into());
|
4530 + | self
|
4531 + | /* ServerBuilderGenerator.kt:428 */
|
4532 + | }
|
4533 + | /* ServerBuilderGenerator.kt:331 */
|
4534 + | #[allow(missing_docs)] // documentation missing in model
|
4535 + | /* ServerBuilderGenerator.kt:343 */
|
4536 + | pub fn recursive_member(
|
4537 + | mut self,
|
4538 + | input: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
4539 + | ) -> Self {
|
4540 + | /* ServerBuilderGenerator.kt:344 */
|
4541 + | self.recursive_member =
|
4542 + | /* ServerBuilderGenerator.kt:376 */input
|
4543 + | /* ServerBuilderGenerator.kt:344 */;
|
4544 + | self
|
4545 + | /* ServerBuilderGenerator.kt:343 */
|
4546 + | }
|
4547 + | /* ServerBuilderGenerator.kt:426 */
|
4548 + | #[allow(missing_docs)] // documentation missing in model
|
4549 + | /* ServerBuilderGenerator.kt:428 */
|
4550 + | pub(crate) fn set_recursive_member(
|
4551 + | mut self,
|
4552 + | input: Option<
|
4553 + | impl ::std::convert::Into<crate::model::RecursiveShapesInputOutputNested1>,
|
4554 + | >,
|
4555 + | ) -> Self {
|
4556 + | /* ServerBuilderGenerator.kt:429 */
|
4557 + | self.recursive_member = input.map(|v| v.into());
|
4558 + | self
|
4559 + | /* ServerBuilderGenerator.kt:428 */
|
4560 + | }
|
4561 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
4562 + | /* ServerBuilderGenerator.kt:271 */
|
4563 + | pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested2 {
|
4564 + | self.build_enforcing_all_constraints()
|
4565 + | }
|
4566 + | /* ServerBuilderGenerator.kt:283 */
|
4567 + | fn build_enforcing_all_constraints(
|
4568 + | self,
|
4569 + | ) -> crate::model::RecursiveShapesInputOutputNested2 {
|
4570 + | /* ServerBuilderGenerator.kt:542 */
|
4571 + | crate::model::RecursiveShapesInputOutputNested2 {
|
4572 + | /* ServerBuilderGenerator.kt:546 */
|
4573 + | bar: self.bar,
|
4574 + | /* ServerBuilderGenerator.kt:546 */
|
4575 + | recursive_member: self.recursive_member,
|
4576 + | /* ServerBuilderGenerator.kt:542 */
|
4577 + | }
|
4578 + | /* ServerBuilderGenerator.kt:283 */
|
4579 + | }
|
4580 + | /* ServerBuilderGenerator.kt:215 */
|
4581 + | }
|
4582 + |
|
4583 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4584 + | }
|
4585 + | /// /* CodegenDelegator.kt:52 */See [`IntegerEnumSet`](crate::model::IntegerEnumSet).
|
4586 + | pub mod integer_enum_set {
|
4587 + |
|
4588 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
4589 + | #[allow(clippy::enum_variant_names)]
|
4590 + | #[derive(Debug, PartialEq)]
|
4591 + | pub enum ConstraintViolation {
|
4592 + | /// Constraint violation error when the list does not contain unique items
|
4593 + | UniqueItems {
|
4594 + | /// A vector of indices into `original` pointing to all duplicate items. This vector has
|
4595 + | /// at least two elements.
|
4596 + | /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
|
4597 + | /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
|
4598 + | /// Nothing is guaranteed about the order of the indices.
|
4599 + | duplicate_indices: ::std::vec::Vec<usize>,
|
4600 + | /// The original vector, that contains duplicate items.
|
4601 + | original: ::std::vec::Vec<i32>,
|
4602 + | },
|
4603 + | }
|
4604 + |
|
4605 + | impl ::std::fmt::Display for ConstraintViolation {
|
4606 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4607 + | let message = match self {
|
4608 + | Self::UniqueItems { duplicate_indices, .. } =>
|
4609 + | format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
|
4610 + | };
|
4611 + | write!(f, "{message}")
|
4612 + | }
|
4613 + | }
|
4614 + |
|
4615 + | impl ::std::error::Error for ConstraintViolation {}
|
4616 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
4617 + | impl ConstraintViolation {
|
4618 + | pub(crate) fn as_validation_exception_field(
|
4619 + | self,
|
4620 + | path: ::std::string::String,
|
4621 + | ) -> crate::model::ValidationExceptionField {
|
4622 + | match self {
|
4623 + | Self::UniqueItems { duplicate_indices, .. } =>
|
4624 + | crate::model::ValidationExceptionField {
|
4625 + | message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
|
4626 + | path,
|
4627 + | },
|
4628 + | }
|
4629 + | }
|
4630 + | }
|
4631 + |
|
4632 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4633 + | }
|
4634 + | pub mod foo_enum_map {
|
4635 + |
|
4636 + | /* MapConstraintViolationGenerator.kt:82 */
|
4637 + | #[allow(clippy::enum_variant_names)]
|
4638 + | #[derive(Debug, PartialEq)]
|
4639 + | pub enum ConstraintViolation {
|
4640 + | #[doc(hidden)]
|
4641 + | Value(
|
4642 + | ::std::string::String,
|
4643 + | crate::model::foo_enum::ConstraintViolation,
|
4644 + | ),
|
4645 + | }
|
4646 + |
|
4647 + | impl ::std::fmt::Display for ConstraintViolation {
|
4648 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4649 + | match self {
|
4650 + | Self::Value(_, value_constraint_violation) => {
|
4651 + | write!(f, "{}", value_constraint_violation)
|
4652 + | }
|
4653 + | }
|
4654 + | }
|
4655 + | }
|
4656 + |
|
4657 + | impl ::std::error::Error for ConstraintViolation {}
|
4658 + | /* MapConstraintViolationGenerator.kt:111 */
|
4659 + | impl ConstraintViolation {
|
4660 + | pub(crate) fn as_validation_exception_field(
|
4661 + | self,
|
4662 + | path: ::std::string::String,
|
4663 + | ) -> crate::model::ValidationExceptionField {
|
4664 + | match self {
|
4665 + | Self::Value(key, value_constraint_violation) => value_constraint_violation
|
4666 + | .as_validation_exception_field(path + "/" + key.as_str()),
|
4667 + | }
|
4668 + | }
|
4669 + | }
|
4670 + |
|
4671 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4672 + | }
|
4673 + | /// /* CodegenDelegator.kt:52 */See [`FooEnumSet`](crate::model::FooEnumSet).
|
4674 + | pub mod foo_enum_set {
|
4675 + |
|
4676 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
4677 + | #[allow(clippy::enum_variant_names)]
|
4678 + | #[derive(Debug, PartialEq)]
|
4679 + | pub enum ConstraintViolation {
|
4680 + | /// Constraint violation error when the list does not contain unique items
|
4681 + | UniqueItems {
|
4682 + | /// A vector of indices into `original` pointing to all duplicate items. This vector has
|
4683 + | /// at least two elements.
|
4684 + | /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
|
4685 + | /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
|
4686 + | /// Nothing is guaranteed about the order of the indices.
|
4687 + | duplicate_indices: ::std::vec::Vec<usize>,
|
4688 + | /// The original vector, that contains duplicate items.
|
4689 + | original: ::std::vec::Vec<crate::model::FooEnum>,
|
4690 + | },
|
4691 + | /// Constraint violation error when an element doesn't satisfy its own constraints.
|
4692 + | /// The first component of the tuple is the index in the collection where the
|
4693 + | /// first constraint violation was found.
|
4694 + | #[doc(hidden)]
|
4695 + | Member(usize, crate::model::foo_enum::ConstraintViolation),
|
4696 + | }
|
4697 + |
|
4698 + | impl ::std::fmt::Display for ConstraintViolation {
|
4699 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4700 + | let message = match self {
|
4701 + | Self::UniqueItems { duplicate_indices, .. } =>
|
4702 + | format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#FooEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
|
4703 + | Self::Member(index, failing_member) => format!("Value at index {index} failed to satisfy constraint. {}",
|
4704 + | failing_member)
|
4705 + | };
|
4706 + | write!(f, "{message}")
|
4707 + | }
|
4708 + | }
|
4709 + |
|
4710 + | impl ::std::error::Error for ConstraintViolation {}
|
4711 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
4712 + | impl ConstraintViolation {
|
4713 + | pub(crate) fn as_validation_exception_field(
|
4714 + | self,
|
4715 + | path: ::std::string::String,
|
4716 + | ) -> crate::model::ValidationExceptionField {
|
4717 + | match self {
|
4718 + | Self::UniqueItems { duplicate_indices, .. } =>
|
4719 + | crate::model::ValidationExceptionField {
|
4720 + | message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
|
4721 + | path,
|
4722 + | },
|
4723 + | Self::Member(index, member_constraint_violation) =>
|
4724 + | member_constraint_violation.as_validation_exception_field(path + "/" + &index.to_string())
|
4725 + | }
|
4726 + | }
|
4727 + | }
|
4728 + |
|
4729 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4730 + | }
|
4731 + | /// /* ServerBuilderGenerator.kt:171 */See [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
4732 + | pub mod complex_nested_error_data {
|
4733 + |
|
4734 + | /* ServerBuilderGenerator.kt:461 */
|
4735 + | impl ::std::convert::From<Builder> for crate::model::ComplexNestedErrorData {
|
4736 + | fn from(builder: Builder) -> Self {
|
4737 + | builder.build()
|
4738 + | }
|
4739 + | }
|
4740 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
4741 + | /* RustType.kt:534 */
|
4742 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4743 + | /* ServerBuilderGenerator.kt:211 */
|
4744 + | pub struct Builder {
|
4745 + | /* ServerBuilderGenerator.kt:308 */
|
4746 + | pub(crate) foo: ::std::option::Option<::std::string::String>,
|
4747 + | /* ServerBuilderGenerator.kt:211 */
|
4748 + | }
|
4749 + | /* ServerBuilderGenerator.kt:215 */
|
4750 + | impl Builder {
|
4751 + | /* ServerBuilderGenerator.kt:331 */
|
4752 + | #[allow(missing_docs)] // documentation missing in model
|
4753 + | /* ServerBuilderGenerator.kt:343 */
|
4754 + | pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4755 + | /* ServerBuilderGenerator.kt:344 */
|
4756 + | self.foo =
|
4757 + | /* ServerBuilderGenerator.kt:376 */input
|
4758 + | /* ServerBuilderGenerator.kt:344 */;
|
4759 + | self
|
4760 + | /* ServerBuilderGenerator.kt:343 */
|
4761 + | }
|
4762 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
4763 + | /* ServerBuilderGenerator.kt:271 */
|
4764 + | pub fn build(self) -> crate::model::ComplexNestedErrorData {
|
4765 + | self.build_enforcing_all_constraints()
|
4766 + | }
|
4767 + | /* ServerBuilderGenerator.kt:283 */
|
4768 + | fn build_enforcing_all_constraints(self) -> crate::model::ComplexNestedErrorData {
|
4769 + | /* ServerBuilderGenerator.kt:542 */
|
4770 + | crate::model::ComplexNestedErrorData {
|
4771 + | /* ServerBuilderGenerator.kt:546 */
|
4772 + | foo: self.foo,
|
4773 + | /* ServerBuilderGenerator.kt:542 */
|
4774 + | }
|
4775 + | /* ServerBuilderGenerator.kt:283 */
|
4776 + | }
|
4777 + | /* ServerBuilderGenerator.kt:215 */
|
4778 + | }
|
4779 + |
|
4780 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4781 + | }
|
4782 + | /// /* ServerBuilderGenerator.kt:171 */See [`NestedPayload`](crate::model::NestedPayload).
|
4783 + | pub mod nested_payload {
|
4784 + |
|
4785 + | /* ServerBuilderGenerator.kt:461 */
|
4786 + | impl ::std::convert::From<Builder> for crate::model::NestedPayload {
|
4787 + | fn from(builder: Builder) -> Self {
|
4788 + | builder.build()
|
4789 + | }
|
4790 + | }
|
4791 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`NestedPayload`](crate::model::NestedPayload).
|
4792 + | /* RustType.kt:534 */
|
4793 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4794 + | /* ServerBuilderGenerator.kt:211 */
|
4795 + | pub struct Builder {
|
4796 + | /* ServerBuilderGenerator.kt:308 */
|
4797 + | pub(crate) greeting: ::std::option::Option<::std::string::String>,
|
4798 + | /* ServerBuilderGenerator.kt:308 */
|
4799 + | pub(crate) name: ::std::option::Option<::std::string::String>,
|
4800 + | /* ServerBuilderGenerator.kt:211 */
|
4801 + | }
|
4802 + | /* ServerBuilderGenerator.kt:215 */
|
4803 + | impl Builder {
|
4804 + | /* ServerBuilderGenerator.kt:331 */
|
4805 + | #[allow(missing_docs)] // documentation missing in model
|
4806 + | /* ServerBuilderGenerator.kt:343 */
|
4807 + | pub fn greeting(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4808 + | /* ServerBuilderGenerator.kt:344 */
|
4809 + | self.greeting =
|
4810 + | /* ServerBuilderGenerator.kt:376 */input
|
4811 + | /* ServerBuilderGenerator.kt:344 */;
|
4812 + | self
|
4813 + | /* ServerBuilderGenerator.kt:343 */
|
4814 + | }
|
4815 + | /* ServerBuilderGenerator.kt:426 */
|
4816 + | #[allow(missing_docs)] // documentation missing in model
|
4817 + | /* ServerBuilderGenerator.kt:428 */
|
4818 + | pub(crate) fn set_greeting(
|
4819 + | mut self,
|
4820 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4821 + | ) -> Self {
|
4822 + | /* ServerBuilderGenerator.kt:429 */
|
4823 + | self.greeting = input.map(|v| v.into());
|
4824 + | self
|
4825 + | /* ServerBuilderGenerator.kt:428 */
|
4826 + | }
|
4827 + | /* ServerBuilderGenerator.kt:331 */
|
4828 + | #[allow(missing_docs)] // documentation missing in model
|
4829 + | /* ServerBuilderGenerator.kt:343 */
|
4830 + | pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4831 + | /* ServerBuilderGenerator.kt:344 */
|
4832 + | self.name =
|
4833 + | /* ServerBuilderGenerator.kt:376 */input
|
4834 + | /* ServerBuilderGenerator.kt:344 */;
|
4835 + | self
|
4836 + | /* ServerBuilderGenerator.kt:343 */
|
4837 + | }
|
4838 + | /* ServerBuilderGenerator.kt:426 */
|
4839 + | #[allow(missing_docs)] // documentation missing in model
|
4840 + | /* ServerBuilderGenerator.kt:428 */
|
4841 + | pub(crate) fn set_name(
|
4842 + | mut self,
|
4843 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4844 + | ) -> Self {
|
4845 + | /* ServerBuilderGenerator.kt:429 */
|
4846 + | self.name = input.map(|v| v.into());
|
4847 + | self
|
4848 + | /* ServerBuilderGenerator.kt:428 */
|
4849 + | }
|
4850 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`NestedPayload`](crate::model::NestedPayload).
|
4851 + | /* ServerBuilderGenerator.kt:271 */
|
4852 + | pub fn build(self) -> crate::model::NestedPayload {
|
4853 + | self.build_enforcing_all_constraints()
|
4854 + | }
|
4855 + | /* ServerBuilderGenerator.kt:283 */
|
4856 + | fn build_enforcing_all_constraints(self) -> crate::model::NestedPayload {
|
4857 + | /* ServerBuilderGenerator.kt:542 */
|
4858 + | crate::model::NestedPayload {
|
4859 + | /* ServerBuilderGenerator.kt:546 */
|
4860 + | greeting: self.greeting,
|
4861 + | /* ServerBuilderGenerator.kt:546 */
|
4862 + | name: self.name,
|
4863 + | /* ServerBuilderGenerator.kt:542 */
|
4864 + | }
|
4865 + | /* ServerBuilderGenerator.kt:283 */
|
4866 + | }
|
4867 + | /* ServerBuilderGenerator.kt:215 */
|
4868 + | }
|
4869 + |
|
4870 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4871 + | }
|
4872 + | /// /* CodegenDelegator.kt:52 */See [`IntegerSet`](crate::model::IntegerSet).
|
4873 + | pub mod integer_set {
|
4874 + |
|
4875 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
4876 + | #[allow(clippy::enum_variant_names)]
|
4877 + | #[derive(Debug, PartialEq)]
|
4878 + | pub enum ConstraintViolation {
|
4879 + | /// Constraint violation error when the list does not contain unique items
|
4880 + | UniqueItems {
|
4881 + | /// A vector of indices into `original` pointing to all duplicate items. This vector has
|
4882 + | /// at least two elements.
|
4883 + | /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
|
4884 + | /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
|
4885 + | /// Nothing is guaranteed about the order of the indices.
|
4886 + | duplicate_indices: ::std::vec::Vec<usize>,
|
4887 + | /// The original vector, that contains duplicate items.
|
4888 + | original: ::std::vec::Vec<i32>,
|
4889 + | },
|
4890 + | }
|
4891 + |
|
4892 + | impl ::std::fmt::Display for ConstraintViolation {
|
4893 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4894 + | let message = match self {
|
4895 + | Self::UniqueItems { duplicate_indices, .. } =>
|
4896 + | format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
|
4897 + | };
|
4898 + | write!(f, "{message}")
|
4899 + | }
|
4900 + | }
|
4901 + |
|
4902 + | impl ::std::error::Error for ConstraintViolation {}
|
4903 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
4904 + | impl ConstraintViolation {
|
4905 + | pub(crate) fn as_validation_exception_field(
|
4906 + | self,
|
4907 + | path: ::std::string::String,
|
4908 + | ) -> crate::model::ValidationExceptionField {
|
4909 + | match self {
|
4910 + | Self::UniqueItems { duplicate_indices, .. } =>
|
4911 + | crate::model::ValidationExceptionField {
|
4912 + | message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
|
4913 + | path,
|
4914 + | },
|
4915 + | }
|
4916 + | }
|
4917 + | }
|
4918 + |
|
4919 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4920 + | }
|