1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* ServerOperationErrorGenerator.kt:63 */
|
3 + | /// Error type for the `GetStorage` operation.
|
4 + | /* ServerOperationErrorGenerator.kt:64 */
|
5 + | /// Each variant represents an error that can occur for the `GetStorage` operation.
|
6 + | /* RustType.kt:534 */
|
7 + | #[derive(::std::fmt::Debug)]
|
8 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum GetStorageError {
|
9 + | /* ServerOperationErrorGenerator.kt:68 */
|
10 + | #[allow(missing_docs)] // documentation missing in model
|
11 + | /* ServerOperationErrorGenerator.kt:71 */
|
12 + | ResourceNotFoundException(crate::error::ResourceNotFoundException),
|
13 + | /// /* ServerOperationErrorGenerator.kt:68 */Not authorized to access Pokémon storage.
|
14 + | /* ServerOperationErrorGenerator.kt:71 */
|
15 + | StorageAccessNotAuthorized(crate::error::StorageAccessNotAuthorized),
|
16 + | /// /* ServerOperationErrorGenerator.kt:68 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
17 + | /* ServerOperationErrorGenerator.kt:71 */
|
18 + | ValidationException(crate::error::ValidationException),
|
19 + | /* ServerOperationErrorGenerator.kt:66 */
|
20 + | }
|
21 + | /* ServerOperationErrorGenerator.kt:75 */
|
22 + | impl ::std::fmt::Display for GetStorageError {
|
23 + | /* ServerOperationErrorGenerator.kt:76 */
|
24 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
25 + | /* ServerOperationErrorGenerator.kt:139 */
|
26 + | match &self {
|
27 + | /* ServerOperationErrorGenerator.kt:142 */
|
28 + | GetStorageError::ResourceNotFoundException(_inner) =>
|
29 + | /* ServerOperationErrorGenerator.kt:78 */
|
30 + | {
|
31 + | _inner.fmt(f)
|
32 + | }
|
33 + | ,
|
34 + | /* ServerOperationErrorGenerator.kt:142 */
|
35 + | GetStorageError::StorageAccessNotAuthorized(_inner) =>
|
36 + | /* ServerOperationErrorGenerator.kt:78 */
|
37 + | {
|
38 + | _inner.fmt(f)
|
39 + | }
|
40 + | ,
|
41 + | /* ServerOperationErrorGenerator.kt:142 */
|
42 + | GetStorageError::ValidationException(_inner) =>
|
43 + | /* ServerOperationErrorGenerator.kt:78 */
|
44 + | {
|
45 + | _inner.fmt(f)
|
46 + | }
|
47 + | /* ServerOperationErrorGenerator.kt:139 */
|
48 + | }
|
49 + | /* ServerOperationErrorGenerator.kt:76 */
|
50 + | }
|
51 + | /* ServerOperationErrorGenerator.kt:75 */
|
52 + | }
|
53 + | /* ServerOperationErrorGenerator.kt:83 */
|
54 + | impl GetStorageError {
|
55 + | /* ServerOperationErrorGenerator.kt:87 */
|
56 + | /// Returns `true` if the error kind is `GetStorageError::ResourceNotFoundException`.
|
57 + | /* ServerOperationErrorGenerator.kt:88 */
|
58 + | pub fn is_resource_not_found_exception(&self) -> bool {
|
59 + | /* ServerOperationErrorGenerator.kt:89 */
|
60 + | matches!(&self, GetStorageError::ResourceNotFoundException(_))
|
61 + | /* ServerOperationErrorGenerator.kt:88 */
|
62 + | }
|
63 + | /* ServerOperationErrorGenerator.kt:87 */
|
64 + | /// Returns `true` if the error kind is `GetStorageError::StorageAccessNotAuthorized`.
|
65 + | /* ServerOperationErrorGenerator.kt:88 */
|
66 + | pub fn is_storage_access_not_authorized(&self) -> bool {
|
67 + | /* ServerOperationErrorGenerator.kt:89 */
|
68 + | matches!(&self, GetStorageError::StorageAccessNotAuthorized(_))
|
69 + | /* ServerOperationErrorGenerator.kt:88 */
|
70 + | }
|
71 + | /* ServerOperationErrorGenerator.kt:87 */
|
72 + | /// Returns `true` if the error kind is `GetStorageError::ValidationException`.
|
73 + | /* ServerOperationErrorGenerator.kt:88 */
|
74 + | pub fn is_validation_exception(&self) -> bool {
|
75 + | /* ServerOperationErrorGenerator.kt:89 */
|
76 + | matches!(&self, GetStorageError::ValidationException(_))
|
77 + | /* ServerOperationErrorGenerator.kt:88 */
|
78 + | }
|
79 + | /* ServerOperationErrorGenerator.kt:92 */
|
80 + | /// Returns the error name string by matching the correct variant.
|
81 + | /* ServerOperationErrorGenerator.kt:93 */
|
82 + | pub fn name(&self) -> &'static str {
|
83 + | /* ServerOperationErrorGenerator.kt:139 */
|
84 + | match &self {
|
85 + | /* ServerOperationErrorGenerator.kt:142 */
|
86 + | GetStorageError::ResourceNotFoundException(_inner) =>
|
87 + | /* ServerOperationErrorGenerator.kt:95 */
|
88 + | {
|
89 + | _inner.name()
|
90 + | }
|
91 + | ,
|
92 + | /* ServerOperationErrorGenerator.kt:142 */
|
93 + | GetStorageError::StorageAccessNotAuthorized(_inner) =>
|
94 + | /* ServerOperationErrorGenerator.kt:95 */
|
95 + | {
|
96 + | _inner.name()
|
97 + | }
|
98 + | ,
|
99 + | /* ServerOperationErrorGenerator.kt:142 */
|
100 + | GetStorageError::ValidationException(_inner) =>
|
101 + | /* ServerOperationErrorGenerator.kt:95 */
|
102 + | {
|
103 + | _inner.name()
|
104 + | }
|
105 + | /* ServerOperationErrorGenerator.kt:139 */
|
106 + | }
|
107 + | /* ServerOperationErrorGenerator.kt:93 */
|
108 + | }
|
109 + | /* ServerOperationErrorGenerator.kt:83 */
|
110 + | }
|
111 + | /* ServerOperationErrorGenerator.kt:100 */
|
112 + | impl ::std::error::Error for GetStorageError {
|
113 + | /* ServerOperationErrorGenerator.kt:101 */
|
114 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
115 + | /* ServerOperationErrorGenerator.kt:139 */
|
116 + | match &self {
|
117 + | /* ServerOperationErrorGenerator.kt:142 */
|
118 + | GetStorageError::ResourceNotFoundException(_inner) =>
|
119 + | /* ServerOperationErrorGenerator.kt:103 */
|
120 + | {
|
121 + | Some(_inner)
|
122 + | }
|
123 + | ,
|
124 + | /* ServerOperationErrorGenerator.kt:142 */
|
125 + | GetStorageError::StorageAccessNotAuthorized(_inner) =>
|
126 + | /* ServerOperationErrorGenerator.kt:103 */
|
127 + | {
|
128 + | Some(_inner)
|
129 + | }
|
130 + | ,
|
131 + | /* ServerOperationErrorGenerator.kt:142 */
|
132 + | GetStorageError::ValidationException(_inner) =>
|
133 + | /* ServerOperationErrorGenerator.kt:103 */
|
134 + | {
|
135 + | Some(_inner)
|
136 + | }
|
137 + | /* ServerOperationErrorGenerator.kt:139 */
|
138 + | }
|
139 + | /* ServerOperationErrorGenerator.kt:101 */
|
140 + | }
|
141 + | /* ServerOperationErrorGenerator.kt:100 */
|
142 + | }
|
143 + | /* ServerOperationErrorGenerator.kt:110 */
|
144 + | impl ::std::convert::From<crate::error::ResourceNotFoundException>
|
145 + | for crate::error::GetStorageError
|
146 + | {
|
147 + | /* ServerOperationErrorGenerator.kt:111 */
|
148 + | fn from(variant: crate::error::ResourceNotFoundException) -> crate::error::GetStorageError {
|
149 + | /* ServerOperationErrorGenerator.kt:112 */
|
150 + | Self::ResourceNotFoundException(variant)
|
151 + | /* ServerOperationErrorGenerator.kt:111 */
|
152 + | }
|
153 + | /* ServerOperationErrorGenerator.kt:110 */
|
154 + | }
|
155 + | /* ServerOperationErrorGenerator.kt:110 */
|
156 + | impl ::std::convert::From<crate::error::StorageAccessNotAuthorized>
|
157 + | for crate::error::GetStorageError
|
158 + | {
|
159 + | /* ServerOperationErrorGenerator.kt:111 */
|
160 + | fn from(variant: crate::error::StorageAccessNotAuthorized) -> crate::error::GetStorageError {
|
161 + | /* ServerOperationErrorGenerator.kt:112 */
|
162 + | Self::StorageAccessNotAuthorized(variant)
|
163 + | /* ServerOperationErrorGenerator.kt:111 */
|
164 + | }
|
165 + | /* ServerOperationErrorGenerator.kt:110 */
|
166 + | }
|
167 + | /* ServerOperationErrorGenerator.kt:110 */
|
168 + | impl ::std::convert::From<crate::error::ValidationException> for crate::error::GetStorageError {
|
169 + | /* ServerOperationErrorGenerator.kt:111 */
|
170 + | fn from(variant: crate::error::ValidationException) -> crate::error::GetStorageError {
|
171 + | /* ServerOperationErrorGenerator.kt:112 */
|
172 + | Self::ValidationException(variant)
|
173 + | /* ServerOperationErrorGenerator.kt:111 */
|
174 + | }
|
175 + | /* ServerOperationErrorGenerator.kt:110 */
|
176 + | }
|
177 + |
|
178 + | /// /* StructureGenerator.kt:197 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
179 + | /* RustType.kt:534 */
|
180 + | #[derive(
|
181 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
182 + | )]
|
183 + | pub /* StructureGenerator.kt:201 */ struct ValidationException {
|
184 + | /// /* StructureGenerator.kt:231 */A summary of the validation failure.
|
185 + | pub message: ::std::string::String,
|
186 + | /// /* StructureGenerator.kt:231 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
|
187 + | pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
188 + | /* StructureGenerator.kt:201 */
|
189 + | }
|
190 + | /* StructureGenerator.kt:135 */
|
191 + | impl ValidationException {
|
192 + | /// /* StructureGenerator.kt:231 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
|
193 + | /* StructureGenerator.kt:166 */
|
194 + | pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
|
195 + | /* StructureGenerator.kt:169 */
|
196 + | self.field_list.as_deref()
|
197 + | /* StructureGenerator.kt:166 */
|
198 + | }
|
199 + | /* StructureGenerator.kt:135 */
|
200 + | }
|
201 + | /* ErrorImplGenerator.kt:99 */
|
202 + | impl ValidationException {
|
203 + | /* ErrorImplGenerator.kt:128 */
|
204 + | /// Returns the error message.
|
205 + | pub fn message(&self) -> &str {
|
206 + | &self.message
|
207 + | }
|
208 + | /* ErrorImplGenerator.kt:141 */
|
209 + | #[doc(hidden)]
|
210 + | /// Returns the error name.
|
211 + | pub fn name(&self) -> &'static str {
|
212 + | "ValidationException"
|
213 + | }
|
214 + | /* ErrorImplGenerator.kt:99 */
|
215 + | }
|
216 + | /* ErrorImplGenerator.kt:153 */
|
217 + | impl ::std::fmt::Display for ValidationException {
|
218 + | /* ErrorImplGenerator.kt:154 */
|
219 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
220 + | /* ErrorImplGenerator.kt:161 */
|
221 + | ::std::write!(f, "ValidationException")?;
|
222 + | /* ErrorImplGenerator.kt:166 */
|
223 + | {
|
224 + | /* ErrorImplGenerator.kt:169 */
|
225 + | ::std::write!(f, ": {}", &self.message)?;
|
226 + | /* ErrorImplGenerator.kt:166 */
|
227 + | }
|
228 + | /* ErrorImplGenerator.kt:176 */
|
229 + | Ok(())
|
230 + | /* ErrorImplGenerator.kt:154 */
|
231 + | }
|
232 + | /* ErrorImplGenerator.kt:153 */
|
233 + | }
|
234 + | /* ErrorImplGenerator.kt:180 */
|
235 + | impl ::std::error::Error for ValidationException {}
|
236 + | /* ServerCodegenVisitor.kt:356 */
|
237 + | impl ValidationException {
|
238 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
239 + | /* ServerBuilderGenerator.kt:295 */
|
240 + | pub fn builder() -> crate::error::validation_exception::Builder {
|
241 + | /* ServerBuilderGenerator.kt:296 */
|
242 + | crate::error::validation_exception::Builder::default()
|
243 + | /* ServerBuilderGenerator.kt:295 */
|
244 + | }
|
245 + | /* ServerCodegenVisitor.kt:356 */
|
246 + | }
|
247 + |
|
248 + | /// /* StructureGenerator.kt:197 */Not authorized to access Pokémon storage.
|
249 + | /* RustType.kt:534 */
|
250 + | #[derive(
|
251 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
252 + | )]
|
253 + | pub /* StructureGenerator.kt:201 */ struct StorageAccessNotAuthorized {/* StructureGenerator.kt:201 */}
|
254 + | /* ErrorImplGenerator.kt:99 */
|
255 + | impl StorageAccessNotAuthorized {
|
256 + | /* ErrorImplGenerator.kt:141 */
|
257 + | #[doc(hidden)]
|
258 + | /// Returns the error name.
|
259 + | pub fn name(&self) -> &'static str {
|
260 + | "StorageAccessNotAuthorized"
|
261 + | }
|
262 + | /* ErrorImplGenerator.kt:99 */
|
263 + | }
|
264 + | /* ErrorImplGenerator.kt:153 */
|
265 + | impl ::std::fmt::Display for StorageAccessNotAuthorized {
|
266 + | /* ErrorImplGenerator.kt:154 */
|
267 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
268 + | /* ErrorImplGenerator.kt:161 */
|
269 + | ::std::write!(f, "StorageAccessNotAuthorized")?;
|
270 + | /* ErrorImplGenerator.kt:176 */
|
271 + | Ok(())
|
272 + | /* ErrorImplGenerator.kt:154 */
|
273 + | }
|
274 + | /* ErrorImplGenerator.kt:153 */
|
275 + | }
|
276 + | /* ErrorImplGenerator.kt:180 */
|
277 + | impl ::std::error::Error for StorageAccessNotAuthorized {}
|
278 + | /* ServerCodegenVisitor.kt:356 */
|
279 + | impl StorageAccessNotAuthorized {
|
280 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`StorageAccessNotAuthorized`](crate::error::StorageAccessNotAuthorized).
|
281 + | /* ServerBuilderGenerator.kt:295 */
|
282 + | pub fn builder() -> crate::error::storage_access_not_authorized::Builder {
|
283 + | /* ServerBuilderGenerator.kt:296 */
|
284 + | crate::error::storage_access_not_authorized::Builder::default()
|
285 + | /* ServerBuilderGenerator.kt:295 */
|
286 + | }
|
287 + | /* ServerCodegenVisitor.kt:356 */
|
288 + | }
|
289 + |
|
290 + | /* StructureGenerator.kt:197 */
|
291 + | #[allow(missing_docs)] // documentation missing in model
|
292 + | /* RustType.kt:534 */
|
293 + | #[derive(
|
294 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
295 + | )]
|
296 + | pub /* StructureGenerator.kt:201 */ struct ResourceNotFoundException {
|
297 + | /* StructureGenerator.kt:231 */
|
298 + | #[allow(missing_docs)] // documentation missing in model
|
299 + | pub message: ::std::string::String,
|
300 + | /* StructureGenerator.kt:201 */
|
301 + | }
|
302 + | /* ErrorImplGenerator.kt:99 */
|
303 + | impl ResourceNotFoundException {
|
304 + | /* ErrorImplGenerator.kt:128 */
|
305 + | /// Returns the error message.
|
306 + | pub fn message(&self) -> &str {
|
307 + | &self.message
|
308 + | }
|
309 + | /* ErrorImplGenerator.kt:141 */
|
310 + | #[doc(hidden)]
|
311 + | /// Returns the error name.
|
312 + | pub fn name(&self) -> &'static str {
|
313 + | "ResourceNotFoundException"
|
314 + | }
|
315 + | /* ErrorImplGenerator.kt:99 */
|
316 + | }
|
317 + | /* ErrorImplGenerator.kt:153 */
|
318 + | impl ::std::fmt::Display for ResourceNotFoundException {
|
319 + | /* ErrorImplGenerator.kt:154 */
|
320 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
321 + | /* ErrorImplGenerator.kt:161 */
|
322 + | ::std::write!(f, "ResourceNotFoundException")?;
|
323 + | /* ErrorImplGenerator.kt:166 */
|
324 + | {
|
325 + | /* ErrorImplGenerator.kt:169 */
|
326 + | ::std::write!(f, ": {}", &self.message)?;
|
327 + | /* ErrorImplGenerator.kt:166 */
|
328 + | }
|
329 + | /* ErrorImplGenerator.kt:176 */
|
330 + | Ok(())
|
331 + | /* ErrorImplGenerator.kt:154 */
|
332 + | }
|
333 + | /* ErrorImplGenerator.kt:153 */
|
334 + | }
|
335 + | /* ErrorImplGenerator.kt:180 */
|
336 + | impl ::std::error::Error for ResourceNotFoundException {}
|
337 + | /* ServerCodegenVisitor.kt:356 */
|
338 + | impl ResourceNotFoundException {
|
339 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
340 + | /* ServerBuilderGenerator.kt:295 */
|
341 + | pub fn builder() -> crate::error::resource_not_found_exception::Builder {
|
342 + | /* ServerBuilderGenerator.kt:296 */
|
343 + | crate::error::resource_not_found_exception::Builder::default()
|
344 + | /* ServerBuilderGenerator.kt:295 */
|
345 + | }
|
346 + | /* ServerCodegenVisitor.kt:356 */
|
347 + | }
|
348 + |
|
349 + | /* ServerOperationErrorGenerator.kt:63 */
|
350 + | /// Error type for the `GetPokemonSpecies` operation.
|
351 + | /* ServerOperationErrorGenerator.kt:64 */
|
352 + | /// Each variant represents an error that can occur for the `GetPokemonSpecies` operation.
|
353 + | /* RustType.kt:534 */
|
354 + | #[derive(::std::fmt::Debug)]
|
355 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum GetPokemonSpeciesError {
|
356 + | /* ServerOperationErrorGenerator.kt:68 */
|
357 + | #[allow(missing_docs)] // documentation missing in model
|
358 + | /* ServerOperationErrorGenerator.kt:71 */
|
359 + | ResourceNotFoundException(crate::error::ResourceNotFoundException),
|
360 + | /// /* ServerOperationErrorGenerator.kt:68 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
361 + | /* ServerOperationErrorGenerator.kt:71 */
|
362 + | ValidationException(crate::error::ValidationException),
|
363 + | /* ServerOperationErrorGenerator.kt:66 */
|
364 + | }
|
365 + | /* ServerOperationErrorGenerator.kt:75 */
|
366 + | impl ::std::fmt::Display for GetPokemonSpeciesError {
|
367 + | /* ServerOperationErrorGenerator.kt:76 */
|
368 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
369 + | /* ServerOperationErrorGenerator.kt:139 */
|
370 + | match &self {
|
371 + | /* ServerOperationErrorGenerator.kt:142 */
|
372 + | GetPokemonSpeciesError::ResourceNotFoundException(_inner) =>
|
373 + | /* ServerOperationErrorGenerator.kt:78 */
|
374 + | {
|
375 + | _inner.fmt(f)
|
376 + | }
|
377 + | ,
|
378 + | /* ServerOperationErrorGenerator.kt:142 */
|
379 + | GetPokemonSpeciesError::ValidationException(_inner) =>
|
380 + | /* ServerOperationErrorGenerator.kt:78 */
|
381 + | {
|
382 + | _inner.fmt(f)
|
383 + | }
|
384 + | /* ServerOperationErrorGenerator.kt:139 */
|
385 + | }
|
386 + | /* ServerOperationErrorGenerator.kt:76 */
|
387 + | }
|
388 + | /* ServerOperationErrorGenerator.kt:75 */
|
389 + | }
|
390 + | /* ServerOperationErrorGenerator.kt:83 */
|
391 + | impl GetPokemonSpeciesError {
|
392 + | /* ServerOperationErrorGenerator.kt:87 */
|
393 + | /// Returns `true` if the error kind is `GetPokemonSpeciesError::ResourceNotFoundException`.
|
394 + | /* ServerOperationErrorGenerator.kt:88 */
|
395 + | pub fn is_resource_not_found_exception(&self) -> bool {
|
396 + | /* ServerOperationErrorGenerator.kt:89 */
|
397 + | matches!(&self, GetPokemonSpeciesError::ResourceNotFoundException(_))
|
398 + | /* ServerOperationErrorGenerator.kt:88 */
|
399 + | }
|
400 + | /* ServerOperationErrorGenerator.kt:87 */
|
401 + | /// Returns `true` if the error kind is `GetPokemonSpeciesError::ValidationException`.
|
402 + | /* ServerOperationErrorGenerator.kt:88 */
|
403 + | pub fn is_validation_exception(&self) -> bool {
|
404 + | /* ServerOperationErrorGenerator.kt:89 */
|
405 + | matches!(&self, GetPokemonSpeciesError::ValidationException(_))
|
406 + | /* ServerOperationErrorGenerator.kt:88 */
|
407 + | }
|
408 + | /* ServerOperationErrorGenerator.kt:92 */
|
409 + | /// Returns the error name string by matching the correct variant.
|
410 + | /* ServerOperationErrorGenerator.kt:93 */
|
411 + | pub fn name(&self) -> &'static str {
|
412 + | /* ServerOperationErrorGenerator.kt:139 */
|
413 + | match &self {
|
414 + | /* ServerOperationErrorGenerator.kt:142 */
|
415 + | GetPokemonSpeciesError::ResourceNotFoundException(_inner) =>
|
416 + | /* ServerOperationErrorGenerator.kt:95 */
|
417 + | {
|
418 + | _inner.name()
|
419 + | }
|
420 + | ,
|
421 + | /* ServerOperationErrorGenerator.kt:142 */
|
422 + | GetPokemonSpeciesError::ValidationException(_inner) =>
|
423 + | /* ServerOperationErrorGenerator.kt:95 */
|
424 + | {
|
425 + | _inner.name()
|
426 + | }
|
427 + | /* ServerOperationErrorGenerator.kt:139 */
|
428 + | }
|
429 + | /* ServerOperationErrorGenerator.kt:93 */
|
430 + | }
|
431 + | /* ServerOperationErrorGenerator.kt:83 */
|
432 + | }
|
433 + | /* ServerOperationErrorGenerator.kt:100 */
|
434 + | impl ::std::error::Error for GetPokemonSpeciesError {
|
435 + | /* ServerOperationErrorGenerator.kt:101 */
|
436 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
437 + | /* ServerOperationErrorGenerator.kt:139 */
|
438 + | match &self {
|
439 + | /* ServerOperationErrorGenerator.kt:142 */
|
440 + | GetPokemonSpeciesError::ResourceNotFoundException(_inner) =>
|
441 + | /* ServerOperationErrorGenerator.kt:103 */
|
442 + | {
|
443 + | Some(_inner)
|
444 + | }
|
445 + | ,
|
446 + | /* ServerOperationErrorGenerator.kt:142 */
|
447 + | GetPokemonSpeciesError::ValidationException(_inner) =>
|
448 + | /* ServerOperationErrorGenerator.kt:103 */
|
449 + | {
|
450 + | Some(_inner)
|
451 + | }
|
452 + | /* ServerOperationErrorGenerator.kt:139 */
|
453 + | }
|
454 + | /* ServerOperationErrorGenerator.kt:101 */
|
455 + | }
|
456 + | /* ServerOperationErrorGenerator.kt:100 */
|
457 + | }
|
458 + | /* ServerOperationErrorGenerator.kt:110 */
|
459 + | impl ::std::convert::From<crate::error::ResourceNotFoundException>
|
460 + | for crate::error::GetPokemonSpeciesError
|
461 + | {
|
462 + | /* ServerOperationErrorGenerator.kt:111 */
|
463 + | fn from(
|
464 + | variant: crate::error::ResourceNotFoundException,
|
465 + | ) -> crate::error::GetPokemonSpeciesError {
|
466 + | /* ServerOperationErrorGenerator.kt:112 */
|
467 + | Self::ResourceNotFoundException(variant)
|
468 + | /* ServerOperationErrorGenerator.kt:111 */
|
469 + | }
|
470 + | /* ServerOperationErrorGenerator.kt:110 */
|
471 + | }
|
472 + | /* ServerOperationErrorGenerator.kt:110 */
|
473 + | impl ::std::convert::From<crate::error::ValidationException>
|
474 + | for crate::error::GetPokemonSpeciesError
|
475 + | {
|
476 + | /* ServerOperationErrorGenerator.kt:111 */
|
477 + | fn from(variant: crate::error::ValidationException) -> crate::error::GetPokemonSpeciesError {
|
478 + | /* ServerOperationErrorGenerator.kt:112 */
|
479 + | Self::ValidationException(variant)
|
480 + | /* ServerOperationErrorGenerator.kt:111 */
|
481 + | }
|
482 + | /* ServerOperationErrorGenerator.kt:110 */
|
483 + | }
|
484 + |
|
485 + | /* ServerOperationErrorGenerator.kt:63 */
|
486 + | /// Error type for the `CapturePokemon` operation.
|
487 + | /* ServerOperationErrorGenerator.kt:64 */
|
488 + | /// Each variant represents an error that can occur for the `CapturePokemon` operation.
|
489 + | /* RustType.kt:534 */
|
490 + | #[derive(::std::fmt::Debug)]
|
491 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum CapturePokemonError {
|
492 + | /* ServerOperationErrorGenerator.kt:68 */
|
493 + | #[allow(missing_docs)] // documentation missing in model
|
494 + | /* ServerOperationErrorGenerator.kt:71 */
|
495 + | UnsupportedRegionError(crate::error::UnsupportedRegionError),
|
496 + | /* ServerOperationErrorGenerator.kt:68 */
|
497 + | #[allow(missing_docs)] // documentation missing in model
|
498 + | /* ServerOperationErrorGenerator.kt:71 */
|
499 + | ThrottlingError(crate::error::ThrottlingError),
|
500 + | /// /* ServerOperationErrorGenerator.kt:68 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
501 + | /* ServerOperationErrorGenerator.kt:71 */
|
502 + | ValidationException(crate::error::ValidationException),
|
503 + | /* ServerOperationErrorGenerator.kt:68 */
|
504 + | #[allow(missing_docs)] // documentation missing in model
|
505 + | /* ServerOperationErrorGenerator.kt:71 */
|
506 + | MasterBallUnsuccessful(crate::error::MasterBallUnsuccessful),
|
507 + | /* ServerOperationErrorGenerator.kt:68 */
|
508 + | #[allow(missing_docs)] // documentation missing in model
|
509 + | /* ServerOperationErrorGenerator.kt:71 */
|
510 + | InvalidPokeballError(crate::error::InvalidPokeballError),
|
511 + | /* ServerOperationErrorGenerator.kt:66 */
|
512 + | }
|
513 + | /* ServerOperationErrorGenerator.kt:75 */
|
514 + | impl ::std::fmt::Display for CapturePokemonError {
|
515 + | /* ServerOperationErrorGenerator.kt:76 */
|
516 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
517 + | /* ServerOperationErrorGenerator.kt:139 */
|
518 + | match &self {
|
519 + | /* ServerOperationErrorGenerator.kt:142 */
|
520 + | CapturePokemonError::UnsupportedRegionError(_inner) =>
|
521 + | /* ServerOperationErrorGenerator.kt:78 */
|
522 + | {
|
523 + | _inner.fmt(f)
|
524 + | }
|
525 + | ,
|
526 + | /* ServerOperationErrorGenerator.kt:142 */
|
527 + | CapturePokemonError::ThrottlingError(_inner) =>
|
528 + | /* ServerOperationErrorGenerator.kt:78 */
|
529 + | {
|
530 + | _inner.fmt(f)
|
531 + | }
|
532 + | ,
|
533 + | /* ServerOperationErrorGenerator.kt:142 */
|
534 + | CapturePokemonError::ValidationException(_inner) =>
|
535 + | /* ServerOperationErrorGenerator.kt:78 */
|
536 + | {
|
537 + | _inner.fmt(f)
|
538 + | }
|
539 + | ,
|
540 + | /* ServerOperationErrorGenerator.kt:142 */
|
541 + | CapturePokemonError::MasterBallUnsuccessful(_inner) =>
|
542 + | /* ServerOperationErrorGenerator.kt:78 */
|
543 + | {
|
544 + | _inner.fmt(f)
|
545 + | }
|
546 + | ,
|
547 + | /* ServerOperationErrorGenerator.kt:142 */
|
548 + | CapturePokemonError::InvalidPokeballError(_inner) =>
|
549 + | /* ServerOperationErrorGenerator.kt:78 */
|
550 + | {
|
551 + | _inner.fmt(f)
|
552 + | }
|
553 + | /* ServerOperationErrorGenerator.kt:139 */
|
554 + | }
|
555 + | /* ServerOperationErrorGenerator.kt:76 */
|
556 + | }
|
557 + | /* ServerOperationErrorGenerator.kt:75 */
|
558 + | }
|
559 + | /* ServerOperationErrorGenerator.kt:83 */
|
560 + | impl CapturePokemonError {
|
561 + | /* ServerOperationErrorGenerator.kt:87 */
|
562 + | /// Returns `true` if the error kind is `CapturePokemonError::UnsupportedRegionError`.
|
563 + | /* ServerOperationErrorGenerator.kt:88 */
|
564 + | pub fn is_unsupported_region_error(&self) -> bool {
|
565 + | /* ServerOperationErrorGenerator.kt:89 */
|
566 + | matches!(&self, CapturePokemonError::UnsupportedRegionError(_))
|
567 + | /* ServerOperationErrorGenerator.kt:88 */
|
568 + | }
|
569 + | /* ServerOperationErrorGenerator.kt:87 */
|
570 + | /// Returns `true` if the error kind is `CapturePokemonError::ThrottlingError`.
|
571 + | /* ServerOperationErrorGenerator.kt:88 */
|
572 + | pub fn is_throttling_error(&self) -> bool {
|
573 + | /* ServerOperationErrorGenerator.kt:89 */
|
574 + | matches!(&self, CapturePokemonError::ThrottlingError(_))
|
575 + | /* ServerOperationErrorGenerator.kt:88 */
|
576 + | }
|
577 + | /* ServerOperationErrorGenerator.kt:87 */
|
578 + | /// Returns `true` if the error kind is `CapturePokemonError::ValidationException`.
|
579 + | /* ServerOperationErrorGenerator.kt:88 */
|
580 + | pub fn is_validation_exception(&self) -> bool {
|
581 + | /* ServerOperationErrorGenerator.kt:89 */
|
582 + | matches!(&self, CapturePokemonError::ValidationException(_))
|
583 + | /* ServerOperationErrorGenerator.kt:88 */
|
584 + | }
|
585 + | /* ServerOperationErrorGenerator.kt:87 */
|
586 + | /// Returns `true` if the error kind is `CapturePokemonError::MasterBallUnsuccessful`.
|
587 + | /* ServerOperationErrorGenerator.kt:88 */
|
588 + | pub fn is_master_ball_unsuccessful(&self) -> bool {
|
589 + | /* ServerOperationErrorGenerator.kt:89 */
|
590 + | matches!(&self, CapturePokemonError::MasterBallUnsuccessful(_))
|
591 + | /* ServerOperationErrorGenerator.kt:88 */
|
592 + | }
|
593 + | /* ServerOperationErrorGenerator.kt:87 */
|
594 + | /// Returns `true` if the error kind is `CapturePokemonError::InvalidPokeballError`.
|
595 + | /* ServerOperationErrorGenerator.kt:88 */
|
596 + | pub fn is_invalid_pokeball_error(&self) -> bool {
|
597 + | /* ServerOperationErrorGenerator.kt:89 */
|
598 + | matches!(&self, CapturePokemonError::InvalidPokeballError(_))
|
599 + | /* ServerOperationErrorGenerator.kt:88 */
|
600 + | }
|
601 + | /* ServerOperationErrorGenerator.kt:92 */
|
602 + | /// Returns the error name string by matching the correct variant.
|
603 + | /* ServerOperationErrorGenerator.kt:93 */
|
604 + | pub fn name(&self) -> &'static str {
|
605 + | /* ServerOperationErrorGenerator.kt:139 */
|
606 + | match &self {
|
607 + | /* ServerOperationErrorGenerator.kt:142 */
|
608 + | CapturePokemonError::UnsupportedRegionError(_inner) =>
|
609 + | /* ServerOperationErrorGenerator.kt:95 */
|
610 + | {
|
611 + | _inner.name()
|
612 + | }
|
613 + | ,
|
614 + | /* ServerOperationErrorGenerator.kt:142 */
|
615 + | CapturePokemonError::ThrottlingError(_inner) =>
|
616 + | /* ServerOperationErrorGenerator.kt:95 */
|
617 + | {
|
618 + | _inner.name()
|
619 + | }
|
620 + | ,
|
621 + | /* ServerOperationErrorGenerator.kt:142 */
|
622 + | CapturePokemonError::ValidationException(_inner) =>
|
623 + | /* ServerOperationErrorGenerator.kt:95 */
|
624 + | {
|
625 + | _inner.name()
|
626 + | }
|
627 + | ,
|
628 + | /* ServerOperationErrorGenerator.kt:142 */
|
629 + | CapturePokemonError::MasterBallUnsuccessful(_inner) =>
|
630 + | /* ServerOperationErrorGenerator.kt:95 */
|
631 + | {
|
632 + | _inner.name()
|
633 + | }
|
634 + | ,
|
635 + | /* ServerOperationErrorGenerator.kt:142 */
|
636 + | CapturePokemonError::InvalidPokeballError(_inner) =>
|
637 + | /* ServerOperationErrorGenerator.kt:95 */
|
638 + | {
|
639 + | _inner.name()
|
640 + | }
|
641 + | /* ServerOperationErrorGenerator.kt:139 */
|
642 + | }
|
643 + | /* ServerOperationErrorGenerator.kt:93 */
|
644 + | }
|
645 + | /* ServerOperationErrorGenerator.kt:83 */
|
646 + | }
|
647 + | /* ServerOperationErrorGenerator.kt:100 */
|
648 + | impl ::std::error::Error for CapturePokemonError {
|
649 + | /* ServerOperationErrorGenerator.kt:101 */
|
650 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
651 + | /* ServerOperationErrorGenerator.kt:139 */
|
652 + | match &self {
|
653 + | /* ServerOperationErrorGenerator.kt:142 */
|
654 + | CapturePokemonError::UnsupportedRegionError(_inner) =>
|
655 + | /* ServerOperationErrorGenerator.kt:103 */
|
656 + | {
|
657 + | Some(_inner)
|
658 + | }
|
659 + | ,
|
660 + | /* ServerOperationErrorGenerator.kt:142 */
|
661 + | CapturePokemonError::ThrottlingError(_inner) =>
|
662 + | /* ServerOperationErrorGenerator.kt:103 */
|
663 + | {
|
664 + | Some(_inner)
|
665 + | }
|
666 + | ,
|
667 + | /* ServerOperationErrorGenerator.kt:142 */
|
668 + | CapturePokemonError::ValidationException(_inner) =>
|
669 + | /* ServerOperationErrorGenerator.kt:103 */
|
670 + | {
|
671 + | Some(_inner)
|
672 + | }
|
673 + | ,
|
674 + | /* ServerOperationErrorGenerator.kt:142 */
|
675 + | CapturePokemonError::MasterBallUnsuccessful(_inner) =>
|
676 + | /* ServerOperationErrorGenerator.kt:103 */
|
677 + | {
|
678 + | Some(_inner)
|
679 + | }
|
680 + | ,
|
681 + | /* ServerOperationErrorGenerator.kt:142 */
|
682 + | CapturePokemonError::InvalidPokeballError(_inner) =>
|
683 + | /* ServerOperationErrorGenerator.kt:103 */
|
684 + | {
|
685 + | Some(_inner)
|
686 + | }
|
687 + | /* ServerOperationErrorGenerator.kt:139 */
|
688 + | }
|
689 + | /* ServerOperationErrorGenerator.kt:101 */
|
690 + | }
|
691 + | /* ServerOperationErrorGenerator.kt:100 */
|
692 + | }
|
693 + | /* ServerOperationErrorGenerator.kt:110 */
|
694 + | impl ::std::convert::From<crate::error::UnsupportedRegionError>
|
695 + | for crate::error::CapturePokemonError
|
696 + | {
|
697 + | /* ServerOperationErrorGenerator.kt:111 */
|
698 + | fn from(variant: crate::error::UnsupportedRegionError) -> crate::error::CapturePokemonError {
|
699 + | /* ServerOperationErrorGenerator.kt:112 */
|
700 + | Self::UnsupportedRegionError(variant)
|
701 + | /* ServerOperationErrorGenerator.kt:111 */
|
702 + | }
|
703 + | /* ServerOperationErrorGenerator.kt:110 */
|
704 + | }
|
705 + | /* ServerOperationErrorGenerator.kt:110 */
|
706 + | impl ::std::convert::From<crate::error::ThrottlingError> for crate::error::CapturePokemonError {
|
707 + | /* ServerOperationErrorGenerator.kt:111 */
|
708 + | fn from(variant: crate::error::ThrottlingError) -> crate::error::CapturePokemonError {
|
709 + | /* ServerOperationErrorGenerator.kt:112 */
|
710 + | Self::ThrottlingError(variant)
|
711 + | /* ServerOperationErrorGenerator.kt:111 */
|
712 + | }
|
713 + | /* ServerOperationErrorGenerator.kt:110 */
|
714 + | }
|
715 + | /* ServerOperationErrorGenerator.kt:110 */
|
716 + | impl ::std::convert::From<crate::error::ValidationException> for crate::error::CapturePokemonError {
|
717 + | /* ServerOperationErrorGenerator.kt:111 */
|
718 + | fn from(variant: crate::error::ValidationException) -> crate::error::CapturePokemonError {
|
719 + | /* ServerOperationErrorGenerator.kt:112 */
|
720 + | Self::ValidationException(variant)
|
721 + | /* ServerOperationErrorGenerator.kt:111 */
|
722 + | }
|
723 + | /* ServerOperationErrorGenerator.kt:110 */
|
724 + | }
|
725 + | /* ServerOperationErrorGenerator.kt:110 */
|
726 + | impl ::std::convert::From<crate::error::MasterBallUnsuccessful>
|
727 + | for crate::error::CapturePokemonError
|
728 + | {
|
729 + | /* ServerOperationErrorGenerator.kt:111 */
|
730 + | fn from(variant: crate::error::MasterBallUnsuccessful) -> crate::error::CapturePokemonError {
|
731 + | /* ServerOperationErrorGenerator.kt:112 */
|
732 + | Self::MasterBallUnsuccessful(variant)
|
733 + | /* ServerOperationErrorGenerator.kt:111 */
|
734 + | }
|
735 + | /* ServerOperationErrorGenerator.kt:110 */
|
736 + | }
|
737 + | /* ServerOperationErrorGenerator.kt:110 */
|
738 + | impl ::std::convert::From<crate::error::InvalidPokeballError>
|
739 + | for crate::error::CapturePokemonError
|
740 + | {
|
741 + | /* ServerOperationErrorGenerator.kt:111 */
|
742 + | fn from(variant: crate::error::InvalidPokeballError) -> crate::error::CapturePokemonError {
|
743 + | /* ServerOperationErrorGenerator.kt:112 */
|
744 + | Self::InvalidPokeballError(variant)
|
745 + | /* ServerOperationErrorGenerator.kt:111 */
|
746 + | }
|
747 + | /* ServerOperationErrorGenerator.kt:110 */
|
748 + | }
|
749 + |
|
750 + | /* StructureGenerator.kt:197 */
|
751 + | #[allow(missing_docs)] // documentation missing in model
|
752 + | /* RustType.kt:534 */
|
753 + | #[derive(
|
754 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
755 + | )]
|
756 + | pub /* StructureGenerator.kt:201 */ struct InvalidPokeballError {
|
757 + | /* StructureGenerator.kt:231 */
|
758 + | #[allow(missing_docs)] // documentation missing in model
|
759 + | pub pokeball: ::std::string::String,
|
760 + | /* StructureGenerator.kt:201 */
|
761 + | }
|
762 + | /* StructureGenerator.kt:135 */
|
763 + | impl InvalidPokeballError {
|
764 + | /* StructureGenerator.kt:231 */
|
765 + | #[allow(missing_docs)] // documentation missing in model
|
766 + | /* StructureGenerator.kt:166 */
|
767 + | pub fn pokeball(&self) -> &str {
|
768 + | /* StructureGenerator.kt:171 */
|
769 + | use std::ops::Deref;
|
770 + | self.pokeball.deref()
|
771 + | /* StructureGenerator.kt:166 */
|
772 + | }
|
773 + | /* StructureGenerator.kt:135 */
|
774 + | }
|
775 + | /* ErrorImplGenerator.kt:99 */
|
776 + | impl InvalidPokeballError {
|
777 + | /* ErrorImplGenerator.kt:141 */
|
778 + | #[doc(hidden)]
|
779 + | /// Returns the error name.
|
780 + | pub fn name(&self) -> &'static str {
|
781 + | "InvalidPokeballError"
|
782 + | }
|
783 + | /* ErrorImplGenerator.kt:99 */
|
784 + | }
|
785 + | /* ErrorImplGenerator.kt:153 */
|
786 + | impl ::std::fmt::Display for InvalidPokeballError {
|
787 + | /* ErrorImplGenerator.kt:154 */
|
788 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
789 + | /* ErrorImplGenerator.kt:161 */
|
790 + | ::std::write!(f, "InvalidPokeballError")?;
|
791 + | /* ErrorImplGenerator.kt:176 */
|
792 + | Ok(())
|
793 + | /* ErrorImplGenerator.kt:154 */
|
794 + | }
|
795 + | /* ErrorImplGenerator.kt:153 */
|
796 + | }
|
797 + | /* ErrorImplGenerator.kt:180 */
|
798 + | impl ::std::error::Error for InvalidPokeballError {}
|
799 + | /* ServerCodegenVisitor.kt:356 */
|
800 + | impl InvalidPokeballError {
|
801 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
802 + | /* ServerBuilderGenerator.kt:295 */
|
803 + | pub fn builder() -> crate::error::invalid_pokeball_error::Builder {
|
804 + | /* ServerBuilderGenerator.kt:296 */
|
805 + | crate::error::invalid_pokeball_error::Builder::default()
|
806 + | /* ServerBuilderGenerator.kt:295 */
|
807 + | }
|
808 + | /* ServerCodegenVisitor.kt:356 */
|
809 + | }
|
810 + |
|
811 + | /* StructureGenerator.kt:197 */
|
812 + | #[allow(missing_docs)] // documentation missing in model
|
813 + | /* RustType.kt:534 */
|
814 + | #[derive(
|
815 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
816 + | )]
|
817 + | pub /* StructureGenerator.kt:201 */ struct MasterBallUnsuccessful {
|
818 + | /* StructureGenerator.kt:231 */
|
819 + | #[allow(missing_docs)] // documentation missing in model
|
820 + | pub message: ::std::option::Option<::std::string::String>,
|
821 + | /* StructureGenerator.kt:201 */
|
822 + | }
|
823 + | /* ErrorImplGenerator.kt:99 */
|
824 + | impl MasterBallUnsuccessful {
|
825 + | /* ErrorImplGenerator.kt:128 */
|
826 + | /// Returns the error message.
|
827 + | pub fn message(&self) -> ::std::option::Option<&str> {
|
828 + | self.message.as_deref()
|
829 + | }
|
830 + | /* ErrorImplGenerator.kt:141 */
|
831 + | #[doc(hidden)]
|
832 + | /// Returns the error name.
|
833 + | pub fn name(&self) -> &'static str {
|
834 + | "MasterBallUnsuccessful"
|
835 + | }
|
836 + | /* ErrorImplGenerator.kt:99 */
|
837 + | }
|
838 + | /* ErrorImplGenerator.kt:153 */
|
839 + | impl ::std::fmt::Display for MasterBallUnsuccessful {
|
840 + | /* ErrorImplGenerator.kt:154 */
|
841 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
842 + | /* ErrorImplGenerator.kt:161 */
|
843 + | ::std::write!(f, "MasterBallUnsuccessful")?;
|
844 + | /* ErrorImplGenerator.kt:166 */
|
845 + | if let ::std::option::Option::Some(inner_1) = &self.message {
|
846 + | /* ErrorImplGenerator.kt:166 */
|
847 + | {
|
848 + | /* ErrorImplGenerator.kt:171 */
|
849 + | ::std::write!(f, ": {inner_1}")?;
|
850 + | /* ErrorImplGenerator.kt:166 */
|
851 + | }
|
852 + | /* ErrorImplGenerator.kt:166 */
|
853 + | }
|
854 + | /* ErrorImplGenerator.kt:176 */
|
855 + | Ok(())
|
856 + | /* ErrorImplGenerator.kt:154 */
|
857 + | }
|
858 + | /* ErrorImplGenerator.kt:153 */
|
859 + | }
|
860 + | /* ErrorImplGenerator.kt:180 */
|
861 + | impl ::std::error::Error for MasterBallUnsuccessful {}
|
862 + | /* ServerCodegenVisitor.kt:356 */
|
863 + | impl MasterBallUnsuccessful {
|
864 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
865 + | /* ServerBuilderGenerator.kt:295 */
|
866 + | pub fn builder() -> crate::error::master_ball_unsuccessful::Builder {
|
867 + | /* ServerBuilderGenerator.kt:296 */
|
868 + | crate::error::master_ball_unsuccessful::Builder::default()
|
869 + | /* ServerBuilderGenerator.kt:295 */
|
870 + | }
|
871 + | /* ServerCodegenVisitor.kt:356 */
|
872 + | }
|
873 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
874 + | impl crate::constrained::Constrained for crate::error::MasterBallUnsuccessful {
|
875 + | type Unconstrained = crate::error::master_ball_unsuccessful::Builder;
|
876 + | }
|
877 + |
|
878 + | /* StructureGenerator.kt:197 */
|
879 + | #[allow(missing_docs)] // documentation missing in model
|
880 + | /* RustType.kt:534 */
|
881 + | #[derive(
|
882 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
883 + | )]
|
884 + | pub /* StructureGenerator.kt:201 */ struct ThrottlingError {/* StructureGenerator.kt:201 */}
|
885 + | /* ErrorImplGenerator.kt:99 */
|
886 + | impl ThrottlingError {
|
887 + | /* ErrorImplGenerator.kt:141 */
|
888 + | #[doc(hidden)]
|
889 + | /// Returns the error name.
|
890 + | pub fn name(&self) -> &'static str {
|
891 + | "ThrottlingError"
|
892 + | }
|
893 + | /* ErrorImplGenerator.kt:99 */
|
894 + | }
|
895 + | /* ErrorImplGenerator.kt:153 */
|
896 + | impl ::std::fmt::Display for ThrottlingError {
|
897 + | /* ErrorImplGenerator.kt:154 */
|
898 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
899 + | /* ErrorImplGenerator.kt:161 */
|
900 + | ::std::write!(f, "ThrottlingError")?;
|
901 + | /* ErrorImplGenerator.kt:176 */
|
902 + | Ok(())
|
903 + | /* ErrorImplGenerator.kt:154 */
|
904 + | }
|
905 + | /* ErrorImplGenerator.kt:153 */
|
906 + | }
|
907 + | /* ErrorImplGenerator.kt:180 */
|
908 + | impl ::std::error::Error for ThrottlingError {}
|
909 + | /* ServerCodegenVisitor.kt:356 */
|
910 + | impl ThrottlingError {
|
911 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ThrottlingError`](crate::error::ThrottlingError).
|
912 + | /* ServerBuilderGenerator.kt:295 */
|
913 + | pub fn builder() -> crate::error::throttling_error::Builder {
|
914 + | /* ServerBuilderGenerator.kt:296 */
|
915 + | crate::error::throttling_error::Builder::default()
|
916 + | /* ServerBuilderGenerator.kt:295 */
|
917 + | }
|
918 + | /* ServerCodegenVisitor.kt:356 */
|
919 + | }
|
920 + |
|
921 + | /* StructureGenerator.kt:197 */
|
922 + | #[allow(missing_docs)] // documentation missing in model
|
923 + | /* RustType.kt:534 */
|
924 + | #[derive(
|
925 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
926 + | )]
|
927 + | pub /* StructureGenerator.kt:201 */ struct UnsupportedRegionError {
|
928 + | /* StructureGenerator.kt:231 */
|
929 + | #[allow(missing_docs)] // documentation missing in model
|
930 + | pub region: ::std::string::String,
|
931 + | /* StructureGenerator.kt:201 */
|
932 + | }
|
933 + | /* StructureGenerator.kt:135 */
|
934 + | impl UnsupportedRegionError {
|
935 + | /* StructureGenerator.kt:231 */
|
936 + | #[allow(missing_docs)] // documentation missing in model
|
937 + | /* StructureGenerator.kt:166 */
|
938 + | pub fn region(&self) -> &str {
|
939 + | /* StructureGenerator.kt:171 */
|
940 + | use std::ops::Deref;
|
941 + | self.region.deref()
|
942 + | /* StructureGenerator.kt:166 */
|
943 + | }
|
944 + | /* StructureGenerator.kt:135 */
|
945 + | }
|
946 + | /* ErrorImplGenerator.kt:99 */
|
947 + | impl UnsupportedRegionError {
|
948 + | /* ErrorImplGenerator.kt:141 */
|
949 + | #[doc(hidden)]
|
950 + | /// Returns the error name.
|
951 + | pub fn name(&self) -> &'static str {
|
952 + | "UnsupportedRegionError"
|
953 + | }
|
954 + | /* ErrorImplGenerator.kt:99 */
|
955 + | }
|
956 + | /* ErrorImplGenerator.kt:153 */
|
957 + | impl ::std::fmt::Display for UnsupportedRegionError {
|
958 + | /* ErrorImplGenerator.kt:154 */
|
959 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
960 + | /* ErrorImplGenerator.kt:161 */
|
961 + | ::std::write!(f, "UnsupportedRegionError")?;
|
962 + | /* ErrorImplGenerator.kt:176 */
|
963 + | Ok(())
|
964 + | /* ErrorImplGenerator.kt:154 */
|
965 + | }
|
966 + | /* ErrorImplGenerator.kt:153 */
|
967 + | }
|
968 + | /* ErrorImplGenerator.kt:180 */
|
969 + | impl ::std::error::Error for UnsupportedRegionError {}
|
970 + | /* ServerCodegenVisitor.kt:356 */
|
971 + | impl UnsupportedRegionError {
|
972 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
973 + | /* ServerBuilderGenerator.kt:295 */
|
974 + | pub fn builder() -> crate::error::unsupported_region_error::Builder {
|
975 + | /* ServerBuilderGenerator.kt:296 */
|
976 + | crate::error::unsupported_region_error::Builder::default()
|
977 + | /* ServerBuilderGenerator.kt:295 */
|
978 + | }
|
979 + | /* ServerCodegenVisitor.kt:356 */
|
980 + | }
|
981 + |
|
982 + | /* ServerOperationErrorGenerator.kt:63 */
|
983 + | /// Error type for the `CapturePokemonEvents` operation.
|
984 + | /* ServerOperationErrorGenerator.kt:64 */
|
985 + | /// Each variant represents an error that can occur for the `CapturePokemonEvents` operation.
|
986 + | /* RustType.kt:534 */
|
987 + | #[derive(::std::fmt::Debug)]
|
988 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum CapturePokemonEventsError {
|
989 + | /* ServerOperationErrorGenerator.kt:68 */
|
990 + | #[allow(missing_docs)] // documentation missing in model
|
991 + | /* ServerOperationErrorGenerator.kt:71 */
|
992 + | InvalidPokeballError(crate::error::InvalidPokeballError),
|
993 + | /* ServerOperationErrorGenerator.kt:68 */
|
994 + | #[allow(missing_docs)] // documentation missing in model
|
995 + | /* ServerOperationErrorGenerator.kt:71 */
|
996 + | ThrottlingError(crate::error::ThrottlingError),
|
997 + | /* ServerOperationErrorGenerator.kt:66 */
|
998 + | }
|
999 + | /* ServerOperationErrorGenerator.kt:75 */
|
1000 + | impl ::std::fmt::Display for CapturePokemonEventsError {
|
1001 + | /* ServerOperationErrorGenerator.kt:76 */
|
1002 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1003 + | /* ServerOperationErrorGenerator.kt:139 */
|
1004 + | match &self {
|
1005 + | /* ServerOperationErrorGenerator.kt:142 */
|
1006 + | CapturePokemonEventsError::InvalidPokeballError(_inner) =>
|
1007 + | /* ServerOperationErrorGenerator.kt:78 */
|
1008 + | {
|
1009 + | _inner.fmt(f)
|
1010 + | }
|
1011 + | ,
|
1012 + | /* ServerOperationErrorGenerator.kt:142 */
|
1013 + | CapturePokemonEventsError::ThrottlingError(_inner) =>
|
1014 + | /* ServerOperationErrorGenerator.kt:78 */
|
1015 + | {
|
1016 + | _inner.fmt(f)
|
1017 + | }
|
1018 + | /* ServerOperationErrorGenerator.kt:139 */
|
1019 + | }
|
1020 + | /* ServerOperationErrorGenerator.kt:76 */
|
1021 + | }
|
1022 + | /* ServerOperationErrorGenerator.kt:75 */
|
1023 + | }
|
1024 + | /* ServerOperationErrorGenerator.kt:83 */
|
1025 + | impl CapturePokemonEventsError {
|
1026 + | /* ServerOperationErrorGenerator.kt:87 */
|
1027 + | /// Returns `true` if the error kind is `CapturePokemonEventsError::InvalidPokeballError`.
|
1028 + | /* ServerOperationErrorGenerator.kt:88 */
|
1029 + | pub fn is_invalid_pokeball_error(&self) -> bool {
|
1030 + | /* ServerOperationErrorGenerator.kt:89 */
|
1031 + | matches!(&self, CapturePokemonEventsError::InvalidPokeballError(_))
|
1032 + | /* ServerOperationErrorGenerator.kt:88 */
|
1033 + | }
|
1034 + | /* ServerOperationErrorGenerator.kt:87 */
|
1035 + | /// Returns `true` if the error kind is `CapturePokemonEventsError::ThrottlingError`.
|
1036 + | /* ServerOperationErrorGenerator.kt:88 */
|
1037 + | pub fn is_throttling_error(&self) -> bool {
|
1038 + | /* ServerOperationErrorGenerator.kt:89 */
|
1039 + | matches!(&self, CapturePokemonEventsError::ThrottlingError(_))
|
1040 + | /* ServerOperationErrorGenerator.kt:88 */
|
1041 + | }
|
1042 + | /* ServerOperationErrorGenerator.kt:92 */
|
1043 + | /// Returns the error name string by matching the correct variant.
|
1044 + | /* ServerOperationErrorGenerator.kt:93 */
|
1045 + | pub fn name(&self) -> &'static str {
|
1046 + | /* ServerOperationErrorGenerator.kt:139 */
|
1047 + | match &self {
|
1048 + | /* ServerOperationErrorGenerator.kt:142 */
|
1049 + | CapturePokemonEventsError::InvalidPokeballError(_inner) =>
|
1050 + | /* ServerOperationErrorGenerator.kt:95 */
|
1051 + | {
|
1052 + | _inner.name()
|
1053 + | }
|
1054 + | ,
|
1055 + | /* ServerOperationErrorGenerator.kt:142 */
|
1056 + | CapturePokemonEventsError::ThrottlingError(_inner) =>
|
1057 + | /* ServerOperationErrorGenerator.kt:95 */
|
1058 + | {
|
1059 + | _inner.name()
|
1060 + | }
|
1061 + | /* ServerOperationErrorGenerator.kt:139 */
|
1062 + | }
|
1063 + | /* ServerOperationErrorGenerator.kt:93 */
|
1064 + | }
|
1065 + | /* ServerOperationErrorGenerator.kt:83 */
|
1066 + | }
|
1067 + | /* ServerOperationErrorGenerator.kt:100 */
|
1068 + | impl ::std::error::Error for CapturePokemonEventsError {
|
1069 + | /* ServerOperationErrorGenerator.kt:101 */
|
1070 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
1071 + | /* ServerOperationErrorGenerator.kt:139 */
|
1072 + | match &self {
|
1073 + | /* ServerOperationErrorGenerator.kt:142 */
|
1074 + | CapturePokemonEventsError::InvalidPokeballError(_inner) =>
|
1075 + | /* ServerOperationErrorGenerator.kt:103 */
|
1076 + | {
|
1077 + | Some(_inner)
|
1078 + | }
|
1079 + | ,
|
1080 + | /* ServerOperationErrorGenerator.kt:142 */
|
1081 + | CapturePokemonEventsError::ThrottlingError(_inner) =>
|
1082 + | /* ServerOperationErrorGenerator.kt:103 */
|
1083 + | {
|
1084 + | Some(_inner)
|
1085 + | }
|
1086 + | /* ServerOperationErrorGenerator.kt:139 */
|
1087 + | }
|
1088 + | /* ServerOperationErrorGenerator.kt:101 */
|
1089 + | }
|
1090 + | /* ServerOperationErrorGenerator.kt:100 */
|
1091 + | }
|
1092 + | /* ServerOperationErrorGenerator.kt:110 */
|
1093 + | impl ::std::convert::From<crate::error::InvalidPokeballError>
|
1094 + | for crate::error::CapturePokemonEventsError
|
1095 + | {
|
1096 + | /* ServerOperationErrorGenerator.kt:111 */
|
1097 + | fn from(
|
1098 + | variant: crate::error::InvalidPokeballError,
|
1099 + | ) -> crate::error::CapturePokemonEventsError {
|
1100 + | /* ServerOperationErrorGenerator.kt:112 */
|
1101 + | Self::InvalidPokeballError(variant)
|
1102 + | /* ServerOperationErrorGenerator.kt:111 */
|
1103 + | }
|
1104 + | /* ServerOperationErrorGenerator.kt:110 */
|
1105 + | }
|
1106 + | /* ServerOperationErrorGenerator.kt:110 */
|
1107 + | impl ::std::convert::From<crate::error::ThrottlingError>
|
1108 + | for crate::error::CapturePokemonEventsError
|
1109 + | {
|
1110 + | /* ServerOperationErrorGenerator.kt:111 */
|
1111 + | fn from(variant: crate::error::ThrottlingError) -> crate::error::CapturePokemonEventsError {
|
1112 + | /* ServerOperationErrorGenerator.kt:112 */
|
1113 + | Self::ThrottlingError(variant)
|
1114 + | /* ServerOperationErrorGenerator.kt:111 */
|
1115 + | }
|
1116 + | /* ServerOperationErrorGenerator.kt:110 */
|
1117 + | }
|
1118 + |
|
1119 + | /* ServerOperationErrorGenerator.kt:63 */
|
1120 + | /// Error type for the `AttemptCapturingPokemonEvent` operation.
|
1121 + | /* ServerOperationErrorGenerator.kt:64 */
|
1122 + | /// Each variant represents an error that can occur for the `AttemptCapturingPokemonEvent` operation.
|
1123 + | /* RustType.kt:534 */
|
1124 + | #[derive(::std::fmt::Debug)]
|
1125 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum AttemptCapturingPokemonEventError {
|
1126 + | /* ServerOperationErrorGenerator.kt:68 */
|
1127 + | #[allow(missing_docs)] // documentation missing in model
|
1128 + | /* ServerOperationErrorGenerator.kt:71 */
|
1129 + | MasterBallUnsuccessful(crate::error::MasterBallUnsuccessful),
|
1130 + | /* ServerOperationErrorGenerator.kt:66 */
|
1131 + | }
|
1132 + | /* ServerOperationErrorGenerator.kt:75 */
|
1133 + | impl ::std::fmt::Display for AttemptCapturingPokemonEventError {
|
1134 + | /* ServerOperationErrorGenerator.kt:76 */
|
1135 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1136 + | /* ServerOperationErrorGenerator.kt:139 */
|
1137 + | match &self {
|
1138 + | /* ServerOperationErrorGenerator.kt:142 */
|
1139 + | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_inner) =>
|
1140 + | /* ServerOperationErrorGenerator.kt:78 */
|
1141 + | {
|
1142 + | _inner.fmt(f)
|
1143 + | }
|
1144 + | /* ServerOperationErrorGenerator.kt:139 */
|
1145 + | }
|
1146 + | /* ServerOperationErrorGenerator.kt:76 */
|
1147 + | }
|
1148 + | /* ServerOperationErrorGenerator.kt:75 */
|
1149 + | }
|
1150 + | /* ServerOperationErrorGenerator.kt:83 */
|
1151 + | impl AttemptCapturingPokemonEventError {
|
1152 + | /* ServerOperationErrorGenerator.kt:87 */
|
1153 + | /// Returns `true` if the error kind is `AttemptCapturingPokemonEventError::MasterBallUnsuccessful`.
|
1154 + | /* ServerOperationErrorGenerator.kt:88 */
|
1155 + | pub fn is_master_ball_unsuccessful(&self) -> bool {
|
1156 + | /* ServerOperationErrorGenerator.kt:89 */
|
1157 + | matches!(
|
1158 + | &self,
|
1159 + | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_)
|
1160 + | )
|
1161 + | /* ServerOperationErrorGenerator.kt:88 */
|
1162 + | }
|
1163 + | /* ServerOperationErrorGenerator.kt:92 */
|
1164 + | /// Returns the error name string by matching the correct variant.
|
1165 + | /* ServerOperationErrorGenerator.kt:93 */
|
1166 + | pub fn name(&self) -> &'static str {
|
1167 + | /* ServerOperationErrorGenerator.kt:139 */
|
1168 + | match &self {
|
1169 + | /* ServerOperationErrorGenerator.kt:142 */
|
1170 + | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_inner) =>
|
1171 + | /* ServerOperationErrorGenerator.kt:95 */
|
1172 + | {
|
1173 + | _inner.name()
|
1174 + | }
|
1175 + | /* ServerOperationErrorGenerator.kt:139 */
|
1176 + | }
|
1177 + | /* ServerOperationErrorGenerator.kt:93 */
|
1178 + | }
|
1179 + | /* ServerOperationErrorGenerator.kt:83 */
|
1180 + | }
|
1181 + | /* ServerOperationErrorGenerator.kt:100 */
|
1182 + | impl ::std::error::Error for AttemptCapturingPokemonEventError {
|
1183 + | /* ServerOperationErrorGenerator.kt:101 */
|
1184 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
1185 + | /* ServerOperationErrorGenerator.kt:139 */
|
1186 + | match &self {
|
1187 + | /* ServerOperationErrorGenerator.kt:142 */
|
1188 + | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_inner) =>
|
1189 + | /* ServerOperationErrorGenerator.kt:103 */
|
1190 + | {
|
1191 + | Some(_inner)
|
1192 + | }
|
1193 + | /* ServerOperationErrorGenerator.kt:139 */
|
1194 + | }
|
1195 + | /* ServerOperationErrorGenerator.kt:101 */
|
1196 + | }
|
1197 + | /* ServerOperationErrorGenerator.kt:100 */
|
1198 + | }
|
1199 + | /* ServerOperationErrorGenerator.kt:110 */
|
1200 + | impl ::std::convert::From<crate::error::MasterBallUnsuccessful>
|
1201 + | for crate::error::AttemptCapturingPokemonEventError
|
1202 + | {
|
1203 + | /* ServerOperationErrorGenerator.kt:111 */
|
1204 + | fn from(
|
1205 + | variant: crate::error::MasterBallUnsuccessful,
|
1206 + | ) -> crate::error::AttemptCapturingPokemonEventError {
|
1207 + | /* ServerOperationErrorGenerator.kt:112 */
|
1208 + | Self::MasterBallUnsuccessful(variant)
|
1209 + | /* ServerOperationErrorGenerator.kt:111 */
|
1210 + | }
|
1211 + | /* ServerOperationErrorGenerator.kt:110 */
|
1212 + | }
|
1213 + |
|
1214 + | /// /* ServerBuilderGenerator.kt:171 */See [`ValidationException`](crate::error::ValidationException).
|
1215 + | pub mod validation_exception {
|
1216 + |
|
1217 + | /* RustType.kt:534 */
|
1218 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1219 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
1220 + | /* RustType.kt:534 */
|
1221 + | #[non_exhaustive]
|
1222 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1223 + | #[allow(clippy::enum_variant_names)]
|
1224 + | pub enum ConstraintViolation {
|
1225 + | /// /* ServerBuilderConstraintViolations.kt:137 */`message` was not provided but it is required when building `ValidationException`.
|
1226 + | /* ServerBuilderConstraintViolations.kt:144 */
|
1227 + | MissingMessage,
|
1228 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1229 + | }
|
1230 + | /* ServerBuilderConstraintViolations.kt:116 */
|
1231 + | impl ::std::fmt::Display for ConstraintViolation {
|
1232 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1233 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1234 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1235 + | match self {
|
1236 + | /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
1237 + | /* ServerBuilderConstraintViolations.kt:118 */}
|
1238 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1239 + | }
|
1240 + | /* ServerBuilderConstraintViolations.kt:116 */
|
1241 + | }
|
1242 + | /* ServerBuilderConstraintViolations.kt:83 */
|
1243 + | impl ::std::error::Error for ConstraintViolation {}
|
1244 + | /* ServerBuilderGenerator.kt:446 */
|
1245 + | impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
|
1246 + | type Error = ConstraintViolation;
|
1247 + |
|
1248 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1249 + | builder.build()
|
1250 + | }
|
1251 + | }
|
1252 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationException`](crate::error::ValidationException).
|
1253 + | /* RustType.kt:534 */
|
1254 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1255 + | /* ServerBuilderGenerator.kt:211 */
|
1256 + | pub struct Builder {
|
1257 + | /* ServerBuilderGenerator.kt:308 */
|
1258 + | pub(crate) message: ::std::option::Option<::std::string::String>,
|
1259 + | /* ServerBuilderGenerator.kt:308 */
|
1260 + | pub(crate) field_list:
|
1261 + | ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
1262 + | /* ServerBuilderGenerator.kt:211 */
|
1263 + | }
|
1264 + | /* ServerBuilderGenerator.kt:215 */
|
1265 + | impl Builder {
|
1266 + | /// /* ServerBuilderGenerator.kt:331 */A summary of the validation failure.
|
1267 + | /* ServerBuilderGenerator.kt:343 */
|
1268 + | pub fn message(mut self, input: ::std::string::String) -> Self {
|
1269 + | /* ServerBuilderGenerator.kt:344 */
|
1270 + | self.message =
|
1271 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1272 + | /* ServerBuilderGenerator.kt:376 */input
|
1273 + | /* ServerBuilderGenerator.kt:345 */)
|
1274 + | /* ServerBuilderGenerator.kt:344 */;
|
1275 + | self
|
1276 + | /* ServerBuilderGenerator.kt:343 */
|
1277 + | }
|
1278 + | /// /* ServerBuilderGenerator.kt:331 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
|
1279 + | /* ServerBuilderGenerator.kt:343 */
|
1280 + | pub fn field_list(
|
1281 + | mut self,
|
1282 + | input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
1283 + | ) -> Self {
|
1284 + | /* ServerBuilderGenerator.kt:344 */
|
1285 + | self.field_list =
|
1286 + | /* ServerBuilderGenerator.kt:376 */input
|
1287 + | /* ServerBuilderGenerator.kt:344 */;
|
1288 + | self
|
1289 + | /* ServerBuilderGenerator.kt:343 */
|
1290 + | }
|
1291 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
1292 + | /// /* ServerBuilderGenerator.kt:260 */
|
1293 + | /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if a [`ConstraintViolation`] occurs.
|
1294 + | ///
|
1295 + | /* ServerBuilderGenerator.kt:271 */
|
1296 + | pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
1297 + | self.build_enforcing_all_constraints()
|
1298 + | }
|
1299 + | /* ServerBuilderGenerator.kt:283 */
|
1300 + | fn build_enforcing_all_constraints(
|
1301 + | self,
|
1302 + | ) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
1303 + | /* ServerBuilderGenerator.kt:287 */
|
1304 + | Ok(
|
1305 + | /* ServerBuilderGenerator.kt:542 */
|
1306 + | crate::error::ValidationException {
|
1307 + | /* ServerBuilderGenerator.kt:546 */
|
1308 + | message: self
|
1309 + | .message
|
1310 + | /* ServerBuilderGenerator.kt:569 */
|
1311 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
1312 + | /* ServerBuilderGenerator.kt:546 */
|
1313 + | field_list: self.field_list,
|
1314 + | /* ServerBuilderGenerator.kt:542 */
|
1315 + | }, /* ServerBuilderGenerator.kt:287 */
|
1316 + | )
|
1317 + | /* ServerBuilderGenerator.kt:283 */
|
1318 + | }
|
1319 + | /* ServerBuilderGenerator.kt:215 */
|
1320 + | }
|
1321 + |
|
1322 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1323 + | }
|
1324 + | /// /* ServerBuilderGenerator.kt:171 */See [`StorageAccessNotAuthorized`](crate::error::StorageAccessNotAuthorized).
|
1325 + | pub mod storage_access_not_authorized {
|
1326 + |
|
1327 + | /* ServerBuilderGenerator.kt:461 */
|
1328 + | impl ::std::convert::From<Builder> for crate::error::StorageAccessNotAuthorized {
|
1329 + | fn from(builder: Builder) -> Self {
|
1330 + | builder.build()
|
1331 + | }
|
1332 + | }
|
1333 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`StorageAccessNotAuthorized`](crate::error::StorageAccessNotAuthorized).
|
1334 + | /* RustType.kt:534 */
|
1335 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1336 + | /* ServerBuilderGenerator.kt:211 */
|
1337 + | pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
1338 + | /* ServerBuilderGenerator.kt:215 */
|
1339 + | impl Builder {
|
1340 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StorageAccessNotAuthorized`](crate::error::StorageAccessNotAuthorized).
|
1341 + | /* ServerBuilderGenerator.kt:271 */
|
1342 + | pub fn build(self) -> crate::error::StorageAccessNotAuthorized {
|
1343 + | self.build_enforcing_all_constraints()
|
1344 + | }
|
1345 + | /* ServerBuilderGenerator.kt:283 */
|
1346 + | fn build_enforcing_all_constraints(self) -> crate::error::StorageAccessNotAuthorized {
|
1347 + | /* ServerBuilderGenerator.kt:542 */
|
1348 + | crate::error::StorageAccessNotAuthorized {
|
1349 + | /* ServerBuilderGenerator.kt:542 */}
|
1350 + | /* ServerBuilderGenerator.kt:283 */
|
1351 + | }
|
1352 + | /* ServerBuilderGenerator.kt:215 */
|
1353 + | }
|
1354 + |
|
1355 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1356 + | }
|
1357 + | /// /* ServerBuilderGenerator.kt:171 */See [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
1358 + | pub mod resource_not_found_exception {
|
1359 + |
|
1360 + | /* RustType.kt:534 */
|
1361 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1362 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
1363 + | /* RustType.kt:534 */
|
1364 + | #[non_exhaustive]
|
1365 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1366 + | #[allow(clippy::enum_variant_names)]
|
1367 + | pub enum ConstraintViolation {
|
1368 + | /// /* ServerBuilderConstraintViolations.kt:137 */`message` was not provided but it is required when building `ResourceNotFoundException`.
|
1369 + | /* ServerBuilderConstraintViolations.kt:144 */
|
1370 + | MissingMessage,
|
1371 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1372 + | }
|
1373 + | /* ServerBuilderConstraintViolations.kt:116 */
|
1374 + | impl ::std::fmt::Display for ConstraintViolation {
|
1375 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1376 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1377 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1378 + | match self {
|
1379 + | /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ResourceNotFoundException`"),
|
1380 + | /* ServerBuilderConstraintViolations.kt:118 */}
|
1381 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1382 + | }
|
1383 + | /* ServerBuilderConstraintViolations.kt:116 */
|
1384 + | }
|
1385 + | /* ServerBuilderConstraintViolations.kt:83 */
|
1386 + | impl ::std::error::Error for ConstraintViolation {}
|
1387 + | /* ServerBuilderGenerator.kt:446 */
|
1388 + | impl ::std::convert::TryFrom<Builder> for crate::error::ResourceNotFoundException {
|
1389 + | type Error = ConstraintViolation;
|
1390 + |
|
1391 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1392 + | builder.build()
|
1393 + | }
|
1394 + | }
|
1395 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
1396 + | /* RustType.kt:534 */
|
1397 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1398 + | /* ServerBuilderGenerator.kt:211 */
|
1399 + | pub struct Builder {
|
1400 + | /* ServerBuilderGenerator.kt:308 */
|
1401 + | pub(crate) message: ::std::option::Option<::std::string::String>,
|
1402 + | /* ServerBuilderGenerator.kt:211 */
|
1403 + | }
|
1404 + | /* ServerBuilderGenerator.kt:215 */
|
1405 + | impl Builder {
|
1406 + | /* ServerBuilderGenerator.kt:331 */
|
1407 + | #[allow(missing_docs)] // documentation missing in model
|
1408 + | /* ServerBuilderGenerator.kt:343 */
|
1409 + | pub fn message(mut self, input: ::std::string::String) -> Self {
|
1410 + | /* ServerBuilderGenerator.kt:344 */
|
1411 + | self.message =
|
1412 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1413 + | /* ServerBuilderGenerator.kt:376 */input
|
1414 + | /* ServerBuilderGenerator.kt:345 */)
|
1415 + | /* ServerBuilderGenerator.kt:344 */;
|
1416 + | self
|
1417 + | /* ServerBuilderGenerator.kt:343 */
|
1418 + | }
|
1419 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
1420 + | /// /* ServerBuilderGenerator.kt:260 */
|
1421 + | /// The builder fails to construct a [`ResourceNotFoundException`](crate::error::ResourceNotFoundException) if a [`ConstraintViolation`] occurs.
|
1422 + | ///
|
1423 + | /* ServerBuilderGenerator.kt:271 */
|
1424 + | pub fn build(self) -> Result<crate::error::ResourceNotFoundException, ConstraintViolation> {
|
1425 + | self.build_enforcing_all_constraints()
|
1426 + | }
|
1427 + | /* ServerBuilderGenerator.kt:283 */
|
1428 + | fn build_enforcing_all_constraints(
|
1429 + | self,
|
1430 + | ) -> Result<crate::error::ResourceNotFoundException, ConstraintViolation> {
|
1431 + | /* ServerBuilderGenerator.kt:287 */
|
1432 + | Ok(
|
1433 + | /* ServerBuilderGenerator.kt:542 */
|
1434 + | crate::error::ResourceNotFoundException {
|
1435 + | /* ServerBuilderGenerator.kt:546 */
|
1436 + | message: self
|
1437 + | .message
|
1438 + | /* ServerBuilderGenerator.kt:569 */
|
1439 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
1440 + | /* ServerBuilderGenerator.kt:542 */
|
1441 + | }, /* ServerBuilderGenerator.kt:287 */
|
1442 + | )
|
1443 + | /* ServerBuilderGenerator.kt:283 */
|
1444 + | }
|
1445 + | /* ServerBuilderGenerator.kt:215 */
|
1446 + | }
|
1447 + |
|
1448 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1449 + | }
|
1450 + | /// /* ServerBuilderGenerator.kt:171 */See [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
1451 + | pub mod invalid_pokeball_error {
|
1452 + |
|
1453 + | /* RustType.kt:534 */
|
1454 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1455 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
1456 + | /* RustType.kt:534 */
|
1457 + | #[non_exhaustive]
|
1458 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1459 + | #[allow(clippy::enum_variant_names)]
|
1460 + | pub enum ConstraintViolation {
|
1461 + | /// /* ServerBuilderConstraintViolations.kt:137 */`pokeball` was not provided but it is required when building `InvalidPokeballError`.
|
1462 + | /* ServerBuilderConstraintViolations.kt:144 */
|
1463 + | MissingPokeball,
|
1464 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1465 + | }
|
1466 + | /* ServerBuilderConstraintViolations.kt:116 */
|
1467 + | impl ::std::fmt::Display for ConstraintViolation {
|
1468 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1469 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1470 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1471 + | match self {
|
1472 + | /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingPokeball => write!(f, "`pokeball` was not provided but it is required when building `InvalidPokeballError`"),
|
1473 + | /* ServerBuilderConstraintViolations.kt:118 */}
|
1474 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1475 + | }
|
1476 + | /* ServerBuilderConstraintViolations.kt:116 */
|
1477 + | }
|
1478 + | /* ServerBuilderConstraintViolations.kt:83 */
|
1479 + | impl ::std::error::Error for ConstraintViolation {}
|
1480 + | /* ServerBuilderGenerator.kt:446 */
|
1481 + | impl ::std::convert::TryFrom<Builder> for crate::error::InvalidPokeballError {
|
1482 + | type Error = ConstraintViolation;
|
1483 + |
|
1484 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1485 + | builder.build()
|
1486 + | }
|
1487 + | }
|
1488 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
1489 + | /* RustType.kt:534 */
|
1490 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1491 + | /* ServerBuilderGenerator.kt:211 */
|
1492 + | pub struct Builder {
|
1493 + | /* ServerBuilderGenerator.kt:308 */
|
1494 + | pub(crate) pokeball: ::std::option::Option<::std::string::String>,
|
1495 + | /* ServerBuilderGenerator.kt:211 */
|
1496 + | }
|
1497 + | /* ServerBuilderGenerator.kt:215 */
|
1498 + | impl Builder {
|
1499 + | /* ServerBuilderGenerator.kt:331 */
|
1500 + | #[allow(missing_docs)] // documentation missing in model
|
1501 + | /* ServerBuilderGenerator.kt:343 */
|
1502 + | pub fn pokeball(mut self, input: ::std::string::String) -> Self {
|
1503 + | /* ServerBuilderGenerator.kt:344 */
|
1504 + | self.pokeball =
|
1505 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1506 + | /* ServerBuilderGenerator.kt:376 */input
|
1507 + | /* ServerBuilderGenerator.kt:345 */)
|
1508 + | /* ServerBuilderGenerator.kt:344 */;
|
1509 + | self
|
1510 + | /* ServerBuilderGenerator.kt:343 */
|
1511 + | }
|
1512 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
1513 + | /// /* ServerBuilderGenerator.kt:260 */
|
1514 + | /// The builder fails to construct a [`InvalidPokeballError`](crate::error::InvalidPokeballError) if a [`ConstraintViolation`] occurs.
|
1515 + | ///
|
1516 + | /* ServerBuilderGenerator.kt:271 */
|
1517 + | pub fn build(self) -> Result<crate::error::InvalidPokeballError, ConstraintViolation> {
|
1518 + | self.build_enforcing_all_constraints()
|
1519 + | }
|
1520 + | /* ServerBuilderGenerator.kt:283 */
|
1521 + | fn build_enforcing_all_constraints(
|
1522 + | self,
|
1523 + | ) -> Result<crate::error::InvalidPokeballError, ConstraintViolation> {
|
1524 + | /* ServerBuilderGenerator.kt:287 */
|
1525 + | Ok(
|
1526 + | /* ServerBuilderGenerator.kt:542 */
|
1527 + | crate::error::InvalidPokeballError {
|
1528 + | /* ServerBuilderGenerator.kt:546 */
|
1529 + | pokeball: self
|
1530 + | .pokeball
|
1531 + | /* ServerBuilderGenerator.kt:569 */
|
1532 + | .ok_or(ConstraintViolation::MissingPokeball)?,
|
1533 + | /* ServerBuilderGenerator.kt:542 */
|
1534 + | }, /* ServerBuilderGenerator.kt:287 */
|
1535 + | )
|
1536 + | /* ServerBuilderGenerator.kt:283 */
|
1537 + | }
|
1538 + | /* ServerBuilderGenerator.kt:215 */
|
1539 + | }
|
1540 + |
|
1541 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1542 + | }
|
1543 + | /// /* ServerBuilderGenerator.kt:171 */See [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
1544 + | pub mod master_ball_unsuccessful {
|
1545 + |
|
1546 + | /* ServerBuilderGenerator.kt:461 */
|
1547 + | impl ::std::convert::From<Builder> for crate::error::MasterBallUnsuccessful {
|
1548 + | fn from(builder: Builder) -> Self {
|
1549 + | builder.build()
|
1550 + | }
|
1551 + | }
|
1552 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
1553 + | /* RustType.kt:534 */
|
1554 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1555 + | /* ServerBuilderGenerator.kt:211 */
|
1556 + | pub struct Builder {
|
1557 + | /* ServerBuilderGenerator.kt:308 */
|
1558 + | pub(crate) message: ::std::option::Option<::std::string::String>,
|
1559 + | /* ServerBuilderGenerator.kt:211 */
|
1560 + | }
|
1561 + | /* ServerBuilderGenerator.kt:215 */
|
1562 + | impl Builder {
|
1563 + | /* ServerBuilderGenerator.kt:331 */
|
1564 + | #[allow(missing_docs)] // documentation missing in model
|
1565 + | /* ServerBuilderGenerator.kt:343 */
|
1566 + | pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1567 + | /* ServerBuilderGenerator.kt:344 */
|
1568 + | self.message =
|
1569 + | /* ServerBuilderGenerator.kt:376 */input
|
1570 + | /* ServerBuilderGenerator.kt:344 */;
|
1571 + | self
|
1572 + | /* ServerBuilderGenerator.kt:343 */
|
1573 + | }
|
1574 + | /* ServerBuilderGenerator.kt:426 */
|
1575 + | #[allow(missing_docs)] // documentation missing in model
|
1576 + | /* ServerBuilderGenerator.kt:428 */
|
1577 + | pub(crate) fn set_message(
|
1578 + | mut self,
|
1579 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
1580 + | ) -> Self {
|
1581 + | /* ServerBuilderGenerator.kt:429 */
|
1582 + | self.message = input.map(|v| v.into());
|
1583 + | self
|
1584 + | /* ServerBuilderGenerator.kt:428 */
|
1585 + | }
|
1586 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
1587 + | /* ServerBuilderGenerator.kt:271 */
|
1588 + | pub fn build(self) -> crate::error::MasterBallUnsuccessful {
|
1589 + | self.build_enforcing_all_constraints()
|
1590 + | }
|
1591 + | /* ServerBuilderGenerator.kt:283 */
|
1592 + | fn build_enforcing_all_constraints(self) -> crate::error::MasterBallUnsuccessful {
|
1593 + | /* ServerBuilderGenerator.kt:542 */
|
1594 + | crate::error::MasterBallUnsuccessful {
|
1595 + | /* ServerBuilderGenerator.kt:546 */
|
1596 + | message: self.message,
|
1597 + | /* ServerBuilderGenerator.kt:542 */
|
1598 + | }
|
1599 + | /* ServerBuilderGenerator.kt:283 */
|
1600 + | }
|
1601 + | /* ServerBuilderGenerator.kt:215 */
|
1602 + | }
|
1603 + |
|
1604 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1605 + | }
|
1606 + | /// /* ServerBuilderGenerator.kt:171 */See [`ThrottlingError`](crate::error::ThrottlingError).
|
1607 + | pub mod throttling_error {
|
1608 + |
|
1609 + | /* ServerBuilderGenerator.kt:461 */
|
1610 + | impl ::std::convert::From<Builder> for crate::error::ThrottlingError {
|
1611 + | fn from(builder: Builder) -> Self {
|
1612 + | builder.build()
|
1613 + | }
|
1614 + | }
|
1615 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ThrottlingError`](crate::error::ThrottlingError).
|
1616 + | /* RustType.kt:534 */
|
1617 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1618 + | /* ServerBuilderGenerator.kt:211 */
|
1619 + | pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
1620 + | /* ServerBuilderGenerator.kt:215 */
|
1621 + | impl Builder {
|
1622 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ThrottlingError`](crate::error::ThrottlingError).
|
1623 + | /* ServerBuilderGenerator.kt:271 */
|
1624 + | pub fn build(self) -> crate::error::ThrottlingError {
|
1625 + | self.build_enforcing_all_constraints()
|
1626 + | }
|
1627 + | /* ServerBuilderGenerator.kt:283 */
|
1628 + | fn build_enforcing_all_constraints(self) -> crate::error::ThrottlingError {
|
1629 + | /* ServerBuilderGenerator.kt:542 */
|
1630 + | crate::error::ThrottlingError {
|
1631 + | /* ServerBuilderGenerator.kt:542 */}
|
1632 + | /* ServerBuilderGenerator.kt:283 */
|
1633 + | }
|
1634 + | /* ServerBuilderGenerator.kt:215 */
|
1635 + | }
|
1636 + |
|
1637 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1638 + | }
|
1639 + | /// /* ServerBuilderGenerator.kt:171 */See [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
1640 + | pub mod unsupported_region_error {
|
1641 + |
|
1642 + | /* RustType.kt:534 */
|
1643 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1644 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
1645 + | /* RustType.kt:534 */
|
1646 + | #[non_exhaustive]
|
1647 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1648 + | #[allow(clippy::enum_variant_names)]
|
1649 + | pub enum ConstraintViolation {
|
1650 + | /// /* ServerBuilderConstraintViolations.kt:137 */`region` was not provided but it is required when building `UnsupportedRegionError`.
|
1651 + | /* ServerBuilderConstraintViolations.kt:144 */
|
1652 + | MissingRegion,
|
1653 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1654 + | }
|
1655 + | /* ServerBuilderConstraintViolations.kt:116 */
|
1656 + | impl ::std::fmt::Display for ConstraintViolation {
|
1657 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1658 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1659 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1660 + | match self {
|
1661 + | /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingRegion => write!(f, "`region` was not provided but it is required when building `UnsupportedRegionError`"),
|
1662 + | /* ServerBuilderConstraintViolations.kt:118 */}
|
1663 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1664 + | }
|
1665 + | /* ServerBuilderConstraintViolations.kt:116 */
|
1666 + | }
|
1667 + | /* ServerBuilderConstraintViolations.kt:83 */
|
1668 + | impl ::std::error::Error for ConstraintViolation {}
|
1669 + | /* ServerBuilderGenerator.kt:446 */
|
1670 + | impl ::std::convert::TryFrom<Builder> for crate::error::UnsupportedRegionError {
|
1671 + | type Error = ConstraintViolation;
|
1672 + |
|
1673 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1674 + | builder.build()
|
1675 + | }
|
1676 + | }
|
1677 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
1678 + | /* RustType.kt:534 */
|
1679 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1680 + | /* ServerBuilderGenerator.kt:211 */
|
1681 + | pub struct Builder {
|
1682 + | /* ServerBuilderGenerator.kt:308 */
|
1683 + | pub(crate) region: ::std::option::Option<::std::string::String>,
|
1684 + | /* ServerBuilderGenerator.kt:211 */
|
1685 + | }
|
1686 + | /* ServerBuilderGenerator.kt:215 */
|
1687 + | impl Builder {
|
1688 + | /* ServerBuilderGenerator.kt:331 */
|
1689 + | #[allow(missing_docs)] // documentation missing in model
|
1690 + | /* ServerBuilderGenerator.kt:343 */
|
1691 + | pub fn region(mut self, input: ::std::string::String) -> Self {
|
1692 + | /* ServerBuilderGenerator.kt:344 */
|
1693 + | self.region =
|
1694 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1695 + | /* ServerBuilderGenerator.kt:376 */input
|
1696 + | /* ServerBuilderGenerator.kt:345 */)
|
1697 + | /* ServerBuilderGenerator.kt:344 */;
|
1698 + | self
|
1699 + | /* ServerBuilderGenerator.kt:343 */
|
1700 + | }
|
1701 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
1702 + | /// /* ServerBuilderGenerator.kt:260 */
|
1703 + | /// The builder fails to construct a [`UnsupportedRegionError`](crate::error::UnsupportedRegionError) if a [`ConstraintViolation`] occurs.
|
1704 + | ///
|
1705 + | /* ServerBuilderGenerator.kt:271 */
|
1706 + | pub fn build(self) -> Result<crate::error::UnsupportedRegionError, ConstraintViolation> {
|
1707 + | self.build_enforcing_all_constraints()
|
1708 + | }
|
1709 + | /* ServerBuilderGenerator.kt:283 */
|
1710 + | fn build_enforcing_all_constraints(
|
1711 + | self,
|
1712 + | ) -> Result<crate::error::UnsupportedRegionError, ConstraintViolation> {
|
1713 + | /* ServerBuilderGenerator.kt:287 */
|
1714 + | Ok(
|
1715 + | /* ServerBuilderGenerator.kt:542 */
|
1716 + | crate::error::UnsupportedRegionError {
|
1717 + | /* ServerBuilderGenerator.kt:546 */
|
1718 + | region: self
|
1719 + | .region
|
1720 + | /* ServerBuilderGenerator.kt:569 */
|
1721 + | .ok_or(ConstraintViolation::MissingRegion)?,
|
1722 + | /* ServerBuilderGenerator.kt:542 */
|
1723 + | }, /* ServerBuilderGenerator.kt:287 */
|
1724 + | )
|
1725 + | /* ServerBuilderGenerator.kt:283 */
|
1726 + | }
|
1727 + | /* ServerBuilderGenerator.kt:215 */
|
1728 + | }
|
1729 + |
|
1730 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1731 + | }
|