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