1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* StructureGenerator.kt:197 */
|
3 + | /// /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
|
4 + | /* RustType.kt:534 */
|
5 + | #[derive(
|
6 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
7 + | )]
|
8 + | pub /* StructureGenerator.kt:201 */ struct ValidationExceptionField {
|
9 + | /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
10 + | pub path: ::std::string::String,
|
11 + | /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
|
12 + | pub message: ::std::string::String,
|
13 + | /* StructureGenerator.kt:201 */
|
14 + | }
|
15 + | /* StructureGenerator.kt:135 */
|
16 + | impl ValidationExceptionField {
|
17 + | /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
18 + | /* StructureGenerator.kt:166 */
|
19 + | pub fn path(&self) -> &str {
|
20 + | /* StructureGenerator.kt:171 */
|
21 + | use std::ops::Deref;
|
22 + | self.path.deref()
|
23 + | /* StructureGenerator.kt:166 */
|
24 + | }
|
25 + | /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
|
26 + | /* StructureGenerator.kt:166 */
|
27 + | pub fn message(&self) -> &str {
|
28 + | /* StructureGenerator.kt:171 */
|
29 + | use std::ops::Deref;
|
30 + | self.message.deref()
|
31 + | /* StructureGenerator.kt:166 */
|
32 + | }
|
33 + | /* StructureGenerator.kt:135 */
|
34 + | }
|
35 + | /* ServerCodegenVisitor.kt:356 */
|
36 + | impl ValidationExceptionField {
|
37 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
38 + | /* ServerBuilderGenerator.kt:295 */
|
39 + | pub fn builder() -> crate::model::validation_exception_field::Builder {
|
40 + | /* ServerBuilderGenerator.kt:296 */
|
41 + | crate::model::validation_exception_field::Builder::default()
|
42 + | /* ServerBuilderGenerator.kt:295 */
|
43 + | }
|
44 + | /* ServerCodegenVisitor.kt:356 */
|
45 + | }
|
46 + |
|
47 + | /* StructureGenerator.kt:197 */
|
48 + | #[allow(missing_docs)] // documentation missing in model
|
49 + | /* RustType.kt:534 */
|
50 + | #[derive(
|
51 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
52 + | )]
|
53 + | pub /* StructureGenerator.kt:201 */ struct FlavorText {
|
54 + | /// /* StructureGenerator.kt:231 */The localized flavor text for an API resource in a specific language.
|
55 + | pub flavor_text: ::std::string::String,
|
56 + | /// /* StructureGenerator.kt:231 */The language this name is in.
|
57 + | pub language: crate::model::Language,
|
58 + | /* StructureGenerator.kt:201 */
|
59 + | }
|
60 + | /* StructureGenerator.kt:135 */
|
61 + | impl FlavorText {
|
62 + | /// /* StructureGenerator.kt:231 */The localized flavor text for an API resource in a specific language.
|
63 + | /* StructureGenerator.kt:166 */
|
64 + | pub fn flavor_text(&self) -> &str {
|
65 + | /* StructureGenerator.kt:171 */
|
66 + | use std::ops::Deref;
|
67 + | self.flavor_text.deref()
|
68 + | /* StructureGenerator.kt:166 */
|
69 + | }
|
70 + | /// /* StructureGenerator.kt:231 */The language this name is in.
|
71 + | /* StructureGenerator.kt:166 */
|
72 + | pub fn language(&self) -> &crate::model::Language {
|
73 + | /* StructureGenerator.kt:172 */
|
74 + | &self.language
|
75 + | /* StructureGenerator.kt:166 */
|
76 + | }
|
77 + | /* StructureGenerator.kt:135 */
|
78 + | }
|
79 + | /* ServerCodegenVisitor.kt:356 */
|
80 + | impl FlavorText {
|
81 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`FlavorText`](crate::model::FlavorText).
|
82 + | /* ServerBuilderGenerator.kt:295 */
|
83 + | pub fn builder() -> crate::model::flavor_text::Builder {
|
84 + | /* ServerBuilderGenerator.kt:296 */
|
85 + | crate::model::flavor_text::Builder::default()
|
86 + | /* ServerBuilderGenerator.kt:295 */
|
87 + | }
|
88 + | /* ServerCodegenVisitor.kt:356 */
|
89 + | }
|
90 + |
|
91 + | /// /* EnumGenerator.kt:183 */Supported languages for FlavorText entries.
|
92 + | /* RustType.kt:534 */
|
93 + | #[derive(
|
94 + | ::std::clone::Clone,
|
95 + | ::std::cmp::Eq,
|
96 + | ::std::cmp::Ord,
|
97 + | ::std::cmp::PartialEq,
|
98 + | ::std::cmp::PartialOrd,
|
99 + | ::std::fmt::Debug,
|
100 + | ::std::hash::Hash,
|
101 + | )]
|
102 + | pub /* EnumGenerator.kt:298 */ enum Language {
|
103 + | /// /* EnumGenerator.kt:183 */American English.
|
104 + | /* EnumGenerator.kt:170 */
|
105 + | English,
|
106 + | /// /* EnumGenerator.kt:183 */Español.
|
107 + | /* EnumGenerator.kt:170 */
|
108 + | Spanish,
|
109 + | /// /* EnumGenerator.kt:183 */Italiano.
|
110 + | /* EnumGenerator.kt:170 */
|
111 + | Italian,
|
112 + | /// /* EnumGenerator.kt:183 */日本語。
|
113 + | /* EnumGenerator.kt:170 */
|
114 + | Japanese,
|
115 + | /* EnumGenerator.kt:298 */
|
116 + | }
|
117 + | /// /* CodegenDelegator.kt:52 */See [`Language`](crate::model::Language).
|
118 + | pub mod language {
|
119 + | #[derive(Debug, PartialEq)]
|
120 + | pub struct ConstraintViolation(pub(crate) ::std::string::String);
|
121 + |
|
122 + | impl ::std::fmt::Display for ConstraintViolation {
|
123 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
124 + | write!(
|
125 + | f,
|
126 + | r#"Value provided for 'com.aws.example#Language' failed to satisfy constraint: Member must satisfy enum value set: [en, es, it, jp]"#
|
127 + | )
|
128 + | }
|
129 + | }
|
130 + |
|
131 + | impl ::std::error::Error for ConstraintViolation {}
|
132 + |
|
133 + | /* ServerEnumGenerator.kt:47 */
|
134 + | }
|
135 + | /* ServerEnumGenerator.kt:88 */
|
136 + | impl ::std::convert::TryFrom<&str> for Language {
|
137 + | type Error = crate::model::language::ConstraintViolation;
|
138 + | fn try_from(
|
139 + | s: &str,
|
140 + | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
|
141 + | match s {
|
142 + | "en" => Ok(Language::English),
|
143 + | "es" => Ok(Language::Spanish),
|
144 + | "it" => Ok(Language::Italian),
|
145 + | "jp" => Ok(Language::Japanese),
|
146 + | _ => Err(crate::model::language::ConstraintViolation(s.to_owned())),
|
147 + | }
|
148 + | }
|
149 + | }
|
150 + | impl ::std::convert::TryFrom<::std::string::String> for Language {
|
151 + | type Error = crate::model::language::ConstraintViolation;
|
152 + | fn try_from(
|
153 + | s: ::std::string::String,
|
154 + | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
|
155 + | {
|
156 + | s.as_str().try_into()
|
157 + | }
|
158 + | }
|
159 + | /* ServerEnumGenerator.kt:148 */
|
160 + | impl std::str::FromStr for Language {
|
161 + | type Err = crate::model::language::ConstraintViolation;
|
162 + | fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
|
163 + | Self::try_from(s)
|
164 + | }
|
165 + | }
|
166 + | /* EnumGenerator.kt:309 */
|
167 + | impl Language {
|
168 + | /// Returns the `&str` value of the enum member.
|
169 + | pub fn as_str(&self) -> &str {
|
170 + | match self {
|
171 + | Language::English => "en",
|
172 + | Language::Spanish => "es",
|
173 + | Language::Italian => "it",
|
174 + | Language::Japanese => "jp",
|
175 + | }
|
176 + | }
|
177 + | /// Returns all the `&str` representations of the enum members.
|
178 + | pub const fn values() -> &'static [&'static str] {
|
179 + | &["en", "es", "it", "jp"]
|
180 + | }
|
181 + | }
|
182 + | /* EnumGenerator.kt:254 */
|
183 + | impl ::std::convert::AsRef<str> for Language {
|
184 + | fn as_ref(&self) -> &str {
|
185 + | self.as_str()
|
186 + | }
|
187 + | }
|
188 + | /* ConstrainedTraitForEnumGenerator.kt:36 */
|
189 + | impl crate::constrained::Constrained for Language {
|
190 + | type Unconstrained = ::std::string::String;
|
191 + | }
|
192 + |
|
193 + | impl ::std::convert::From<::std::string::String>
|
194 + | for crate::constrained::MaybeConstrained<crate::model::Language>
|
195 + | {
|
196 + | fn from(value: ::std::string::String) -> Self {
|
197 + | Self::Unconstrained(value)
|
198 + | }
|
199 + | }
|
200 + |
|
201 + | /* UnionGenerator.kt:67 */
|
202 + | #[allow(missing_docs)] // documentation missing in model
|
203 + | /* RustType.kt:534 */
|
204 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
205 + | pub /* UnionGenerator.kt:85 */ enum CapturePokemonEvents {
|
206 + | /* UnionGenerator.kt:90 */
|
207 + | #[allow(missing_docs)] // documentation missing in model
|
208 + | /* UnionGenerator.kt:190 */
|
209 + | Event(crate::model::CaptureEvent),
|
210 + | /* UnionGenerator.kt:85 */
|
211 + | }
|
212 + | /* UnionGenerator.kt:111 */
|
213 + | impl CapturePokemonEvents {
|
214 + | /* RustType.kt:534 */
|
215 + | #[allow(irrefutable_let_patterns)]
|
216 + | /* UnionGenerator.kt:217 */
|
217 + | /// Tries to convert the enum instance into [`Event`](crate::model::CapturePokemonEvents::Event), extracting the inner [`CaptureEvent`](crate::model::CaptureEvent).
|
218 + | /* UnionGenerator.kt:222 */
|
219 + | /// Returns `Err(&Self)` if it can't be converted.
|
220 + | /* UnionGenerator.kt:223 */
|
221 + | pub fn as_event(&self) -> ::std::result::Result<&crate::model::CaptureEvent, &Self> {
|
222 + | /* UnionGenerator.kt:227 */
|
223 + | if let CapturePokemonEvents::Event(val) = &self {
|
224 + | ::std::result::Result::Ok(val)
|
225 + | } else {
|
226 + | ::std::result::Result::Err(self)
|
227 + | }
|
228 + | /* UnionGenerator.kt:223 */
|
229 + | }
|
230 + | /* UnionGenerator.kt:121 */
|
231 + | /// Returns true if this is a [`Event`](crate::model::CapturePokemonEvents::Event).
|
232 + | /* UnionGenerator.kt:122 */
|
233 + | pub fn is_event(&self) -> bool {
|
234 + | /* UnionGenerator.kt:123 */
|
235 + | self.as_event().is_ok()
|
236 + | /* UnionGenerator.kt:122 */
|
237 + | }
|
238 + | /* UnionGenerator.kt:111 */
|
239 + | }
|
240 + |
|
241 + | /* StructureGenerator.kt:197 */
|
242 + | #[allow(missing_docs)] // documentation missing in model
|
243 + | /* RustType.kt:534 */
|
244 + | #[derive(
|
245 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
246 + | )]
|
247 + | pub /* StructureGenerator.kt:201 */ struct CaptureEvent {
|
248 + | /* StructureGenerator.kt:231 */
|
249 + | #[allow(missing_docs)] // documentation missing in model
|
250 + | pub name: ::std::option::Option<::std::string::String>,
|
251 + | /* StructureGenerator.kt:231 */
|
252 + | #[allow(missing_docs)] // documentation missing in model
|
253 + | pub captured: ::std::option::Option<bool>,
|
254 + | /* StructureGenerator.kt:231 */
|
255 + | #[allow(missing_docs)] // documentation missing in model
|
256 + | pub shiny: ::std::option::Option<bool>,
|
257 + | /* StructureGenerator.kt:231 */
|
258 + | #[allow(missing_docs)] // documentation missing in model
|
259 + | pub pokedex_update: ::std::option::Option<::aws_smithy_types::Blob>,
|
260 + | /* StructureGenerator.kt:201 */
|
261 + | }
|
262 + | /* StructureGenerator.kt:135 */
|
263 + | impl CaptureEvent {
|
264 + | /* StructureGenerator.kt:231 */
|
265 + | #[allow(missing_docs)] // documentation missing in model
|
266 + | /* StructureGenerator.kt:166 */
|
267 + | pub fn name(&self) -> ::std::option::Option<&str> {
|
268 + | /* StructureGenerator.kt:169 */
|
269 + | self.name.as_deref()
|
270 + | /* StructureGenerator.kt:166 */
|
271 + | }
|
272 + | /* StructureGenerator.kt:231 */
|
273 + | #[allow(missing_docs)] // documentation missing in model
|
274 + | /* StructureGenerator.kt:166 */
|
275 + | pub fn captured(&self) -> ::std::option::Option<bool> {
|
276 + | /* StructureGenerator.kt:168 */
|
277 + | self.captured
|
278 + | /* StructureGenerator.kt:166 */
|
279 + | }
|
280 + | /* StructureGenerator.kt:231 */
|
281 + | #[allow(missing_docs)] // documentation missing in model
|
282 + | /* StructureGenerator.kt:166 */
|
283 + | pub fn shiny(&self) -> ::std::option::Option<bool> {
|
284 + | /* StructureGenerator.kt:168 */
|
285 + | self.shiny
|
286 + | /* StructureGenerator.kt:166 */
|
287 + | }
|
288 + | /* StructureGenerator.kt:231 */
|
289 + | #[allow(missing_docs)] // documentation missing in model
|
290 + | /* StructureGenerator.kt:166 */
|
291 + | pub fn pokedex_update(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
|
292 + | /* StructureGenerator.kt:170 */
|
293 + | self.pokedex_update.as_ref()
|
294 + | /* StructureGenerator.kt:166 */
|
295 + | }
|
296 + | /* StructureGenerator.kt:135 */
|
297 + | }
|
298 + | /* ServerCodegenVisitor.kt:356 */
|
299 + | impl CaptureEvent {
|
300 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CaptureEvent`](crate::model::CaptureEvent).
|
301 + | /* ServerBuilderGenerator.kt:295 */
|
302 + | pub fn builder() -> crate::model::capture_event::Builder {
|
303 + | /* ServerBuilderGenerator.kt:296 */
|
304 + | crate::model::capture_event::Builder::default()
|
305 + | /* ServerBuilderGenerator.kt:295 */
|
306 + | }
|
307 + | /* ServerCodegenVisitor.kt:356 */
|
308 + | }
|
309 + |
|
310 + | /* UnionGenerator.kt:67 */
|
311 + | #[allow(missing_docs)] // documentation missing in model
|
312 + | /* RustType.kt:534 */
|
313 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
314 + | pub /* UnionGenerator.kt:85 */ enum AttemptCapturingPokemonEvent {
|
315 + | /* UnionGenerator.kt:90 */
|
316 + | #[allow(missing_docs)] // documentation missing in model
|
317 + | /* UnionGenerator.kt:190 */
|
318 + | Event(crate::model::CapturingEvent),
|
319 + | /* UnionGenerator.kt:85 */
|
320 + | }
|
321 + | /* UnionGenerator.kt:111 */
|
322 + | impl AttemptCapturingPokemonEvent {
|
323 + | /* RustType.kt:534 */
|
324 + | #[allow(irrefutable_let_patterns)]
|
325 + | /* UnionGenerator.kt:217 */
|
326 + | /// Tries to convert the enum instance into [`Event`](crate::model::AttemptCapturingPokemonEvent::Event), extracting the inner [`CapturingEvent`](crate::model::CapturingEvent).
|
327 + | /* UnionGenerator.kt:222 */
|
328 + | /// Returns `Err(&Self)` if it can't be converted.
|
329 + | /* UnionGenerator.kt:223 */
|
330 + | pub fn as_event(&self) -> ::std::result::Result<&crate::model::CapturingEvent, &Self> {
|
331 + | /* UnionGenerator.kt:227 */
|
332 + | if let AttemptCapturingPokemonEvent::Event(val) = &self {
|
333 + | ::std::result::Result::Ok(val)
|
334 + | } else {
|
335 + | ::std::result::Result::Err(self)
|
336 + | }
|
337 + | /* UnionGenerator.kt:223 */
|
338 + | }
|
339 + | /* UnionGenerator.kt:121 */
|
340 + | /// Returns true if this is a [`Event`](crate::model::AttemptCapturingPokemonEvent::Event).
|
341 + | /* UnionGenerator.kt:122 */
|
342 + | pub fn is_event(&self) -> bool {
|
343 + | /* UnionGenerator.kt:123 */
|
344 + | self.as_event().is_ok()
|
345 + | /* UnionGenerator.kt:122 */
|
346 + | }
|
347 + | /* UnionGenerator.kt:111 */
|
348 + | }
|
349 + |
|
350 + | /* StructureGenerator.kt:197 */
|
351 + | #[allow(missing_docs)] // documentation missing in model
|
352 + | /* RustType.kt:534 */
|
353 + | #[derive(
|
354 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
355 + | )]
|
356 + | pub /* StructureGenerator.kt:201 */ struct CapturingEvent {
|
357 + | /* StructureGenerator.kt:231 */
|
358 + | #[allow(missing_docs)] // documentation missing in model
|
359 + | pub payload: ::std::option::Option<crate::model::CapturingPayload>,
|
360 + | /* StructureGenerator.kt:201 */
|
361 + | }
|
362 + | /* StructureGenerator.kt:135 */
|
363 + | impl CapturingEvent {
|
364 + | /* StructureGenerator.kt:231 */
|
365 + | #[allow(missing_docs)] // documentation missing in model
|
366 + | /* StructureGenerator.kt:166 */
|
367 + | pub fn payload(&self) -> ::std::option::Option<&crate::model::CapturingPayload> {
|
368 + | /* StructureGenerator.kt:170 */
|
369 + | self.payload.as_ref()
|
370 + | /* StructureGenerator.kt:166 */
|
371 + | }
|
372 + | /* StructureGenerator.kt:135 */
|
373 + | }
|
374 + | /* ServerCodegenVisitor.kt:356 */
|
375 + | impl CapturingEvent {
|
376 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CapturingEvent`](crate::model::CapturingEvent).
|
377 + | /* ServerBuilderGenerator.kt:295 */
|
378 + | pub fn builder() -> crate::model::capturing_event::Builder {
|
379 + | /* ServerBuilderGenerator.kt:296 */
|
380 + | crate::model::capturing_event::Builder::default()
|
381 + | /* ServerBuilderGenerator.kt:295 */
|
382 + | }
|
383 + | /* ServerCodegenVisitor.kt:356 */
|
384 + | }
|
385 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
386 + | impl crate::constrained::Constrained for crate::model::CapturingEvent {
|
387 + | type Unconstrained = crate::model::capturing_event::Builder;
|
388 + | }
|
389 + |
|
390 + | /* StructureGenerator.kt:197 */
|
391 + | #[allow(missing_docs)] // documentation missing in model
|
392 + | /* RustType.kt:534 */
|
393 + | #[derive(
|
394 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
395 + | )]
|
396 + | pub /* StructureGenerator.kt:201 */ struct CapturingPayload {
|
397 + | /* StructureGenerator.kt:231 */
|
398 + | #[allow(missing_docs)] // documentation missing in model
|
399 + | pub name: ::std::option::Option<::std::string::String>,
|
400 + | /* StructureGenerator.kt:231 */
|
401 + | #[allow(missing_docs)] // documentation missing in model
|
402 + | pub pokeball: ::std::option::Option<::std::string::String>,
|
403 + | /* StructureGenerator.kt:201 */
|
404 + | }
|
405 + | /* StructureGenerator.kt:135 */
|
406 + | impl CapturingPayload {
|
407 + | /* StructureGenerator.kt:231 */
|
408 + | #[allow(missing_docs)] // documentation missing in model
|
409 + | /* StructureGenerator.kt:166 */
|
410 + | pub fn name(&self) -> ::std::option::Option<&str> {
|
411 + | /* StructureGenerator.kt:169 */
|
412 + | self.name.as_deref()
|
413 + | /* StructureGenerator.kt:166 */
|
414 + | }
|
415 + | /* StructureGenerator.kt:231 */
|
416 + | #[allow(missing_docs)] // documentation missing in model
|
417 + | /* StructureGenerator.kt:166 */
|
418 + | pub fn pokeball(&self) -> ::std::option::Option<&str> {
|
419 + | /* StructureGenerator.kt:169 */
|
420 + | self.pokeball.as_deref()
|
421 + | /* StructureGenerator.kt:166 */
|
422 + | }
|
423 + | /* StructureGenerator.kt:135 */
|
424 + | }
|
425 + | /* ServerCodegenVisitor.kt:356 */
|
426 + | impl CapturingPayload {
|
427 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CapturingPayload`](crate::model::CapturingPayload).
|
428 + | /* ServerBuilderGenerator.kt:295 */
|
429 + | pub fn builder() -> crate::model::capturing_payload::Builder {
|
430 + | /* ServerBuilderGenerator.kt:296 */
|
431 + | crate::model::capturing_payload::Builder::default()
|
432 + | /* ServerBuilderGenerator.kt:295 */
|
433 + | }
|
434 + | /* ServerCodegenVisitor.kt:356 */
|
435 + | }
|
436 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
437 + | impl crate::constrained::Constrained for crate::model::CapturingPayload {
|
438 + | type Unconstrained = crate::model::capturing_payload::Builder;
|
439 + | }
|
440 + | /// /* ServerBuilderGenerator.kt:171 */See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
441 + | pub mod validation_exception_field {
|
442 + |
|
443 + | /* RustType.kt:534 */
|
444 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
445 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
446 + | /* RustType.kt:534 */
|
447 + | #[non_exhaustive]
|
448 + | /* ServerBuilderConstraintViolations.kt:75 */
|
449 + | #[allow(clippy::enum_variant_names)]
|
450 + | pub enum ConstraintViolation {
|
451 + | /// /* ServerBuilderConstraintViolations.kt:137 */`path` was not provided but it is required when building `ValidationExceptionField`.
|
452 + | /* ServerBuilderConstraintViolations.kt:144 */
|
453 + | MissingPath,
|
454 + | /// /* ServerBuilderConstraintViolations.kt:137 */`message` was not provided but it is required when building `ValidationExceptionField`.
|
455 + | /* ServerBuilderConstraintViolations.kt:144 */
|
456 + | MissingMessage,
|
457 + | /* ServerBuilderConstraintViolations.kt:75 */
|
458 + | }
|
459 + | /* ServerBuilderConstraintViolations.kt:116 */
|
460 + | impl ::std::fmt::Display for ConstraintViolation {
|
461 + | /* ServerBuilderConstraintViolations.kt:117 */
|
462 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
463 + | /* ServerBuilderConstraintViolations.kt:118 */
|
464 + | match self {
|
465 + | /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
|
466 + | /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
|
467 + | /* ServerBuilderConstraintViolations.kt:118 */}
|
468 + | /* ServerBuilderConstraintViolations.kt:117 */
|
469 + | }
|
470 + | /* ServerBuilderConstraintViolations.kt:116 */
|
471 + | }
|
472 + | /* ServerBuilderConstraintViolations.kt:83 */
|
473 + | impl ::std::error::Error for ConstraintViolation {}
|
474 + | /* ServerBuilderGenerator.kt:446 */
|
475 + | impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
|
476 + | type Error = ConstraintViolation;
|
477 + |
|
478 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
479 + | builder.build()
|
480 + | }
|
481 + | }
|
482 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
483 + | /* RustType.kt:534 */
|
484 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
485 + | /* ServerBuilderGenerator.kt:211 */
|
486 + | pub struct Builder {
|
487 + | /* ServerBuilderGenerator.kt:308 */
|
488 + | pub(crate) path: ::std::option::Option<::std::string::String>,
|
489 + | /* ServerBuilderGenerator.kt:308 */
|
490 + | pub(crate) message: ::std::option::Option<::std::string::String>,
|
491 + | /* ServerBuilderGenerator.kt:211 */
|
492 + | }
|
493 + | /* ServerBuilderGenerator.kt:215 */
|
494 + | impl Builder {
|
495 + | /// /* ServerBuilderGenerator.kt:331 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
496 + | /* ServerBuilderGenerator.kt:343 */
|
497 + | pub fn path(mut self, input: ::std::string::String) -> Self {
|
498 + | /* ServerBuilderGenerator.kt:344 */
|
499 + | self.path =
|
500 + | /* ServerBuilderGenerator.kt:345 */Some(
|
501 + | /* ServerBuilderGenerator.kt:376 */input
|
502 + | /* ServerBuilderGenerator.kt:345 */)
|
503 + | /* ServerBuilderGenerator.kt:344 */;
|
504 + | self
|
505 + | /* ServerBuilderGenerator.kt:343 */
|
506 + | }
|
507 + | /// /* ServerBuilderGenerator.kt:331 */A detailed description of the validation failure.
|
508 + | /* ServerBuilderGenerator.kt:343 */
|
509 + | pub fn message(mut self, input: ::std::string::String) -> Self {
|
510 + | /* ServerBuilderGenerator.kt:344 */
|
511 + | self.message =
|
512 + | /* ServerBuilderGenerator.kt:345 */Some(
|
513 + | /* ServerBuilderGenerator.kt:376 */input
|
514 + | /* ServerBuilderGenerator.kt:345 */)
|
515 + | /* ServerBuilderGenerator.kt:344 */;
|
516 + | self
|
517 + | /* ServerBuilderGenerator.kt:343 */
|
518 + | }
|
519 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
520 + | /// /* ServerBuilderGenerator.kt:260 */
|
521 + | /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if a [`ConstraintViolation`] occurs.
|
522 + | ///
|
523 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
524 + | /* ServerBuilderGenerator.kt:271 */
|
525 + | pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
|
526 + | self.build_enforcing_all_constraints()
|
527 + | }
|
528 + | /* ServerBuilderGenerator.kt:283 */
|
529 + | fn build_enforcing_all_constraints(
|
530 + | self,
|
531 + | ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
|
532 + | /* ServerBuilderGenerator.kt:287 */
|
533 + | Ok(
|
534 + | /* ServerBuilderGenerator.kt:542 */
|
535 + | crate::model::ValidationExceptionField {
|
536 + | /* ServerBuilderGenerator.kt:546 */
|
537 + | path: self
|
538 + | .path
|
539 + | /* ServerBuilderGenerator.kt:569 */
|
540 + | .ok_or(ConstraintViolation::MissingPath)?,
|
541 + | /* ServerBuilderGenerator.kt:546 */
|
542 + | message: self
|
543 + | .message
|
544 + | /* ServerBuilderGenerator.kt:569 */
|
545 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
546 + | /* ServerBuilderGenerator.kt:542 */
|
547 + | }, /* ServerBuilderGenerator.kt:287 */
|
548 + | )
|
549 + | /* ServerBuilderGenerator.kt:283 */
|
550 + | }
|
551 + | /* ServerBuilderGenerator.kt:215 */
|
552 + | }
|
553 + |
|
554 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
555 + | }
|
556 + | /// /* ServerBuilderGenerator.kt:171 */See [`FlavorText`](crate::model::FlavorText).
|
557 + | pub mod flavor_text {
|
558 + |
|
559 + | /* RustType.kt:534 */
|
560 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
561 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
562 + | /* RustType.kt:534 */
|
563 + | #[non_exhaustive]
|
564 + | /* ServerBuilderConstraintViolations.kt:75 */
|
565 + | #[allow(clippy::enum_variant_names)]
|
566 + | pub enum ConstraintViolation {
|
567 + | /// /* ServerBuilderConstraintViolations.kt:137 */`flavor_text` was not provided but it is required when building `FlavorText`.
|
568 + | /* ServerBuilderConstraintViolations.kt:144 */
|
569 + | MissingFlavorText,
|
570 + | /// /* ServerBuilderConstraintViolations.kt:137 */`language` was not provided but it is required when building `FlavorText`.
|
571 + | /* ServerBuilderConstraintViolations.kt:144 */
|
572 + | MissingLanguage,
|
573 + | /* ServerBuilderConstraintViolations.kt:75 */
|
574 + | }
|
575 + | /* ServerBuilderConstraintViolations.kt:116 */
|
576 + | impl ::std::fmt::Display for ConstraintViolation {
|
577 + | /* ServerBuilderConstraintViolations.kt:117 */
|
578 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
579 + | /* ServerBuilderConstraintViolations.kt:118 */
|
580 + | match self {
|
581 + | /* ServerBuilderConstraintViolations.kt:126 */
|
582 + | ConstraintViolation::MissingFlavorText => write!(
|
583 + | f,
|
584 + | "`flavor_text` was not provided but it is required when building `FlavorText`"
|
585 + | ),
|
586 + | /* ServerBuilderConstraintViolations.kt:126 */
|
587 + | ConstraintViolation::MissingLanguage => write!(
|
588 + | f,
|
589 + | "`language` was not provided but it is required when building `FlavorText`"
|
590 + | ),
|
591 + | /* ServerBuilderConstraintViolations.kt:118 */
|
592 + | }
|
593 + | /* ServerBuilderConstraintViolations.kt:117 */
|
594 + | }
|
595 + | /* ServerBuilderConstraintViolations.kt:116 */
|
596 + | }
|
597 + | /* ServerBuilderConstraintViolations.kt:83 */
|
598 + | impl ::std::error::Error for ConstraintViolation {}
|
599 + | /* ServerBuilderGenerator.kt:446 */
|
600 + | impl ::std::convert::TryFrom<Builder> for crate::model::FlavorText {
|
601 + | type Error = ConstraintViolation;
|
602 + |
|
603 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
604 + | builder.build()
|
605 + | }
|
606 + | }
|
607 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`FlavorText`](crate::model::FlavorText).
|
608 + | /* RustType.kt:534 */
|
609 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
610 + | /* ServerBuilderGenerator.kt:211 */
|
611 + | pub struct Builder {
|
612 + | /* ServerBuilderGenerator.kt:308 */
|
613 + | pub(crate) flavor_text: ::std::option::Option<::std::string::String>,
|
614 + | /* ServerBuilderGenerator.kt:308 */
|
615 + | pub(crate) language: ::std::option::Option<crate::model::Language>,
|
616 + | /* ServerBuilderGenerator.kt:211 */
|
617 + | }
|
618 + | /* ServerBuilderGenerator.kt:215 */
|
619 + | impl Builder {
|
620 + | /// /* ServerBuilderGenerator.kt:331 */The localized flavor text for an API resource in a specific language.
|
621 + | /* ServerBuilderGenerator.kt:343 */
|
622 + | pub fn flavor_text(mut self, input: ::std::string::String) -> Self {
|
623 + | /* ServerBuilderGenerator.kt:344 */
|
624 + | self.flavor_text =
|
625 + | /* ServerBuilderGenerator.kt:345 */Some(
|
626 + | /* ServerBuilderGenerator.kt:376 */input
|
627 + | /* ServerBuilderGenerator.kt:345 */)
|
628 + | /* ServerBuilderGenerator.kt:344 */;
|
629 + | self
|
630 + | /* ServerBuilderGenerator.kt:343 */
|
631 + | }
|
632 + | /// /* ServerBuilderGenerator.kt:331 */The language this name is in.
|
633 + | /* ServerBuilderGenerator.kt:343 */
|
634 + | pub fn language(mut self, input: crate::model::Language) -> Self {
|
635 + | /* ServerBuilderGenerator.kt:344 */
|
636 + | self.language =
|
637 + | /* ServerBuilderGenerator.kt:345 */Some(
|
638 + | /* ServerBuilderGenerator.kt:376 */input
|
639 + | /* ServerBuilderGenerator.kt:345 */)
|
640 + | /* ServerBuilderGenerator.kt:344 */;
|
641 + | self
|
642 + | /* ServerBuilderGenerator.kt:343 */
|
643 + | }
|
644 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`FlavorText`](crate::model::FlavorText).
|
645 + | /// /* ServerBuilderGenerator.kt:260 */
|
646 + | /// The builder fails to construct a [`FlavorText`](crate::model::FlavorText) if a [`ConstraintViolation`] occurs.
|
647 + | ///
|
648 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
649 + | /* ServerBuilderGenerator.kt:271 */
|
650 + | pub fn build(self) -> Result<crate::model::FlavorText, ConstraintViolation> {
|
651 + | self.build_enforcing_all_constraints()
|
652 + | }
|
653 + | /* ServerBuilderGenerator.kt:283 */
|
654 + | fn build_enforcing_all_constraints(
|
655 + | self,
|
656 + | ) -> Result<crate::model::FlavorText, ConstraintViolation> {
|
657 + | /* ServerBuilderGenerator.kt:287 */
|
658 + | Ok(
|
659 + | /* ServerBuilderGenerator.kt:542 */
|
660 + | crate::model::FlavorText {
|
661 + | /* ServerBuilderGenerator.kt:546 */
|
662 + | flavor_text: self
|
663 + | .flavor_text
|
664 + | /* ServerBuilderGenerator.kt:569 */
|
665 + | .ok_or(ConstraintViolation::MissingFlavorText)?,
|
666 + | /* ServerBuilderGenerator.kt:546 */
|
667 + | language: self
|
668 + | .language
|
669 + | /* ServerBuilderGenerator.kt:569 */
|
670 + | .ok_or(ConstraintViolation::MissingLanguage)?,
|
671 + | /* ServerBuilderGenerator.kt:542 */
|
672 + | }, /* ServerBuilderGenerator.kt:287 */
|
673 + | )
|
674 + | /* ServerBuilderGenerator.kt:283 */
|
675 + | }
|
676 + | /* ServerBuilderGenerator.kt:215 */
|
677 + | }
|
678 + |
|
679 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
680 + | }
|
681 + | /// /* ServerBuilderGenerator.kt:171 */See [`CaptureEvent`](crate::model::CaptureEvent).
|
682 + | pub mod capture_event {
|
683 + |
|
684 + | /* ServerBuilderGenerator.kt:461 */
|
685 + | impl ::std::convert::From<Builder> for crate::model::CaptureEvent {
|
686 + | fn from(builder: Builder) -> Self {
|
687 + | builder.build()
|
688 + | }
|
689 + | }
|
690 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`CaptureEvent`](crate::model::CaptureEvent).
|
691 + | /* RustType.kt:534 */
|
692 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
693 + | /* ServerBuilderGenerator.kt:211 */
|
694 + | pub struct Builder {
|
695 + | /* ServerBuilderGenerator.kt:308 */
|
696 + | pub(crate) name: ::std::option::Option<::std::string::String>,
|
697 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) captured: ::std::option::Option<bool>,
|
698 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) shiny: ::std::option::Option<bool>,
|
699 + | /* ServerBuilderGenerator.kt:308 */
|
700 + | pub(crate) pokedex_update: ::std::option::Option<::aws_smithy_types::Blob>,
|
701 + | /* ServerBuilderGenerator.kt:211 */
|
702 + | }
|
703 + | /* ServerBuilderGenerator.kt:215 */
|
704 + | impl Builder {
|
705 + | /* ServerBuilderGenerator.kt:331 */
|
706 + | #[allow(missing_docs)] // documentation missing in model
|
707 + | /* ServerBuilderGenerator.kt:343 */
|
708 + | pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
709 + | /* ServerBuilderGenerator.kt:344 */
|
710 + | self.name =
|
711 + | /* ServerBuilderGenerator.kt:376 */input
|
712 + | /* ServerBuilderGenerator.kt:344 */;
|
713 + | self
|
714 + | /* ServerBuilderGenerator.kt:343 */
|
715 + | }
|
716 + | /* ServerBuilderGenerator.kt:331 */
|
717 + | #[allow(missing_docs)] // documentation missing in model
|
718 + | /* ServerBuilderGenerator.kt:343 */
|
719 + | pub fn captured(mut self, input: ::std::option::Option<bool>) -> Self {
|
720 + | /* ServerBuilderGenerator.kt:344 */
|
721 + | self.captured =
|
722 + | /* ServerBuilderGenerator.kt:376 */input
|
723 + | /* ServerBuilderGenerator.kt:344 */;
|
724 + | self
|
725 + | /* ServerBuilderGenerator.kt:343 */
|
726 + | }
|
727 + | /* ServerBuilderGenerator.kt:331 */
|
728 + | #[allow(missing_docs)] // documentation missing in model
|
729 + | /* ServerBuilderGenerator.kt:343 */
|
730 + | pub fn shiny(mut self, input: ::std::option::Option<bool>) -> Self {
|
731 + | /* ServerBuilderGenerator.kt:344 */
|
732 + | self.shiny =
|
733 + | /* ServerBuilderGenerator.kt:376 */input
|
734 + | /* ServerBuilderGenerator.kt:344 */;
|
735 + | self
|
736 + | /* ServerBuilderGenerator.kt:343 */
|
737 + | }
|
738 + | /* ServerBuilderGenerator.kt:331 */
|
739 + | #[allow(missing_docs)] // documentation missing in model
|
740 + | /* ServerBuilderGenerator.kt:343 */
|
741 + | pub fn pokedex_update(
|
742 + | mut self,
|
743 + | input: ::std::option::Option<::aws_smithy_types::Blob>,
|
744 + | ) -> Self {
|
745 + | /* ServerBuilderGenerator.kt:344 */
|
746 + | self.pokedex_update =
|
747 + | /* ServerBuilderGenerator.kt:376 */input
|
748 + | /* ServerBuilderGenerator.kt:344 */;
|
749 + | self
|
750 + | /* ServerBuilderGenerator.kt:343 */
|
751 + | }
|
752 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CaptureEvent`](crate::model::CaptureEvent).
|
753 + | /* ServerBuilderGenerator.kt:271 */
|
754 + | pub fn build(self) -> crate::model::CaptureEvent {
|
755 + | self.build_enforcing_all_constraints()
|
756 + | }
|
757 + | /* ServerBuilderGenerator.kt:283 */
|
758 + | fn build_enforcing_all_constraints(self) -> crate::model::CaptureEvent {
|
759 + | /* ServerBuilderGenerator.kt:542 */
|
760 + | crate::model::CaptureEvent {
|
761 + | /* ServerBuilderGenerator.kt:546 */
|
762 + | name: self.name,
|
763 + | /* ServerBuilderGenerator.kt:546 */
|
764 + | captured: self.captured,
|
765 + | /* ServerBuilderGenerator.kt:546 */
|
766 + | shiny: self.shiny,
|
767 + | /* ServerBuilderGenerator.kt:546 */
|
768 + | pokedex_update: self.pokedex_update,
|
769 + | /* ServerBuilderGenerator.kt:542 */
|
770 + | }
|
771 + | /* ServerBuilderGenerator.kt:283 */
|
772 + | }
|
773 + | /* ServerBuilderGenerator.kt:215 */
|
774 + | }
|
775 + |
|
776 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
777 + | }
|
778 + | /// /* ServerBuilderGenerator.kt:171 */See [`CapturingEvent`](crate::model::CapturingEvent).
|
779 + | pub mod capturing_event {
|
780 + |
|
781 + | /* ServerBuilderGenerator.kt:461 */
|
782 + | impl ::std::convert::From<Builder> for crate::model::CapturingEvent {
|
783 + | fn from(builder: Builder) -> Self {
|
784 + | builder.build()
|
785 + | }
|
786 + | }
|
787 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`CapturingEvent`](crate::model::CapturingEvent).
|
788 + | /* RustType.kt:534 */
|
789 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
790 + | /* ServerBuilderGenerator.kt:211 */
|
791 + | pub struct Builder {
|
792 + | /* ServerBuilderGenerator.kt:308 */
|
793 + | pub(crate) payload: ::std::option::Option<crate::model::CapturingPayload>,
|
794 + | /* ServerBuilderGenerator.kt:211 */
|
795 + | }
|
796 + | /* ServerBuilderGenerator.kt:215 */
|
797 + | impl Builder {
|
798 + | /* ServerBuilderGenerator.kt:331 */
|
799 + | #[allow(missing_docs)] // documentation missing in model
|
800 + | /* ServerBuilderGenerator.kt:343 */
|
801 + | pub fn payload(
|
802 + | mut self,
|
803 + | input: ::std::option::Option<crate::model::CapturingPayload>,
|
804 + | ) -> Self {
|
805 + | /* ServerBuilderGenerator.kt:344 */
|
806 + | self.payload =
|
807 + | /* ServerBuilderGenerator.kt:376 */input
|
808 + | /* ServerBuilderGenerator.kt:344 */;
|
809 + | self
|
810 + | /* ServerBuilderGenerator.kt:343 */
|
811 + | }
|
812 + | /* ServerBuilderGenerator.kt:426 */
|
813 + | #[allow(missing_docs)] // documentation missing in model
|
814 + | /* ServerBuilderGenerator.kt:428 */
|
815 + | pub(crate) fn set_payload(
|
816 + | mut self,
|
817 + | input: Option<impl ::std::convert::Into<crate::model::CapturingPayload>>,
|
818 + | ) -> Self {
|
819 + | /* ServerBuilderGenerator.kt:429 */
|
820 + | self.payload = input.map(|v| v.into());
|
821 + | self
|
822 + | /* ServerBuilderGenerator.kt:428 */
|
823 + | }
|
824 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CapturingEvent`](crate::model::CapturingEvent).
|
825 + | /* ServerBuilderGenerator.kt:271 */
|
826 + | pub fn build(self) -> crate::model::CapturingEvent {
|
827 + | self.build_enforcing_all_constraints()
|
828 + | }
|
829 + | /* ServerBuilderGenerator.kt:283 */
|
830 + | fn build_enforcing_all_constraints(self) -> crate::model::CapturingEvent {
|
831 + | /* ServerBuilderGenerator.kt:542 */
|
832 + | crate::model::CapturingEvent {
|
833 + | /* ServerBuilderGenerator.kt:546 */
|
834 + | payload: self.payload,
|
835 + | /* ServerBuilderGenerator.kt:542 */
|
836 + | }
|
837 + | /* ServerBuilderGenerator.kt:283 */
|
838 + | }
|
839 + | /* ServerBuilderGenerator.kt:215 */
|
840 + | }
|
841 + |
|
842 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
843 + | }
|
844 + | /// /* ServerBuilderGenerator.kt:171 */See [`CapturingPayload`](crate::model::CapturingPayload).
|
845 + | pub mod capturing_payload {
|
846 + |
|
847 + | /* ServerBuilderGenerator.kt:461 */
|
848 + | impl ::std::convert::From<Builder> for crate::model::CapturingPayload {
|
849 + | fn from(builder: Builder) -> Self {
|
850 + | builder.build()
|
851 + | }
|
852 + | }
|
853 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`CapturingPayload`](crate::model::CapturingPayload).
|
854 + | /* RustType.kt:534 */
|
855 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
856 + | /* ServerBuilderGenerator.kt:211 */
|
857 + | pub struct Builder {
|
858 + | /* ServerBuilderGenerator.kt:308 */
|
859 + | pub(crate) name: ::std::option::Option<::std::string::String>,
|
860 + | /* ServerBuilderGenerator.kt:308 */
|
861 + | pub(crate) pokeball: ::std::option::Option<::std::string::String>,
|
862 + | /* ServerBuilderGenerator.kt:211 */
|
863 + | }
|
864 + | /* ServerBuilderGenerator.kt:215 */
|
865 + | impl Builder {
|
866 + | /* ServerBuilderGenerator.kt:331 */
|
867 + | #[allow(missing_docs)] // documentation missing in model
|
868 + | /* ServerBuilderGenerator.kt:343 */
|
869 + | pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
870 + | /* ServerBuilderGenerator.kt:344 */
|
871 + | self.name =
|
872 + | /* ServerBuilderGenerator.kt:376 */input
|
873 + | /* ServerBuilderGenerator.kt:344 */;
|
874 + | self
|
875 + | /* ServerBuilderGenerator.kt:343 */
|
876 + | }
|
877 + | /* ServerBuilderGenerator.kt:426 */
|
878 + | #[allow(missing_docs)] // documentation missing in model
|
879 + | /* ServerBuilderGenerator.kt:428 */
|
880 + | pub(crate) fn set_name(
|
881 + | mut self,
|
882 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
883 + | ) -> Self {
|
884 + | /* ServerBuilderGenerator.kt:429 */
|
885 + | self.name = input.map(|v| v.into());
|
886 + | self
|
887 + | /* ServerBuilderGenerator.kt:428 */
|
888 + | }
|
889 + | /* ServerBuilderGenerator.kt:331 */
|
890 + | #[allow(missing_docs)] // documentation missing in model
|
891 + | /* ServerBuilderGenerator.kt:343 */
|
892 + | pub fn pokeball(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
893 + | /* ServerBuilderGenerator.kt:344 */
|
894 + | self.pokeball =
|
895 + | /* ServerBuilderGenerator.kt:376 */input
|
896 + | /* ServerBuilderGenerator.kt:344 */;
|
897 + | self
|
898 + | /* ServerBuilderGenerator.kt:343 */
|
899 + | }
|
900 + | /* ServerBuilderGenerator.kt:426 */
|
901 + | #[allow(missing_docs)] // documentation missing in model
|
902 + | /* ServerBuilderGenerator.kt:428 */
|
903 + | pub(crate) fn set_pokeball(
|
904 + | mut self,
|
905 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
906 + | ) -> Self {
|
907 + | /* ServerBuilderGenerator.kt:429 */
|
908 + | self.pokeball = input.map(|v| v.into());
|
909 + | self
|
910 + | /* ServerBuilderGenerator.kt:428 */
|
911 + | }
|
912 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CapturingPayload`](crate::model::CapturingPayload).
|
913 + | /* ServerBuilderGenerator.kt:271 */
|
914 + | pub fn build(self) -> crate::model::CapturingPayload {
|
915 + | self.build_enforcing_all_constraints()
|
916 + | }
|
917 + | /* ServerBuilderGenerator.kt:283 */
|
918 + | fn build_enforcing_all_constraints(self) -> crate::model::CapturingPayload {
|
919 + | /* ServerBuilderGenerator.kt:542 */
|
920 + | crate::model::CapturingPayload {
|
921 + | /* ServerBuilderGenerator.kt:546 */
|
922 + | name: self.name,
|
923 + | /* ServerBuilderGenerator.kt:546 */
|
924 + | pokeball: self.pokeball,
|
925 + | /* ServerBuilderGenerator.kt:542 */
|
926 + | }
|
927 + | /* ServerBuilderGenerator.kt:283 */
|
928 + | }
|
929 + | /* ServerBuilderGenerator.kt:215 */
|
930 + | }
|
931 + |
|
932 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
933 + | }
|