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