1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 2 |
|
3 + | /* ServerOperationErrorGenerator.kt:63 */
|
3 4 | /// Error type for the `CapturePokemon` operation.
|
5 + | /* ServerOperationErrorGenerator.kt:64 */
|
4 6 | /// Each variant represents an error that can occur for the `CapturePokemon` operation.
|
7 + | /* RustType.kt:516 */
|
5 8 | #[derive(::std::fmt::Debug)]
|
6 - | pub enum CapturePokemonError {
|
7 - | /// 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.
|
9 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum CapturePokemonError {
|
10 + | /// /* 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.
|
11 + | /* ServerOperationErrorGenerator.kt:71 */
|
8 12 | ValidationException(crate::error::ValidationException),
|
13 + | /* ServerOperationErrorGenerator.kt:68 */
|
9 14 | #[allow(missing_docs)] // documentation missing in model
|
15 + | /* ServerOperationErrorGenerator.kt:71 */
|
10 16 | MasterBallUnsuccessful(crate::error::MasterBallUnsuccessful),
|
17 + | /* ServerOperationErrorGenerator.kt:68 */
|
11 18 | #[allow(missing_docs)] // documentation missing in model
|
19 + | /* ServerOperationErrorGenerator.kt:71 */
|
12 20 | InvalidPokeballError(crate::error::InvalidPokeballError),
|
21 + | /* ServerOperationErrorGenerator.kt:68 */
|
13 22 | #[allow(missing_docs)] // documentation missing in model
|
23 + | /* ServerOperationErrorGenerator.kt:71 */
|
14 24 | ThrottlingError(crate::error::ThrottlingError),
|
25 + | /* ServerOperationErrorGenerator.kt:68 */
|
15 26 | #[allow(missing_docs)] // documentation missing in model
|
27 + | /* ServerOperationErrorGenerator.kt:71 */
|
16 28 | UnsupportedRegionError(crate::error::UnsupportedRegionError),
|
29 + | /* ServerOperationErrorGenerator.kt:66 */
|
17 30 | }
|
31 + | /* ServerOperationErrorGenerator.kt:75 */
|
18 32 | impl ::std::fmt::Display for CapturePokemonError {
|
33 + | /* ServerOperationErrorGenerator.kt:76 */
|
19 34 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
35 + | /* ServerOperationErrorGenerator.kt:139 */
|
20 36 | match &self {
|
21 - | CapturePokemonError::ValidationException(_inner) => _inner.fmt(f),
|
22 - | CapturePokemonError::MasterBallUnsuccessful(_inner) => _inner.fmt(f),
|
23 - | CapturePokemonError::InvalidPokeballError(_inner) => _inner.fmt(f),
|
24 - | CapturePokemonError::ThrottlingError(_inner) => _inner.fmt(f),
|
25 - | CapturePokemonError::UnsupportedRegionError(_inner) => _inner.fmt(f),
|
37 + | /* ServerOperationErrorGenerator.kt:142 */
|
38 + | CapturePokemonError::ValidationException(_inner) =>
|
39 + | /* ServerOperationErrorGenerator.kt:78 */
|
40 + | {
|
41 + | _inner.fmt(f)
|
42 + | }
|
43 + | ,
|
44 + | /* ServerOperationErrorGenerator.kt:142 */
|
45 + | CapturePokemonError::MasterBallUnsuccessful(_inner) =>
|
46 + | /* ServerOperationErrorGenerator.kt:78 */
|
47 + | {
|
48 + | _inner.fmt(f)
|
49 + | }
|
50 + | ,
|
51 + | /* ServerOperationErrorGenerator.kt:142 */
|
52 + | CapturePokemonError::InvalidPokeballError(_inner) =>
|
53 + | /* ServerOperationErrorGenerator.kt:78 */
|
54 + | {
|
55 + | _inner.fmt(f)
|
56 + | }
|
57 + | ,
|
58 + | /* ServerOperationErrorGenerator.kt:142 */
|
59 + | CapturePokemonError::ThrottlingError(_inner) =>
|
60 + | /* ServerOperationErrorGenerator.kt:78 */
|
61 + | {
|
62 + | _inner.fmt(f)
|
63 + | }
|
64 + | ,
|
65 + | /* ServerOperationErrorGenerator.kt:142 */
|
66 + | CapturePokemonError::UnsupportedRegionError(_inner) =>
|
67 + | /* ServerOperationErrorGenerator.kt:78 */
|
68 + | {
|
69 + | _inner.fmt(f)
|
70 + | }
|
71 + | /* ServerOperationErrorGenerator.kt:139 */
|
26 72 | }
|
73 + | /* ServerOperationErrorGenerator.kt:76 */
|
27 74 | }
|
75 + | /* ServerOperationErrorGenerator.kt:75 */
|
28 76 | }
|
77 + | /* ServerOperationErrorGenerator.kt:83 */
|
29 78 | impl CapturePokemonError {
|
79 + | /* ServerOperationErrorGenerator.kt:87 */
|
30 80 | /// Returns `true` if the error kind is `CapturePokemonError::ValidationException`.
|
81 + | /* ServerOperationErrorGenerator.kt:88 */
|
31 82 | pub fn is_validation_exception(&self) -> bool {
|
83 + | /* ServerOperationErrorGenerator.kt:89 */
|
32 84 | matches!(&self, CapturePokemonError::ValidationException(_))
|
85 + | /* ServerOperationErrorGenerator.kt:88 */
|
33 86 | }
|
87 + | /* ServerOperationErrorGenerator.kt:87 */
|
34 88 | /// Returns `true` if the error kind is `CapturePokemonError::MasterBallUnsuccessful`.
|
89 + | /* ServerOperationErrorGenerator.kt:88 */
|
35 90 | pub fn is_master_ball_unsuccessful(&self) -> bool {
|
91 + | /* ServerOperationErrorGenerator.kt:89 */
|
36 92 | matches!(&self, CapturePokemonError::MasterBallUnsuccessful(_))
|
93 + | /* ServerOperationErrorGenerator.kt:88 */
|
37 94 | }
|
95 + | /* ServerOperationErrorGenerator.kt:87 */
|
38 96 | /// Returns `true` if the error kind is `CapturePokemonError::InvalidPokeballError`.
|
97 + | /* ServerOperationErrorGenerator.kt:88 */
|
39 98 | pub fn is_invalid_pokeball_error(&self) -> bool {
|
99 + | /* ServerOperationErrorGenerator.kt:89 */
|
40 100 | matches!(&self, CapturePokemonError::InvalidPokeballError(_))
|
101 + | /* ServerOperationErrorGenerator.kt:88 */
|
41 102 | }
|
103 + | /* ServerOperationErrorGenerator.kt:87 */
|
42 104 | /// Returns `true` if the error kind is `CapturePokemonError::ThrottlingError`.
|
105 + | /* ServerOperationErrorGenerator.kt:88 */
|
43 106 | pub fn is_throttling_error(&self) -> bool {
|
107 + | /* ServerOperationErrorGenerator.kt:89 */
|
44 108 | matches!(&self, CapturePokemonError::ThrottlingError(_))
|
109 + | /* ServerOperationErrorGenerator.kt:88 */
|
45 110 | }
|
111 + | /* ServerOperationErrorGenerator.kt:87 */
|
46 112 | /// Returns `true` if the error kind is `CapturePokemonError::UnsupportedRegionError`.
|
113 + | /* ServerOperationErrorGenerator.kt:88 */
|
47 114 | pub fn is_unsupported_region_error(&self) -> bool {
|
115 + | /* ServerOperationErrorGenerator.kt:89 */
|
48 116 | matches!(&self, CapturePokemonError::UnsupportedRegionError(_))
|
117 + | /* ServerOperationErrorGenerator.kt:88 */
|
49 118 | }
|
119 + | /* ServerOperationErrorGenerator.kt:92 */
|
50 120 | /// Returns the error name string by matching the correct variant.
|
121 + | /* ServerOperationErrorGenerator.kt:93 */
|
51 122 | pub fn name(&self) -> &'static str {
|
123 + | /* ServerOperationErrorGenerator.kt:139 */
|
52 124 | match &self {
|
53 - | CapturePokemonError::ValidationException(_inner) => _inner.name(),
|
54 - | CapturePokemonError::MasterBallUnsuccessful(_inner) => _inner.name(),
|
55 - | CapturePokemonError::InvalidPokeballError(_inner) => _inner.name(),
|
56 - | CapturePokemonError::ThrottlingError(_inner) => _inner.name(),
|
57 - | CapturePokemonError::UnsupportedRegionError(_inner) => _inner.name(),
|
125 + | /* ServerOperationErrorGenerator.kt:142 */
|
126 + | CapturePokemonError::ValidationException(_inner) =>
|
127 + | /* ServerOperationErrorGenerator.kt:95 */
|
128 + | {
|
129 + | _inner.name()
|
130 + | }
|
131 + | ,
|
132 + | /* ServerOperationErrorGenerator.kt:142 */
|
133 + | CapturePokemonError::MasterBallUnsuccessful(_inner) =>
|
134 + | /* ServerOperationErrorGenerator.kt:95 */
|
135 + | {
|
136 + | _inner.name()
|
137 + | }
|
138 + | ,
|
139 + | /* ServerOperationErrorGenerator.kt:142 */
|
140 + | CapturePokemonError::InvalidPokeballError(_inner) =>
|
141 + | /* ServerOperationErrorGenerator.kt:95 */
|
142 + | {
|
143 + | _inner.name()
|
58 144 | }
|
145 + | ,
|
146 + | /* ServerOperationErrorGenerator.kt:142 */
|
147 + | CapturePokemonError::ThrottlingError(_inner) =>
|
148 + | /* ServerOperationErrorGenerator.kt:95 */
|
149 + | {
|
150 + | _inner.name()
|
59 151 | }
|
152 + | ,
|
153 + | /* ServerOperationErrorGenerator.kt:142 */
|
154 + | CapturePokemonError::UnsupportedRegionError(_inner) =>
|
155 + | /* ServerOperationErrorGenerator.kt:95 */
|
156 + | {
|
157 + | _inner.name()
|
158 + | }
|
159 + | /* ServerOperationErrorGenerator.kt:139 */
|
160 + | }
|
161 + | /* ServerOperationErrorGenerator.kt:93 */
|
162 + | }
|
163 + | /* ServerOperationErrorGenerator.kt:83 */
|
60 164 | }
|
165 + | /* ServerOperationErrorGenerator.kt:100 */
|
61 166 | impl ::std::error::Error for CapturePokemonError {
|
167 + | /* ServerOperationErrorGenerator.kt:101 */
|
62 168 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
169 + | /* ServerOperationErrorGenerator.kt:139 */
|
63 170 | match &self {
|
64 - | CapturePokemonError::ValidationException(_inner) => Some(_inner),
|
65 - | CapturePokemonError::MasterBallUnsuccessful(_inner) => Some(_inner),
|
66 - | CapturePokemonError::InvalidPokeballError(_inner) => Some(_inner),
|
67 - | CapturePokemonError::ThrottlingError(_inner) => Some(_inner),
|
68 - | CapturePokemonError::UnsupportedRegionError(_inner) => Some(_inner),
|
171 + | /* ServerOperationErrorGenerator.kt:142 */
|
172 + | CapturePokemonError::ValidationException(_inner) =>
|
173 + | /* ServerOperationErrorGenerator.kt:103 */
|
174 + | {
|
175 + | Some(_inner)
|
176 + | }
|
177 + | ,
|
178 + | /* ServerOperationErrorGenerator.kt:142 */
|
179 + | CapturePokemonError::MasterBallUnsuccessful(_inner) =>
|
180 + | /* ServerOperationErrorGenerator.kt:103 */
|
181 + | {
|
182 + | Some(_inner)
|
69 183 | }
|
184 + | ,
|
185 + | /* ServerOperationErrorGenerator.kt:142 */
|
186 + | CapturePokemonError::InvalidPokeballError(_inner) =>
|
187 + | /* ServerOperationErrorGenerator.kt:103 */
|
188 + | {
|
189 + | Some(_inner)
|
70 190 | }
|
191 + | ,
|
192 + | /* ServerOperationErrorGenerator.kt:142 */
|
193 + | CapturePokemonError::ThrottlingError(_inner) =>
|
194 + | /* ServerOperationErrorGenerator.kt:103 */
|
195 + | {
|
196 + | Some(_inner)
|
197 + | }
|
198 + | ,
|
199 + | /* ServerOperationErrorGenerator.kt:142 */
|
200 + | CapturePokemonError::UnsupportedRegionError(_inner) =>
|
201 + | /* ServerOperationErrorGenerator.kt:103 */
|
202 + | {
|
203 + | Some(_inner)
|
204 + | }
|
205 + | /* ServerOperationErrorGenerator.kt:139 */
|
206 + | }
|
207 + | /* ServerOperationErrorGenerator.kt:101 */
|
208 + | }
|
209 + | /* ServerOperationErrorGenerator.kt:100 */
|
71 210 | }
|
211 + | /* ServerOperationErrorGenerator.kt:110 */
|
72 212 | impl ::std::convert::From<crate::error::ValidationException> for crate::error::CapturePokemonError {
|
213 + | /* ServerOperationErrorGenerator.kt:111 */
|
73 214 | fn from(variant: crate::error::ValidationException) -> crate::error::CapturePokemonError {
|
215 + | /* ServerOperationErrorGenerator.kt:112 */
|
74 216 | Self::ValidationException(variant)
|
217 + | /* ServerOperationErrorGenerator.kt:111 */
|
75 218 | }
|
219 + | /* ServerOperationErrorGenerator.kt:110 */
|
76 220 | }
|
221 + | /* ServerOperationErrorGenerator.kt:110 */
|
77 222 | impl ::std::convert::From<crate::error::MasterBallUnsuccessful>
|
78 223 | for crate::error::CapturePokemonError
|
79 224 | {
|
225 + | /* ServerOperationErrorGenerator.kt:111 */
|
80 226 | fn from(variant: crate::error::MasterBallUnsuccessful) -> crate::error::CapturePokemonError {
|
227 + | /* ServerOperationErrorGenerator.kt:112 */
|
81 228 | Self::MasterBallUnsuccessful(variant)
|
229 + | /* ServerOperationErrorGenerator.kt:111 */
|
82 230 | }
|
231 + | /* ServerOperationErrorGenerator.kt:110 */
|
83 232 | }
|
233 + | /* ServerOperationErrorGenerator.kt:110 */
|
84 234 | impl ::std::convert::From<crate::error::InvalidPokeballError>
|
85 235 | for crate::error::CapturePokemonError
|
86 236 | {
|
237 + | /* ServerOperationErrorGenerator.kt:111 */
|
87 238 | fn from(variant: crate::error::InvalidPokeballError) -> crate::error::CapturePokemonError {
|
239 + | /* ServerOperationErrorGenerator.kt:112 */
|
88 240 | Self::InvalidPokeballError(variant)
|
241 + | /* ServerOperationErrorGenerator.kt:111 */
|
89 242 | }
|
243 + | /* ServerOperationErrorGenerator.kt:110 */
|
90 244 | }
|
245 + | /* ServerOperationErrorGenerator.kt:110 */
|
91 246 | impl ::std::convert::From<crate::error::ThrottlingError> for crate::error::CapturePokemonError {
|
247 + | /* ServerOperationErrorGenerator.kt:111 */
|
92 248 | fn from(variant: crate::error::ThrottlingError) -> crate::error::CapturePokemonError {
|
249 + | /* ServerOperationErrorGenerator.kt:112 */
|
93 250 | Self::ThrottlingError(variant)
|
251 + | /* ServerOperationErrorGenerator.kt:111 */
|
94 252 | }
|
253 + | /* ServerOperationErrorGenerator.kt:110 */
|
95 254 | }
|
255 + | /* ServerOperationErrorGenerator.kt:110 */
|
96 256 | impl ::std::convert::From<crate::error::UnsupportedRegionError>
|
97 257 | for crate::error::CapturePokemonError
|
98 258 | {
|
259 + | /* ServerOperationErrorGenerator.kt:111 */
|
99 260 | fn from(variant: crate::error::UnsupportedRegionError) -> crate::error::CapturePokemonError {
|
261 + | /* ServerOperationErrorGenerator.kt:112 */
|
100 262 | Self::UnsupportedRegionError(variant)
|
263 + | /* ServerOperationErrorGenerator.kt:111 */
|
101 264 | }
|
265 + | /* ServerOperationErrorGenerator.kt:110 */
|
102 266 | }
|
103 267 |
|
268 + | /* StructureGenerator.kt:197 */
|
104 269 | #[allow(missing_docs)] // documentation missing in model
|
270 + | /* RustType.kt:516 */
|
105 271 | #[derive(
|
106 272 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
107 273 | )]
|
108 - | pub struct UnsupportedRegionError {
|
274 + | pub /* StructureGenerator.kt:201 */ struct UnsupportedRegionError {
|
275 + | /* StructureGenerator.kt:231 */
|
109 276 | #[allow(missing_docs)] // documentation missing in model
|
110 277 | pub region: ::std::string::String,
|
278 + | /* StructureGenerator.kt:201 */
|
111 279 | }
|
280 + | /* StructureGenerator.kt:135 */
|
112 281 | impl UnsupportedRegionError {
|
282 + | /* StructureGenerator.kt:231 */
|
113 283 | #[allow(missing_docs)] // documentation missing in model
|
284 + | /* StructureGenerator.kt:166 */
|
114 285 | pub fn region(&self) -> &str {
|
286 + | /* StructureGenerator.kt:171 */
|
115 287 | use std::ops::Deref;
|
116 288 | self.region.deref()
|
289 + | /* StructureGenerator.kt:166 */
|
117 290 | }
|
291 + | /* StructureGenerator.kt:135 */
|
118 292 | }
|
293 + | /* ErrorImplGenerator.kt:99 */
|
119 294 | impl UnsupportedRegionError {
|
295 + | /* ErrorImplGenerator.kt:141 */
|
120 296 | #[doc(hidden)]
|
121 297 | /// Returns the error name.
|
122 298 | pub fn name(&self) -> &'static str {
|
123 299 | "UnsupportedRegionError"
|
124 300 | }
|
301 + | /* ErrorImplGenerator.kt:99 */
|
125 302 | }
|
303 + | /* ErrorImplGenerator.kt:153 */
|
126 304 | impl ::std::fmt::Display for UnsupportedRegionError {
|
305 + | /* ErrorImplGenerator.kt:154 */
|
127 306 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
307 + | /* ErrorImplGenerator.kt:161 */
|
128 308 | ::std::write!(f, "UnsupportedRegionError")?;
|
309 + | /* ErrorImplGenerator.kt:171 */
|
129 310 | Ok(())
|
311 + | /* ErrorImplGenerator.kt:154 */
|
130 312 | }
|
313 + | /* ErrorImplGenerator.kt:153 */
|
131 314 | }
|
315 + | /* ErrorImplGenerator.kt:175 */
|
132 316 | impl ::std::error::Error for UnsupportedRegionError {}
|
317 + | /* ServerCodegenVisitor.kt:345 */
|
133 318 | impl UnsupportedRegionError {
|
134 - | /// Creates a new builder-style object to manufacture [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
319 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
320 + | /* ServerBuilderGenerator.kt:295 */
|
135 321 | pub fn builder() -> crate::error::unsupported_region_error::Builder {
|
322 + | /* ServerBuilderGenerator.kt:296 */
|
136 323 | crate::error::unsupported_region_error::Builder::default()
|
324 + | /* ServerBuilderGenerator.kt:295 */
|
137 325 | }
|
326 + | /* ServerCodegenVisitor.kt:345 */
|
138 327 | }
|
139 328 |
|
329 + | /* StructureGenerator.kt:197 */
|
140 330 | #[allow(missing_docs)] // documentation missing in model
|
331 + | /* RustType.kt:516 */
|
141 332 | #[derive(
|
142 333 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
143 334 | )]
|
144 - | pub struct ThrottlingError {}
|
335 + | pub /* StructureGenerator.kt:201 */ struct ThrottlingError {/* StructureGenerator.kt:201 */}
|
336 + | /* ErrorImplGenerator.kt:99 */
|
145 337 | impl ThrottlingError {
|
338 + | /* ErrorImplGenerator.kt:141 */
|
146 339 | #[doc(hidden)]
|
147 340 | /// Returns the error name.
|
148 341 | pub fn name(&self) -> &'static str {
|
149 342 | "ThrottlingError"
|
150 343 | }
|
344 + | /* ErrorImplGenerator.kt:99 */
|
151 345 | }
|
346 + | /* ErrorImplGenerator.kt:153 */
|
152 347 | impl ::std::fmt::Display for ThrottlingError {
|
348 + | /* ErrorImplGenerator.kt:154 */
|
153 349 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
350 + | /* ErrorImplGenerator.kt:161 */
|
154 351 | ::std::write!(f, "ThrottlingError")?;
|
352 + | /* ErrorImplGenerator.kt:171 */
|
155 353 | Ok(())
|
354 + | /* ErrorImplGenerator.kt:154 */
|
156 355 | }
|
356 + | /* ErrorImplGenerator.kt:153 */
|
157 357 | }
|
358 + | /* ErrorImplGenerator.kt:175 */
|
158 359 | impl ::std::error::Error for ThrottlingError {}
|
360 + | /* ServerCodegenVisitor.kt:345 */
|
159 361 | impl ThrottlingError {
|
160 - | /// Creates a new builder-style object to manufacture [`ThrottlingError`](crate::error::ThrottlingError).
|
362 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ThrottlingError`](crate::error::ThrottlingError).
|
363 + | /* ServerBuilderGenerator.kt:295 */
|
161 364 | pub fn builder() -> crate::error::throttling_error::Builder {
|
365 + | /* ServerBuilderGenerator.kt:296 */
|
162 366 | crate::error::throttling_error::Builder::default()
|
367 + | /* ServerBuilderGenerator.kt:295 */
|
163 368 | }
|
369 + | /* ServerCodegenVisitor.kt:345 */
|
164 370 | }
|
165 371 |
|
372 + | /* StructureGenerator.kt:197 */
|
166 373 | #[allow(missing_docs)] // documentation missing in model
|
374 + | /* RustType.kt:516 */
|
167 375 | #[derive(
|
168 376 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
169 377 | )]
|
170 - | pub struct InvalidPokeballError {
|
378 + | pub /* StructureGenerator.kt:201 */ struct InvalidPokeballError {
|
379 + | /* StructureGenerator.kt:231 */
|
171 380 | #[allow(missing_docs)] // documentation missing in model
|
172 381 | pub pokeball: ::std::string::String,
|
382 + | /* StructureGenerator.kt:201 */
|
173 383 | }
|
384 + | /* StructureGenerator.kt:135 */
|
174 385 | impl InvalidPokeballError {
|
386 + | /* StructureGenerator.kt:231 */
|
175 387 | #[allow(missing_docs)] // documentation missing in model
|
388 + | /* StructureGenerator.kt:166 */
|
176 389 | pub fn pokeball(&self) -> &str {
|
390 + | /* StructureGenerator.kt:171 */
|
177 391 | use std::ops::Deref;
|
178 392 | self.pokeball.deref()
|
393 + | /* StructureGenerator.kt:166 */
|
179 394 | }
|
395 + | /* StructureGenerator.kt:135 */
|
180 396 | }
|
397 + | /* ErrorImplGenerator.kt:99 */
|
181 398 | impl InvalidPokeballError {
|
399 + | /* ErrorImplGenerator.kt:141 */
|
182 400 | #[doc(hidden)]
|
183 401 | /// Returns the error name.
|
184 402 | pub fn name(&self) -> &'static str {
|
185 403 | "InvalidPokeballError"
|
186 404 | }
|
405 + | /* ErrorImplGenerator.kt:99 */
|
187 406 | }
|
407 + | /* ErrorImplGenerator.kt:153 */
|
188 408 | impl ::std::fmt::Display for InvalidPokeballError {
|
409 + | /* ErrorImplGenerator.kt:154 */
|
189 410 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
411 + | /* ErrorImplGenerator.kt:161 */
|
190 412 | ::std::write!(f, "InvalidPokeballError")?;
|
413 + | /* ErrorImplGenerator.kt:171 */
|
191 414 | Ok(())
|
415 + | /* ErrorImplGenerator.kt:154 */
|
192 416 | }
|
417 + | /* ErrorImplGenerator.kt:153 */
|
193 418 | }
|
419 + | /* ErrorImplGenerator.kt:175 */
|
194 420 | impl ::std::error::Error for InvalidPokeballError {}
|
421 + | /* ServerCodegenVisitor.kt:345 */
|
195 422 | impl InvalidPokeballError {
|
196 - | /// Creates a new builder-style object to manufacture [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
423 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
424 + | /* ServerBuilderGenerator.kt:295 */
|
197 425 | pub fn builder() -> crate::error::invalid_pokeball_error::Builder {
|
426 + | /* ServerBuilderGenerator.kt:296 */
|
198 427 | crate::error::invalid_pokeball_error::Builder::default()
|
428 + | /* ServerBuilderGenerator.kt:295 */
|
199 429 | }
|
430 + | /* ServerCodegenVisitor.kt:345 */
|
200 431 | }
|
201 432 |
|
433 + | /* StructureGenerator.kt:197 */
|
202 434 | #[allow(missing_docs)] // documentation missing in model
|
435 + | /* RustType.kt:516 */
|
203 436 | #[derive(
|
204 437 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
205 438 | )]
|
206 - | pub struct MasterBallUnsuccessful {
|
439 + | pub /* StructureGenerator.kt:201 */ struct MasterBallUnsuccessful {
|
440 + | /* StructureGenerator.kt:231 */
|
207 441 | #[allow(missing_docs)] // documentation missing in model
|
208 442 | pub message: ::std::option::Option<::std::string::String>,
|
443 + | /* StructureGenerator.kt:201 */
|
209 444 | }
|
445 + | /* ErrorImplGenerator.kt:99 */
|
210 446 | impl MasterBallUnsuccessful {
|
447 + | /* ErrorImplGenerator.kt:128 */
|
211 448 | /// Returns the error message.
|
212 449 | pub fn message(&self) -> ::std::option::Option<&str> {
|
213 450 | self.message.as_deref()
|
214 451 | }
|
452 + | /* ErrorImplGenerator.kt:141 */
|
215 453 | #[doc(hidden)]
|
216 454 | /// Returns the error name.
|
217 455 | pub fn name(&self) -> &'static str {
|
218 456 | "MasterBallUnsuccessful"
|
219 457 | }
|
458 + | /* ErrorImplGenerator.kt:99 */
|
220 459 | }
|
460 + | /* ErrorImplGenerator.kt:153 */
|
221 461 | impl ::std::fmt::Display for MasterBallUnsuccessful {
|
462 + | /* ErrorImplGenerator.kt:154 */
|
222 463 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
464 + | /* ErrorImplGenerator.kt:161 */
|
223 465 | ::std::write!(f, "MasterBallUnsuccessful")?;
|
466 + | /* ErrorImplGenerator.kt:166 */
|
224 467 | if let ::std::option::Option::Some(inner_1) = &self.message {
|
468 + | /* ErrorImplGenerator.kt:166 */
|
225 469 | {
|
470 + | /* ErrorImplGenerator.kt:167 */
|
226 471 | ::std::write!(f, ": {}", inner_1)?;
|
472 + | /* ErrorImplGenerator.kt:166 */
|
227 473 | }
|
474 + | /* ErrorImplGenerator.kt:166 */
|
228 475 | }
|
476 + | /* ErrorImplGenerator.kt:171 */
|
229 477 | Ok(())
|
478 + | /* ErrorImplGenerator.kt:154 */
|
230 479 | }
|
480 + | /* ErrorImplGenerator.kt:153 */
|
231 481 | }
|
482 + | /* ErrorImplGenerator.kt:175 */
|
232 483 | impl ::std::error::Error for MasterBallUnsuccessful {}
|
484 + | /* ServerCodegenVisitor.kt:345 */
|
233 485 | impl MasterBallUnsuccessful {
|
234 - | /// Creates a new builder-style object to manufacture [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
486 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
487 + | /* ServerBuilderGenerator.kt:295 */
|
235 488 | pub fn builder() -> crate::error::master_ball_unsuccessful::Builder {
|
489 + | /* ServerBuilderGenerator.kt:296 */
|
236 490 | crate::error::master_ball_unsuccessful::Builder::default()
|
491 + | /* ServerBuilderGenerator.kt:295 */
|
237 492 | }
|
493 + | /* ServerCodegenVisitor.kt:345 */
|
238 494 | }
|
495 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
239 496 | impl crate::constrained::Constrained for crate::error::MasterBallUnsuccessful {
|
240 497 | type Unconstrained = crate::error::master_ball_unsuccessful::Builder;
|
241 498 | }
|
242 499 |
|
243 - | /// 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.
|
500 + | /// /* 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.
|
501 + | /* RustType.kt:516 */
|
244 502 | #[derive(
|
245 503 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
246 504 | )]
|
247 - | pub struct ValidationException {
|
248 - | /// A summary of the validation failure.
|
505 + | pub /* StructureGenerator.kt:201 */ struct ValidationException {
|
506 + | /// /* StructureGenerator.kt:231 */A summary of the validation failure.
|
249 507 | pub message: ::std::string::String,
|
250 - | /// 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.
|
508 + | /// /* 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.
|
251 509 | pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
510 + | /* StructureGenerator.kt:201 */
|
252 511 | }
|
512 + | /* StructureGenerator.kt:135 */
|
253 513 | impl ValidationException {
|
254 - | /// 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.
|
514 + | /// /* 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.
|
515 + | /* StructureGenerator.kt:166 */
|
255 516 | pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
|
517 + | /* StructureGenerator.kt:169 */
|
256 518 | self.field_list.as_deref()
|
519 + | /* StructureGenerator.kt:166 */
|
257 520 | }
|
521 + | /* StructureGenerator.kt:135 */
|
258 522 | }
|
523 + | /* ErrorImplGenerator.kt:99 */
|
259 524 | impl ValidationException {
|
525 + | /* ErrorImplGenerator.kt:128 */
|
260 526 | /// Returns the error message.
|
261 527 | pub fn message(&self) -> &str {
|
262 528 | &self.message
|
263 529 | }
|
530 + | /* ErrorImplGenerator.kt:141 */
|
264 531 | #[doc(hidden)]
|
265 532 | /// Returns the error name.
|
266 533 | pub fn name(&self) -> &'static str {
|
267 534 | "ValidationException"
|
268 535 | }
|
536 + | /* ErrorImplGenerator.kt:99 */
|
269 537 | }
|
538 + | /* ErrorImplGenerator.kt:153 */
|
270 539 | impl ::std::fmt::Display for ValidationException {
|
540 + | /* ErrorImplGenerator.kt:154 */
|
271 541 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
542 + | /* ErrorImplGenerator.kt:161 */
|
272 543 | ::std::write!(f, "ValidationException")?;
|
544 + | /* ErrorImplGenerator.kt:166 */
|
273 545 | {
|
546 + | /* ErrorImplGenerator.kt:167 */
|
274 547 | ::std::write!(f, ": {}", &self.message)?;
|
548 + | /* ErrorImplGenerator.kt:166 */
|
275 549 | }
|
550 + | /* ErrorImplGenerator.kt:171 */
|
276 551 | Ok(())
|
552 + | /* ErrorImplGenerator.kt:154 */
|
277 553 | }
|
554 + | /* ErrorImplGenerator.kt:153 */
|
278 555 | }
|
556 + | /* ErrorImplGenerator.kt:175 */
|
279 557 | impl ::std::error::Error for ValidationException {}
|
558 + | /* ServerCodegenVisitor.kt:345 */
|
280 559 | impl ValidationException {
|
281 - | /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
560 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
561 + | /* ServerBuilderGenerator.kt:295 */
|
282 562 | pub fn builder() -> crate::error::validation_exception::Builder {
|
563 + | /* ServerBuilderGenerator.kt:296 */
|
283 564 | crate::error::validation_exception::Builder::default()
|
565 + | /* ServerBuilderGenerator.kt:295 */
|
284 566 | }
|
567 + | /* ServerCodegenVisitor.kt:345 */
|
285 568 | }
|
286 569 |
|
570 + | /* ServerOperationErrorGenerator.kt:63 */
|
287 571 | /// Error type for the `CapturePokemonEvents` operation.
|
572 + | /* ServerOperationErrorGenerator.kt:64 */
|
288 573 | /// Each variant represents an error that can occur for the `CapturePokemonEvents` operation.
|
574 + | /* RustType.kt:516 */
|
289 575 | #[derive(::std::fmt::Debug)]
|
290 - | pub enum CapturePokemonEventsError {
|
576 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum CapturePokemonEventsError {
|
577 + | /* ServerOperationErrorGenerator.kt:68 */
|
291 578 | #[allow(missing_docs)] // documentation missing in model
|
579 + | /* ServerOperationErrorGenerator.kt:71 */
|
292 580 | InvalidPokeballError(crate::error::InvalidPokeballError),
|
581 + | /* ServerOperationErrorGenerator.kt:68 */
|
293 582 | #[allow(missing_docs)] // documentation missing in model
|
583 + | /* ServerOperationErrorGenerator.kt:71 */
|
294 584 | ThrottlingError(crate::error::ThrottlingError),
|
585 + | /* ServerOperationErrorGenerator.kt:66 */
|
295 586 | }
|
587 + | /* ServerOperationErrorGenerator.kt:75 */
|
296 588 | impl ::std::fmt::Display for CapturePokemonEventsError {
|
589 + | /* ServerOperationErrorGenerator.kt:76 */
|
297 590 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
591 + | /* ServerOperationErrorGenerator.kt:139 */
|
298 592 | match &self {
|
299 - | CapturePokemonEventsError::InvalidPokeballError(_inner) => _inner.fmt(f),
|
300 - | CapturePokemonEventsError::ThrottlingError(_inner) => _inner.fmt(f),
|
593 + | /* ServerOperationErrorGenerator.kt:142 */
|
594 + | CapturePokemonEventsError::InvalidPokeballError(_inner) =>
|
595 + | /* ServerOperationErrorGenerator.kt:78 */
|
596 + | {
|
597 + | _inner.fmt(f)
|
301 598 | }
|
599 + | ,
|
600 + | /* ServerOperationErrorGenerator.kt:142 */
|
601 + | CapturePokemonEventsError::ThrottlingError(_inner) =>
|
602 + | /* ServerOperationErrorGenerator.kt:78 */
|
603 + | {
|
604 + | _inner.fmt(f)
|
605 + | }
|
606 + | /* ServerOperationErrorGenerator.kt:139 */
|
302 607 | }
|
608 + | /* ServerOperationErrorGenerator.kt:76 */
|
609 + | }
|
610 + | /* ServerOperationErrorGenerator.kt:75 */
|
303 611 | }
|
612 + | /* ServerOperationErrorGenerator.kt:83 */
|
304 613 | impl CapturePokemonEventsError {
|
614 + | /* ServerOperationErrorGenerator.kt:87 */
|
305 615 | /// Returns `true` if the error kind is `CapturePokemonEventsError::InvalidPokeballError`.
|
616 + | /* ServerOperationErrorGenerator.kt:88 */
|
306 617 | pub fn is_invalid_pokeball_error(&self) -> bool {
|
618 + | /* ServerOperationErrorGenerator.kt:89 */
|
307 619 | matches!(&self, CapturePokemonEventsError::InvalidPokeballError(_))
|
620 + | /* ServerOperationErrorGenerator.kt:88 */
|
308 621 | }
|
622 + | /* ServerOperationErrorGenerator.kt:87 */
|
309 623 | /// Returns `true` if the error kind is `CapturePokemonEventsError::ThrottlingError`.
|
624 + | /* ServerOperationErrorGenerator.kt:88 */
|
310 625 | pub fn is_throttling_error(&self) -> bool {
|
626 + | /* ServerOperationErrorGenerator.kt:89 */
|
311 627 | matches!(&self, CapturePokemonEventsError::ThrottlingError(_))
|
628 + | /* ServerOperationErrorGenerator.kt:88 */
|
312 629 | }
|
630 + | /* ServerOperationErrorGenerator.kt:92 */
|
313 631 | /// Returns the error name string by matching the correct variant.
|
632 + | /* ServerOperationErrorGenerator.kt:93 */
|
314 633 | pub fn name(&self) -> &'static str {
|
634 + | /* ServerOperationErrorGenerator.kt:139 */
|
315 635 | match &self {
|
316 - | CapturePokemonEventsError::InvalidPokeballError(_inner) => _inner.name(),
|
317 - | CapturePokemonEventsError::ThrottlingError(_inner) => _inner.name(),
|
636 + | /* ServerOperationErrorGenerator.kt:142 */
|
637 + | CapturePokemonEventsError::InvalidPokeballError(_inner) =>
|
638 + | /* ServerOperationErrorGenerator.kt:95 */
|
639 + | {
|
640 + | _inner.name()
|
318 641 | }
|
642 + | ,
|
643 + | /* ServerOperationErrorGenerator.kt:142 */
|
644 + | CapturePokemonEventsError::ThrottlingError(_inner) =>
|
645 + | /* ServerOperationErrorGenerator.kt:95 */
|
646 + | {
|
647 + | _inner.name()
|
648 + | }
|
649 + | /* ServerOperationErrorGenerator.kt:139 */
|
319 650 | }
|
651 + | /* ServerOperationErrorGenerator.kt:93 */
|
652 + | }
|
653 + | /* ServerOperationErrorGenerator.kt:83 */
|
320 654 | }
|
655 + | /* ServerOperationErrorGenerator.kt:100 */
|
321 656 | impl ::std::error::Error for CapturePokemonEventsError {
|
657 + | /* ServerOperationErrorGenerator.kt:101 */
|
322 658 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
659 + | /* ServerOperationErrorGenerator.kt:139 */
|
323 660 | match &self {
|
324 - | CapturePokemonEventsError::InvalidPokeballError(_inner) => Some(_inner),
|
325 - | CapturePokemonEventsError::ThrottlingError(_inner) => Some(_inner),
|
661 + | /* ServerOperationErrorGenerator.kt:142 */
|
662 + | CapturePokemonEventsError::InvalidPokeballError(_inner) =>
|
663 + | /* ServerOperationErrorGenerator.kt:103 */
|
664 + | {
|
665 + | Some(_inner)
|
326 666 | }
|
667 + | ,
|
668 + | /* ServerOperationErrorGenerator.kt:142 */
|
669 + | CapturePokemonEventsError::ThrottlingError(_inner) =>
|
670 + | /* ServerOperationErrorGenerator.kt:103 */
|
671 + | {
|
672 + | Some(_inner)
|
673 + | }
|
674 + | /* ServerOperationErrorGenerator.kt:139 */
|
327 675 | }
|
676 + | /* ServerOperationErrorGenerator.kt:101 */
|
677 + | }
|
678 + | /* ServerOperationErrorGenerator.kt:100 */
|
328 679 | }
|
680 + | /* ServerOperationErrorGenerator.kt:110 */
|
329 681 | impl ::std::convert::From<crate::error::InvalidPokeballError>
|
330 682 | for crate::error::CapturePokemonEventsError
|
331 683 | {
|
684 + | /* ServerOperationErrorGenerator.kt:111 */
|
332 685 | fn from(
|
333 686 | variant: crate::error::InvalidPokeballError,
|
334 687 | ) -> crate::error::CapturePokemonEventsError {
|
688 + | /* ServerOperationErrorGenerator.kt:112 */
|
335 689 | Self::InvalidPokeballError(variant)
|
690 + | /* ServerOperationErrorGenerator.kt:111 */
|
336 691 | }
|
692 + | /* ServerOperationErrorGenerator.kt:110 */
|
337 693 | }
|
694 + | /* ServerOperationErrorGenerator.kt:110 */
|
338 695 | impl ::std::convert::From<crate::error::ThrottlingError>
|
339 696 | for crate::error::CapturePokemonEventsError
|
340 697 | {
|
698 + | /* ServerOperationErrorGenerator.kt:111 */
|
341 699 | fn from(variant: crate::error::ThrottlingError) -> crate::error::CapturePokemonEventsError {
|
700 + | /* ServerOperationErrorGenerator.kt:112 */
|
342 701 | Self::ThrottlingError(variant)
|
702 + | /* ServerOperationErrorGenerator.kt:111 */
|
343 703 | }
|
704 + | /* ServerOperationErrorGenerator.kt:110 */
|
344 705 | }
|
345 706 |
|
707 + | /* ServerOperationErrorGenerator.kt:63 */
|
346 708 | /// Error type for the `AttemptCapturingPokemonEvent` operation.
|
709 + | /* ServerOperationErrorGenerator.kt:64 */
|
347 710 | /// Each variant represents an error that can occur for the `AttemptCapturingPokemonEvent` operation.
|
711 + | /* RustType.kt:516 */
|
348 712 | #[derive(::std::fmt::Debug)]
|
349 - | pub enum AttemptCapturingPokemonEventError {
|
713 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum AttemptCapturingPokemonEventError {
|
714 + | /* ServerOperationErrorGenerator.kt:68 */
|
350 715 | #[allow(missing_docs)] // documentation missing in model
|
716 + | /* ServerOperationErrorGenerator.kt:71 */
|
351 717 | MasterBallUnsuccessful(crate::error::MasterBallUnsuccessful),
|
718 + | /* ServerOperationErrorGenerator.kt:66 */
|
352 719 | }
|
720 + | /* ServerOperationErrorGenerator.kt:75 */
|
353 721 | impl ::std::fmt::Display for AttemptCapturingPokemonEventError {
|
722 + | /* ServerOperationErrorGenerator.kt:76 */
|
354 723 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
724 + | /* ServerOperationErrorGenerator.kt:139 */
|
355 725 | match &self {
|
356 - | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_inner) => _inner.fmt(f),
|
726 + | /* ServerOperationErrorGenerator.kt:142 */
|
727 + | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_inner) =>
|
728 + | /* ServerOperationErrorGenerator.kt:78 */
|
729 + | {
|
730 + | _inner.fmt(f)
|
357 731 | }
|
732 + | /* ServerOperationErrorGenerator.kt:139 */
|
358 733 | }
|
734 + | /* ServerOperationErrorGenerator.kt:76 */
|
735 + | }
|
736 + | /* ServerOperationErrorGenerator.kt:75 */
|
359 737 | }
|
738 + | /* ServerOperationErrorGenerator.kt:83 */
|
360 739 | impl AttemptCapturingPokemonEventError {
|
740 + | /* ServerOperationErrorGenerator.kt:87 */
|
361 741 | /// Returns `true` if the error kind is `AttemptCapturingPokemonEventError::MasterBallUnsuccessful`.
|
742 + | /* ServerOperationErrorGenerator.kt:88 */
|
362 743 | pub fn is_master_ball_unsuccessful(&self) -> bool {
|
744 + | /* ServerOperationErrorGenerator.kt:89 */
|
363 745 | matches!(
|
364 746 | &self,
|
365 747 | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_)
|
366 748 | )
|
749 + | /* ServerOperationErrorGenerator.kt:88 */
|
367 750 | }
|
751 + | /* ServerOperationErrorGenerator.kt:92 */
|
368 752 | /// Returns the error name string by matching the correct variant.
|
753 + | /* ServerOperationErrorGenerator.kt:93 */
|
369 754 | pub fn name(&self) -> &'static str {
|
755 + | /* ServerOperationErrorGenerator.kt:139 */
|
370 756 | match &self {
|
371 - | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_inner) => _inner.name(),
|
757 + | /* ServerOperationErrorGenerator.kt:142 */
|
758 + | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_inner) =>
|
759 + | /* ServerOperationErrorGenerator.kt:95 */
|
760 + | {
|
761 + | _inner.name()
|
372 762 | }
|
763 + | /* ServerOperationErrorGenerator.kt:139 */
|
373 764 | }
|
765 + | /* ServerOperationErrorGenerator.kt:93 */
|
766 + | }
|
767 + | /* ServerOperationErrorGenerator.kt:83 */
|
374 768 | }
|
769 + | /* ServerOperationErrorGenerator.kt:100 */
|
375 770 | impl ::std::error::Error for AttemptCapturingPokemonEventError {
|
771 + | /* ServerOperationErrorGenerator.kt:101 */
|
376 772 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
773 + | /* ServerOperationErrorGenerator.kt:139 */
|
377 774 | match &self {
|
378 - | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_inner) => Some(_inner),
|
775 + | /* ServerOperationErrorGenerator.kt:142 */
|
776 + | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_inner) =>
|
777 + | /* ServerOperationErrorGenerator.kt:103 */
|
778 + | {
|
779 + | Some(_inner)
|
379 780 | }
|
781 + | /* ServerOperationErrorGenerator.kt:139 */
|
380 782 | }
|
783 + | /* ServerOperationErrorGenerator.kt:101 */
|
784 + | }
|
785 + | /* ServerOperationErrorGenerator.kt:100 */
|
381 786 | }
|
787 + | /* ServerOperationErrorGenerator.kt:110 */
|
382 788 | impl ::std::convert::From<crate::error::MasterBallUnsuccessful>
|
383 789 | for crate::error::AttemptCapturingPokemonEventError
|
384 790 | {
|
791 + | /* ServerOperationErrorGenerator.kt:111 */
|
385 792 | fn from(
|
386 793 | variant: crate::error::MasterBallUnsuccessful,
|
387 794 | ) -> crate::error::AttemptCapturingPokemonEventError {
|
795 + | /* ServerOperationErrorGenerator.kt:112 */
|
388 796 | Self::MasterBallUnsuccessful(variant)
|
797 + | /* ServerOperationErrorGenerator.kt:111 */
|
389 798 | }
|
799 + | /* ServerOperationErrorGenerator.kt:110 */
|
390 800 | }
|
391 801 |
|
392 - | /// See [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
802 + | /// /* ServerBuilderGenerator.kt:171 */See [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
393 803 | pub mod unsupported_region_error {
|
394 804 |
|
805 + | /* RustType.kt:516 */
|
395 806 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
396 - | /// Holds one variant for each of the ways the builder can fail.
|
807 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
808 + | /* RustType.kt:516 */
|
397 809 | #[non_exhaustive]
|
810 + | /* ServerBuilderConstraintViolations.kt:75 */
|
398 811 | #[allow(clippy::enum_variant_names)]
|
399 812 | pub enum ConstraintViolation {
|
400 - | /// `region` was not provided but it is required when building `UnsupportedRegionError`.
|
813 + | /// /* ServerBuilderConstraintViolations.kt:138 */`region` was not provided but it is required when building `UnsupportedRegionError`.
|
814 + | /* ServerBuilderConstraintViolations.kt:143 */
|
401 815 | MissingRegion,
|
816 + | /* ServerBuilderConstraintViolations.kt:75 */
|
402 817 | }
|
818 + | /* ServerBuilderConstraintViolations.kt:117 */
|
403 819 | impl ::std::fmt::Display for ConstraintViolation {
|
820 + | /* ServerBuilderConstraintViolations.kt:118 */
|
404 821 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
822 + | /* ServerBuilderConstraintViolations.kt:119 */
|
405 823 | match self {
|
406 - | ConstraintViolation::MissingRegion => write!(f, "`region` was not provided but it is required when building `UnsupportedRegionError`"),
|
407 - | }
|
824 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRegion => write!(f, "`region` was not provided but it is required when building `UnsupportedRegionError`"),
|
825 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
826 + | /* ServerBuilderConstraintViolations.kt:118 */
|
408 827 | }
|
828 + | /* ServerBuilderConstraintViolations.kt:117 */
|
409 829 | }
|
830 + | /* ServerBuilderConstraintViolations.kt:84 */
|
410 831 | impl ::std::error::Error for ConstraintViolation {}
|
832 + | /* ServerBuilderGenerator.kt:446 */
|
411 833 | impl ::std::convert::TryFrom<Builder> for crate::error::UnsupportedRegionError {
|
412 834 | type Error = ConstraintViolation;
|
413 835 |
|
414 836 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
415 837 | builder.build()
|
416 838 | }
|
417 839 | }
|
418 - | /// A builder for [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
840 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
841 + | /* RustType.kt:516 */
|
419 842 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
843 + | /* ServerBuilderGenerator.kt:211 */
|
420 844 | pub struct Builder {
|
845 + | /* ServerBuilderGenerator.kt:308 */
|
421 846 | pub(crate) region: ::std::option::Option<::std::string::String>,
|
847 + | /* ServerBuilderGenerator.kt:211 */
|
422 848 | }
|
849 + | /* ServerBuilderGenerator.kt:215 */
|
423 850 | impl Builder {
|
851 + | /* ServerBuilderGenerator.kt:331 */
|
424 852 | #[allow(missing_docs)] // documentation missing in model
|
853 + | /* ServerBuilderGenerator.kt:343 */
|
425 854 | pub fn region(mut self, input: ::std::string::String) -> Self {
|
426 - | self.region = Some(input);
|
855 + | /* ServerBuilderGenerator.kt:344 */
|
856 + | self.region =
|
857 + | /* ServerBuilderGenerator.kt:345 */Some(
|
858 + | /* ServerBuilderGenerator.kt:376 */input
|
859 + | /* ServerBuilderGenerator.kt:345 */)
|
860 + | /* ServerBuilderGenerator.kt:344 */;
|
427 861 | self
|
862 + | /* ServerBuilderGenerator.kt:343 */
|
428 863 | }
|
429 - | /// Consumes the builder and constructs a [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
430 - | ///
|
864 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
865 + | /// /* ServerBuilderGenerator.kt:260 */
|
431 866 | /// The builder fails to construct a [`UnsupportedRegionError`](crate::error::UnsupportedRegionError) if a [`ConstraintViolation`] occurs.
|
432 867 | ///
|
868 + | /* ServerBuilderGenerator.kt:271 */
|
433 869 | pub fn build(self) -> Result<crate::error::UnsupportedRegionError, ConstraintViolation> {
|
434 870 | self.build_enforcing_all_constraints()
|
435 871 | }
|
872 + | /* ServerBuilderGenerator.kt:283 */
|
436 873 | fn build_enforcing_all_constraints(
|
437 874 | self,
|
438 875 | ) -> Result<crate::error::UnsupportedRegionError, ConstraintViolation> {
|
439 - | Ok(crate::error::UnsupportedRegionError {
|
440 - | region: self.region.ok_or(ConstraintViolation::MissingRegion)?,
|
441 - | })
|
876 + | /* ServerBuilderGenerator.kt:287 */
|
877 + | Ok(
|
878 + | /* ServerBuilderGenerator.kt:542 */
|
879 + | crate::error::UnsupportedRegionError {
|
880 + | /* ServerBuilderGenerator.kt:546 */
|
881 + | region: self
|
882 + | .region
|
883 + | /* ServerBuilderGenerator.kt:569 */
|
884 + | .ok_or(ConstraintViolation::MissingRegion)?,
|
885 + | /* ServerBuilderGenerator.kt:542 */
|
886 + | }, /* ServerBuilderGenerator.kt:287 */
|
887 + | )
|
888 + | /* ServerBuilderGenerator.kt:283 */
|
442 889 | }
|
890 + | /* ServerBuilderGenerator.kt:215 */
|
443 891 | }
|
892 + |
|
893 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
444 894 | }
|
445 - | /// See [`ThrottlingError`](crate::error::ThrottlingError).
|
895 + | /// /* ServerBuilderGenerator.kt:171 */See [`ThrottlingError`](crate::error::ThrottlingError).
|
446 896 | pub mod throttling_error {
|
447 897 |
|
898 + | /* ServerBuilderGenerator.kt:461 */
|
448 899 | impl ::std::convert::From<Builder> for crate::error::ThrottlingError {
|
449 900 | fn from(builder: Builder) -> Self {
|
450 901 | builder.build()
|
451 902 | }
|
452 903 | }
|
453 - | /// A builder for [`ThrottlingError`](crate::error::ThrottlingError).
|
904 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ThrottlingError`](crate::error::ThrottlingError).
|
905 + | /* RustType.kt:516 */
|
454 906 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
455 - | pub struct Builder {}
|
907 + | /* ServerBuilderGenerator.kt:211 */
|
908 + | pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
909 + | /* ServerBuilderGenerator.kt:215 */
|
456 910 | impl Builder {
|
457 - | /// Consumes the builder and constructs a [`ThrottlingError`](crate::error::ThrottlingError).
|
911 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ThrottlingError`](crate::error::ThrottlingError).
|
912 + | /* ServerBuilderGenerator.kt:271 */
|
458 913 | pub fn build(self) -> crate::error::ThrottlingError {
|
459 914 | self.build_enforcing_all_constraints()
|
460 915 | }
|
916 + | /* ServerBuilderGenerator.kt:283 */
|
461 917 | fn build_enforcing_all_constraints(self) -> crate::error::ThrottlingError {
|
462 - | crate::error::ThrottlingError {}
|
918 + | /* ServerBuilderGenerator.kt:542 */
|
919 + | crate::error::ThrottlingError {
|
920 + | /* ServerBuilderGenerator.kt:542 */}
|
921 + | /* ServerBuilderGenerator.kt:283 */
|
463 922 | }
|
923 + | /* ServerBuilderGenerator.kt:215 */
|
464 924 | }
|
925 + |
|
926 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
465 927 | }
|
466 - | /// See [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
928 + | /// /* ServerBuilderGenerator.kt:171 */See [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
467 929 | pub mod invalid_pokeball_error {
|
468 930 |
|
931 + | /* RustType.kt:516 */
|
469 932 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
470 - | /// Holds one variant for each of the ways the builder can fail.
|
933 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
934 + | /* RustType.kt:516 */
|
471 935 | #[non_exhaustive]
|
936 + | /* ServerBuilderConstraintViolations.kt:75 */
|
472 937 | #[allow(clippy::enum_variant_names)]
|
473 938 | pub enum ConstraintViolation {
|
474 - | /// `pokeball` was not provided but it is required when building `InvalidPokeballError`.
|
939 + | /// /* ServerBuilderConstraintViolations.kt:138 */`pokeball` was not provided but it is required when building `InvalidPokeballError`.
|
940 + | /* ServerBuilderConstraintViolations.kt:143 */
|
475 941 | MissingPokeball,
|
942 + | /* ServerBuilderConstraintViolations.kt:75 */
|
476 943 | }
|
944 + | /* ServerBuilderConstraintViolations.kt:117 */
|
477 945 | impl ::std::fmt::Display for ConstraintViolation {
|
946 + | /* ServerBuilderConstraintViolations.kt:118 */
|
478 947 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
948 + | /* ServerBuilderConstraintViolations.kt:119 */
|
479 949 | match self {
|
480 - | ConstraintViolation::MissingPokeball => write!(f, "`pokeball` was not provided but it is required when building `InvalidPokeballError`"),
|
481 - | }
|
950 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingPokeball => write!(f, "`pokeball` was not provided but it is required when building `InvalidPokeballError`"),
|
951 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
952 + | /* ServerBuilderConstraintViolations.kt:118 */
|
482 953 | }
|
954 + | /* ServerBuilderConstraintViolations.kt:117 */
|
483 955 | }
|
956 + | /* ServerBuilderConstraintViolations.kt:84 */
|
484 957 | impl ::std::error::Error for ConstraintViolation {}
|
958 + | /* ServerBuilderGenerator.kt:446 */
|
485 959 | impl ::std::convert::TryFrom<Builder> for crate::error::InvalidPokeballError {
|
486 960 | type Error = ConstraintViolation;
|
487 961 |
|
488 962 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
489 963 | builder.build()
|
490 964 | }
|
491 965 | }
|
492 - | /// A builder for [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
966 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
967 + | /* RustType.kt:516 */
|
493 968 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
969 + | /* ServerBuilderGenerator.kt:211 */
|
494 970 | pub struct Builder {
|
971 + | /* ServerBuilderGenerator.kt:308 */
|
495 972 | pub(crate) pokeball: ::std::option::Option<::std::string::String>,
|
973 + | /* ServerBuilderGenerator.kt:211 */
|
496 974 | }
|
975 + | /* ServerBuilderGenerator.kt:215 */
|
497 976 | impl Builder {
|
977 + | /* ServerBuilderGenerator.kt:331 */
|
498 978 | #[allow(missing_docs)] // documentation missing in model
|
979 + | /* ServerBuilderGenerator.kt:343 */
|
499 980 | pub fn pokeball(mut self, input: ::std::string::String) -> Self {
|
500 - | self.pokeball = Some(input);
|
981 + | /* ServerBuilderGenerator.kt:344 */
|
982 + | self.pokeball =
|
983 + | /* ServerBuilderGenerator.kt:345 */Some(
|
984 + | /* ServerBuilderGenerator.kt:376 */input
|
985 + | /* ServerBuilderGenerator.kt:345 */)
|
986 + | /* ServerBuilderGenerator.kt:344 */;
|
501 987 | self
|
988 + | /* ServerBuilderGenerator.kt:343 */
|
502 989 | }
|
503 - | /// Consumes the builder and constructs a [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
504 - | ///
|
990 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
991 + | /// /* ServerBuilderGenerator.kt:260 */
|
505 992 | /// The builder fails to construct a [`InvalidPokeballError`](crate::error::InvalidPokeballError) if a [`ConstraintViolation`] occurs.
|
506 993 | ///
|
994 + | /* ServerBuilderGenerator.kt:271 */
|
507 995 | pub fn build(self) -> Result<crate::error::InvalidPokeballError, ConstraintViolation> {
|
508 996 | self.build_enforcing_all_constraints()
|
509 997 | }
|
998 + | /* ServerBuilderGenerator.kt:283 */
|
510 999 | fn build_enforcing_all_constraints(
|
511 1000 | self,
|
512 1001 | ) -> Result<crate::error::InvalidPokeballError, ConstraintViolation> {
|
513 - | Ok(crate::error::InvalidPokeballError {
|
514 - | pokeball: self.pokeball.ok_or(ConstraintViolation::MissingPokeball)?,
|
515 - | })
|
1002 + | /* ServerBuilderGenerator.kt:287 */
|
1003 + | Ok(
|
1004 + | /* ServerBuilderGenerator.kt:542 */
|
1005 + | crate::error::InvalidPokeballError {
|
1006 + | /* ServerBuilderGenerator.kt:546 */
|
1007 + | pokeball: self
|
1008 + | .pokeball
|
1009 + | /* ServerBuilderGenerator.kt:569 */
|
1010 + | .ok_or(ConstraintViolation::MissingPokeball)?,
|
1011 + | /* ServerBuilderGenerator.kt:542 */
|
1012 + | }, /* ServerBuilderGenerator.kt:287 */
|
1013 + | )
|
1014 + | /* ServerBuilderGenerator.kt:283 */
|
516 1015 | }
|
1016 + | /* ServerBuilderGenerator.kt:215 */
|
517 1017 | }
|
1018 + |
|
1019 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
518 1020 | }
|
519 - | /// See [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
1021 + | /// /* ServerBuilderGenerator.kt:171 */See [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
520 1022 | pub mod master_ball_unsuccessful {
|
521 1023 |
|
1024 + | /* ServerBuilderGenerator.kt:461 */
|
522 1025 | impl ::std::convert::From<Builder> for crate::error::MasterBallUnsuccessful {
|
523 1026 | fn from(builder: Builder) -> Self {
|
524 1027 | builder.build()
|
525 1028 | }
|
526 1029 | }
|
527 - | /// A builder for [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
1030 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
1031 + | /* RustType.kt:516 */
|
528 1032 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1033 + | /* ServerBuilderGenerator.kt:211 */
|
529 1034 | pub struct Builder {
|
1035 + | /* ServerBuilderGenerator.kt:308 */
|
530 1036 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
1037 + | /* ServerBuilderGenerator.kt:211 */
|
531 1038 | }
|
1039 + | /* ServerBuilderGenerator.kt:215 */
|
532 1040 | impl Builder {
|
1041 + | /* ServerBuilderGenerator.kt:331 */
|
533 1042 | #[allow(missing_docs)] // documentation missing in model
|
1043 + | /* ServerBuilderGenerator.kt:343 */
|
534 1044 | pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
535 - | self.message = input;
|
1045 + | /* ServerBuilderGenerator.kt:344 */
|
1046 + | self.message =
|
1047 + | /* ServerBuilderGenerator.kt:376 */input
|
1048 + | /* ServerBuilderGenerator.kt:344 */;
|
536 1049 | self
|
1050 + | /* ServerBuilderGenerator.kt:343 */
|
537 1051 | }
|
1052 + | /* ServerBuilderGenerator.kt:426 */
|
538 1053 | #[allow(missing_docs)] // documentation missing in model
|
1054 + | /* ServerBuilderGenerator.kt:428 */
|
539 1055 | pub(crate) fn set_message(
|
540 1056 | mut self,
|
541 1057 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
542 1058 | ) -> Self {
|
1059 + | /* ServerBuilderGenerator.kt:429 */
|
543 1060 | self.message = input.map(|v| v.into());
|
544 1061 | self
|
1062 + | /* ServerBuilderGenerator.kt:428 */
|
545 1063 | }
|
546 - | /// Consumes the builder and constructs a [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
1064 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
1065 + | /* ServerBuilderGenerator.kt:271 */
|
547 1066 | pub fn build(self) -> crate::error::MasterBallUnsuccessful {
|
548 1067 | self.build_enforcing_all_constraints()
|
549 1068 | }
|
1069 + | /* ServerBuilderGenerator.kt:283 */
|
550 1070 | fn build_enforcing_all_constraints(self) -> crate::error::MasterBallUnsuccessful {
|
1071 + | /* ServerBuilderGenerator.kt:542 */
|
551 1072 | crate::error::MasterBallUnsuccessful {
|
1073 + | /* ServerBuilderGenerator.kt:546 */
|
552 1074 | message: self.message,
|
1075 + | /* ServerBuilderGenerator.kt:542 */
|
553 1076 | }
|
1077 + | /* ServerBuilderGenerator.kt:283 */
|
554 1078 | }
|
1079 + | /* ServerBuilderGenerator.kt:215 */
|
555 1080 | }
|
1081 + |
|
1082 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
556 1083 | }
|
557 - | /// See [`ValidationException`](crate::error::ValidationException).
|
1084 + | /// /* ServerBuilderGenerator.kt:171 */See [`ValidationException`](crate::error::ValidationException).
|
558 1085 | pub mod validation_exception {
|
559 1086 |
|
1087 + | /* RustType.kt:516 */
|
560 1088 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
561 - | /// Holds one variant for each of the ways the builder can fail.
|
1089 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
1090 + | /* RustType.kt:516 */
|
562 1091 | #[non_exhaustive]
|
1092 + | /* ServerBuilderConstraintViolations.kt:75 */
|
563 1093 | #[allow(clippy::enum_variant_names)]
|
564 1094 | pub enum ConstraintViolation {
|
565 - | /// `message` was not provided but it is required when building `ValidationException`.
|
1095 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationException`.
|
1096 + | /* ServerBuilderConstraintViolations.kt:143 */
|
566 1097 | MissingMessage,
|
1098 + | /* ServerBuilderConstraintViolations.kt:75 */
|
567 1099 | }
|
1100 + | /* ServerBuilderConstraintViolations.kt:117 */
|
568 1101 | impl ::std::fmt::Display for ConstraintViolation {
|
1102 + | /* ServerBuilderConstraintViolations.kt:118 */
|
569 1103 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1104 + | /* ServerBuilderConstraintViolations.kt:119 */
|
570 1105 | match self {
|
571 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
572 - | }
|
1106 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
1107 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
1108 + | /* ServerBuilderConstraintViolations.kt:118 */
|
573 1109 | }
|
1110 + | /* ServerBuilderConstraintViolations.kt:117 */
|
574 1111 | }
|
1112 + | /* ServerBuilderConstraintViolations.kt:84 */
|
575 1113 | impl ::std::error::Error for ConstraintViolation {}
|
1114 + | /* ServerBuilderGenerator.kt:446 */
|
576 1115 | impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
|
577 1116 | type Error = ConstraintViolation;
|
578 1117 |
|
579 1118 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
580 1119 | builder.build()
|
581 1120 | }
|
582 1121 | }
|
583 - | /// A builder for [`ValidationException`](crate::error::ValidationException).
|
1122 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationException`](crate::error::ValidationException).
|
1123 + | /* RustType.kt:516 */
|
584 1124 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1125 + | /* ServerBuilderGenerator.kt:211 */
|
585 1126 | pub struct Builder {
|
1127 + | /* ServerBuilderGenerator.kt:308 */
|
586 1128 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
1129 + | /* ServerBuilderGenerator.kt:308 */
|
587 1130 | pub(crate) field_list:
|
588 1131 | ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
1132 + | /* ServerBuilderGenerator.kt:211 */
|
589 1133 | }
|
1134 + | /* ServerBuilderGenerator.kt:215 */
|
590 1135 | impl Builder {
|
591 - | /// A summary of the validation failure.
|
1136 + | /// /* ServerBuilderGenerator.kt:331 */A summary of the validation failure.
|
1137 + | /* ServerBuilderGenerator.kt:343 */
|
592 1138 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
593 - | self.message = Some(input);
|
1139 + | /* ServerBuilderGenerator.kt:344 */
|
1140 + | self.message =
|
1141 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1142 + | /* ServerBuilderGenerator.kt:376 */input
|
1143 + | /* ServerBuilderGenerator.kt:345 */)
|
1144 + | /* ServerBuilderGenerator.kt:344 */;
|
594 1145 | self
|
1146 + | /* ServerBuilderGenerator.kt:343 */
|
595 1147 | }
|
596 - | /// 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.
|
1148 + | /// /* 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.
|
1149 + | /* ServerBuilderGenerator.kt:343 */
|
597 1150 | pub fn field_list(
|
598 1151 | mut self,
|
599 1152 | input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
600 1153 | ) -> Self {
|
601 - | self.field_list = input;
|
1154 + | /* ServerBuilderGenerator.kt:344 */
|
1155 + | self.field_list =
|
1156 + | /* ServerBuilderGenerator.kt:376 */input
|
1157 + | /* ServerBuilderGenerator.kt:344 */;
|
602 1158 | self
|
1159 + | /* ServerBuilderGenerator.kt:343 */
|
603 1160 | }
|
604 - | /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
605 - | ///
|
1161 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
1162 + | /// /* ServerBuilderGenerator.kt:260 */
|
606 1163 | /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if a [`ConstraintViolation`] occurs.
|
607 1164 | ///
|
1165 + | /* ServerBuilderGenerator.kt:271 */
|
608 1166 | pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
609 1167 | self.build_enforcing_all_constraints()
|
610 1168 | }
|
1169 + | /* ServerBuilderGenerator.kt:283 */
|
611 1170 | fn build_enforcing_all_constraints(
|
612 1171 | self,
|
613 1172 | ) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
614 - | Ok(crate::error::ValidationException {
|
615 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
1173 + | /* ServerBuilderGenerator.kt:287 */
|
1174 + | Ok(
|
1175 + | /* ServerBuilderGenerator.kt:542 */
|
1176 + | crate::error::ValidationException {
|
1177 + | /* ServerBuilderGenerator.kt:546 */
|
1178 + | message: self
|
1179 + | .message
|
1180 + | /* ServerBuilderGenerator.kt:569 */
|
1181 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
1182 + | /* ServerBuilderGenerator.kt:546 */
|
616 1183 | field_list: self.field_list,
|
617 - | })
|
1184 + | /* ServerBuilderGenerator.kt:542 */
|
1185 + | }, /* ServerBuilderGenerator.kt:287 */
|
1186 + | )
|
1187 + | /* ServerBuilderGenerator.kt:283 */
|
618 1188 | }
|
1189 + | /* ServerBuilderGenerator.kt:215 */
|
619 1190 | }
|
1191 + |
|
1192 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
620 1193 | }
|