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