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:534 */
|
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:356 */
|
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:356 */
|
30 45 | }
|
31 46 |
|
47 + | /* StructureGenerator.kt:197 */
|
32 48 | #[allow(missing_docs)] // documentation missing in model
|
49 + | /* RustType.kt:534 */
|
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:356 */
|
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:356 */
|
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:534 */
|
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:356 */
|
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:356 */
|
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:534 */
|
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:356 */
|
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:356 */
|
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:181 */
|
131 215 | #[allow(missing_docs)] // documentation missing in model
|
216 + | /* RustType.kt:534 */
|
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:298 */ enum TestEnum {
|
227 + | /* EnumGenerator.kt:181 */
|
142 228 | #[allow(missing_docs)] // documentation missing in model
|
229 + | /* EnumGenerator.kt:170 */
|
143 230 | Bar,
|
231 + | /* EnumGenerator.kt:181 */
|
144 232 | #[allow(missing_docs)] // documentation missing in model
|
233 + | /* EnumGenerator.kt:170 */
|
145 234 | Baz,
|
235 + | /* EnumGenerator.kt:181 */
|
146 236 | #[allow(missing_docs)] // documentation missing in model
|
237 + | /* EnumGenerator.kt:170 */
|
147 238 | Foo,
|
239 + | /* EnumGenerator.kt:298 */
|
148 240 | }
|
149 - | /// See [`TestEnum`](crate::model::TestEnum).
|
241 + | /// /* CodegenDelegator.kt:52 */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:47 */
|
178 272 | }
|
273 + | /* ServerEnumGenerator.kt:88 */
|
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:148 */
|
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:309 */
|
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:254 */
|
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:534 */
|
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:356 */
|
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:356 */
|
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:534 */
|
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:356 */
|
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:356 */
|
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:534 */
|
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:356 */
|
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:356 */
|
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:534 */
|
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:356 */
|
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:356 */
|
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:534 */
|
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:534 */
|
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:534 */
|
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:534 */
|
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:534 */
|
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:356 */
|
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:356 */
|
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:534 */
|
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:534 */
|
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:356 */
|
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:356 */
|
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:534 */
|
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:356 */
|
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:356 */
|
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:181 */
|
850 1384 | #[allow(missing_docs)] // documentation missing in model
|
1385 + | /* RustType.kt:534 */
|
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:298 */ enum FooEnum {
|
1396 + | /* EnumGenerator.kt:181 */
|
861 1397 | #[allow(missing_docs)] // documentation missing in model
|
1398 + | /* EnumGenerator.kt:170 */
|
862 1399 | Zero,
|
1400 + | /* EnumGenerator.kt:181 */
|
863 1401 | #[allow(missing_docs)] // documentation missing in model
|
1402 + | /* EnumGenerator.kt:170 */
|
864 1403 | One,
|
1404 + | /* EnumGenerator.kt:181 */
|
865 1405 | #[allow(missing_docs)] // documentation missing in model
|
1406 + | /* EnumGenerator.kt:170 */
|
866 1407 | Bar,
|
1408 + | /* EnumGenerator.kt:181 */
|
867 1409 | #[allow(missing_docs)] // documentation missing in model
|
1410 + | /* EnumGenerator.kt:170 */
|
868 1411 | Baz,
|
1412 + | /* EnumGenerator.kt:181 */
|
869 1413 | #[allow(missing_docs)] // documentation missing in model
|
1414 + | /* EnumGenerator.kt:170 */
|
870 1415 | Foo,
|
1416 + | /* EnumGenerator.kt:298 */
|
871 1417 | }
|
872 - | /// See [`FooEnum`](crate::model::FooEnum).
|
1418 + | /// /* CodegenDelegator.kt:52 */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:47 */
|
901 1449 | }
|
1450 + | /* ServerEnumGenerator.kt:88 */
|
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:148 */
|
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:309 */
|
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:254 */
|
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:534 */
|
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:534 */
|
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:356 */
|
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:356 */
|
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:534 */
|
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:356 */
|
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:356 */
|
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:534 */
|
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:356 */
|
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:356 */
|
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:534 */
|
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:534 */
|
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:534 */
|
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:356 */
|
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:356 */
|
1310 1971 | }
|
1311 1972 |
|
1973 + | /* UnionGenerator.kt:67 */
|
1312 1974 | #[allow(missing_docs)] // documentation missing in model
|
1975 + | /* RustType.kt:534 */
|
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:534 */
|
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:181 */
|
1337 2016 | #[allow(missing_docs)] // documentation missing in model
|
2017 + | /* RustType.kt:534 */
|
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:298 */ enum StringEnum {
|
2028 + | /* EnumGenerator.kt:181 */
|
1348 2029 | #[allow(missing_docs)] // documentation missing in model
|
2030 + | /* EnumGenerator.kt:170 */
|
1349 2031 | V,
|
2032 + | /* EnumGenerator.kt:298 */
|
1350 2033 | }
|
1351 - | /// See [`StringEnum`](crate::model::StringEnum).
|
2034 + | /// /* CodegenDelegator.kt:52 */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:47 */
|
1380 2065 | }
|
2066 + | /* ServerEnumGenerator.kt:88 */
|
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:148 */
|
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:309 */
|
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:254 */
|
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:534 */
|
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:356 */
|
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:356 */
|
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:534 */
|
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:534 */
|
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:534 */
|
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:137 */`path` was not provided but it is required when building `ValidationExceptionField`.
|
2271 + | /* ServerBuilderConstraintViolations.kt:144 */
|
1549 2272 | MissingPath,
|
1550 - | /// `message` was not provided but it is required when building `ValidationExceptionField`.
|
2273 + | /// /* ServerBuilderConstraintViolations.kt:137 */`message` was not provided but it is required when building `ValidationExceptionField`.
|
2274 + | /* ServerBuilderConstraintViolations.kt:144 */
|
1551 2275 | MissingMessage,
|
2276 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1552 2277 | }
|
2278 + | /* ServerBuilderConstraintViolations.kt:116 */
|
1553 2279 | impl ::std::fmt::Display for ConstraintViolation {
|
2280 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1554 2281 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2282 + | /* ServerBuilderConstraintViolations.kt:118 */
|
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:126 */ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
|
2285 + | /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
|
2286 + | /* ServerBuilderConstraintViolations.kt:118 */}
|
2287 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1559 2288 | }
|
2289 + | /* ServerBuilderConstraintViolations.kt:116 */
|
1560 2290 | }
|
2291 + | /* ServerBuilderConstraintViolations.kt:83 */
|
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:534 */
|
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:534 */
|
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(|| String::from("hi")),
|
2481 + | /* ServerBuilderGenerator.kt:546 */
|
2482 + | greeting: self
|
2483 + | .greeting
|
2484 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
2485 + | .unwrap_or_else(|| String::from("hi")),
|
2486 + | /* ServerBuilderGenerator.kt:546 */
|
1667 2487 | farewell: self.farewell,
|
2488 + | /* ServerBuilderGenerator.kt:542 */
|
1668 2489 | }
|
2490 + | /* ServerBuilderGenerator.kt:283 */
|
1669 2491 | }
|
2492 + | /* ServerBuilderGenerator.kt:215 */
|
1670 2493 | }
|
2494 + |
|
2495 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1671 2496 | }
|
1672 - | /// See [`Farewell`](crate::model::Farewell).
|
2497 + | /// /* ServerBuilderGenerator.kt:171 */See [`Farewell`](crate::model::Farewell).
|
1673 2498 | pub mod farewell {
|
1674 2499 |
|
2500 + | /* ServerBuilderGenerator.kt:461 */
|
1675 2501 | impl ::std::convert::From<Builder> for crate::model::Farewell {
|
1676 2502 | fn from(builder: Builder) -> Self {
|
1677 2503 | builder.build()
|
1678 2504 | }
|
1679 2505 | }
|
1680 - | /// A builder for [`Farewell`](crate::model::Farewell).
|
2506 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Farewell`](crate::model::Farewell).
|
2507 + | /* RustType.kt:534 */
|
1681 2508 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2509 + | /* ServerBuilderGenerator.kt:211 */
|
1682 2510 | pub struct Builder {
|
2511 + | /* ServerBuilderGenerator.kt:308 */
|
1683 2512 | pub(crate) phrase: ::std::option::Option<::std::string::String>,
|
2513 + | /* ServerBuilderGenerator.kt:211 */
|
1684 2514 | }
|
2515 + | /* ServerBuilderGenerator.kt:215 */
|
1685 2516 | impl Builder {
|
2517 + | /* ServerBuilderGenerator.kt:331 */
|
1686 2518 | #[allow(missing_docs)] // documentation missing in model
|
2519 + | /* ServerBuilderGenerator.kt:343 */
|
1687 2520 | pub fn phrase(mut self, input: ::std::string::String) -> Self {
|
1688 - | self.phrase = Some(input);
|
2521 + | /* ServerBuilderGenerator.kt:344 */
|
2522 + | self.phrase =
|
2523 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2524 + | /* ServerBuilderGenerator.kt:376 */input
|
2525 + | /* ServerBuilderGenerator.kt:345 */)
|
2526 + | /* ServerBuilderGenerator.kt:344 */;
|
1689 2527 | self
|
2528 + | /* ServerBuilderGenerator.kt:343 */
|
1690 2529 | }
|
2530 + | /* ServerBuilderGenerator.kt:426 */
|
1691 2531 | #[allow(missing_docs)] // documentation missing in model
|
2532 + | /* ServerBuilderGenerator.kt:428 */
|
1692 2533 | pub(crate) fn set_phrase(
|
1693 2534 | mut self,
|
1694 2535 | input: impl ::std::convert::Into<::std::string::String>,
|
1695 2536 | ) -> Self {
|
2537 + | /* ServerBuilderGenerator.kt:429 */
|
1696 2538 | self.phrase = Some(input.into());
|
1697 2539 | self
|
2540 + | /* ServerBuilderGenerator.kt:428 */
|
1698 2541 | }
|
1699 - | /// Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
|
2542 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
|
2543 + | /* ServerBuilderGenerator.kt:271 */
|
1700 2544 | pub fn build(self) -> crate::model::Farewell {
|
1701 2545 | self.build_enforcing_all_constraints()
|
1702 2546 | }
|
2547 + | /* ServerBuilderGenerator.kt:283 */
|
1703 2548 | fn build_enforcing_all_constraints(self) -> crate::model::Farewell {
|
2549 + | /* ServerBuilderGenerator.kt:542 */
|
1704 2550 | crate::model::Farewell {
|
1705 - | phrase: self.phrase.unwrap_or_else(|| String::from("bye")),
|
2551 + | /* ServerBuilderGenerator.kt:546 */
|
2552 + | phrase: self
|
2553 + | .phrase
|
2554 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
2555 + | .unwrap_or_else(|| String::from("bye")),
|
2556 + | /* ServerBuilderGenerator.kt:542 */
|
1706 2557 | }
|
2558 + | /* ServerBuilderGenerator.kt:283 */
|
1707 2559 | }
|
2560 + | /* ServerBuilderGenerator.kt:215 */
|
1708 2561 | }
|
2562 + |
|
2563 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1709 2564 | }
|
1710 - | /// See [`TopLevel`](crate::model::TopLevel).
|
2565 + | /// /* ServerBuilderGenerator.kt:171 */See [`TopLevel`](crate::model::TopLevel).
|
1711 2566 | pub mod top_level {
|
1712 2567 |
|
2568 + | /* RustType.kt:534 */
|
1713 2569 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1714 - | /// Holds one variant for each of the ways the builder can fail.
|
2570 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2571 + | /* RustType.kt:534 */
|
1715 2572 | #[non_exhaustive]
|
2573 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1716 2574 | #[allow(clippy::enum_variant_names)]
|
1717 2575 | pub enum ConstraintViolation {
|
1718 - | /// `dialog` was not provided but it is required when building `TopLevel`.
|
2576 + | /// /* ServerBuilderConstraintViolations.kt:137 */`dialog` was not provided but it is required when building `TopLevel`.
|
2577 + | /* ServerBuilderConstraintViolations.kt:144 */
|
1719 2578 | MissingDialog,
|
2579 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1720 2580 | }
|
2581 + | /* ServerBuilderConstraintViolations.kt:116 */
|
1721 2582 | impl ::std::fmt::Display for ConstraintViolation {
|
2583 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1722 2584 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2585 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1723 2586 | match self {
|
2587 + | /* ServerBuilderConstraintViolations.kt:126 */
|
1724 2588 | ConstraintViolation::MissingDialog => write!(
|
1725 2589 | f,
|
1726 2590 | "`dialog` was not provided but it is required when building `TopLevel`"
|
1727 2591 | ),
|
2592 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1728 2593 | }
|
2594 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1729 2595 | }
|
2596 + | /* ServerBuilderConstraintViolations.kt:116 */
|
1730 2597 | }
|
2598 + | /* ServerBuilderConstraintViolations.kt:83 */
|
1731 2599 | impl ::std::error::Error for ConstraintViolation {}
|
2600 + | /* ServerBuilderConstraintViolations.kt:172 */
|
1732 2601 | impl ConstraintViolation {
|
1733 2602 | pub(crate) fn as_validation_exception_field(
|
1734 2603 | self,
|
1735 2604 | path: ::std::string::String,
|
1736 2605 | ) -> crate::model::ValidationExceptionField {
|
1737 2606 | match self {
|
1738 2607 | ConstraintViolation::MissingDialog => crate::model::ValidationExceptionField {
|
1739 2608 | message: format!("Value at '{}/dialog' failed to satisfy constraint: Member must not be null", path),
|
1740 2609 | path: path + "/dialog",
|
1741 2610 | },
|
1742 2611 | }
|
1743 2612 | }
|
1744 2613 | }
|
2614 + | /* ServerBuilderGenerator.kt:244 */
|
1745 2615 | impl ::std::convert::From<Builder>
|
1746 2616 | for crate::constrained::MaybeConstrained<crate::model::TopLevel>
|
1747 2617 | {
|
1748 2618 | fn from(builder: Builder) -> Self {
|
1749 2619 | Self::Unconstrained(builder)
|
1750 2620 | }
|
1751 2621 | }
|
2622 + | /* ServerBuilderGenerator.kt:446 */
|
1752 2623 | impl ::std::convert::TryFrom<Builder> for crate::model::TopLevel {
|
1753 2624 | type Error = ConstraintViolation;
|
1754 2625 |
|
1755 2626 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1756 2627 | builder.build()
|
1757 2628 | }
|
1758 2629 | }
|
1759 - | /// A builder for [`TopLevel`](crate::model::TopLevel).
|
2630 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`TopLevel`](crate::model::TopLevel).
|
2631 + | /* RustType.kt:534 */
|
1760 2632 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2633 + | /* ServerBuilderGenerator.kt:211 */
|
1761 2634 | pub struct Builder {
|
2635 + | /* ServerBuilderGenerator.kt:308 */
|
1762 2636 | pub(crate) dialog: ::std::option::Option<crate::model::Dialog>,
|
2637 + | /* ServerBuilderGenerator.kt:308 */
|
1763 2638 | pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::model::Dialog>>,
|
2639 + | /* ServerBuilderGenerator.kt:308 */
|
1764 2640 | pub(crate) dialog_map: ::std::option::Option<
|
1765 2641 | ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
1766 2642 | >,
|
2643 + | /* ServerBuilderGenerator.kt:211 */
|
1767 2644 | }
|
2645 + | /* ServerBuilderGenerator.kt:215 */
|
1768 2646 | impl Builder {
|
2647 + | /* ServerBuilderGenerator.kt:331 */
|
1769 2648 | #[allow(missing_docs)] // documentation missing in model
|
2649 + | /* ServerBuilderGenerator.kt:343 */
|
1770 2650 | pub fn dialog(mut self, input: crate::model::Dialog) -> Self {
|
1771 - | self.dialog = Some(input);
|
2651 + | /* ServerBuilderGenerator.kt:344 */
|
2652 + | self.dialog =
|
2653 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2654 + | /* ServerBuilderGenerator.kt:376 */input
|
2655 + | /* ServerBuilderGenerator.kt:345 */)
|
2656 + | /* ServerBuilderGenerator.kt:344 */;
|
1772 2657 | self
|
2658 + | /* ServerBuilderGenerator.kt:343 */
|
1773 2659 | }
|
2660 + | /* ServerBuilderGenerator.kt:426 */
|
1774 2661 | #[allow(missing_docs)] // documentation missing in model
|
2662 + | /* ServerBuilderGenerator.kt:428 */
|
1775 2663 | pub(crate) fn set_dialog(
|
1776 2664 | mut self,
|
1777 2665 | input: impl ::std::convert::Into<crate::model::Dialog>,
|
1778 2666 | ) -> Self {
|
2667 + | /* ServerBuilderGenerator.kt:429 */
|
1779 2668 | self.dialog = Some(input.into());
|
1780 2669 | self
|
2670 + | /* ServerBuilderGenerator.kt:428 */
|
1781 2671 | }
|
2672 + | /* ServerBuilderGenerator.kt:331 */
|
1782 2673 | #[allow(missing_docs)] // documentation missing in model
|
2674 + | /* ServerBuilderGenerator.kt:343 */
|
1783 2675 | pub fn dialog_list(mut self, input: ::std::vec::Vec<crate::model::Dialog>) -> Self {
|
1784 - | self.dialog_list = Some(input);
|
2676 + | /* ServerBuilderGenerator.kt:344 */
|
2677 + | self.dialog_list =
|
2678 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2679 + | /* ServerBuilderGenerator.kt:376 */input
|
2680 + | /* ServerBuilderGenerator.kt:345 */)
|
2681 + | /* ServerBuilderGenerator.kt:344 */;
|
1785 2682 | self
|
2683 + | /* ServerBuilderGenerator.kt:343 */
|
1786 2684 | }
|
2685 + | /* ServerBuilderGenerator.kt:426 */
|
1787 2686 | #[allow(missing_docs)] // documentation missing in model
|
2687 + | /* ServerBuilderGenerator.kt:428 */
|
1788 2688 | pub(crate) fn set_dialog_list(
|
1789 2689 | mut self,
|
1790 2690 | input: impl ::std::convert::Into<::std::vec::Vec<crate::model::Dialog>>,
|
1791 2691 | ) -> Self {
|
2692 + | /* ServerBuilderGenerator.kt:429 */
|
1792 2693 | self.dialog_list = Some(input.into());
|
1793 2694 | self
|
2695 + | /* ServerBuilderGenerator.kt:428 */
|
1794 2696 | }
|
2697 + | /* ServerBuilderGenerator.kt:331 */
|
1795 2698 | #[allow(missing_docs)] // documentation missing in model
|
2699 + | /* ServerBuilderGenerator.kt:343 */
|
1796 2700 | pub fn dialog_map(
|
1797 2701 | mut self,
|
1798 2702 | input: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
1799 2703 | ) -> Self {
|
1800 - | self.dialog_map = Some(input);
|
2704 + | /* ServerBuilderGenerator.kt:344 */
|
2705 + | self.dialog_map =
|
2706 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2707 + | /* ServerBuilderGenerator.kt:376 */input
|
2708 + | /* ServerBuilderGenerator.kt:345 */)
|
2709 + | /* ServerBuilderGenerator.kt:344 */;
|
1801 2710 | self
|
2711 + | /* ServerBuilderGenerator.kt:343 */
|
1802 2712 | }
|
2713 + | /* ServerBuilderGenerator.kt:426 */
|
1803 2714 | #[allow(missing_docs)] // documentation missing in model
|
2715 + | /* ServerBuilderGenerator.kt:428 */
|
1804 2716 | pub(crate) fn set_dialog_map(
|
1805 2717 | mut self,
|
1806 2718 | input: impl ::std::convert::Into<
|
1807 2719 | ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
1808 2720 | >,
|
1809 2721 | ) -> Self {
|
2722 + | /* ServerBuilderGenerator.kt:429 */
|
1810 2723 | self.dialog_map = Some(input.into());
|
1811 2724 | self
|
2725 + | /* ServerBuilderGenerator.kt:428 */
|
1812 2726 | }
|
1813 - | /// Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
|
1814 - | ///
|
2727 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
|
2728 + | /// /* ServerBuilderGenerator.kt:260 */
|
1815 2729 | /// The builder fails to construct a [`TopLevel`](crate::model::TopLevel) if a [`ConstraintViolation`] occurs.
|
1816 2730 | ///
|
2731 + | /* ServerBuilderGenerator.kt:271 */
|
1817 2732 | pub fn build(self) -> Result<crate::model::TopLevel, ConstraintViolation> {
|
1818 2733 | self.build_enforcing_all_constraints()
|
1819 2734 | }
|
2735 + | /* ServerBuilderGenerator.kt:283 */
|
1820 2736 | fn build_enforcing_all_constraints(
|
1821 2737 | self,
|
1822 2738 | ) -> Result<crate::model::TopLevel, ConstraintViolation> {
|
1823 - | Ok(crate::model::TopLevel {
|
1824 - | dialog: self.dialog.ok_or(ConstraintViolation::MissingDialog)?,
|
1825 - | dialog_list: self.dialog_list.unwrap_or_default(),
|
1826 - | dialog_map: self.dialog_map.unwrap_or_default(),
|
1827 - | })
|
2739 + | /* ServerBuilderGenerator.kt:287 */
|
2740 + | Ok(
|
2741 + | /* ServerBuilderGenerator.kt:542 */
|
2742 + | crate::model::TopLevel {
|
2743 + | /* ServerBuilderGenerator.kt:546 */
|
2744 + | dialog: self
|
2745 + | .dialog
|
2746 + | /* ServerBuilderGenerator.kt:569 */
|
2747 + | .ok_or(ConstraintViolation::MissingDialog)?,
|
2748 + | /* ServerBuilderGenerator.kt:546 */
|
2749 + | dialog_list: self
|
2750 + | .dialog_list
|
2751 + | /* ServerBuilderGeneratorCommon.kt:95 */
|
2752 + | .unwrap_or_default(),
|
2753 + | /* ServerBuilderGenerator.kt:546 */
|
2754 + | dialog_map: self
|
2755 + | .dialog_map
|
2756 + | /* ServerBuilderGeneratorCommon.kt:95 */
|
2757 + | .unwrap_or_default(),
|
2758 + | /* ServerBuilderGenerator.kt:542 */
|
2759 + | }, /* ServerBuilderGenerator.kt:287 */
|
2760 + | )
|
2761 + | /* ServerBuilderGenerator.kt:283 */
|
1828 2762 | }
|
2763 + | /* ServerBuilderGenerator.kt:215 */
|
1829 2764 | }
|
2765 + |
|
2766 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1830 2767 | }
|
1831 - | /// See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
2768 + | /// /* ServerBuilderGenerator.kt:171 */See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
1832 2769 | pub mod client_optional_defaults {
|
1833 2770 |
|
2771 + | /* ServerBuilderGenerator.kt:461 */
|
1834 2772 | impl ::std::convert::From<Builder> for crate::model::ClientOptionalDefaults {
|
1835 2773 | fn from(builder: Builder) -> Self {
|
1836 2774 | builder.build()
|
1837 2775 | }
|
1838 2776 | }
|
1839 - | /// A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
2777 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
2778 + | /* RustType.kt:534 */
|
1840 2779 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2780 + | /* ServerBuilderGenerator.kt:211 */
|
1841 2781 | pub struct Builder {
|
2782 + | /* ServerBuilderGenerator.kt:308 */
|
1842 2783 | pub(crate) member: ::std::option::Option<i32>,
|
2784 + | /* ServerBuilderGenerator.kt:211 */
|
1843 2785 | }
|
2786 + | /* ServerBuilderGenerator.kt:215 */
|
1844 2787 | impl Builder {
|
2788 + | /* ServerBuilderGenerator.kt:331 */
|
1845 2789 | #[allow(missing_docs)] // documentation missing in model
|
2790 + | /* ServerBuilderGenerator.kt:343 */
|
1846 2791 | pub fn member(mut self, input: i32) -> Self {
|
1847 - | self.member = Some(input);
|
2792 + | /* ServerBuilderGenerator.kt:344 */
|
2793 + | self.member =
|
2794 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2795 + | /* ServerBuilderGenerator.kt:376 */input
|
2796 + | /* ServerBuilderGenerator.kt:345 */)
|
2797 + | /* ServerBuilderGenerator.kt:344 */;
|
1848 2798 | self
|
2799 + | /* ServerBuilderGenerator.kt:343 */
|
1849 2800 | }
|
2801 + | /* ServerBuilderGenerator.kt:426 */
|
1850 2802 | #[allow(missing_docs)] // documentation missing in model
|
2803 + | /* ServerBuilderGenerator.kt:428 */
|
1851 2804 | pub(crate) fn set_member(mut self, input: impl ::std::convert::Into<i32>) -> Self {
|
2805 + | /* ServerBuilderGenerator.kt:429 */
|
1852 2806 | self.member = Some(input.into());
|
1853 2807 | self
|
2808 + | /* ServerBuilderGenerator.kt:428 */
|
1854 2809 | }
|
1855 - | /// Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
2810 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
2811 + | /* ServerBuilderGenerator.kt:271 */
|
1856 2812 | pub fn build(self) -> crate::model::ClientOptionalDefaults {
|
1857 2813 | self.build_enforcing_all_constraints()
|
1858 2814 | }
|
2815 + | /* ServerBuilderGenerator.kt:283 */
|
1859 2816 | fn build_enforcing_all_constraints(self) -> crate::model::ClientOptionalDefaults {
|
2817 + | /* ServerBuilderGenerator.kt:542 */
|
1860 2818 | crate::model::ClientOptionalDefaults {
|
1861 - | member: self.member.unwrap_or(0i32),
|
2819 + | /* ServerBuilderGenerator.kt:546 */
|
2820 + | member: self
|
2821 + | .member
|
2822 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
2823 + | .unwrap_or(0i32),
|
2824 + | /* ServerBuilderGenerator.kt:542 */
|
1862 2825 | }
|
2826 + | /* ServerBuilderGenerator.kt:283 */
|
1863 2827 | }
|
2828 + | /* ServerBuilderGenerator.kt:215 */
|
1864 2829 | }
|
2830 + |
|
2831 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1865 2832 | }
|
1866 - | /// See [`Defaults`](crate::model::Defaults).
|
2833 + | /// /* ServerBuilderGenerator.kt:171 */See [`Defaults`](crate::model::Defaults).
|
1867 2834 | pub mod defaults {
|
1868 2835 |
|
2836 + | /* RustType.kt:534 */
|
1869 2837 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1870 - | /// Holds one variant for each of the ways the builder can fail.
|
2838 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2839 + | /* RustType.kt:534 */
|
1871 2840 | #[non_exhaustive]
|
2841 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1872 2842 | #[allow(clippy::enum_variant_names)]
|
1873 2843 | pub enum ConstraintViolation {
|
1874 - | /// Constraint violation occurred building member `default_enum` when building `Defaults`.
|
2844 + | /// /* ServerBuilderConstraintViolations.kt:159 */Constraint violation occurred building member `default_enum` when building `Defaults`.
|
2845 + | /* RustType.kt:534 */
|
1875 2846 | #[doc(hidden)]
|
2847 + | /* ServerBuilderConstraintViolations.kt:165 */
|
1876 2848 | DefaultEnum(crate::model::test_enum::ConstraintViolation),
|
2849 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1877 2850 | }
|
2851 + | /* ServerBuilderConstraintViolations.kt:116 */
|
1878 2852 | impl ::std::fmt::Display for ConstraintViolation {
|
2853 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1879 2854 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2855 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1880 2856 | match self {
|
1881 - | ConstraintViolation::DefaultEnum(_) => write!(f, "constraint violation occurred building member `default_enum` when building `Defaults`"),
|
1882 - | }
|
2857 + | /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::DefaultEnum(_) => write!(f, "constraint violation occurred building member `default_enum` when building `Defaults`"),
|
2858 + | /* ServerBuilderConstraintViolations.kt:118 */}
|
2859 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1883 2860 | }
|
2861 + | /* ServerBuilderConstraintViolations.kt:116 */
|
1884 2862 | }
|
2863 + | /* ServerBuilderConstraintViolations.kt:83 */
|
1885 2864 | impl ::std::error::Error for ConstraintViolation {}
|
2865 + | /* ServerBuilderConstraintViolations.kt:172 */
|
1886 2866 | impl ConstraintViolation {
|
1887 2867 | pub(crate) fn as_validation_exception_field(
|
1888 2868 | self,
|
1889 2869 | path: ::std::string::String,
|
1890 2870 | ) -> crate::model::ValidationExceptionField {
|
1891 2871 | match self {
|
1892 2872 | ConstraintViolation::DefaultEnum(inner) => {
|
1893 2873 | inner.as_validation_exception_field(path + "/defaultEnum")
|
1894 2874 | }
|
1895 2875 | }
|
1896 2876 | }
|
1897 2877 | }
|
2878 + | /* ServerBuilderGenerator.kt:244 */
|
1898 2879 | impl ::std::convert::From<Builder>
|
1899 2880 | for crate::constrained::MaybeConstrained<crate::model::Defaults>
|
1900 2881 | {
|
1901 2882 | fn from(builder: Builder) -> Self {
|
1902 2883 | Self::Unconstrained(builder)
|
1903 2884 | }
|
1904 2885 | }
|
2886 + | /* ServerBuilderGenerator.kt:446 */
|
1905 2887 | impl ::std::convert::TryFrom<Builder> for crate::model::Defaults {
|
1906 2888 | type Error = ConstraintViolation;
|
1907 2889 |
|
1908 2890 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1909 2891 | builder.build()
|
1910 2892 | }
|
1911 2893 | }
|
1912 - | /// A builder for [`Defaults`](crate::model::Defaults).
|
2894 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Defaults`](crate::model::Defaults).
|
2895 + | /* RustType.kt:534 */
|
1913 2896 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2897 + | /* ServerBuilderGenerator.kt:211 */
|
1914 2898 | pub struct Builder {
|
2899 + | /* ServerBuilderGenerator.kt:308 */
|
1915 2900 | pub(crate) default_string: ::std::option::Option<::std::string::String>,
|
2901 + | /* ServerBuilderGenerator.kt:308 */
|
1916 2902 | pub(crate) default_boolean: ::std::option::Option<bool>,
|
2903 + | /* ServerBuilderGenerator.kt:308 */
|
1917 2904 | pub(crate) default_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2905 + | /* ServerBuilderGenerator.kt:308 */
|
1918 2906 | pub(crate) default_document_map: ::std::option::Option<::aws_smithy_types::Document>,
|
2907 + | /* ServerBuilderGenerator.kt:308 */
|
1919 2908 | pub(crate) default_document_string: ::std::option::Option<::aws_smithy_types::Document>,
|
2909 + | /* ServerBuilderGenerator.kt:308 */
|
1920 2910 | pub(crate) default_document_boolean: ::std::option::Option<::aws_smithy_types::Document>,
|
2911 + | /* ServerBuilderGenerator.kt:308 */
|
1921 2912 | pub(crate) default_document_list: ::std::option::Option<::aws_smithy_types::Document>,
|
2913 + | /* ServerBuilderGenerator.kt:308 */
|
1922 2914 | pub(crate) default_null_document: ::std::option::Option<::aws_smithy_types::Document>,
|
2915 + | /* ServerBuilderGenerator.kt:308 */
|
1923 2916 | pub(crate) default_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
2917 + | /* ServerBuilderGenerator.kt:308 */
|
1924 2918 | pub(crate) default_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
2919 + | /* ServerBuilderGenerator.kt:308 */
|
1925 2920 | pub(crate) default_byte: ::std::option::Option<i8>,
|
2921 + | /* ServerBuilderGenerator.kt:308 */
|
1926 2922 | pub(crate) default_short: ::std::option::Option<i16>,
|
2923 + | /* ServerBuilderGenerator.kt:308 */
|
1927 2924 | pub(crate) default_integer: ::std::option::Option<i32>,
|
2925 + | /* ServerBuilderGenerator.kt:308 */
|
1928 2926 | pub(crate) default_long: ::std::option::Option<i64>,
|
2927 + | /* ServerBuilderGenerator.kt:308 */
|
1929 2928 | pub(crate) default_float: ::std::option::Option<f32>,
|
2929 + | /* ServerBuilderGenerator.kt:308 */
|
1930 2930 | pub(crate) default_double: ::std::option::Option<f64>,
|
2931 + | /* ServerBuilderGenerator.kt:308 */
|
1931 2932 | pub(crate) default_map: ::std::option::Option<
|
1932 2933 | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1933 2934 | >,
|
2935 + | /* ServerBuilderGenerator.kt:308 */
|
1934 2936 | pub(crate) default_enum:
|
1935 2937 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::TestEnum>>,
|
2938 + | /* ServerBuilderGenerator.kt:308 */
|
1936 2939 | pub(crate) default_int_enum: ::std::option::Option<i32>,
|
2940 + | /* ServerBuilderGenerator.kt:308 */
|
1937 2941 | pub(crate) empty_string: ::std::option::Option<::std::string::String>,
|
2942 + | /* ServerBuilderGenerator.kt:308 */
|
1938 2943 | pub(crate) false_boolean: ::std::option::Option<bool>,
|
2944 + | /* ServerBuilderGenerator.kt:308 */
|
1939 2945 | pub(crate) empty_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
1940 - | pub(crate) zero_byte: ::std::option::Option<i8>,
|
2946 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) zero_byte: ::std::option::Option<i8>,
|
2947 + | /* ServerBuilderGenerator.kt:308 */
|
1941 2948 | pub(crate) zero_short: ::std::option::Option<i16>,
|
2949 + | /* ServerBuilderGenerator.kt:308 */
|
1942 2950 | pub(crate) zero_integer: ::std::option::Option<i32>,
|
1943 - | pub(crate) zero_long: ::std::option::Option<i64>,
|
2951 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) zero_long: ::std::option::Option<i64>,
|
2952 + | /* ServerBuilderGenerator.kt:308 */
|
1944 2953 | pub(crate) zero_float: ::std::option::Option<f32>,
|
2954 + | /* ServerBuilderGenerator.kt:308 */
|
1945 2955 | pub(crate) zero_double: ::std::option::Option<f64>,
|
2956 + | /* ServerBuilderGenerator.kt:211 */
|
1946 2957 | }
|
2958 + | /* ServerBuilderGenerator.kt:215 */
|
1947 2959 | impl Builder {
|
2960 + | /* ServerBuilderGenerator.kt:331 */
|
1948 2961 | #[allow(missing_docs)] // documentation missing in model
|
2962 + | /* ServerBuilderGenerator.kt:343 */
|
1949 2963 | pub fn default_string(mut self, input: ::std::string::String) -> Self {
|
1950 - | self.default_string = Some(input);
|
2964 + | /* ServerBuilderGenerator.kt:344 */
|
2965 + | self.default_string =
|
2966 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2967 + | /* ServerBuilderGenerator.kt:376 */input
|
2968 + | /* ServerBuilderGenerator.kt:345 */)
|
2969 + | /* ServerBuilderGenerator.kt:344 */;
|
1951 2970 | self
|
2971 + | /* ServerBuilderGenerator.kt:343 */
|
1952 2972 | }
|
2973 + | /* ServerBuilderGenerator.kt:426 */
|
1953 2974 | #[allow(missing_docs)] // documentation missing in model
|
2975 + | /* ServerBuilderGenerator.kt:428 */
|
1954 2976 | pub(crate) fn set_default_string(
|
1955 2977 | mut self,
|
1956 2978 | input: impl ::std::convert::Into<::std::string::String>,
|
1957 2979 | ) -> Self {
|
2980 + | /* ServerBuilderGenerator.kt:429 */
|
1958 2981 | self.default_string = Some(input.into());
|
1959 2982 | self
|
2983 + | /* ServerBuilderGenerator.kt:428 */
|
1960 2984 | }
|
2985 + | /* ServerBuilderGenerator.kt:331 */
|
1961 2986 | #[allow(missing_docs)] // documentation missing in model
|
2987 + | /* ServerBuilderGenerator.kt:343 */
|
1962 2988 | pub fn default_boolean(mut self, input: bool) -> Self {
|
1963 - | self.default_boolean = Some(input);
|
2989 + | /* ServerBuilderGenerator.kt:344 */
|
2990 + | self.default_boolean =
|
2991 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2992 + | /* ServerBuilderGenerator.kt:376 */input
|
2993 + | /* ServerBuilderGenerator.kt:345 */)
|
2994 + | /* ServerBuilderGenerator.kt:344 */;
|
1964 2995 | self
|
2996 + | /* ServerBuilderGenerator.kt:343 */
|
1965 2997 | }
|
2998 + | /* ServerBuilderGenerator.kt:426 */
|
1966 2999 | #[allow(missing_docs)] // documentation missing in model
|
3000 + | /* ServerBuilderGenerator.kt:428 */
|
1967 3001 | pub(crate) fn set_default_boolean(
|
1968 3002 | mut self,
|
1969 3003 | input: impl ::std::convert::Into<bool>,
|
1970 3004 | ) -> Self {
|
3005 + | /* ServerBuilderGenerator.kt:429 */
|
1971 3006 | self.default_boolean = Some(input.into());
|
1972 3007 | self
|
3008 + | /* ServerBuilderGenerator.kt:428 */
|
1973 3009 | }
|
3010 + | /* ServerBuilderGenerator.kt:331 */
|
1974 3011 | #[allow(missing_docs)] // documentation missing in model
|
3012 + | /* ServerBuilderGenerator.kt:343 */
|
1975 3013 | pub fn default_list(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
|
1976 - | self.default_list = Some(input);
|
3014 + | /* ServerBuilderGenerator.kt:344 */
|
3015 + | self.default_list =
|
3016 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3017 + | /* ServerBuilderGenerator.kt:376 */input
|
3018 + | /* ServerBuilderGenerator.kt:345 */)
|
3019 + | /* ServerBuilderGenerator.kt:344 */;
|
1977 3020 | self
|
3021 + | /* ServerBuilderGenerator.kt:343 */
|
1978 3022 | }
|
3023 + | /* ServerBuilderGenerator.kt:426 */
|
1979 3024 | #[allow(missing_docs)] // documentation missing in model
|
3025 + | /* ServerBuilderGenerator.kt:428 */
|
1980 3026 | pub(crate) fn set_default_list(
|
1981 3027 | mut self,
|
1982 3028 | input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>,
|
1983 3029 | ) -> Self {
|
3030 + | /* ServerBuilderGenerator.kt:429 */
|
1984 3031 | self.default_list = Some(input.into());
|
1985 3032 | self
|
3033 + | /* ServerBuilderGenerator.kt:428 */
|
1986 3034 | }
|
3035 + | /* ServerBuilderGenerator.kt:331 */
|
1987 3036 | #[allow(missing_docs)] // documentation missing in model
|
3037 + | /* ServerBuilderGenerator.kt:343 */
|
1988 3038 | pub fn default_document_map(mut self, input: ::aws_smithy_types::Document) -> Self {
|
1989 - | self.default_document_map = Some(input);
|
3039 + | /* ServerBuilderGenerator.kt:344 */
|
3040 + | self.default_document_map =
|
3041 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3042 + | /* ServerBuilderGenerator.kt:376 */input
|
3043 + | /* ServerBuilderGenerator.kt:345 */)
|
3044 + | /* ServerBuilderGenerator.kt:344 */;
|
1990 3045 | self
|
3046 + | /* ServerBuilderGenerator.kt:343 */
|
1991 3047 | }
|
3048 + | /* ServerBuilderGenerator.kt:426 */
|
1992 3049 | #[allow(missing_docs)] // documentation missing in model
|
3050 + | /* ServerBuilderGenerator.kt:428 */
|
1993 3051 | pub(crate) fn set_default_document_map(
|
1994 3052 | mut self,
|
1995 3053 | input: impl ::std::convert::Into<::aws_smithy_types::Document>,
|
1996 3054 | ) -> Self {
|
3055 + | /* ServerBuilderGenerator.kt:429 */
|
1997 3056 | self.default_document_map = Some(input.into());
|
1998 3057 | self
|
3058 + | /* ServerBuilderGenerator.kt:428 */
|
1999 3059 | }
|
3060 + | /* ServerBuilderGenerator.kt:331 */
|
2000 3061 | #[allow(missing_docs)] // documentation missing in model
|
3062 + | /* ServerBuilderGenerator.kt:343 */
|
2001 3063 | pub fn default_document_string(mut self, input: ::aws_smithy_types::Document) -> Self {
|
2002 - | self.default_document_string = Some(input);
|
3064 + | /* ServerBuilderGenerator.kt:344 */
|
3065 + | self.default_document_string =
|
3066 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3067 + | /* ServerBuilderGenerator.kt:376 */input
|
3068 + | /* ServerBuilderGenerator.kt:345 */)
|
3069 + | /* ServerBuilderGenerator.kt:344 */;
|
2003 3070 | self
|
3071 + | /* ServerBuilderGenerator.kt:343 */
|
2004 3072 | }
|
3073 + | /* ServerBuilderGenerator.kt:426 */
|
2005 3074 | #[allow(missing_docs)] // documentation missing in model
|
3075 + | /* ServerBuilderGenerator.kt:428 */
|
2006 3076 | pub(crate) fn set_default_document_string(
|
2007 3077 | mut self,
|
2008 3078 | input: impl ::std::convert::Into<::aws_smithy_types::Document>,
|
2009 3079 | ) -> Self {
|
3080 + | /* ServerBuilderGenerator.kt:429 */
|
2010 3081 | self.default_document_string = Some(input.into());
|
2011 3082 | self
|
3083 + | /* ServerBuilderGenerator.kt:428 */
|
2012 3084 | }
|
3085 + | /* ServerBuilderGenerator.kt:331 */
|
2013 3086 | #[allow(missing_docs)] // documentation missing in model
|
3087 + | /* ServerBuilderGenerator.kt:343 */
|
2014 3088 | pub fn default_document_boolean(mut self, input: ::aws_smithy_types::Document) -> Self {
|
2015 - | self.default_document_boolean = Some(input);
|
3089 + | /* ServerBuilderGenerator.kt:344 */
|
3090 + | self.default_document_boolean =
|
3091 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3092 + | /* ServerBuilderGenerator.kt:376 */input
|
3093 + | /* ServerBuilderGenerator.kt:345 */)
|
3094 + | /* ServerBuilderGenerator.kt:344 */;
|
2016 3095 | self
|
3096 + | /* ServerBuilderGenerator.kt:343 */
|
2017 3097 | }
|
3098 + | /* ServerBuilderGenerator.kt:426 */
|
2018 3099 | #[allow(missing_docs)] // documentation missing in model
|
3100 + | /* ServerBuilderGenerator.kt:428 */
|
2019 3101 | pub(crate) fn set_default_document_boolean(
|
2020 3102 | mut self,
|
2021 3103 | input: impl ::std::convert::Into<::aws_smithy_types::Document>,
|
2022 3104 | ) -> Self {
|
3105 + | /* ServerBuilderGenerator.kt:429 */
|
2023 3106 | self.default_document_boolean = Some(input.into());
|
2024 3107 | self
|
3108 + | /* ServerBuilderGenerator.kt:428 */
|
2025 3109 | }
|
3110 + | /* ServerBuilderGenerator.kt:331 */
|
2026 3111 | #[allow(missing_docs)] // documentation missing in model
|
3112 + | /* ServerBuilderGenerator.kt:343 */
|
2027 3113 | pub fn default_document_list(mut self, input: ::aws_smithy_types::Document) -> Self {
|
2028 - | self.default_document_list = Some(input);
|
3114 + | /* ServerBuilderGenerator.kt:344 */
|
3115 + | self.default_document_list =
|
3116 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3117 + | /* ServerBuilderGenerator.kt:376 */input
|
3118 + | /* ServerBuilderGenerator.kt:345 */)
|
3119 + | /* ServerBuilderGenerator.kt:344 */;
|
2029 3120 | self
|
3121 + | /* ServerBuilderGenerator.kt:343 */
|
2030 3122 | }
|
3123 + | /* ServerBuilderGenerator.kt:426 */
|
2031 3124 | #[allow(missing_docs)] // documentation missing in model
|
3125 + | /* ServerBuilderGenerator.kt:428 */
|
2032 3126 | pub(crate) fn set_default_document_list(
|
2033 3127 | mut self,
|
2034 3128 | input: impl ::std::convert::Into<::aws_smithy_types::Document>,
|
2035 3129 | ) -> Self {
|
3130 + | /* ServerBuilderGenerator.kt:429 */
|
2036 3131 | self.default_document_list = Some(input.into());
|
2037 3132 | self
|
3133 + | /* ServerBuilderGenerator.kt:428 */
|
2038 3134 | }
|
3135 + | /* ServerBuilderGenerator.kt:331 */
|
2039 3136 | #[allow(missing_docs)] // documentation missing in model
|
3137 + | /* ServerBuilderGenerator.kt:343 */
|
2040 3138 | pub fn default_null_document(
|
2041 3139 | mut self,
|
2042 3140 | input: ::std::option::Option<::aws_smithy_types::Document>,
|
2043 3141 | ) -> Self {
|
2044 - | self.default_null_document = input;
|
3142 + | /* ServerBuilderGenerator.kt:344 */
|
3143 + | self.default_null_document =
|
3144 + | /* ServerBuilderGenerator.kt:376 */input
|
3145 + | /* ServerBuilderGenerator.kt:344 */;
|
2045 3146 | self
|
3147 + | /* ServerBuilderGenerator.kt:343 */
|
2046 3148 | }
|
3149 + | /* ServerBuilderGenerator.kt:426 */
|
2047 3150 | #[allow(missing_docs)] // documentation missing in model
|
3151 + | /* ServerBuilderGenerator.kt:428 */
|
2048 3152 | pub(crate) fn set_default_null_document(
|
2049 3153 | mut self,
|
2050 3154 | input: Option<impl ::std::convert::Into<::aws_smithy_types::Document>>,
|
2051 3155 | ) -> Self {
|
3156 + | /* ServerBuilderGenerator.kt:429 */
|
2052 3157 | self.default_null_document = input.map(|v| v.into());
|
2053 3158 | self
|
3159 + | /* ServerBuilderGenerator.kt:428 */
|
2054 3160 | }
|
3161 + | /* ServerBuilderGenerator.kt:331 */
|
2055 3162 | #[allow(missing_docs)] // documentation missing in model
|
3163 + | /* ServerBuilderGenerator.kt:343 */
|
2056 3164 | pub fn default_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
2057 - | self.default_timestamp = Some(input);
|
3165 + | /* ServerBuilderGenerator.kt:344 */
|
3166 + | self.default_timestamp =
|
3167 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3168 + | /* ServerBuilderGenerator.kt:376 */input
|
3169 + | /* ServerBuilderGenerator.kt:345 */)
|
3170 + | /* ServerBuilderGenerator.kt:344 */;
|
2058 3171 | self
|
3172 + | /* ServerBuilderGenerator.kt:343 */
|
2059 3173 | }
|
3174 + | /* ServerBuilderGenerator.kt:426 */
|
2060 3175 | #[allow(missing_docs)] // documentation missing in model
|
3176 + | /* ServerBuilderGenerator.kt:428 */
|
2061 3177 | pub(crate) fn set_default_timestamp(
|
2062 3178 | mut self,
|
2063 3179 | input: impl ::std::convert::Into<::aws_smithy_types::DateTime>,
|
2064 3180 | ) -> Self {
|
3181 + | /* ServerBuilderGenerator.kt:429 */
|
2065 3182 | self.default_timestamp = Some(input.into());
|
2066 3183 | self
|
3184 + | /* ServerBuilderGenerator.kt:428 */
|
2067 3185 | }
|
3186 + | /* ServerBuilderGenerator.kt:331 */
|
2068 3187 | #[allow(missing_docs)] // documentation missing in model
|
3188 + | /* ServerBuilderGenerator.kt:343 */
|
2069 3189 | pub fn default_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
|
2070 - | self.default_blob = Some(input);
|
3190 + | /* ServerBuilderGenerator.kt:344 */
|
3191 + | self.default_blob =
|
3192 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3193 + | /* ServerBuilderGenerator.kt:376 */input
|
3194 + | /* ServerBuilderGenerator.kt:345 */)
|
3195 + | /* ServerBuilderGenerator.kt:344 */;
|
2071 3196 | self
|
3197 + | /* ServerBuilderGenerator.kt:343 */
|
2072 3198 | }
|
3199 + | /* ServerBuilderGenerator.kt:426 */
|
2073 3200 | #[allow(missing_docs)] // documentation missing in model
|
3201 + | /* ServerBuilderGenerator.kt:428 */
|
2074 3202 | pub(crate) fn set_default_blob(
|
2075 3203 | mut self,
|
2076 3204 | input: impl ::std::convert::Into<::aws_smithy_types::Blob>,
|
2077 3205 | ) -> Self {
|
3206 + | /* ServerBuilderGenerator.kt:429 */
|
2078 3207 | self.default_blob = Some(input.into());
|
2079 3208 | self
|
3209 + | /* ServerBuilderGenerator.kt:428 */
|
2080 3210 | }
|
3211 + | /* ServerBuilderGenerator.kt:331 */
|
2081 3212 | #[allow(missing_docs)] // documentation missing in model
|
3213 + | /* ServerBuilderGenerator.kt:343 */
|
2082 3214 | pub fn default_byte(mut self, input: i8) -> Self {
|
2083 - | self.default_byte = Some(input);
|
3215 + | /* ServerBuilderGenerator.kt:344 */
|
3216 + | self.default_byte =
|
3217 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3218 + | /* ServerBuilderGenerator.kt:376 */input
|
3219 + | /* ServerBuilderGenerator.kt:345 */)
|
3220 + | /* ServerBuilderGenerator.kt:344 */;
|
2084 3221 | self
|
3222 + | /* ServerBuilderGenerator.kt:343 */
|
2085 3223 | }
|
3224 + | /* ServerBuilderGenerator.kt:426 */
|
2086 3225 | #[allow(missing_docs)] // documentation missing in model
|
3226 + | /* ServerBuilderGenerator.kt:428 */
|
2087 3227 | pub(crate) fn set_default_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
|
3228 + | /* ServerBuilderGenerator.kt:429 */
|
2088 3229 | self.default_byte = Some(input.into());
|
2089 3230 | self
|
3231 + | /* ServerBuilderGenerator.kt:428 */
|
2090 3232 | }
|
3233 + | /* ServerBuilderGenerator.kt:331 */
|
2091 3234 | #[allow(missing_docs)] // documentation missing in model
|
3235 + | /* ServerBuilderGenerator.kt:343 */
|
2092 3236 | pub fn default_short(mut self, input: i16) -> Self {
|
2093 - | self.default_short = Some(input);
|
3237 + | /* ServerBuilderGenerator.kt:344 */
|
3238 + | self.default_short =
|
3239 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3240 + | /* ServerBuilderGenerator.kt:376 */input
|
3241 + | /* ServerBuilderGenerator.kt:345 */)
|
3242 + | /* ServerBuilderGenerator.kt:344 */;
|
2094 3243 | self
|
3244 + | /* ServerBuilderGenerator.kt:343 */
|
2095 3245 | }
|
3246 + | /* ServerBuilderGenerator.kt:426 */
|
2096 3247 | #[allow(missing_docs)] // documentation missing in model
|
3248 + | /* ServerBuilderGenerator.kt:428 */
|
2097 3249 | pub(crate) fn set_default_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
|
3250 + | /* ServerBuilderGenerator.kt:429 */
|
2098 3251 | self.default_short = Some(input.into());
|
2099 3252 | self
|
3253 + | /* ServerBuilderGenerator.kt:428 */
|
2100 3254 | }
|
3255 + | /* ServerBuilderGenerator.kt:331 */
|
2101 3256 | #[allow(missing_docs)] // documentation missing in model
|
3257 + | /* ServerBuilderGenerator.kt:343 */
|
2102 3258 | pub fn default_integer(mut self, input: i32) -> Self {
|
2103 - | self.default_integer = Some(input);
|
3259 + | /* ServerBuilderGenerator.kt:344 */
|
3260 + | self.default_integer =
|
3261 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3262 + | /* ServerBuilderGenerator.kt:376 */input
|
3263 + | /* ServerBuilderGenerator.kt:345 */)
|
3264 + | /* ServerBuilderGenerator.kt:344 */;
|
2104 3265 | self
|
3266 + | /* ServerBuilderGenerator.kt:343 */
|
2105 3267 | }
|
3268 + | /* ServerBuilderGenerator.kt:426 */
|
2106 3269 | #[allow(missing_docs)] // documentation missing in model
|
3270 + | /* ServerBuilderGenerator.kt:428 */
|
2107 3271 | pub(crate) fn set_default_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
|
3272 + | /* ServerBuilderGenerator.kt:429 */
|
2108 3273 | self.default_integer = Some(input.into());
|
2109 3274 | self
|
3275 + | /* ServerBuilderGenerator.kt:428 */
|
2110 3276 | }
|
3277 + | /* ServerBuilderGenerator.kt:331 */
|
2111 3278 | #[allow(missing_docs)] // documentation missing in model
|
3279 + | /* ServerBuilderGenerator.kt:343 */
|
2112 3280 | pub fn default_long(mut self, input: i64) -> Self {
|
2113 - | self.default_long = Some(input);
|
3281 + | /* ServerBuilderGenerator.kt:344 */
|
3282 + | self.default_long =
|
3283 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3284 + | /* ServerBuilderGenerator.kt:376 */input
|
3285 + | /* ServerBuilderGenerator.kt:345 */)
|
3286 + | /* ServerBuilderGenerator.kt:344 */;
|
2114 3287 | self
|
3288 + | /* ServerBuilderGenerator.kt:343 */
|
2115 3289 | }
|
3290 + | /* ServerBuilderGenerator.kt:426 */
|
2116 3291 | #[allow(missing_docs)] // documentation missing in model
|
3292 + | /* ServerBuilderGenerator.kt:428 */
|
2117 3293 | pub(crate) fn set_default_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
|
3294 + | /* ServerBuilderGenerator.kt:429 */
|
2118 3295 | self.default_long = Some(input.into());
|
2119 3296 | self
|
3297 + | /* ServerBuilderGenerator.kt:428 */
|
2120 3298 | }
|
3299 + | /* ServerBuilderGenerator.kt:331 */
|
2121 3300 | #[allow(missing_docs)] // documentation missing in model
|
3301 + | /* ServerBuilderGenerator.kt:343 */
|
2122 3302 | pub fn default_float(mut self, input: f32) -> Self {
|
2123 - | self.default_float = Some(input);
|
3303 + | /* ServerBuilderGenerator.kt:344 */
|
3304 + | self.default_float =
|
3305 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3306 + | /* ServerBuilderGenerator.kt:376 */input
|
3307 + | /* ServerBuilderGenerator.kt:345 */)
|
3308 + | /* ServerBuilderGenerator.kt:344 */;
|
2124 3309 | self
|
3310 + | /* ServerBuilderGenerator.kt:343 */
|
2125 3311 | }
|
3312 + | /* ServerBuilderGenerator.kt:426 */
|
2126 3313 | #[allow(missing_docs)] // documentation missing in model
|
3314 + | /* ServerBuilderGenerator.kt:428 */
|
2127 3315 | pub(crate) fn set_default_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
|
3316 + | /* ServerBuilderGenerator.kt:429 */
|
2128 3317 | self.default_float = Some(input.into());
|
2129 3318 | self
|
3319 + | /* ServerBuilderGenerator.kt:428 */
|
2130 3320 | }
|
3321 + | /* ServerBuilderGenerator.kt:331 */
|
2131 3322 | #[allow(missing_docs)] // documentation missing in model
|
3323 + | /* ServerBuilderGenerator.kt:343 */
|
2132 3324 | pub fn default_double(mut self, input: f64) -> Self {
|
2133 - | self.default_double = Some(input);
|
3325 + | /* ServerBuilderGenerator.kt:344 */
|
3326 + | self.default_double =
|
3327 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3328 + | /* ServerBuilderGenerator.kt:376 */input
|
3329 + | /* ServerBuilderGenerator.kt:345 */)
|
3330 + | /* ServerBuilderGenerator.kt:344 */;
|
2134 3331 | self
|
3332 + | /* ServerBuilderGenerator.kt:343 */
|
2135 3333 | }
|
3334 + | /* ServerBuilderGenerator.kt:426 */
|
2136 3335 | #[allow(missing_docs)] // documentation missing in model
|
3336 + | /* ServerBuilderGenerator.kt:428 */
|
2137 3337 | pub(crate) fn set_default_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
|
3338 + | /* ServerBuilderGenerator.kt:429 */
|
2138 3339 | self.default_double = Some(input.into());
|
2139 3340 | self
|
3341 + | /* ServerBuilderGenerator.kt:428 */
|
2140 3342 | }
|
3343 + | /* ServerBuilderGenerator.kt:331 */
|
2141 3344 | #[allow(missing_docs)] // documentation missing in model
|
3345 + | /* ServerBuilderGenerator.kt:343 */
|
2142 3346 | pub fn default_map(
|
2143 3347 | mut self,
|
2144 3348 | input: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2145 3349 | ) -> Self {
|
2146 - | self.default_map = Some(input);
|
3350 + | /* ServerBuilderGenerator.kt:344 */
|
3351 + | self.default_map =
|
3352 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3353 + | /* ServerBuilderGenerator.kt:376 */input
|
3354 + | /* ServerBuilderGenerator.kt:345 */)
|
3355 + | /* ServerBuilderGenerator.kt:344 */;
|
2147 3356 | self
|
3357 + | /* ServerBuilderGenerator.kt:343 */
|
2148 3358 | }
|
3359 + | /* ServerBuilderGenerator.kt:426 */
|
2149 3360 | #[allow(missing_docs)] // documentation missing in model
|
3361 + | /* ServerBuilderGenerator.kt:428 */
|
2150 3362 | pub(crate) fn set_default_map(
|
2151 3363 | mut self,
|
2152 3364 | input: impl ::std::convert::Into<
|
2153 3365 | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2154 3366 | >,
|
2155 3367 | ) -> Self {
|
3368 + | /* ServerBuilderGenerator.kt:429 */
|
2156 3369 | self.default_map = Some(input.into());
|
2157 3370 | self
|
3371 + | /* ServerBuilderGenerator.kt:428 */
|
2158 3372 | }
|
3373 + | /* ServerBuilderGenerator.kt:331 */
|
2159 3374 | #[allow(missing_docs)] // documentation missing in model
|
3375 + | /* ServerBuilderGenerator.kt:343 */
|
2160 3376 | pub fn default_enum(mut self, input: crate::model::TestEnum) -> Self {
|
2161 - | self.default_enum = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3377 + | /* ServerBuilderGenerator.kt:344 */
|
3378 + | self.default_enum =
|
3379 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3380 + | /* ServerBuilderGenerator.kt:372 */crate::constrained::MaybeConstrained::Constrained(input)
|
3381 + | /* ServerBuilderGenerator.kt:345 */)
|
3382 + | /* ServerBuilderGenerator.kt:344 */;
|
2162 3383 | self
|
3384 + | /* ServerBuilderGenerator.kt:343 */
|
2163 3385 | }
|
3386 + | /* ServerBuilderGenerator.kt:426 */
|
2164 3387 | #[allow(missing_docs)] // documentation missing in model
|
3388 + | /* ServerBuilderGenerator.kt:428 */
|
2165 3389 | pub(crate) fn set_default_enum(
|
2166 3390 | mut self,
|
2167 3391 | input: impl ::std::convert::Into<
|
2168 3392 | crate::constrained::MaybeConstrained<crate::model::TestEnum>,
|
2169 3393 | >,
|
2170 3394 | ) -> Self {
|
3395 + | /* ServerBuilderGenerator.kt:429 */
|
2171 3396 | self.default_enum = Some(input.into());
|
2172 3397 | self
|
3398 + | /* ServerBuilderGenerator.kt:428 */
|
2173 3399 | }
|
3400 + | /* ServerBuilderGenerator.kt:331 */
|
2174 3401 | #[allow(missing_docs)] // documentation missing in model
|
3402 + | /* ServerBuilderGenerator.kt:343 */
|
2175 3403 | pub fn default_int_enum(mut self, input: i32) -> Self {
|
2176 - | self.default_int_enum = Some(input);
|
3404 + | /* ServerBuilderGenerator.kt:344 */
|
3405 + | self.default_int_enum =
|
3406 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3407 + | /* ServerBuilderGenerator.kt:376 */input
|
3408 + | /* ServerBuilderGenerator.kt:345 */)
|
3409 + | /* ServerBuilderGenerator.kt:344 */;
|
2177 3410 | self
|
3411 + | /* ServerBuilderGenerator.kt:343 */
|
2178 3412 | }
|
3413 + | /* ServerBuilderGenerator.kt:426 */
|
2179 3414 | #[allow(missing_docs)] // documentation missing in model
|
3415 + | /* ServerBuilderGenerator.kt:428 */
|
2180 3416 | pub(crate) fn set_default_int_enum(
|
2181 3417 | mut self,
|
2182 3418 | input: impl ::std::convert::Into<i32>,
|
2183 3419 | ) -> Self {
|
3420 + | /* ServerBuilderGenerator.kt:429 */
|
2184 3421 | self.default_int_enum = Some(input.into());
|
2185 3422 | self
|
3423 + | /* ServerBuilderGenerator.kt:428 */
|
2186 3424 | }
|
3425 + | /* ServerBuilderGenerator.kt:331 */
|
2187 3426 | #[allow(missing_docs)] // documentation missing in model
|
3427 + | /* ServerBuilderGenerator.kt:343 */
|
2188 3428 | pub fn empty_string(mut self, input: ::std::string::String) -> Self {
|
2189 - | self.empty_string = Some(input);
|
3429 + | /* ServerBuilderGenerator.kt:344 */
|
3430 + | self.empty_string =
|
3431 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3432 + | /* ServerBuilderGenerator.kt:376 */input
|
3433 + | /* ServerBuilderGenerator.kt:345 */)
|
3434 + | /* ServerBuilderGenerator.kt:344 */;
|
2190 3435 | self
|
3436 + | /* ServerBuilderGenerator.kt:343 */
|
2191 3437 | }
|
3438 + | /* ServerBuilderGenerator.kt:426 */
|
2192 3439 | #[allow(missing_docs)] // documentation missing in model
|
3440 + | /* ServerBuilderGenerator.kt:428 */
|
2193 3441 | pub(crate) fn set_empty_string(
|
2194 3442 | mut self,
|
2195 3443 | input: impl ::std::convert::Into<::std::string::String>,
|
2196 3444 | ) -> Self {
|
3445 + | /* ServerBuilderGenerator.kt:429 */
|
2197 3446 | self.empty_string = Some(input.into());
|
2198 3447 | self
|
3448 + | /* ServerBuilderGenerator.kt:428 */
|
2199 3449 | }
|
3450 + | /* ServerBuilderGenerator.kt:331 */
|
2200 3451 | #[allow(missing_docs)] // documentation missing in model
|
3452 + | /* ServerBuilderGenerator.kt:343 */
|
2201 3453 | pub fn false_boolean(mut self, input: bool) -> Self {
|
2202 - | self.false_boolean = Some(input);
|
3454 + | /* ServerBuilderGenerator.kt:344 */
|
3455 + | self.false_boolean =
|
3456 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3457 + | /* ServerBuilderGenerator.kt:376 */input
|
3458 + | /* ServerBuilderGenerator.kt:345 */)
|
3459 + | /* ServerBuilderGenerator.kt:344 */;
|
2203 3460 | self
|
3461 + | /* ServerBuilderGenerator.kt:343 */
|
2204 3462 | }
|
3463 + | /* ServerBuilderGenerator.kt:426 */
|
2205 3464 | #[allow(missing_docs)] // documentation missing in model
|
3465 + | /* ServerBuilderGenerator.kt:428 */
|
2206 3466 | pub(crate) fn set_false_boolean(mut self, input: impl ::std::convert::Into<bool>) -> Self {
|
3467 + | /* ServerBuilderGenerator.kt:429 */
|
2207 3468 | self.false_boolean = Some(input.into());
|
2208 3469 | self
|
3470 + | /* ServerBuilderGenerator.kt:428 */
|
2209 3471 | }
|
3472 + | /* ServerBuilderGenerator.kt:331 */
|
2210 3473 | #[allow(missing_docs)] // documentation missing in model
|
3474 + | /* ServerBuilderGenerator.kt:343 */
|
2211 3475 | pub fn empty_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
|
2212 - | self.empty_blob = Some(input);
|
3476 + | /* ServerBuilderGenerator.kt:344 */
|
3477 + | self.empty_blob =
|
3478 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3479 + | /* ServerBuilderGenerator.kt:376 */input
|
3480 + | /* ServerBuilderGenerator.kt:345 */)
|
3481 + | /* ServerBuilderGenerator.kt:344 */;
|
2213 3482 | self
|
3483 + | /* ServerBuilderGenerator.kt:343 */
|
2214 3484 | }
|
3485 + | /* ServerBuilderGenerator.kt:426 */
|
2215 3486 | #[allow(missing_docs)] // documentation missing in model
|
3487 + | /* ServerBuilderGenerator.kt:428 */
|
2216 3488 | pub(crate) fn set_empty_blob(
|
2217 3489 | mut self,
|
2218 3490 | input: impl ::std::convert::Into<::aws_smithy_types::Blob>,
|
2219 3491 | ) -> Self {
|
3492 + | /* ServerBuilderGenerator.kt:429 */
|
2220 3493 | self.empty_blob = Some(input.into());
|
2221 3494 | self
|
3495 + | /* ServerBuilderGenerator.kt:428 */
|
2222 3496 | }
|
3497 + | /* ServerBuilderGenerator.kt:331 */
|
2223 3498 | #[allow(missing_docs)] // documentation missing in model
|
3499 + | /* ServerBuilderGenerator.kt:343 */
|
2224 3500 | pub fn zero_byte(mut self, input: i8) -> Self {
|
2225 - | self.zero_byte = Some(input);
|
3501 + | /* ServerBuilderGenerator.kt:344 */
|
3502 + | self.zero_byte =
|
3503 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3504 + | /* ServerBuilderGenerator.kt:376 */input
|
3505 + | /* ServerBuilderGenerator.kt:345 */)
|
3506 + | /* ServerBuilderGenerator.kt:344 */;
|
2226 3507 | self
|
3508 + | /* ServerBuilderGenerator.kt:343 */
|
2227 3509 | }
|
3510 + | /* ServerBuilderGenerator.kt:426 */
|
2228 3511 | #[allow(missing_docs)] // documentation missing in model
|
3512 + | /* ServerBuilderGenerator.kt:428 */
|
2229 3513 | pub(crate) fn set_zero_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
|
3514 + | /* ServerBuilderGenerator.kt:429 */
|
2230 3515 | self.zero_byte = Some(input.into());
|
2231 3516 | self
|
3517 + | /* ServerBuilderGenerator.kt:428 */
|
2232 3518 | }
|
3519 + | /* ServerBuilderGenerator.kt:331 */
|
2233 3520 | #[allow(missing_docs)] // documentation missing in model
|
3521 + | /* ServerBuilderGenerator.kt:343 */
|
2234 3522 | pub fn zero_short(mut self, input: i16) -> Self {
|
2235 - | self.zero_short = Some(input);
|
3523 + | /* ServerBuilderGenerator.kt:344 */
|
3524 + | self.zero_short =
|
3525 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3526 + | /* ServerBuilderGenerator.kt:376 */input
|
3527 + | /* ServerBuilderGenerator.kt:345 */)
|
3528 + | /* ServerBuilderGenerator.kt:344 */;
|
2236 3529 | self
|
3530 + | /* ServerBuilderGenerator.kt:343 */
|
2237 3531 | }
|
3532 + | /* ServerBuilderGenerator.kt:426 */
|
2238 3533 | #[allow(missing_docs)] // documentation missing in model
|
3534 + | /* ServerBuilderGenerator.kt:428 */
|
2239 3535 | pub(crate) fn set_zero_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
|
3536 + | /* ServerBuilderGenerator.kt:429 */
|
2240 3537 | self.zero_short = Some(input.into());
|
2241 3538 | self
|
3539 + | /* ServerBuilderGenerator.kt:428 */
|
2242 3540 | }
|
3541 + | /* ServerBuilderGenerator.kt:331 */
|
2243 3542 | #[allow(missing_docs)] // documentation missing in model
|
3543 + | /* ServerBuilderGenerator.kt:343 */
|
2244 3544 | pub fn zero_integer(mut self, input: i32) -> Self {
|
2245 - | self.zero_integer = Some(input);
|
3545 + | /* ServerBuilderGenerator.kt:344 */
|
3546 + | self.zero_integer =
|
3547 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3548 + | /* ServerBuilderGenerator.kt:376 */input
|
3549 + | /* ServerBuilderGenerator.kt:345 */)
|
3550 + | /* ServerBuilderGenerator.kt:344 */;
|
2246 3551 | self
|
3552 + | /* ServerBuilderGenerator.kt:343 */
|
2247 3553 | }
|
3554 + | /* ServerBuilderGenerator.kt:426 */
|
2248 3555 | #[allow(missing_docs)] // documentation missing in model
|
3556 + | /* ServerBuilderGenerator.kt:428 */
|
2249 3557 | pub(crate) fn set_zero_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
|
3558 + | /* ServerBuilderGenerator.kt:429 */
|
2250 3559 | self.zero_integer = Some(input.into());
|
2251 3560 | self
|
3561 + | /* ServerBuilderGenerator.kt:428 */
|
2252 3562 | }
|
3563 + | /* ServerBuilderGenerator.kt:331 */
|
2253 3564 | #[allow(missing_docs)] // documentation missing in model
|
3565 + | /* ServerBuilderGenerator.kt:343 */
|
2254 3566 | pub fn zero_long(mut self, input: i64) -> Self {
|
2255 - | self.zero_long = Some(input);
|
3567 + | /* ServerBuilderGenerator.kt:344 */
|
3568 + | self.zero_long =
|
3569 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3570 + | /* ServerBuilderGenerator.kt:376 */input
|
3571 + | /* ServerBuilderGenerator.kt:345 */)
|
3572 + | /* ServerBuilderGenerator.kt:344 */;
|
2256 3573 | self
|
3574 + | /* ServerBuilderGenerator.kt:343 */
|
2257 3575 | }
|
3576 + | /* ServerBuilderGenerator.kt:426 */
|
2258 3577 | #[allow(missing_docs)] // documentation missing in model
|
3578 + | /* ServerBuilderGenerator.kt:428 */
|
2259 3579 | pub(crate) fn set_zero_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
|
3580 + | /* ServerBuilderGenerator.kt:429 */
|
2260 3581 | self.zero_long = Some(input.into());
|
2261 3582 | self
|
3583 + | /* ServerBuilderGenerator.kt:428 */
|
2262 3584 | }
|
3585 + | /* ServerBuilderGenerator.kt:331 */
|
2263 3586 | #[allow(missing_docs)] // documentation missing in model
|
3587 + | /* ServerBuilderGenerator.kt:343 */
|
2264 3588 | pub fn zero_float(mut self, input: f32) -> Self {
|
2265 - | self.zero_float = Some(input);
|
3589 + | /* ServerBuilderGenerator.kt:344 */
|
3590 + | self.zero_float =
|
3591 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3592 + | /* ServerBuilderGenerator.kt:376 */input
|
3593 + | /* ServerBuilderGenerator.kt:345 */)
|
3594 + | /* ServerBuilderGenerator.kt:344 */;
|
2266 3595 | self
|
3596 + | /* ServerBuilderGenerator.kt:343 */
|
2267 3597 | }
|
3598 + | /* ServerBuilderGenerator.kt:426 */
|
2268 3599 | #[allow(missing_docs)] // documentation missing in model
|
3600 + | /* ServerBuilderGenerator.kt:428 */
|
2269 3601 | pub(crate) fn set_zero_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
|
3602 + | /* ServerBuilderGenerator.kt:429 */
|
2270 3603 | self.zero_float = Some(input.into());
|
2271 3604 | self
|
3605 + | /* ServerBuilderGenerator.kt:428 */
|
2272 3606 | }
|
3607 + | /* ServerBuilderGenerator.kt:331 */
|
2273 3608 | #[allow(missing_docs)] // documentation missing in model
|
3609 + | /* ServerBuilderGenerator.kt:343 */
|
2274 3610 | pub fn zero_double(mut self, input: f64) -> Self {
|
2275 - | self.zero_double = Some(input);
|
3611 + | /* ServerBuilderGenerator.kt:344 */
|
3612 + | self.zero_double =
|
3613 + | /* ServerBuilderGenerator.kt:345 */Some(
|
3614 + | /* ServerBuilderGenerator.kt:376 */input
|
3615 + | /* ServerBuilderGenerator.kt:345 */)
|
3616 + | /* ServerBuilderGenerator.kt:344 */;
|
2276 3617 | self
|
3618 + | /* ServerBuilderGenerator.kt:343 */
|
2277 3619 | }
|
3620 + | /* ServerBuilderGenerator.kt:426 */
|
2278 3621 | #[allow(missing_docs)] // documentation missing in model
|
3622 + | /* ServerBuilderGenerator.kt:428 */
|
2279 3623 | pub(crate) fn set_zero_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
|
3624 + | /* ServerBuilderGenerator.kt:429 */
|
2280 3625 | self.zero_double = Some(input.into());
|
2281 3626 | self
|
3627 + | /* ServerBuilderGenerator.kt:428 */
|
2282 3628 | }
|
2283 - | /// Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
|
2284 - | ///
|
3629 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
|
3630 + | /// /* ServerBuilderGenerator.kt:260 */
|
2285 3631 | /// The builder fails to construct a [`Defaults`](crate::model::Defaults) if a [`ConstraintViolation`] occurs.
|
2286 3632 | ///
|
3633 + | /* ServerBuilderGenerator.kt:271 */
|
2287 3634 | pub fn build(self) -> Result<crate::model::Defaults, ConstraintViolation> {
|
2288 3635 | self.build_enforcing_all_constraints()
|
2289 3636 | }
|
3637 + | /* ServerBuilderGenerator.kt:283 */
|
2290 3638 | fn build_enforcing_all_constraints(
|
2291 3639 | self,
|
2292 3640 | ) -> Result<crate::model::Defaults, ConstraintViolation> {
|
2293 - | Ok(crate::model::Defaults {
|
2294 - | default_string: self.default_string.unwrap_or_else(|| String::from("hi")),
|
2295 - | default_boolean: self.default_boolean.unwrap_or(true),
|
2296 - | default_list: self.default_list.unwrap_or_default(),
|
2297 - | default_document_map: self.default_document_map.unwrap_or_else(|| {
|
2298 - | ::aws_smithy_types::Document::Object(::std::collections::HashMap::new())
|
2299 - | }),
|
2300 - | default_document_string: self.default_document_string.unwrap_or_else(|| {
|
2301 - | ::aws_smithy_types::Document::String(::std::string::String::from("hi"))
|
2302 - | }),
|
2303 - | default_document_boolean: self
|
2304 - | .default_document_boolean
|
2305 - | .unwrap_or(::aws_smithy_types::Document::Bool(true)),
|
2306 - | default_document_list: self
|
2307 - | .default_document_list
|
2308 - | .unwrap_or_else(|| ::aws_smithy_types::Document::Array(::std::vec::Vec::new())),
|
2309 - | default_null_document: self.default_null_document,
|
2310 - | default_timestamp: self.default_timestamp.unwrap_or_else(|| {
|
2311 - | ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)
|
2312 - | }),
|
2313 - | default_blob: self
|
2314 - | .default_blob
|
2315 - | .unwrap_or_else(|| ::aws_smithy_types::Blob::new("YWJj")),
|
2316 - | default_byte: self.default_byte.unwrap_or(1i8),
|
2317 - | default_short: self.default_short.unwrap_or(1i16),
|
2318 - | default_integer: self.default_integer.unwrap_or(10i32),
|
2319 - | default_long: self.default_long.unwrap_or(100i64),
|
2320 - | default_float: self.default_float.unwrap_or(1.0f32),
|
2321 - | default_double: self.default_double.unwrap_or(1.0f64),
|
2322 - | default_map: self.default_map.unwrap_or_default(),
|
2323 - | default_enum: self
|
2324 - | .default_enum
|
2325 - | .map(|v| match v {
|
2326 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2327 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2328 - | })
|
2329 - | .map(|res| res.map_err(ConstraintViolation::DefaultEnum))
|
2330 - | .transpose()?
|
2331 - | .unwrap_or(
|
2332 - | "FOO"
|
2333 - | .parse::<crate::model::TestEnum>()
|
2334 - | .expect("static value validated to member"),
|
2335 - | ),
|
2336 - | default_int_enum: self.default_int_enum.unwrap_or(1i32),
|
2337 - | empty_string: self.empty_string.unwrap_or_else(|| String::from("")),
|
2338 - | false_boolean: self.false_boolean.unwrap_or(false),
|
2339 - | empty_blob: self
|
2340 - | .empty_blob
|
2341 - | .unwrap_or_else(|| ::aws_smithy_types::Blob::new("")),
|
2342 - | zero_byte: self.zero_byte.unwrap_or(0i8),
|
2343 - | zero_short: self.zero_short.unwrap_or(0i16),
|
2344 - | zero_integer: self.zero_integer.unwrap_or(0i32),
|
2345 - | zero_long: self.zero_long.unwrap_or(0i64),
|
2346 - | zero_float: self.zero_float.unwrap_or(0.0f32),
|
2347 - | zero_double: self.zero_double.unwrap_or(0.0f64),
|
2348 - | })
|
3641 + | /* ServerBuilderGenerator.kt:287 */
|
3642 + | Ok(
|
3643 + | /* ServerBuilderGenerator.kt:542 */
|
3644 + | crate::model::Defaults {
|
3645 + | /* ServerBuilderGenerator.kt:546 */
|
3646 + | default_string: self
|
3647 + | .default_string
|
3648 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3649 + | .unwrap_or_else(|| String::from("hi")),
|
3650 + | /* ServerBuilderGenerator.kt:546 */
|
3651 + | default_boolean: self
|
3652 + | .default_boolean
|
3653 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3654 + | .unwrap_or(true),
|
3655 + | /* ServerBuilderGenerator.kt:546 */
|
3656 + | default_list: self
|
3657 + | .default_list
|
3658 + | /* ServerBuilderGeneratorCommon.kt:95 */
|
3659 + | .unwrap_or_default(),
|
3660 + | /* ServerBuilderGenerator.kt:546 */
|
3661 + | default_document_map: self
|
3662 + | .default_document_map
|
3663 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3664 + | .unwrap_or_else(|| {
|
3665 + | ::aws_smithy_types::Document::Object(::std::collections::HashMap::new())
|
3666 + | }),
|
3667 + | /* ServerBuilderGenerator.kt:546 */
|
3668 + | default_document_string: self
|
3669 + | .default_document_string
|
3670 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3671 + | .unwrap_or_else(|| {
|
3672 + | ::aws_smithy_types::Document::String(::std::string::String::from("hi"))
|
3673 + | }),
|
3674 + | /* ServerBuilderGenerator.kt:546 */
|
3675 + | default_document_boolean: self
|
3676 + | .default_document_boolean
|
3677 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3678 + | .unwrap_or(::aws_smithy_types::Document::Bool(true)),
|
3679 + | /* ServerBuilderGenerator.kt:546 */
|
3680 + | default_document_list: self
|
3681 + | .default_document_list
|
3682 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3683 + | .unwrap_or_else(|| {
|
3684 + | ::aws_smithy_types::Document::Array(::std::vec::Vec::new())
|
3685 + | }),
|
3686 + | /* ServerBuilderGenerator.kt:546 */
|
3687 + | default_null_document: self.default_null_document,
|
3688 + | /* ServerBuilderGenerator.kt:546 */
|
3689 + | default_timestamp: self
|
3690 + | .default_timestamp
|
3691 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3692 + | .unwrap_or_else(|| {
|
3693 + | ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)
|
3694 + | }),
|
3695 + | /* ServerBuilderGenerator.kt:546 */
|
3696 + | default_blob: self
|
3697 + | .default_blob
|
3698 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3699 + | .unwrap_or_else(|| ::aws_smithy_types::Blob::new("YWJj")),
|
3700 + | /* ServerBuilderGenerator.kt:546 */
|
3701 + | default_byte: self
|
3702 + | .default_byte
|
3703 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3704 + | .unwrap_or(1i8),
|
3705 + | /* ServerBuilderGenerator.kt:546 */
|
3706 + | default_short: self
|
3707 + | .default_short
|
3708 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3709 + | .unwrap_or(1i16),
|
3710 + | /* ServerBuilderGenerator.kt:546 */
|
3711 + | default_integer: self
|
3712 + | .default_integer
|
3713 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3714 + | .unwrap_or(10i32),
|
3715 + | /* ServerBuilderGenerator.kt:546 */
|
3716 + | default_long: self
|
3717 + | .default_long
|
3718 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3719 + | .unwrap_or(100i64),
|
3720 + | /* ServerBuilderGenerator.kt:546 */
|
3721 + | default_float: self
|
3722 + | .default_float
|
3723 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3724 + | .unwrap_or(1.0f32),
|
3725 + | /* ServerBuilderGenerator.kt:546 */
|
3726 + | default_double: self
|
3727 + | .default_double
|
3728 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3729 + | .unwrap_or(1.0f64),
|
3730 + | /* ServerBuilderGenerator.kt:546 */
|
3731 + | default_map: self
|
3732 + | .default_map
|
3733 + | /* ServerBuilderGeneratorCommon.kt:95 */
|
3734 + | .unwrap_or_default(),
|
3735 + | /* ServerBuilderGenerator.kt:546 */
|
3736 + | default_enum: self
|
3737 + | .default_enum
|
3738 + | /* ServerBuilderGenerator.kt:602 */
|
3739 + | .map(|v| match v {
|
3740 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
3741 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3742 + | })
|
3743 + | /* ServerBuilderGenerator.kt:614 */
|
3744 + | .map(|res| res.map_err(ConstraintViolation::DefaultEnum))
|
3745 + | .transpose()?
|
3746 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3747 + | .unwrap_or(
|
3748 + | "FOO"
|
3749 + | .parse::<crate::model::TestEnum>()
|
3750 + | .expect("static value validated to member"),
|
3751 + | ),
|
3752 + | /* ServerBuilderGenerator.kt:546 */
|
3753 + | default_int_enum: self
|
3754 + | .default_int_enum
|
3755 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3756 + | .unwrap_or(1i32),
|
3757 + | /* ServerBuilderGenerator.kt:546 */
|
3758 + | empty_string: self
|
3759 + | .empty_string
|
3760 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3761 + | .unwrap_or_else(|| String::from("")),
|
3762 + | /* ServerBuilderGenerator.kt:546 */
|
3763 + | false_boolean: self
|
3764 + | .false_boolean
|
3765 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3766 + | .unwrap_or(false),
|
3767 + | /* ServerBuilderGenerator.kt:546 */
|
3768 + | empty_blob: self
|
3769 + | .empty_blob
|
3770 + | /* ServerBuilderGeneratorCommon.kt:129 */
|
3771 + | .unwrap_or_else(|| ::aws_smithy_types::Blob::new("")),
|
3772 + | /* ServerBuilderGenerator.kt:546 */
|
3773 + | zero_byte: self
|
3774 + | .zero_byte
|
3775 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3776 + | .unwrap_or(0i8),
|
3777 + | /* ServerBuilderGenerator.kt:546 */
|
3778 + | zero_short: self
|
3779 + | .zero_short
|
3780 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3781 + | .unwrap_or(0i16),
|
3782 + | /* ServerBuilderGenerator.kt:546 */
|
3783 + | zero_integer: self
|
3784 + | .zero_integer
|
3785 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3786 + | .unwrap_or(0i32),
|
3787 + | /* ServerBuilderGenerator.kt:546 */
|
3788 + | zero_long: self
|
3789 + | .zero_long
|
3790 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3791 + | .unwrap_or(0i64),
|
3792 + | /* ServerBuilderGenerator.kt:546 */
|
3793 + | zero_float: self
|
3794 + | .zero_float
|
3795 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3796 + | .unwrap_or(0.0f32),
|
3797 + | /* ServerBuilderGenerator.kt:546 */
|
3798 + | zero_double: self
|
3799 + | .zero_double
|
3800 + | /* ServerBuilderGeneratorCommon.kt:125 */
|
3801 + | .unwrap_or(0.0f64),
|
3802 + | /* ServerBuilderGenerator.kt:542 */
|
3803 + | }, /* ServerBuilderGenerator.kt:287 */
|
3804 + | )
|
3805 + | /* ServerBuilderGenerator.kt:283 */
|
2349 3806 | }
|
3807 + | /* ServerBuilderGenerator.kt:215 */
|
2350 3808 | }
|
3809 + |
|
3810 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2351 3811 | }
|
2352 - | /// See [`PayloadConfig`](crate::model::PayloadConfig).
|
3812 + | /// /* ServerBuilderGenerator.kt:171 */See [`PayloadConfig`](crate::model::PayloadConfig).
|
2353 3813 | pub mod payload_config {
|
2354 3814 |
|
3815 + | /* ServerBuilderGenerator.kt:461 */
|
2355 3816 | impl ::std::convert::From<Builder> for crate::model::PayloadConfig {
|
2356 3817 | fn from(builder: Builder) -> Self {
|
2357 3818 | builder.build()
|
2358 3819 | }
|
2359 3820 | }
|
2360 - | /// A builder for [`PayloadConfig`](crate::model::PayloadConfig).
|
3821 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`PayloadConfig`](crate::model::PayloadConfig).
|
3822 + | /* RustType.kt:534 */
|
2361 3823 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3824 + | /* ServerBuilderGenerator.kt:211 */
|
2362 3825 | pub struct Builder {
|
3826 + | /* ServerBuilderGenerator.kt:308 */
|
2363 3827 | pub(crate) data: ::std::option::Option<i32>,
|
3828 + | /* ServerBuilderGenerator.kt:211 */
|
2364 3829 | }
|
3830 + | /* ServerBuilderGenerator.kt:215 */
|
2365 3831 | impl Builder {
|
3832 + | /* ServerBuilderGenerator.kt:331 */
|
2366 3833 | #[allow(missing_docs)] // documentation missing in model
|
3834 + | /* ServerBuilderGenerator.kt:343 */
|
2367 3835 | pub fn data(mut self, input: ::std::option::Option<i32>) -> Self {
|
2368 - | self.data = input;
|
3836 + | /* ServerBuilderGenerator.kt:344 */
|
3837 + | self.data =
|
3838 + | /* ServerBuilderGenerator.kt:376 */input
|
3839 + | /* ServerBuilderGenerator.kt:344 */;
|
2369 3840 | self
|
3841 + | /* ServerBuilderGenerator.kt:343 */
|
2370 3842 | }
|
3843 + | /* ServerBuilderGenerator.kt:426 */
|
2371 3844 | #[allow(missing_docs)] // documentation missing in model
|
3845 + | /* ServerBuilderGenerator.kt:428 */
|
2372 3846 | pub(crate) fn set_data(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
3847 + | /* ServerBuilderGenerator.kt:429 */
|
2373 3848 | self.data = input.map(|v| v.into());
|
2374 3849 | self
|
3850 + | /* ServerBuilderGenerator.kt:428 */
|
2375 3851 | }
|
2376 - | /// Consumes the builder and constructs a [`PayloadConfig`](crate::model::PayloadConfig).
|
3852 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`PayloadConfig`](crate::model::PayloadConfig).
|
3853 + | /* ServerBuilderGenerator.kt:271 */
|
2377 3854 | pub fn build(self) -> crate::model::PayloadConfig {
|
2378 3855 | self.build_enforcing_all_constraints()
|
2379 3856 | }
|
3857 + | /* ServerBuilderGenerator.kt:283 */
|
2380 3858 | fn build_enforcing_all_constraints(self) -> crate::model::PayloadConfig {
|
2381 - | crate::model::PayloadConfig { data: self.data }
|
3859 + | /* ServerBuilderGenerator.kt:542 */
|
3860 + | crate::model::PayloadConfig {
|
3861 + | /* ServerBuilderGenerator.kt:546 */
|
3862 + | data: self.data,
|
3863 + | /* ServerBuilderGenerator.kt:542 */
|
3864 + | }
|
3865 + | /* ServerBuilderGenerator.kt:283 */
|
2382 3866 | }
|
3867 + | /* ServerBuilderGenerator.kt:215 */
|
2383 3868 | }
|
3869 + |
|
3870 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2384 3871 | }
|
2385 - | /// See [`TestConfig`](crate::model::TestConfig).
|
3872 + | /// /* ServerBuilderGenerator.kt:171 */See [`TestConfig`](crate::model::TestConfig).
|
2386 3873 | pub mod test_config {
|
2387 3874 |
|
3875 + | /* ServerBuilderGenerator.kt:461 */
|
2388 3876 | impl ::std::convert::From<Builder> for crate::model::TestConfig {
|
2389 3877 | fn from(builder: Builder) -> Self {
|
2390 3878 | builder.build()
|
2391 3879 | }
|
2392 3880 | }
|
2393 - | /// A builder for [`TestConfig`](crate::model::TestConfig).
|
3881 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`TestConfig`](crate::model::TestConfig).
|
3882 + | /* RustType.kt:534 */
|
2394 3883 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3884 + | /* ServerBuilderGenerator.kt:211 */
|
2395 3885 | pub struct Builder {
|
3886 + | /* ServerBuilderGenerator.kt:308 */
|
2396 3887 | pub(crate) timeout: ::std::option::Option<i32>,
|
3888 + | /* ServerBuilderGenerator.kt:211 */
|
2397 3889 | }
|
3890 + | /* ServerBuilderGenerator.kt:215 */
|
2398 3891 | impl Builder {
|
3892 + | /* ServerBuilderGenerator.kt:331 */
|
2399 3893 | #[allow(missing_docs)] // documentation missing in model
|
3894 + | /* ServerBuilderGenerator.kt:343 */
|
2400 3895 | pub fn timeout(mut self, input: ::std::option::Option<i32>) -> Self {
|
2401 - | self.timeout = input;
|
3896 + | /* ServerBuilderGenerator.kt:344 */
|
3897 + | self.timeout =
|
3898 + | /* ServerBuilderGenerator.kt:376 */input
|
3899 + | /* ServerBuilderGenerator.kt:344 */;
|
2402 3900 | self
|
3901 + | /* ServerBuilderGenerator.kt:343 */
|
2403 3902 | }
|
3903 + | /* ServerBuilderGenerator.kt:426 */
|
2404 3904 | #[allow(missing_docs)] // documentation missing in model
|
3905 + | /* ServerBuilderGenerator.kt:428 */
|
2405 3906 | pub(crate) fn set_timeout(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
3907 + | /* ServerBuilderGenerator.kt:429 */
|
2406 3908 | self.timeout = input.map(|v| v.into());
|
2407 3909 | self
|
3910 + | /* ServerBuilderGenerator.kt:428 */
|
2408 3911 | }
|
2409 - | /// Consumes the builder and constructs a [`TestConfig`](crate::model::TestConfig).
|
3912 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`TestConfig`](crate::model::TestConfig).
|
3913 + | /* ServerBuilderGenerator.kt:271 */
|
2410 3914 | pub fn build(self) -> crate::model::TestConfig {
|
2411 3915 | self.build_enforcing_all_constraints()
|
2412 3916 | }
|
3917 + | /* ServerBuilderGenerator.kt:283 */
|
2413 3918 | fn build_enforcing_all_constraints(self) -> crate::model::TestConfig {
|
3919 + | /* ServerBuilderGenerator.kt:542 */
|
2414 3920 | crate::model::TestConfig {
|
3921 + | /* ServerBuilderGenerator.kt:546 */
|
2415 3922 | timeout: self.timeout,
|
3923 + | /* ServerBuilderGenerator.kt:542 */
|
2416 3924 | }
|
3925 + | /* ServerBuilderGenerator.kt:283 */
|
2417 3926 | }
|
3927 + | /* ServerBuilderGenerator.kt:215 */
|
2418 3928 | }
|
3929 + |
|
3930 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2419 3931 | }
|
2420 - | /// See [`Unit`](crate::model::Unit).
|
3932 + | /// /* ServerBuilderGenerator.kt:171 */See [`Unit`](crate::model::Unit).
|
2421 3933 | pub mod unit {
|
2422 3934 |
|
3935 + | /* ServerBuilderGenerator.kt:461 */
|
2423 3936 | impl ::std::convert::From<Builder> for crate::model::Unit {
|
2424 3937 | fn from(builder: Builder) -> Self {
|
2425 3938 | builder.build()
|
2426 3939 | }
|
2427 3940 | }
|
2428 - | /// A builder for [`Unit`](crate::model::Unit).
|
3941 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Unit`](crate::model::Unit).
|
3942 + | /* RustType.kt:534 */
|
2429 3943 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2430 - | pub struct Builder {}
|
3944 + | /* ServerBuilderGenerator.kt:211 */
|
3945 + | pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
3946 + | /* ServerBuilderGenerator.kt:215 */
|
2431 3947 | impl Builder {
|
2432 - | /// Consumes the builder and constructs a [`Unit`](crate::model::Unit).
|
3948 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Unit`](crate::model::Unit).
|
3949 + | /* ServerBuilderGenerator.kt:271 */
|
2433 3950 | pub fn build(self) -> crate::model::Unit {
|
2434 3951 | self.build_enforcing_all_constraints()
|
2435 3952 | }
|
3953 + | /* ServerBuilderGenerator.kt:283 */
|
2436 3954 | fn build_enforcing_all_constraints(self) -> crate::model::Unit {
|
2437 - | crate::model::Unit {}
|
3955 + | /* ServerBuilderGenerator.kt:542 */
|
3956 + | crate::model::Unit {
|
3957 + | /* ServerBuilderGenerator.kt:542 */}
|
3958 + | /* ServerBuilderGenerator.kt:283 */
|
2438 3959 | }
|
3960 + | /* ServerBuilderGenerator.kt:215 */
|
2439 3961 | }
|
3962 + |
|
3963 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2440 3964 | }
|
2441 3965 | pub mod my_union {
|
2442 3966 |
|
3967 + | /* RustType.kt:534 */
|
2443 3968 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3969 + | /* UnconstrainedUnionGenerator.kt:150 */
|
2444 3970 | #[allow(clippy::enum_variant_names)]
|
2445 3971 | pub enum ConstraintViolation {
|
3972 + | /* UnconstrainedUnionGenerator.kt:218 */
|
2446 3973 | EnumValue(crate::model::foo_enum::ConstraintViolation),
|
3974 + | /* UnconstrainedUnionGenerator.kt:150 */
|
2447 3975 | }
|
3976 + | /* UnconstrainedUnionGenerator.kt:158 */
|
2448 3977 | impl ::std::fmt::Display for ConstraintViolation {
|
2449 3978 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2450 3979 | match self {
|
2451 3980 | Self::EnumValue(inner) => write!(f, "{inner}"),
|
2452 3981 | }
|
2453 3982 | }
|
2454 3983 | }
|
2455 3984 |
|
2456 3985 | impl ::std::error::Error for ConstraintViolation {}
|
3986 + | /* UnconstrainedUnionGenerator.kt:176 */
|
2457 3987 | impl ConstraintViolation {
|
2458 3988 | pub(crate) fn as_validation_exception_field(
|
2459 3989 | self,
|
2460 3990 | path: ::std::string::String,
|
2461 3991 | ) -> crate::model::ValidationExceptionField {
|
2462 3992 | match self {
|
2463 3993 | Self::EnumValue(inner) => inner.as_validation_exception_field(path + "/enumValue"),
|
2464 3994 | }
|
2465 3995 | }
|
2466 3996 | }
|
3997 + |
|
3998 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2467 3999 | }
|
2468 - | /// See [`RenamedGreeting`](crate::model::RenamedGreeting).
|
4000 + | /// /* ServerBuilderGenerator.kt:171 */See [`RenamedGreeting`](crate::model::RenamedGreeting).
|
2469 4001 | pub mod renamed_greeting {
|
2470 4002 |
|
4003 + | /* ServerBuilderGenerator.kt:461 */
|
2471 4004 | impl ::std::convert::From<Builder> for crate::model::RenamedGreeting {
|
2472 4005 | fn from(builder: Builder) -> Self {
|
2473 4006 | builder.build()
|
2474 4007 | }
|
2475 4008 | }
|
2476 - | /// A builder for [`RenamedGreeting`](crate::model::RenamedGreeting).
|
4009 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`RenamedGreeting`](crate::model::RenamedGreeting).
|
4010 + | /* RustType.kt:534 */
|
2477 4011 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4012 + | /* ServerBuilderGenerator.kt:211 */
|
2478 4013 | pub struct Builder {
|
4014 + | /* ServerBuilderGenerator.kt:308 */
|
2479 4015 | pub(crate) salutation: ::std::option::Option<::std::string::String>,
|
4016 + | /* ServerBuilderGenerator.kt:211 */
|
2480 4017 | }
|
4018 + | /* ServerBuilderGenerator.kt:215 */
|
2481 4019 | impl Builder {
|
4020 + | /* ServerBuilderGenerator.kt:331 */
|
2482 4021 | #[allow(missing_docs)] // documentation missing in model
|
4022 + | /* ServerBuilderGenerator.kt:343 */
|
2483 4023 | pub fn salutation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
2484 - | self.salutation = input;
|
4024 + | /* ServerBuilderGenerator.kt:344 */
|
4025 + | self.salutation =
|
4026 + | /* ServerBuilderGenerator.kt:376 */input
|
4027 + | /* ServerBuilderGenerator.kt:344 */;
|
2485 4028 | self
|
4029 + | /* ServerBuilderGenerator.kt:343 */
|
2486 4030 | }
|
4031 + | /* ServerBuilderGenerator.kt:426 */
|
2487 4032 | #[allow(missing_docs)] // documentation missing in model
|
4033 + | /* ServerBuilderGenerator.kt:428 */
|
2488 4034 | pub(crate) fn set_salutation(
|
2489 4035 | mut self,
|
2490 4036 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
2491 4037 | ) -> Self {
|
4038 + | /* ServerBuilderGenerator.kt:429 */
|
2492 4039 | self.salutation = input.map(|v| v.into());
|
2493 4040 | self
|
4041 + | /* ServerBuilderGenerator.kt:428 */
|
2494 4042 | }
|
2495 - | /// Consumes the builder and constructs a [`RenamedGreeting`](crate::model::RenamedGreeting).
|
4043 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RenamedGreeting`](crate::model::RenamedGreeting).
|
4044 + | /* ServerBuilderGenerator.kt:271 */
|
2496 4045 | pub fn build(self) -> crate::model::RenamedGreeting {
|
2497 4046 | self.build_enforcing_all_constraints()
|
2498 4047 | }
|
4048 + | /* ServerBuilderGenerator.kt:283 */
|
2499 4049 | fn build_enforcing_all_constraints(self) -> crate::model::RenamedGreeting {
|
4050 + | /* ServerBuilderGenerator.kt:542 */
|
2500 4051 | crate::model::RenamedGreeting {
|
4052 + | /* ServerBuilderGenerator.kt:546 */
|
2501 4053 | salutation: self.salutation,
|
4054 + | /* ServerBuilderGenerator.kt:542 */
|
2502 4055 | }
|
4056 + | /* ServerBuilderGenerator.kt:283 */
|
2503 4057 | }
|
4058 + | /* ServerBuilderGenerator.kt:215 */
|
2504 4059 | }
|
4060 + |
|
4061 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2505 4062 | }
|
2506 - | /// See [`GreetingStruct`](crate::model::GreetingStruct).
|
4063 + | /// /* ServerBuilderGenerator.kt:171 */See [`GreetingStruct`](crate::model::GreetingStruct).
|
2507 4064 | pub mod greeting_struct {
|
2508 4065 |
|
4066 + | /* ServerBuilderGenerator.kt:461 */
|
2509 4067 | impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
|
2510 4068 | fn from(builder: Builder) -> Self {
|
2511 4069 | builder.build()
|
2512 4070 | }
|
2513 4071 | }
|
2514 - | /// A builder for [`GreetingStruct`](crate::model::GreetingStruct).
|
4072 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`GreetingStruct`](crate::model::GreetingStruct).
|
4073 + | /* RustType.kt:534 */
|
2515 4074 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4075 + | /* ServerBuilderGenerator.kt:211 */
|
2516 4076 | pub struct Builder {
|
4077 + | /* ServerBuilderGenerator.kt:308 */
|
2517 4078 | pub(crate) hi: ::std::option::Option<::std::string::String>,
|
4079 + | /* ServerBuilderGenerator.kt:211 */
|
2518 4080 | }
|
4081 + | /* ServerBuilderGenerator.kt:215 */
|
2519 4082 | impl Builder {
|
4083 + | /* ServerBuilderGenerator.kt:331 */
|
2520 4084 | #[allow(missing_docs)] // documentation missing in model
|
4085 + | /* ServerBuilderGenerator.kt:343 */
|
2521 4086 | pub fn hi(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
2522 - | self.hi = input;
|
4087 + | /* ServerBuilderGenerator.kt:344 */
|
4088 + | self.hi =
|
4089 + | /* ServerBuilderGenerator.kt:376 */input
|
4090 + | /* ServerBuilderGenerator.kt:344 */;
|
2523 4091 | self
|
4092 + | /* ServerBuilderGenerator.kt:343 */
|
2524 4093 | }
|
4094 + | /* ServerBuilderGenerator.kt:426 */
|
2525 4095 | #[allow(missing_docs)] // documentation missing in model
|
4096 + | /* ServerBuilderGenerator.kt:428 */
|
2526 4097 | pub(crate) fn set_hi(
|
2527 4098 | mut self,
|
2528 4099 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
2529 4100 | ) -> Self {
|
4101 + | /* ServerBuilderGenerator.kt:429 */
|
2530 4102 | self.hi = input.map(|v| v.into());
|
2531 4103 | self
|
4104 + | /* ServerBuilderGenerator.kt:428 */
|
2532 4105 | }
|
2533 - | /// Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
|
4106 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
|
4107 + | /* ServerBuilderGenerator.kt:271 */
|
2534 4108 | pub fn build(self) -> crate::model::GreetingStruct {
|
2535 4109 | self.build_enforcing_all_constraints()
|
2536 4110 | }
|
4111 + | /* ServerBuilderGenerator.kt:283 */
|
2537 4112 | fn build_enforcing_all_constraints(self) -> crate::model::GreetingStruct {
|
2538 - | crate::model::GreetingStruct { hi: self.hi }
|
4113 + | /* ServerBuilderGenerator.kt:542 */
|
4114 + | crate::model::GreetingStruct {
|
4115 + | /* ServerBuilderGenerator.kt:546 */
|
4116 + | hi: self.hi,
|
4117 + | /* ServerBuilderGenerator.kt:542 */
|
4118 + | }
|
4119 + | /* ServerBuilderGenerator.kt:283 */
|
2539 4120 | }
|
4121 + | /* ServerBuilderGenerator.kt:215 */
|
2540 4122 | }
|
4123 + |
|
4124 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2541 4125 | }
|
2542 4126 | pub mod sparse_set_map {
|
2543 4127 |
|
4128 + | /* MapConstraintViolationGenerator.kt:82 */
|
2544 4129 | #[allow(clippy::enum_variant_names)]
|
2545 4130 | #[derive(Debug, PartialEq)]
|
2546 4131 | pub enum ConstraintViolation {
|
2547 4132 | #[doc(hidden)]
|
2548 4133 | Value(
|
2549 4134 | ::std::string::String,
|
2550 4135 | crate::model::string_set::ConstraintViolation,
|
2551 4136 | ),
|
2552 4137 | }
|
2553 4138 |
|
2554 4139 | impl ::std::fmt::Display for ConstraintViolation {
|
2555 4140 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2556 4141 | match self {
|
2557 4142 | Self::Value(_, value_constraint_violation) => {
|
2558 4143 | write!(f, "{}", value_constraint_violation)
|
2559 4144 | }
|
2560 4145 | }
|
2561 4146 | }
|
2562 4147 | }
|
2563 4148 |
|
2564 4149 | impl ::std::error::Error for ConstraintViolation {}
|
4150 + | /* MapConstraintViolationGenerator.kt:111 */
|
2565 4151 | impl ConstraintViolation {
|
2566 4152 | pub(crate) fn as_validation_exception_field(
|
2567 4153 | self,
|
2568 4154 | path: ::std::string::String,
|
2569 4155 | ) -> crate::model::ValidationExceptionField {
|
2570 4156 | match self {
|
2571 4157 | Self::Value(key, value_constraint_violation) => value_constraint_violation
|
2572 4158 | .as_validation_exception_field(path + "/" + key.as_str()),
|
2573 4159 | }
|
2574 4160 | }
|
2575 4161 | }
|
4162 + |
|
4163 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2576 4164 | }
|
2577 - | /// See [`StringSet`](crate::model::StringSet).
|
4165 + | /// /* CodegenDelegator.kt:52 */See [`StringSet`](crate::model::StringSet).
|
2578 4166 | pub mod string_set {
|
2579 4167 |
|
4168 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
2580 4169 | #[allow(clippy::enum_variant_names)]
|
2581 4170 | #[derive(Debug, PartialEq)]
|
2582 4171 | pub enum ConstraintViolation {
|
2583 4172 | /// Constraint violation error when the list does not contain unique items
|
2584 4173 | UniqueItems {
|
2585 4174 | /// A vector of indices into `original` pointing to all duplicate items. This vector has
|
2586 4175 | /// at least two elements.
|
2587 4176 | /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
|
2588 4177 | /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
|
2589 4178 | /// Nothing is guaranteed about the order of the indices.
|
2590 4179 | duplicate_indices: ::std::vec::Vec<usize>,
|
2591 4180 | /// The original vector, that contains duplicate items.
|
2592 4181 | original: ::std::vec::Vec<::std::string::String>,
|
2593 4182 | },
|
2594 4183 | }
|
2595 4184 |
|
2596 4185 | impl ::std::fmt::Display for ConstraintViolation {
|
2597 4186 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2598 4187 | let message = match self {
|
2599 4188 | Self::UniqueItems { duplicate_indices, .. } =>
|
2600 4189 | format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#StringSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
|
2601 4190 | };
|
2602 4191 | write!(f, "{message}")
|
2603 4192 | }
|
2604 4193 | }
|
2605 4194 |
|
2606 4195 | impl ::std::error::Error for ConstraintViolation {}
|
4196 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
2607 4197 | impl ConstraintViolation {
|
2608 4198 | pub(crate) fn as_validation_exception_field(
|
2609 4199 | self,
|
2610 4200 | path: ::std::string::String,
|
2611 4201 | ) -> crate::model::ValidationExceptionField {
|
2612 4202 | match self {
|
2613 4203 | Self::UniqueItems { duplicate_indices, .. } =>
|
2614 4204 | crate::model::ValidationExceptionField {
|
2615 4205 | message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
|
2616 4206 | path,
|
2617 4207 | },
|
2618 4208 | }
|
2619 4209 | }
|
2620 4210 | }
|
4211 + |
|
4212 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2621 4213 | }
|
2622 4214 | pub mod dense_set_map {
|
2623 4215 |
|
4216 + | /* MapConstraintViolationGenerator.kt:82 */
|
2624 4217 | #[allow(clippy::enum_variant_names)]
|
2625 4218 | #[derive(Debug, PartialEq)]
|
2626 4219 | pub enum ConstraintViolation {
|
2627 4220 | #[doc(hidden)]
|
2628 4221 | Value(
|
2629 4222 | ::std::string::String,
|
2630 4223 | crate::model::string_set::ConstraintViolation,
|
2631 4224 | ),
|
2632 4225 | }
|
2633 4226 |
|
2634 4227 | impl ::std::fmt::Display for ConstraintViolation {
|
2635 4228 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2636 4229 | match self {
|
2637 4230 | Self::Value(_, value_constraint_violation) => {
|
2638 4231 | write!(f, "{}", value_constraint_violation)
|
2639 4232 | }
|
2640 4233 | }
|
2641 4234 | }
|
2642 4235 | }
|
2643 4236 |
|
2644 4237 | impl ::std::error::Error for ConstraintViolation {}
|
4238 + | /* MapConstraintViolationGenerator.kt:111 */
|
2645 4239 | impl ConstraintViolation {
|
2646 4240 | pub(crate) fn as_validation_exception_field(
|
2647 4241 | self,
|
2648 4242 | path: ::std::string::String,
|
2649 4243 | ) -> crate::model::ValidationExceptionField {
|
2650 4244 | match self {
|
2651 4245 | Self::Value(key, value_constraint_violation) => value_constraint_violation
|
2652 4246 | .as_validation_exception_field(path + "/" + key.as_str()),
|
2653 4247 | }
|
2654 4248 | }
|
2655 4249 | }
|
4250 + |
|
4251 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2656 4252 | }
|
2657 - | /// See [`StructureListMember`](crate::model::StructureListMember).
|
4253 + | /// /* ServerBuilderGenerator.kt:171 */See [`StructureListMember`](crate::model::StructureListMember).
|
2658 4254 | pub mod structure_list_member {
|
2659 4255 |
|
4256 + | /* ServerBuilderGenerator.kt:461 */
|
2660 4257 | impl ::std::convert::From<Builder> for crate::model::StructureListMember {
|
2661 4258 | fn from(builder: Builder) -> Self {
|
2662 4259 | builder.build()
|
2663 4260 | }
|
2664 4261 | }
|
2665 - | /// A builder for [`StructureListMember`](crate::model::StructureListMember).
|
4262 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`StructureListMember`](crate::model::StructureListMember).
|
4263 + | /* RustType.kt:534 */
|
2666 4264 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4265 + | /* ServerBuilderGenerator.kt:211 */
|
2667 4266 | pub struct Builder {
|
4267 + | /* ServerBuilderGenerator.kt:308 */
|
2668 4268 | pub(crate) a: ::std::option::Option<::std::string::String>,
|
4269 + | /* ServerBuilderGenerator.kt:308 */
|
2669 4270 | pub(crate) b: ::std::option::Option<::std::string::String>,
|
4271 + | /* ServerBuilderGenerator.kt:211 */
|
2670 4272 | }
|
4273 + | /* ServerBuilderGenerator.kt:215 */
|
2671 4274 | impl Builder {
|
4275 + | /* ServerBuilderGenerator.kt:331 */
|
2672 4276 | #[allow(missing_docs)] // documentation missing in model
|
4277 + | /* ServerBuilderGenerator.kt:343 */
|
2673 4278 | pub fn a(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
2674 - | self.a = input;
|
4279 + | /* ServerBuilderGenerator.kt:344 */
|
4280 + | self.a =
|
4281 + | /* ServerBuilderGenerator.kt:376 */input
|
4282 + | /* ServerBuilderGenerator.kt:344 */;
|
2675 4283 | self
|
4284 + | /* ServerBuilderGenerator.kt:343 */
|
2676 4285 | }
|
4286 + | /* ServerBuilderGenerator.kt:426 */
|
2677 4287 | #[allow(missing_docs)] // documentation missing in model
|
4288 + | /* ServerBuilderGenerator.kt:428 */
|
2678 4289 | pub(crate) fn set_a(
|
2679 4290 | mut self,
|
2680 4291 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
2681 4292 | ) -> Self {
|
4293 + | /* ServerBuilderGenerator.kt:429 */
|
2682 4294 | self.a = input.map(|v| v.into());
|
2683 4295 | self
|
4296 + | /* ServerBuilderGenerator.kt:428 */
|
2684 4297 | }
|
4298 + | /* ServerBuilderGenerator.kt:331 */
|
2685 4299 | #[allow(missing_docs)] // documentation missing in model
|
4300 + | /* ServerBuilderGenerator.kt:343 */
|
2686 4301 | pub fn b(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
2687 - | self.b = input;
|
4302 + | /* ServerBuilderGenerator.kt:344 */
|
4303 + | self.b =
|
4304 + | /* ServerBuilderGenerator.kt:376 */input
|
4305 + | /* ServerBuilderGenerator.kt:344 */;
|
2688 4306 | self
|
4307 + | /* ServerBuilderGenerator.kt:343 */
|
2689 4308 | }
|
4309 + | /* ServerBuilderGenerator.kt:426 */
|
2690 4310 | #[allow(missing_docs)] // documentation missing in model
|
4311 + | /* ServerBuilderGenerator.kt:428 */
|
2691 4312 | pub(crate) fn set_b(
|
2692 4313 | mut self,
|
2693 4314 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
2694 4315 | ) -> Self {
|
4316 + | /* ServerBuilderGenerator.kt:429 */
|
2695 4317 | self.b = input.map(|v| v.into());
|
2696 4318 | self
|
4319 + | /* ServerBuilderGenerator.kt:428 */
|
2697 4320 | }
|
2698 - | /// Consumes the builder and constructs a [`StructureListMember`](crate::model::StructureListMember).
|
4321 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StructureListMember`](crate::model::StructureListMember).
|
4322 + | /* ServerBuilderGenerator.kt:271 */
|
2699 4323 | pub fn build(self) -> crate::model::StructureListMember {
|
2700 4324 | self.build_enforcing_all_constraints()
|
2701 4325 | }
|
4326 + | /* ServerBuilderGenerator.kt:283 */
|
2702 4327 | fn build_enforcing_all_constraints(self) -> crate::model::StructureListMember {
|
4328 + | /* ServerBuilderGenerator.kt:542 */
|
2703 4329 | crate::model::StructureListMember {
|
4330 + | /* ServerBuilderGenerator.kt:546 */
|
2704 4331 | a: self.a,
|
4332 + | /* ServerBuilderGenerator.kt:546 */
|
2705 4333 | b: self.b,
|
4334 + | /* ServerBuilderGenerator.kt:542 */
|
2706 4335 | }
|
4336 + | /* ServerBuilderGenerator.kt:283 */
|
2707 4337 | }
|
4338 + | /* ServerBuilderGenerator.kt:215 */
|
2708 4339 | }
|
4340 + |
|
4341 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2709 4342 | }
|
2710 4343 | pub mod foo_enum_list {
|
2711 4344 |
|
4345 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
2712 4346 | #[allow(clippy::enum_variant_names)]
|
2713 4347 | #[derive(Debug, PartialEq)]
|
2714 4348 | pub enum ConstraintViolation {
|
2715 4349 | /// Constraint violation error when an element doesn't satisfy its own constraints.
|
2716 4350 | /// The first component of the tuple is the index in the collection where the
|
2717 4351 | /// first constraint violation was found.
|
2718 4352 | #[doc(hidden)]
|
2719 4353 | Member(usize, crate::model::foo_enum::ConstraintViolation),
|
2720 4354 | }
|
2721 4355 |
|
2722 4356 | impl ::std::fmt::Display for ConstraintViolation {
|
2723 4357 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2724 4358 | let message = match self {
|
2725 4359 | Self::Member(index, failing_member) => format!(
|
2726 4360 | "Value at index {index} failed to satisfy constraint. {}",
|
2727 4361 | failing_member
|
2728 4362 | ),
|
2729 4363 | };
|
2730 4364 | write!(f, "{message}")
|
2731 4365 | }
|
2732 4366 | }
|
2733 4367 |
|
2734 4368 | impl ::std::error::Error for ConstraintViolation {}
|
4369 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
2735 4370 | impl ConstraintViolation {
|
2736 4371 | pub(crate) fn as_validation_exception_field(
|
2737 4372 | self,
|
2738 4373 | path: ::std::string::String,
|
2739 4374 | ) -> crate::model::ValidationExceptionField {
|
2740 4375 | match self {
|
2741 4376 | Self::Member(index, member_constraint_violation) => member_constraint_violation
|
2742 4377 | .as_validation_exception_field(path + "/" + &index.to_string()),
|
2743 4378 | }
|
2744 4379 | }
|
2745 4380 | }
|
4381 + |
|
4382 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2746 4383 | }
|
2747 - | /// See [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
4384 + | /// /* ServerBuilderGenerator.kt:171 */See [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
2748 4385 | pub mod recursive_shapes_input_output_nested1 {
|
2749 4386 |
|
4387 + | /* ServerBuilderGenerator.kt:461 */
|
2750 4388 | impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested1 {
|
2751 4389 | fn from(builder: Builder) -> Self {
|
2752 4390 | builder.build()
|
2753 4391 | }
|
2754 4392 | }
|
2755 - | /// A builder for [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
4393 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
4394 + | /* RustType.kt:534 */
|
2756 4395 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4396 + | /* ServerBuilderGenerator.kt:211 */
|
2757 4397 | pub struct Builder {
|
4398 + | /* ServerBuilderGenerator.kt:308 */
|
2758 4399 | pub(crate) foo: ::std::option::Option<::std::string::String>,
|
4400 + | /* ServerBuilderGenerator.kt:308 */
|
2759 4401 | pub(crate) nested: ::std::option::Option<
|
2760 4402 | ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
|
2761 4403 | >,
|
4404 + | /* ServerBuilderGenerator.kt:211 */
|
2762 4405 | }
|
4406 + | /* ServerBuilderGenerator.kt:215 */
|
2763 4407 | impl Builder {
|
4408 + | /* ServerBuilderGenerator.kt:331 */
|
2764 4409 | #[allow(missing_docs)] // documentation missing in model
|
4410 + | /* ServerBuilderGenerator.kt:343 */
|
2765 4411 | pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
2766 - | self.foo = input;
|
4412 + | /* ServerBuilderGenerator.kt:344 */
|
4413 + | self.foo =
|
4414 + | /* ServerBuilderGenerator.kt:376 */input
|
4415 + | /* ServerBuilderGenerator.kt:344 */;
|
2767 4416 | self
|
4417 + | /* ServerBuilderGenerator.kt:343 */
|
2768 4418 | }
|
4419 + | /* ServerBuilderGenerator.kt:426 */
|
2769 4420 | #[allow(missing_docs)] // documentation missing in model
|
4421 + | /* ServerBuilderGenerator.kt:428 */
|
2770 4422 | pub(crate) fn set_foo(
|
2771 4423 | mut self,
|
2772 4424 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
2773 4425 | ) -> Self {
|
4426 + | /* ServerBuilderGenerator.kt:429 */
|
2774 4427 | self.foo = input.map(|v| v.into());
|
2775 4428 | self
|
4429 + | /* ServerBuilderGenerator.kt:428 */
|
2776 4430 | }
|
4431 + | /* ServerBuilderGenerator.kt:331 */
|
2777 4432 | #[allow(missing_docs)] // documentation missing in model
|
4433 + | /* ServerBuilderGenerator.kt:343 */
|
2778 4434 | pub fn nested(
|
2779 4435 | mut self,
|
2780 4436 | input: ::std::option::Option<
|
2781 4437 | ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
|
2782 4438 | >,
|
2783 4439 | ) -> Self {
|
2784 - | self.nested = input;
|
4440 + | /* ServerBuilderGenerator.kt:344 */
|
4441 + | self.nested =
|
4442 + | /* ServerBuilderGenerator.kt:376 */input
|
4443 + | /* ServerBuilderGenerator.kt:344 */;
|
2785 4444 | self
|
4445 + | /* ServerBuilderGenerator.kt:343 */
|
2786 4446 | }
|
4447 + | /* ServerBuilderGenerator.kt:426 */
|
2787 4448 | #[allow(missing_docs)] // documentation missing in model
|
4449 + | /* ServerBuilderGenerator.kt:428 */
|
2788 4450 | pub(crate) fn set_nested(
|
2789 4451 | mut self,
|
2790 4452 | input: Option<
|
2791 4453 | impl ::std::convert::Into<
|
2792 4454 | ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
|
2793 4455 | >,
|
2794 4456 | >,
|
2795 4457 | ) -> Self {
|
4458 + | /* ServerBuilderGenerator.kt:429 */
|
2796 4459 | self.nested = input.map(|v| v.into());
|
2797 4460 | self
|
4461 + | /* ServerBuilderGenerator.kt:428 */
|
2798 4462 | }
|
2799 - | /// Consumes the builder and constructs a [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
4463 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
4464 + | /* ServerBuilderGenerator.kt:271 */
|
2800 4465 | pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested1 {
|
2801 4466 | self.build_enforcing_all_constraints()
|
2802 4467 | }
|
4468 + | /* ServerBuilderGenerator.kt:283 */
|
2803 4469 | fn build_enforcing_all_constraints(
|
2804 4470 | self,
|
2805 4471 | ) -> crate::model::RecursiveShapesInputOutputNested1 {
|
4472 + | /* ServerBuilderGenerator.kt:542 */
|
2806 4473 | crate::model::RecursiveShapesInputOutputNested1 {
|
4474 + | /* ServerBuilderGenerator.kt:546 */
|
2807 4475 | foo: self.foo,
|
4476 + | /* ServerBuilderGenerator.kt:546 */
|
2808 4477 | nested: self.nested,
|
4478 + | /* ServerBuilderGenerator.kt:542 */
|
2809 4479 | }
|
4480 + | /* ServerBuilderGenerator.kt:283 */
|
2810 4481 | }
|
4482 + | /* ServerBuilderGenerator.kt:215 */
|
2811 4483 | }
|
4484 + |
|
4485 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2812 4486 | }
|
2813 - | /// See [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
4487 + | /// /* ServerBuilderGenerator.kt:171 */See [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
2814 4488 | pub mod recursive_shapes_input_output_nested2 {
|
2815 4489 |
|
4490 + | /* ServerBuilderGenerator.kt:461 */
|
2816 4491 | impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested2 {
|
2817 4492 | fn from(builder: Builder) -> Self {
|
2818 4493 | builder.build()
|
2819 4494 | }
|
2820 4495 | }
|
2821 - | /// A builder for [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
4496 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
4497 + | /* RustType.kt:534 */
|
2822 4498 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4499 + | /* ServerBuilderGenerator.kt:211 */
|
2823 4500 | pub struct Builder {
|
4501 + | /* ServerBuilderGenerator.kt:308 */
|
2824 4502 | pub(crate) bar: ::std::option::Option<::std::string::String>,
|
4503 + | /* ServerBuilderGenerator.kt:308 */
|
2825 4504 | pub(crate) recursive_member:
|
2826 4505 | ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
4506 + | /* ServerBuilderGenerator.kt:211 */
|
2827 4507 | }
|
4508 + | /* ServerBuilderGenerator.kt:215 */
|
2828 4509 | impl Builder {
|
4510 + | /* ServerBuilderGenerator.kt:331 */
|
2829 4511 | #[allow(missing_docs)] // documentation missing in model
|
4512 + | /* ServerBuilderGenerator.kt:343 */
|
2830 4513 | pub fn bar(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
2831 - | self.bar = input;
|
4514 + | /* ServerBuilderGenerator.kt:344 */
|
4515 + | self.bar =
|
4516 + | /* ServerBuilderGenerator.kt:376 */input
|
4517 + | /* ServerBuilderGenerator.kt:344 */;
|
2832 4518 | self
|
4519 + | /* ServerBuilderGenerator.kt:343 */
|
2833 4520 | }
|
4521 + | /* ServerBuilderGenerator.kt:426 */
|
2834 4522 | #[allow(missing_docs)] // documentation missing in model
|
4523 + | /* ServerBuilderGenerator.kt:428 */
|
2835 4524 | pub(crate) fn set_bar(
|
2836 4525 | mut self,
|
2837 4526 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
2838 4527 | ) -> Self {
|
4528 + | /* ServerBuilderGenerator.kt:429 */
|
2839 4529 | self.bar = input.map(|v| v.into());
|
2840 4530 | self
|
4531 + | /* ServerBuilderGenerator.kt:428 */
|
2841 4532 | }
|
4533 + | /* ServerBuilderGenerator.kt:331 */
|
2842 4534 | #[allow(missing_docs)] // documentation missing in model
|
4535 + | /* ServerBuilderGenerator.kt:343 */
|
2843 4536 | pub fn recursive_member(
|
2844 4537 | mut self,
|
2845 4538 | input: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
2846 4539 | ) -> Self {
|
2847 - | self.recursive_member = input;
|
4540 + | /* ServerBuilderGenerator.kt:344 */
|
4541 + | self.recursive_member =
|
4542 + | /* ServerBuilderGenerator.kt:376 */input
|
4543 + | /* ServerBuilderGenerator.kt:344 */;
|
2848 4544 | self
|
4545 + | /* ServerBuilderGenerator.kt:343 */
|
2849 4546 | }
|
4547 + | /* ServerBuilderGenerator.kt:426 */
|
2850 4548 | #[allow(missing_docs)] // documentation missing in model
|
4549 + | /* ServerBuilderGenerator.kt:428 */
|
2851 4550 | pub(crate) fn set_recursive_member(
|
2852 4551 | mut self,
|
2853 4552 | input: Option<
|
2854 4553 | impl ::std::convert::Into<crate::model::RecursiveShapesInputOutputNested1>,
|
2855 4554 | >,
|
2856 4555 | ) -> Self {
|
4556 + | /* ServerBuilderGenerator.kt:429 */
|
2857 4557 | self.recursive_member = input.map(|v| v.into());
|
2858 4558 | self
|
4559 + | /* ServerBuilderGenerator.kt:428 */
|
2859 4560 | }
|
2860 - | /// Consumes the builder and constructs a [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
4561 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
4562 + | /* ServerBuilderGenerator.kt:271 */
|
2861 4563 | pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested2 {
|
2862 4564 | self.build_enforcing_all_constraints()
|
2863 4565 | }
|
4566 + | /* ServerBuilderGenerator.kt:283 */
|
2864 4567 | fn build_enforcing_all_constraints(
|
2865 4568 | self,
|
2866 4569 | ) -> crate::model::RecursiveShapesInputOutputNested2 {
|
4570 + | /* ServerBuilderGenerator.kt:542 */
|
2867 4571 | crate::model::RecursiveShapesInputOutputNested2 {
|
4572 + | /* ServerBuilderGenerator.kt:546 */
|
2868 4573 | bar: self.bar,
|
4574 + | /* ServerBuilderGenerator.kt:546 */
|
2869 4575 | recursive_member: self.recursive_member,
|
4576 + | /* ServerBuilderGenerator.kt:542 */
|
2870 4577 | }
|
4578 + | /* ServerBuilderGenerator.kt:283 */
|
2871 4579 | }
|
4580 + | /* ServerBuilderGenerator.kt:215 */
|
2872 4581 | }
|
4582 + |
|
4583 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2873 4584 | }
|
2874 - | /// See [`IntegerEnumSet`](crate::model::IntegerEnumSet).
|
4585 + | /// /* CodegenDelegator.kt:52 */See [`IntegerEnumSet`](crate::model::IntegerEnumSet).
|
2875 4586 | pub mod integer_enum_set {
|
2876 4587 |
|
4588 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
2877 4589 | #[allow(clippy::enum_variant_names)]
|
2878 4590 | #[derive(Debug, PartialEq)]
|
2879 4591 | pub enum ConstraintViolation {
|
2880 4592 | /// Constraint violation error when the list does not contain unique items
|
2881 4593 | UniqueItems {
|
2882 4594 | /// A vector of indices into `original` pointing to all duplicate items. This vector has
|
2883 4595 | /// at least two elements.
|
2884 4596 | /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
|
2885 4597 | /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
|
2886 4598 | /// Nothing is guaranteed about the order of the indices.
|
2887 4599 | duplicate_indices: ::std::vec::Vec<usize>,
|
2888 4600 | /// The original vector, that contains duplicate items.
|
2889 4601 | original: ::std::vec::Vec<i32>,
|
2890 4602 | },
|
2891 4603 | }
|
2892 4604 |
|
2893 4605 | impl ::std::fmt::Display for ConstraintViolation {
|
2894 4606 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2895 4607 | let message = match self {
|
2896 4608 | Self::UniqueItems { duplicate_indices, .. } =>
|
2897 4609 | format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
|
2898 4610 | };
|
2899 4611 | write!(f, "{message}")
|
2900 4612 | }
|
2901 4613 | }
|
2902 4614 |
|
2903 4615 | impl ::std::error::Error for ConstraintViolation {}
|
4616 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
2904 4617 | impl ConstraintViolation {
|
2905 4618 | pub(crate) fn as_validation_exception_field(
|
2906 4619 | self,
|
2907 4620 | path: ::std::string::String,
|
2908 4621 | ) -> crate::model::ValidationExceptionField {
|
2909 4622 | match self {
|
2910 4623 | Self::UniqueItems { duplicate_indices, .. } =>
|
2911 4624 | crate::model::ValidationExceptionField {
|
2912 4625 | message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
|
2913 4626 | path,
|
2914 4627 | },
|
2915 4628 | }
|
2916 4629 | }
|
2917 4630 | }
|
4631 + |
|
4632 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2918 4633 | }
|
2919 4634 | pub mod foo_enum_map {
|
2920 4635 |
|
4636 + | /* MapConstraintViolationGenerator.kt:82 */
|
2921 4637 | #[allow(clippy::enum_variant_names)]
|
2922 4638 | #[derive(Debug, PartialEq)]
|
2923 4639 | pub enum ConstraintViolation {
|
2924 4640 | #[doc(hidden)]
|
2925 4641 | Value(
|
2926 4642 | ::std::string::String,
|
2927 4643 | crate::model::foo_enum::ConstraintViolation,
|
2928 4644 | ),
|
2929 4645 | }
|
2930 4646 |
|
2931 4647 | impl ::std::fmt::Display for ConstraintViolation {
|
2932 4648 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2933 4649 | match self {
|
2934 4650 | Self::Value(_, value_constraint_violation) => {
|
2935 4651 | write!(f, "{}", value_constraint_violation)
|
2936 4652 | }
|
2937 4653 | }
|
2938 4654 | }
|
2939 4655 | }
|
2940 4656 |
|
2941 4657 | impl ::std::error::Error for ConstraintViolation {}
|
4658 + | /* MapConstraintViolationGenerator.kt:111 */
|
2942 4659 | impl ConstraintViolation {
|
2943 4660 | pub(crate) fn as_validation_exception_field(
|
2944 4661 | self,
|
2945 4662 | path: ::std::string::String,
|
2946 4663 | ) -> crate::model::ValidationExceptionField {
|
2947 4664 | match self {
|
2948 4665 | Self::Value(key, value_constraint_violation) => value_constraint_violation
|
2949 4666 | .as_validation_exception_field(path + "/" + key.as_str()),
|
2950 4667 | }
|
2951 4668 | }
|
2952 4669 | }
|
4670 + |
|
4671 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2953 4672 | }
|
2954 - | /// See [`FooEnumSet`](crate::model::FooEnumSet).
|
4673 + | /// /* CodegenDelegator.kt:52 */See [`FooEnumSet`](crate::model::FooEnumSet).
|
2955 4674 | pub mod foo_enum_set {
|
2956 4675 |
|
4676 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
2957 4677 | #[allow(clippy::enum_variant_names)]
|
2958 4678 | #[derive(Debug, PartialEq)]
|
2959 4679 | pub enum ConstraintViolation {
|
2960 4680 | /// Constraint violation error when the list does not contain unique items
|
2961 4681 | UniqueItems {
|
2962 4682 | /// A vector of indices into `original` pointing to all duplicate items. This vector has
|
2963 4683 | /// at least two elements.
|
2964 4684 | /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
|
2965 4685 | /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
|
2966 4686 | /// Nothing is guaranteed about the order of the indices.
|
2967 4687 | duplicate_indices: ::std::vec::Vec<usize>,
|
2968 4688 | /// The original vector, that contains duplicate items.
|
2969 4689 | original: ::std::vec::Vec<crate::model::FooEnum>,
|
2970 4690 | },
|
2971 4691 | /// Constraint violation error when an element doesn't satisfy its own constraints.
|
2972 4692 | /// The first component of the tuple is the index in the collection where the
|
2973 4693 | /// first constraint violation was found.
|
2974 4694 | #[doc(hidden)]
|
2975 4695 | Member(usize, crate::model::foo_enum::ConstraintViolation),
|
2976 4696 | }
|
2977 4697 |
|
2978 4698 | impl ::std::fmt::Display for ConstraintViolation {
|
2979 4699 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2980 4700 | let message = match self {
|
2981 4701 | Self::UniqueItems { duplicate_indices, .. } =>
|
2982 4702 | format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#FooEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
|
2983 4703 | Self::Member(index, failing_member) => format!("Value at index {index} failed to satisfy constraint. {}",
|
2984 4704 | failing_member)
|
2985 4705 | };
|
2986 4706 | write!(f, "{message}")
|
2987 4707 | }
|
2988 4708 | }
|
2989 4709 |
|
2990 4710 | impl ::std::error::Error for ConstraintViolation {}
|
4711 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
2991 4712 | impl ConstraintViolation {
|
2992 4713 | pub(crate) fn as_validation_exception_field(
|
2993 4714 | self,
|
2994 4715 | path: ::std::string::String,
|
2995 4716 | ) -> crate::model::ValidationExceptionField {
|
2996 4717 | match self {
|
2997 4718 | Self::UniqueItems { duplicate_indices, .. } =>
|
2998 4719 | crate::model::ValidationExceptionField {
|
2999 4720 | message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
|
3000 4721 | path,
|
3001 4722 | },
|
3002 4723 | Self::Member(index, member_constraint_violation) =>
|
3003 4724 | member_constraint_violation.as_validation_exception_field(path + "/" + &index.to_string())
|
3004 4725 | }
|
3005 4726 | }
|
3006 4727 | }
|
4728 + |
|
4729 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3007 4730 | }
|
3008 - | /// See [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
4731 + | /// /* ServerBuilderGenerator.kt:171 */See [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
3009 4732 | pub mod complex_nested_error_data {
|
3010 4733 |
|
4734 + | /* ServerBuilderGenerator.kt:461 */
|
3011 4735 | impl ::std::convert::From<Builder> for crate::model::ComplexNestedErrorData {
|
3012 4736 | fn from(builder: Builder) -> Self {
|
3013 4737 | builder.build()
|
3014 4738 | }
|
3015 4739 | }
|
3016 - | /// A builder for [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
4740 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
4741 + | /* RustType.kt:534 */
|
3017 4742 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4743 + | /* ServerBuilderGenerator.kt:211 */
|
3018 4744 | pub struct Builder {
|
4745 + | /* ServerBuilderGenerator.kt:308 */
|
3019 4746 | pub(crate) foo: ::std::option::Option<::std::string::String>,
|
4747 + | /* ServerBuilderGenerator.kt:211 */
|
3020 4748 | }
|
4749 + | /* ServerBuilderGenerator.kt:215 */
|
3021 4750 | impl Builder {
|
4751 + | /* ServerBuilderGenerator.kt:331 */
|
3022 4752 | #[allow(missing_docs)] // documentation missing in model
|
4753 + | /* ServerBuilderGenerator.kt:343 */
|
3023 4754 | pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
3024 - | self.foo = input;
|
4755 + | /* ServerBuilderGenerator.kt:344 */
|
4756 + | self.foo =
|
4757 + | /* ServerBuilderGenerator.kt:376 */input
|
4758 + | /* ServerBuilderGenerator.kt:344 */;
|
3025 4759 | self
|
4760 + | /* ServerBuilderGenerator.kt:343 */
|
3026 4761 | }
|
3027 - | /// Consumes the builder and constructs a [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
4762 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
4763 + | /* ServerBuilderGenerator.kt:271 */
|
3028 4764 | pub fn build(self) -> crate::model::ComplexNestedErrorData {
|
3029 4765 | self.build_enforcing_all_constraints()
|
3030 4766 | }
|
4767 + | /* ServerBuilderGenerator.kt:283 */
|
3031 4768 | fn build_enforcing_all_constraints(self) -> crate::model::ComplexNestedErrorData {
|
3032 - | crate::model::ComplexNestedErrorData { foo: self.foo }
|
4769 + | /* ServerBuilderGenerator.kt:542 */
|
4770 + | crate::model::ComplexNestedErrorData {
|
4771 + | /* ServerBuilderGenerator.kt:546 */
|
4772 + | foo: self.foo,
|
4773 + | /* ServerBuilderGenerator.kt:542 */
|
4774 + | }
|
4775 + | /* ServerBuilderGenerator.kt:283 */
|
3033 4776 | }
|
4777 + | /* ServerBuilderGenerator.kt:215 */
|
3034 4778 | }
|
4779 + |
|
4780 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3035 4781 | }
|
3036 - | /// See [`NestedPayload`](crate::model::NestedPayload).
|
4782 + | /// /* ServerBuilderGenerator.kt:171 */See [`NestedPayload`](crate::model::NestedPayload).
|
3037 4783 | pub mod nested_payload {
|
3038 4784 |
|
4785 + | /* ServerBuilderGenerator.kt:461 */
|
3039 4786 | impl ::std::convert::From<Builder> for crate::model::NestedPayload {
|
3040 4787 | fn from(builder: Builder) -> Self {
|
3041 4788 | builder.build()
|
3042 4789 | }
|
3043 4790 | }
|
3044 - | /// A builder for [`NestedPayload`](crate::model::NestedPayload).
|
4791 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`NestedPayload`](crate::model::NestedPayload).
|
4792 + | /* RustType.kt:534 */
|
3045 4793 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4794 + | /* ServerBuilderGenerator.kt:211 */
|
3046 4795 | pub struct Builder {
|
4796 + | /* ServerBuilderGenerator.kt:308 */
|
3047 4797 | pub(crate) greeting: ::std::option::Option<::std::string::String>,
|
4798 + | /* ServerBuilderGenerator.kt:308 */
|
3048 4799 | pub(crate) name: ::std::option::Option<::std::string::String>,
|
4800 + | /* ServerBuilderGenerator.kt:211 */
|
3049 4801 | }
|
4802 + | /* ServerBuilderGenerator.kt:215 */
|
3050 4803 | impl Builder {
|
4804 + | /* ServerBuilderGenerator.kt:331 */
|
3051 4805 | #[allow(missing_docs)] // documentation missing in model
|
4806 + | /* ServerBuilderGenerator.kt:343 */
|
3052 4807 | pub fn greeting(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
3053 - | self.greeting = input;
|
4808 + | /* ServerBuilderGenerator.kt:344 */
|
4809 + | self.greeting =
|
4810 + | /* ServerBuilderGenerator.kt:376 */input
|
4811 + | /* ServerBuilderGenerator.kt:344 */;
|
3054 4812 | self
|
4813 + | /* ServerBuilderGenerator.kt:343 */
|
3055 4814 | }
|
4815 + | /* ServerBuilderGenerator.kt:426 */
|
3056 4816 | #[allow(missing_docs)] // documentation missing in model
|
4817 + | /* ServerBuilderGenerator.kt:428 */
|
3057 4818 | pub(crate) fn set_greeting(
|
3058 4819 | mut self,
|
3059 4820 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
3060 4821 | ) -> Self {
|
4822 + | /* ServerBuilderGenerator.kt:429 */
|
3061 4823 | self.greeting = input.map(|v| v.into());
|
3062 4824 | self
|
4825 + | /* ServerBuilderGenerator.kt:428 */
|
3063 4826 | }
|
4827 + | /* ServerBuilderGenerator.kt:331 */
|
3064 4828 | #[allow(missing_docs)] // documentation missing in model
|
4829 + | /* ServerBuilderGenerator.kt:343 */
|
3065 4830 | pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
3066 - | self.name = input;
|
4831 + | /* ServerBuilderGenerator.kt:344 */
|
4832 + | self.name =
|
4833 + | /* ServerBuilderGenerator.kt:376 */input
|
4834 + | /* ServerBuilderGenerator.kt:344 */;
|
3067 4835 | self
|
4836 + | /* ServerBuilderGenerator.kt:343 */
|
3068 4837 | }
|
4838 + | /* ServerBuilderGenerator.kt:426 */
|
3069 4839 | #[allow(missing_docs)] // documentation missing in model
|
4840 + | /* ServerBuilderGenerator.kt:428 */
|
3070 4841 | pub(crate) fn set_name(
|
3071 4842 | mut self,
|
3072 4843 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
3073 4844 | ) -> Self {
|
4845 + | /* ServerBuilderGenerator.kt:429 */
|
3074 4846 | self.name = input.map(|v| v.into());
|
3075 4847 | self
|
4848 + | /* ServerBuilderGenerator.kt:428 */
|
3076 4849 | }
|
3077 - | /// Consumes the builder and constructs a [`NestedPayload`](crate::model::NestedPayload).
|
4850 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`NestedPayload`](crate::model::NestedPayload).
|
4851 + | /* ServerBuilderGenerator.kt:271 */
|
3078 4852 | pub fn build(self) -> crate::model::NestedPayload {
|
3079 4853 | self.build_enforcing_all_constraints()
|
3080 4854 | }
|
4855 + | /* ServerBuilderGenerator.kt:283 */
|
3081 4856 | fn build_enforcing_all_constraints(self) -> crate::model::NestedPayload {
|
4857 + | /* ServerBuilderGenerator.kt:542 */
|
3082 4858 | crate::model::NestedPayload {
|
4859 + | /* ServerBuilderGenerator.kt:546 */
|
3083 4860 | greeting: self.greeting,
|
4861 + | /* ServerBuilderGenerator.kt:546 */
|
3084 4862 | name: self.name,
|
4863 + | /* ServerBuilderGenerator.kt:542 */
|
3085 4864 | }
|
4865 + | /* ServerBuilderGenerator.kt:283 */
|
3086 4866 | }
|
4867 + | /* ServerBuilderGenerator.kt:215 */
|
3087 4868 | }
|
4869 + |
|
4870 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3088 4871 | }
|
3089 - | /// See [`IntegerSet`](crate::model::IntegerSet).
|
4872 + | /// /* CodegenDelegator.kt:52 */See [`IntegerSet`](crate::model::IntegerSet).
|
3090 4873 | pub mod integer_set {
|
3091 4874 |
|
4875 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
3092 4876 | #[allow(clippy::enum_variant_names)]
|
3093 4877 | #[derive(Debug, PartialEq)]
|
3094 4878 | pub enum ConstraintViolation {
|
3095 4879 | /// Constraint violation error when the list does not contain unique items
|
3096 4880 | UniqueItems {
|
3097 4881 | /// A vector of indices into `original` pointing to all duplicate items. This vector has
|
3098 4882 | /// at least two elements.
|
3099 4883 | /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
|
3100 4884 | /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
|
3101 4885 | /// Nothing is guaranteed about the order of the indices.
|
3102 4886 | duplicate_indices: ::std::vec::Vec<usize>,
|
3103 4887 | /// The original vector, that contains duplicate items.
|
3104 4888 | original: ::std::vec::Vec<i32>,
|
3105 4889 | },
|
3106 4890 | }
|
3107 4891 |
|
3108 4892 | impl ::std::fmt::Display for ConstraintViolation {
|
3109 4893 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3110 4894 | let message = match self {
|
3111 4895 | Self::UniqueItems { duplicate_indices, .. } =>
|
3112 4896 | format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
|
3113 4897 | };
|
3114 4898 | write!(f, "{message}")
|
3115 4899 | }
|
3116 4900 | }
|
3117 4901 |
|
3118 4902 | impl ::std::error::Error for ConstraintViolation {}
|
4903 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
3119 4904 | impl ConstraintViolation {
|
3120 4905 | pub(crate) fn as_validation_exception_field(
|
3121 4906 | self,
|
3122 4907 | path: ::std::string::String,
|
3123 4908 | ) -> crate::model::ValidationExceptionField {
|
3124 4909 | match self {
|
3125 4910 | Self::UniqueItems { duplicate_indices, .. } =>
|
3126 4911 | crate::model::ValidationExceptionField {
|
3127 4912 | message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
|
3128 4913 | path,
|
3129 4914 | },
|
3130 4915 | }
|
3131 4916 | }
|
3132 4917 | }
|
4918 + |
|
4919 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3133 4920 | }
|