1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* ServerOperationErrorGenerator.kt:63 */
|
2 3 | /// Error type for the `GetStorage` operation.
|
4 + | /* ServerOperationErrorGenerator.kt:64 */
|
3 5 | /// Each variant represents an error that can occur for the `GetStorage` operation.
|
6 + | /* RustType.kt:516 */
|
4 7 | #[derive(::std::fmt::Debug)]
|
5 - | pub enum GetStorageError {
|
6 - | /// 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.
|
8 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum GetStorageError {
|
9 + | /// /* 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.
|
10 + | /* ServerOperationErrorGenerator.kt:71 */
|
7 11 | ValidationException(crate::error::ValidationException),
|
8 - | /// Not authorized to access Pokémon storage.
|
12 + | /// /* ServerOperationErrorGenerator.kt:68 */Not authorized to access Pokémon storage.
|
13 + | /* ServerOperationErrorGenerator.kt:71 */
|
9 14 | StorageAccessNotAuthorized(crate::error::StorageAccessNotAuthorized),
|
15 + | /* ServerOperationErrorGenerator.kt:68 */
|
10 16 | #[allow(missing_docs)] // documentation missing in model
|
17 + | /* ServerOperationErrorGenerator.kt:71 */
|
11 18 | ResourceNotFoundException(crate::error::ResourceNotFoundException),
|
19 + | /* ServerOperationErrorGenerator.kt:68 */
|
12 20 | #[allow(missing_docs)] // documentation missing in model
|
21 + | /* ServerOperationErrorGenerator.kt:71 */
|
13 22 | InternalServerError(crate::error::InternalServerError),
|
23 + | /* ServerOperationErrorGenerator.kt:66 */
|
14 24 | }
|
25 + | /* ServerOperationErrorGenerator.kt:75 */
|
15 26 | impl ::std::fmt::Display for GetStorageError {
|
27 + | /* ServerOperationErrorGenerator.kt:76 */
|
16 28 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
29 + | /* ServerOperationErrorGenerator.kt:139 */
|
17 30 | match &self {
|
18 - | GetStorageError::ValidationException(_inner) => _inner.fmt(f),
|
19 - | GetStorageError::StorageAccessNotAuthorized(_inner) => _inner.fmt(f),
|
20 - | GetStorageError::ResourceNotFoundException(_inner) => _inner.fmt(f),
|
21 - | GetStorageError::InternalServerError(_inner) => _inner.fmt(f),
|
31 + | /* ServerOperationErrorGenerator.kt:142 */
|
32 + | GetStorageError::ValidationException(_inner) =>
|
33 + | /* ServerOperationErrorGenerator.kt:78 */
|
34 + | {
|
35 + | _inner.fmt(f)
|
36 + | }
|
37 + | ,
|
38 + | /* ServerOperationErrorGenerator.kt:142 */
|
39 + | GetStorageError::StorageAccessNotAuthorized(_inner) =>
|
40 + | /* ServerOperationErrorGenerator.kt:78 */
|
41 + | {
|
42 + | _inner.fmt(f)
|
43 + | }
|
44 + | ,
|
45 + | /* ServerOperationErrorGenerator.kt:142 */
|
46 + | GetStorageError::ResourceNotFoundException(_inner) =>
|
47 + | /* ServerOperationErrorGenerator.kt:78 */
|
48 + | {
|
49 + | _inner.fmt(f)
|
22 50 | }
|
51 + | ,
|
52 + | /* ServerOperationErrorGenerator.kt:142 */
|
53 + | GetStorageError::InternalServerError(_inner) =>
|
54 + | /* ServerOperationErrorGenerator.kt:78 */
|
55 + | {
|
56 + | _inner.fmt(f)
|
57 + | }
|
58 + | /* ServerOperationErrorGenerator.kt:139 */
|
59 + | }
|
60 + | /* ServerOperationErrorGenerator.kt:76 */
|
23 61 | }
|
62 + | /* ServerOperationErrorGenerator.kt:75 */
|
24 63 | }
|
64 + | /* ServerOperationErrorGenerator.kt:83 */
|
25 65 | impl GetStorageError {
|
66 + | /* ServerOperationErrorGenerator.kt:87 */
|
26 67 | /// Returns `true` if the error kind is `GetStorageError::ValidationException`.
|
68 + | /* ServerOperationErrorGenerator.kt:88 */
|
27 69 | pub fn is_validation_exception(&self) -> bool {
|
70 + | /* ServerOperationErrorGenerator.kt:89 */
|
28 71 | matches!(&self, GetStorageError::ValidationException(_))
|
72 + | /* ServerOperationErrorGenerator.kt:88 */
|
29 73 | }
|
74 + | /* ServerOperationErrorGenerator.kt:87 */
|
30 75 | /// Returns `true` if the error kind is `GetStorageError::StorageAccessNotAuthorized`.
|
76 + | /* ServerOperationErrorGenerator.kt:88 */
|
31 77 | pub fn is_storage_access_not_authorized(&self) -> bool {
|
78 + | /* ServerOperationErrorGenerator.kt:89 */
|
32 79 | matches!(&self, GetStorageError::StorageAccessNotAuthorized(_))
|
80 + | /* ServerOperationErrorGenerator.kt:88 */
|
33 81 | }
|
82 + | /* ServerOperationErrorGenerator.kt:87 */
|
34 83 | /// Returns `true` if the error kind is `GetStorageError::ResourceNotFoundException`.
|
84 + | /* ServerOperationErrorGenerator.kt:88 */
|
35 85 | pub fn is_resource_not_found_exception(&self) -> bool {
|
86 + | /* ServerOperationErrorGenerator.kt:89 */
|
36 87 | matches!(&self, GetStorageError::ResourceNotFoundException(_))
|
88 + | /* ServerOperationErrorGenerator.kt:88 */
|
37 89 | }
|
90 + | /* ServerOperationErrorGenerator.kt:87 */
|
38 91 | /// Returns `true` if the error kind is `GetStorageError::InternalServerError`.
|
92 + | /* ServerOperationErrorGenerator.kt:88 */
|
39 93 | pub fn is_internal_server_error(&self) -> bool {
|
94 + | /* ServerOperationErrorGenerator.kt:89 */
|
40 95 | matches!(&self, GetStorageError::InternalServerError(_))
|
96 + | /* ServerOperationErrorGenerator.kt:88 */
|
41 97 | }
|
98 + | /* ServerOperationErrorGenerator.kt:92 */
|
42 99 | /// Returns the error name string by matching the correct variant.
|
100 + | /* ServerOperationErrorGenerator.kt:93 */
|
43 101 | pub fn name(&self) -> &'static str {
|
102 + | /* ServerOperationErrorGenerator.kt:139 */
|
44 103 | match &self {
|
45 - | GetStorageError::ValidationException(_inner) => _inner.name(),
|
46 - | GetStorageError::StorageAccessNotAuthorized(_inner) => _inner.name(),
|
47 - | GetStorageError::ResourceNotFoundException(_inner) => _inner.name(),
|
48 - | GetStorageError::InternalServerError(_inner) => _inner.name(),
|
104 + | /* ServerOperationErrorGenerator.kt:142 */
|
105 + | GetStorageError::ValidationException(_inner) =>
|
106 + | /* ServerOperationErrorGenerator.kt:95 */
|
107 + | {
|
108 + | _inner.name()
|
109 + | }
|
110 + | ,
|
111 + | /* ServerOperationErrorGenerator.kt:142 */
|
112 + | GetStorageError::StorageAccessNotAuthorized(_inner) =>
|
113 + | /* ServerOperationErrorGenerator.kt:95 */
|
114 + | {
|
115 + | _inner.name()
|
116 + | }
|
117 + | ,
|
118 + | /* ServerOperationErrorGenerator.kt:142 */
|
119 + | GetStorageError::ResourceNotFoundException(_inner) =>
|
120 + | /* ServerOperationErrorGenerator.kt:95 */
|
121 + | {
|
122 + | _inner.name()
|
123 + | }
|
124 + | ,
|
125 + | /* ServerOperationErrorGenerator.kt:142 */
|
126 + | GetStorageError::InternalServerError(_inner) =>
|
127 + | /* ServerOperationErrorGenerator.kt:95 */
|
128 + | {
|
129 + | _inner.name()
|
49 130 | }
|
131 + | /* ServerOperationErrorGenerator.kt:139 */
|
50 132 | }
|
133 + | /* ServerOperationErrorGenerator.kt:93 */
|
134 + | }
|
135 + | /* ServerOperationErrorGenerator.kt:83 */
|
51 136 | }
|
137 + | /* ServerOperationErrorGenerator.kt:100 */
|
52 138 | impl ::std::error::Error for GetStorageError {
|
139 + | /* ServerOperationErrorGenerator.kt:101 */
|
53 140 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
141 + | /* ServerOperationErrorGenerator.kt:139 */
|
54 142 | match &self {
|
55 - | GetStorageError::ValidationException(_inner) => Some(_inner),
|
56 - | GetStorageError::StorageAccessNotAuthorized(_inner) => Some(_inner),
|
57 - | GetStorageError::ResourceNotFoundException(_inner) => Some(_inner),
|
58 - | GetStorageError::InternalServerError(_inner) => Some(_inner),
|
143 + | /* ServerOperationErrorGenerator.kt:142 */
|
144 + | GetStorageError::ValidationException(_inner) =>
|
145 + | /* ServerOperationErrorGenerator.kt:103 */
|
146 + | {
|
147 + | Some(_inner)
|
148 + | }
|
149 + | ,
|
150 + | /* ServerOperationErrorGenerator.kt:142 */
|
151 + | GetStorageError::StorageAccessNotAuthorized(_inner) =>
|
152 + | /* ServerOperationErrorGenerator.kt:103 */
|
153 + | {
|
154 + | Some(_inner)
|
155 + | }
|
156 + | ,
|
157 + | /* ServerOperationErrorGenerator.kt:142 */
|
158 + | GetStorageError::ResourceNotFoundException(_inner) =>
|
159 + | /* ServerOperationErrorGenerator.kt:103 */
|
160 + | {
|
161 + | Some(_inner)
|
162 + | }
|
163 + | ,
|
164 + | /* ServerOperationErrorGenerator.kt:142 */
|
165 + | GetStorageError::InternalServerError(_inner) =>
|
166 + | /* ServerOperationErrorGenerator.kt:103 */
|
167 + | {
|
168 + | Some(_inner)
|
59 169 | }
|
170 + | /* ServerOperationErrorGenerator.kt:139 */
|
60 171 | }
|
172 + | /* ServerOperationErrorGenerator.kt:101 */
|
173 + | }
|
174 + | /* ServerOperationErrorGenerator.kt:100 */
|
61 175 | }
|
176 + | /* ServerOperationErrorGenerator.kt:110 */
|
62 177 | impl ::std::convert::From<crate::error::ValidationException> for crate::error::GetStorageError {
|
178 + | /* ServerOperationErrorGenerator.kt:111 */
|
63 179 | fn from(variant: crate::error::ValidationException) -> crate::error::GetStorageError {
|
180 + | /* ServerOperationErrorGenerator.kt:112 */
|
64 181 | Self::ValidationException(variant)
|
182 + | /* ServerOperationErrorGenerator.kt:111 */
|
65 183 | }
|
184 + | /* ServerOperationErrorGenerator.kt:110 */
|
66 185 | }
|
186 + | /* ServerOperationErrorGenerator.kt:110 */
|
67 187 | impl ::std::convert::From<crate::error::StorageAccessNotAuthorized>
|
68 188 | for crate::error::GetStorageError
|
69 189 | {
|
190 + | /* ServerOperationErrorGenerator.kt:111 */
|
70 191 | fn from(variant: crate::error::StorageAccessNotAuthorized) -> crate::error::GetStorageError {
|
192 + | /* ServerOperationErrorGenerator.kt:112 */
|
71 193 | Self::StorageAccessNotAuthorized(variant)
|
194 + | /* ServerOperationErrorGenerator.kt:111 */
|
72 195 | }
|
196 + | /* ServerOperationErrorGenerator.kt:110 */
|
73 197 | }
|
198 + | /* ServerOperationErrorGenerator.kt:110 */
|
74 199 | impl ::std::convert::From<crate::error::ResourceNotFoundException>
|
75 200 | for crate::error::GetStorageError
|
76 201 | {
|
202 + | /* ServerOperationErrorGenerator.kt:111 */
|
77 203 | fn from(variant: crate::error::ResourceNotFoundException) -> crate::error::GetStorageError {
|
204 + | /* ServerOperationErrorGenerator.kt:112 */
|
78 205 | Self::ResourceNotFoundException(variant)
|
206 + | /* ServerOperationErrorGenerator.kt:111 */
|
79 207 | }
|
208 + | /* ServerOperationErrorGenerator.kt:110 */
|
80 209 | }
|
210 + | /* ServerOperationErrorGenerator.kt:110 */
|
81 211 | impl ::std::convert::From<crate::error::InternalServerError> for crate::error::GetStorageError {
|
212 + | /* ServerOperationErrorGenerator.kt:111 */
|
82 213 | fn from(variant: crate::error::InternalServerError) -> crate::error::GetStorageError {
|
214 + | /* ServerOperationErrorGenerator.kt:112 */
|
83 215 | Self::InternalServerError(variant)
|
216 + | /* ServerOperationErrorGenerator.kt:111 */
|
84 217 | }
|
218 + | /* ServerOperationErrorGenerator.kt:110 */
|
85 219 | }
|
86 220 |
|
221 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
87 222 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::GetStorageError {
|
88 223 | fn from(variant: ::pyo3::PyErr) -> crate::error::GetStorageError {
|
89 224 | ::pyo3::Python::with_gil(|py| {
|
90 225 | let error = variant.value(py);
|
91 226 | if let Ok(error) = error.extract::<crate::error::ValidationException>() {
|
92 227 | return error.into();
|
93 228 | }
|
94 229 | if let Ok(error) = error.extract::<crate::error::StorageAccessNotAuthorized>() {
|
95 230 | return error.into();
|
96 231 | }
|
97 232 | if let Ok(error) = error.extract::<crate::error::ResourceNotFoundException>() {
|
98 233 | return error.into();
|
99 234 | }
|
100 235 | crate::error::InternalServerError {
|
101 236 | message: error.to_string(),
|
102 237 | }
|
103 238 | .into()
|
104 239 | })
|
105 240 | }
|
106 241 | }
|
107 242 |
|
243 + | /* RustType.kt:516 */
|
108 244 | #[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
|
245 + | /* PythonServerStructureGenerator.kt:63 */
|
109 246 | /// :param message str:
|
110 247 | /// :rtype None:
|
248 + | /* StructureGenerator.kt:197 */
|
111 249 | #[allow(missing_docs)] // documentation missing in model
|
250 + | /* RustType.kt:516 */
|
112 251 | #[derive(
|
113 252 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
114 253 | )]
|
115 - | pub struct InternalServerError {
|
254 + | pub /* StructureGenerator.kt:201 */ struct InternalServerError {
|
255 + | /* RustType.kt:516 */
|
116 256 | #[pyo3(get, set)]
|
257 + | /* PythonServerStructureGenerator.kt:80 */
|
117 258 | /// :type str:
|
259 + | /* StructureGenerator.kt:231 */
|
118 260 | #[allow(missing_docs)] // documentation missing in model
|
119 261 | pub message: ::std::string::String,
|
262 + | /* StructureGenerator.kt:201 */
|
120 263 | }
|
264 + | /* RustType.kt:516 */
|
121 265 | #[allow(clippy::new_without_default)]
|
266 + | /* RustType.kt:516 */
|
122 267 | #[allow(clippy::too_many_arguments)]
|
268 + | /* RustType.kt:516 */
|
123 269 | #[::pyo3::pymethods]
|
270 + | /* PythonServerStructureGenerator.kt:88 */
|
124 271 | impl InternalServerError {
|
125 272 | #[new]
|
126 273 | pub fn new(message: ::std::string::String) -> Self {
|
127 274 | Self { message }
|
128 275 | }
|
129 276 | fn __repr__(&self) -> String {
|
130 277 | format!("{self:?}")
|
131 278 | }
|
132 279 | fn __str__(&self) -> String {
|
133 280 | format!("{self:?}")
|
134 281 | }
|
135 282 | }
|
283 + | /* ErrorImplGenerator.kt:99 */
|
136 284 | impl InternalServerError {
|
285 + | /* ErrorImplGenerator.kt:128 */
|
137 286 | /// Returns the error message.
|
138 287 | pub fn message(&self) -> &str {
|
139 288 | &self.message
|
140 289 | }
|
290 + | /* ErrorImplGenerator.kt:141 */
|
141 291 | #[doc(hidden)]
|
142 292 | /// Returns the error name.
|
143 293 | pub fn name(&self) -> &'static str {
|
144 294 | "InternalServerError"
|
145 295 | }
|
296 + | /* ErrorImplGenerator.kt:99 */
|
146 297 | }
|
298 + | /* ErrorImplGenerator.kt:153 */
|
147 299 | impl ::std::fmt::Display for InternalServerError {
|
300 + | /* ErrorImplGenerator.kt:154 */
|
148 301 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
302 + | /* ErrorImplGenerator.kt:161 */
|
149 303 | ::std::write!(f, "InternalServerError")?;
|
304 + | /* ErrorImplGenerator.kt:166 */
|
150 305 | {
|
306 + | /* ErrorImplGenerator.kt:167 */
|
151 307 | ::std::write!(f, ": {}", &self.message)?;
|
308 + | /* ErrorImplGenerator.kt:166 */
|
152 309 | }
|
310 + | /* ErrorImplGenerator.kt:171 */
|
153 311 | Ok(())
|
312 + | /* ErrorImplGenerator.kt:154 */
|
154 313 | }
|
314 + | /* ErrorImplGenerator.kt:153 */
|
155 315 | }
|
316 + | /* ErrorImplGenerator.kt:175 */
|
156 317 | impl ::std::error::Error for InternalServerError {}
|
318 + | /* ServerCodegenVisitor.kt:370 */
|
157 319 | impl InternalServerError {
|
158 - | /// Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
|
320 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
|
321 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
159 322 | pub fn builder() -> crate::error::internal_server_error::Builder {
|
323 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
160 324 | crate::error::internal_server_error::Builder::default()
|
325 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
161 326 | }
|
327 + | /* ServerCodegenVisitor.kt:370 */
|
162 328 | }
|
163 329 |
|
330 + | /* RustType.kt:516 */
|
164 331 | #[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
|
332 + | /* PythonServerStructureGenerator.kt:63 */
|
165 333 | /// :param message str:
|
166 334 | /// :rtype None:
|
335 + | /* StructureGenerator.kt:197 */
|
167 336 | #[allow(missing_docs)] // documentation missing in model
|
337 + | /* RustType.kt:516 */
|
168 338 | #[derive(
|
169 339 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
170 340 | )]
|
171 - | pub struct ResourceNotFoundException {
|
341 + | pub /* StructureGenerator.kt:201 */ struct ResourceNotFoundException {
|
342 + | /* RustType.kt:516 */
|
172 343 | #[pyo3(get, set)]
|
344 + | /* PythonServerStructureGenerator.kt:80 */
|
173 345 | /// :type str:
|
346 + | /* StructureGenerator.kt:231 */
|
174 347 | #[allow(missing_docs)] // documentation missing in model
|
175 348 | pub message: ::std::string::String,
|
349 + | /* StructureGenerator.kt:201 */
|
176 350 | }
|
351 + | /* RustType.kt:516 */
|
177 352 | #[allow(clippy::new_without_default)]
|
353 + | /* RustType.kt:516 */
|
178 354 | #[allow(clippy::too_many_arguments)]
|
355 + | /* RustType.kt:516 */
|
179 356 | #[::pyo3::pymethods]
|
357 + | /* PythonServerStructureGenerator.kt:88 */
|
180 358 | impl ResourceNotFoundException {
|
181 359 | #[new]
|
182 360 | pub fn new(message: ::std::string::String) -> Self {
|
183 361 | Self { message }
|
184 362 | }
|
185 363 | fn __repr__(&self) -> String {
|
186 364 | format!("{self:?}")
|
187 365 | }
|
188 366 | fn __str__(&self) -> String {
|
189 367 | format!("{self:?}")
|
190 368 | }
|
191 369 | }
|
370 + | /* ErrorImplGenerator.kt:99 */
|
192 371 | impl ResourceNotFoundException {
|
372 + | /* ErrorImplGenerator.kt:128 */
|
193 373 | /// Returns the error message.
|
194 374 | pub fn message(&self) -> &str {
|
195 375 | &self.message
|
196 376 | }
|
377 + | /* ErrorImplGenerator.kt:141 */
|
197 378 | #[doc(hidden)]
|
198 379 | /// Returns the error name.
|
199 380 | pub fn name(&self) -> &'static str {
|
200 381 | "ResourceNotFoundException"
|
201 382 | }
|
383 + | /* ErrorImplGenerator.kt:99 */
|
202 384 | }
|
385 + | /* ErrorImplGenerator.kt:153 */
|
203 386 | impl ::std::fmt::Display for ResourceNotFoundException {
|
387 + | /* ErrorImplGenerator.kt:154 */
|
204 388 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
389 + | /* ErrorImplGenerator.kt:161 */
|
205 390 | ::std::write!(f, "ResourceNotFoundException")?;
|
391 + | /* ErrorImplGenerator.kt:166 */
|
206 392 | {
|
393 + | /* ErrorImplGenerator.kt:167 */
|
207 394 | ::std::write!(f, ": {}", &self.message)?;
|
395 + | /* ErrorImplGenerator.kt:166 */
|
208 396 | }
|
397 + | /* ErrorImplGenerator.kt:171 */
|
209 398 | Ok(())
|
399 + | /* ErrorImplGenerator.kt:154 */
|
210 400 | }
|
401 + | /* ErrorImplGenerator.kt:153 */
|
211 402 | }
|
403 + | /* ErrorImplGenerator.kt:175 */
|
212 404 | impl ::std::error::Error for ResourceNotFoundException {}
|
405 + | /* ServerCodegenVisitor.kt:370 */
|
213 406 | impl ResourceNotFoundException {
|
214 - | /// Creates a new builder-style object to manufacture [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
407 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
408 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
215 409 | pub fn builder() -> crate::error::resource_not_found_exception::Builder {
|
410 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
216 411 | crate::error::resource_not_found_exception::Builder::default()
|
412 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
217 413 | }
|
414 + | /* ServerCodegenVisitor.kt:370 */
|
218 415 | }
|
219 416 |
|
417 + | /* RustType.kt:516 */
|
220 418 | #[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
|
419 + | /* PythonServerStructureGenerator.kt:63 */
|
221 420 | /// :rtype None:
|
222 - | /// Not authorized to access Pokémon storage.
|
421 + | /// /* StructureGenerator.kt:197 */Not authorized to access Pokémon storage.
|
422 + | /* RustType.kt:516 */
|
223 423 | #[derive(
|
224 424 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
225 425 | )]
|
226 - | pub struct StorageAccessNotAuthorized {}
|
426 + | pub /* StructureGenerator.kt:201 */ struct StorageAccessNotAuthorized {/* StructureGenerator.kt:201 */}
|
427 + | /* RustType.kt:516 */
|
227 428 | #[allow(clippy::new_without_default)]
|
429 + | /* RustType.kt:516 */
|
228 430 | #[allow(clippy::too_many_arguments)]
|
431 + | /* RustType.kt:516 */
|
229 432 | #[::pyo3::pymethods]
|
433 + | /* PythonServerStructureGenerator.kt:88 */
|
230 434 | impl StorageAccessNotAuthorized {
|
231 435 | #[new]
|
232 436 | pub fn new() -> Self {
|
233 437 | Self {}
|
234 438 | }
|
235 439 | fn __repr__(&self) -> String {
|
236 440 | format!("{self:?}")
|
237 441 | }
|
238 442 | fn __str__(&self) -> String {
|
239 443 | format!("{self:?}")
|
240 444 | }
|
241 445 | }
|
446 + | /* ErrorImplGenerator.kt:99 */
|
242 447 | impl StorageAccessNotAuthorized {
|
448 + | /* ErrorImplGenerator.kt:141 */
|
243 449 | #[doc(hidden)]
|
244 450 | /// Returns the error name.
|
245 451 | pub fn name(&self) -> &'static str {
|
246 452 | "StorageAccessNotAuthorized"
|
247 453 | }
|
454 + | /* ErrorImplGenerator.kt:99 */
|
248 455 | }
|
456 + | /* ErrorImplGenerator.kt:153 */
|
249 457 | impl ::std::fmt::Display for StorageAccessNotAuthorized {
|
458 + | /* ErrorImplGenerator.kt:154 */
|
250 459 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
460 + | /* ErrorImplGenerator.kt:161 */
|
251 461 | ::std::write!(f, "StorageAccessNotAuthorized")?;
|
462 + | /* ErrorImplGenerator.kt:171 */
|
252 463 | Ok(())
|
464 + | /* ErrorImplGenerator.kt:154 */
|
253 465 | }
|
466 + | /* ErrorImplGenerator.kt:153 */
|
254 467 | }
|
468 + | /* ErrorImplGenerator.kt:175 */
|
255 469 | impl ::std::error::Error for StorageAccessNotAuthorized {}
|
470 + | /* ServerCodegenVisitor.kt:370 */
|
256 471 | impl StorageAccessNotAuthorized {
|
257 - | /// Creates a new builder-style object to manufacture [`StorageAccessNotAuthorized`](crate::error::StorageAccessNotAuthorized).
|
472 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`StorageAccessNotAuthorized`](crate::error::StorageAccessNotAuthorized).
|
473 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
258 474 | pub fn builder() -> crate::error::storage_access_not_authorized::Builder {
|
475 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
259 476 | crate::error::storage_access_not_authorized::Builder::default()
|
477 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
260 478 | }
|
479 + | /* ServerCodegenVisitor.kt:370 */
|
261 480 | }
|
262 481 |
|
482 + | /* RustType.kt:516 */
|
263 483 | #[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
|
484 + | /* PythonServerStructureGenerator.kt:63 */
|
264 485 | /// :param message str:
|
265 486 | /// :param field_list typing.Optional\[typing.List\[pokemon_service_server_sdk.model.ValidationExceptionField\]\]:
|
266 487 | /// :rtype None:
|
267 - | /// 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.
|
488 + | /// /* 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.
|
489 + | /* RustType.kt:516 */
|
268 490 | #[derive(
|
269 491 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
270 492 | )]
|
271 - | pub struct ValidationException {
|
493 + | pub /* StructureGenerator.kt:201 */ struct ValidationException {
|
494 + | /* RustType.kt:516 */
|
272 495 | #[pyo3(get, set)]
|
496 + | /* PythonServerStructureGenerator.kt:80 */
|
273 497 | /// :type str:
|
274 - | /// A summary of the validation failure.
|
498 + | /// /* StructureGenerator.kt:231 */A summary of the validation failure.
|
275 499 | pub message: ::std::string::String,
|
500 + | /* RustType.kt:516 */
|
276 501 | #[pyo3(get, set)]
|
502 + | /* PythonServerStructureGenerator.kt:80 */
|
277 503 | /// :type typing.Optional\[typing.List\[pokemon_service_server_sdk.model.ValidationExceptionField\]\]:
|
278 - | /// 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.
|
504 + | /// /* 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.
|
279 505 | pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
506 + | /* StructureGenerator.kt:201 */
|
280 507 | }
|
508 + | /* StructureGenerator.kt:135 */
|
281 509 | impl ValidationException {
|
282 - | /// 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.
|
510 + | /// /* 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.
|
511 + | /* StructureGenerator.kt:166 */
|
283 512 | pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
|
513 + | /* StructureGenerator.kt:169 */
|
284 514 | self.field_list.as_deref()
|
515 + | /* StructureGenerator.kt:166 */
|
285 516 | }
|
517 + | /* StructureGenerator.kt:135 */
|
286 518 | }
|
519 + | /* RustType.kt:516 */
|
287 520 | #[allow(clippy::new_without_default)]
|
521 + | /* RustType.kt:516 */
|
288 522 | #[allow(clippy::too_many_arguments)]
|
523 + | /* RustType.kt:516 */
|
289 524 | #[::pyo3::pymethods]
|
525 + | /* PythonServerStructureGenerator.kt:88 */
|
290 526 | impl ValidationException {
|
291 527 | #[new]
|
292 528 | pub fn new(
|
293 529 | message: ::std::string::String,
|
294 530 | field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
295 531 | ) -> Self {
|
296 532 | Self {
|
297 533 | message,
|
298 534 | field_list,
|
299 535 | }
|
300 536 | }
|
301 537 | fn __repr__(&self) -> String {
|
302 538 | format!("{self:?}")
|
303 539 | }
|
304 540 | fn __str__(&self) -> String {
|
305 541 | format!("{self:?}")
|
306 542 | }
|
307 543 | }
|
544 + | /* ErrorImplGenerator.kt:99 */
|
308 545 | impl ValidationException {
|
546 + | /* ErrorImplGenerator.kt:128 */
|
309 547 | /// Returns the error message.
|
310 548 | pub fn message(&self) -> &str {
|
311 549 | &self.message
|
312 550 | }
|
551 + | /* ErrorImplGenerator.kt:141 */
|
313 552 | #[doc(hidden)]
|
314 553 | /// Returns the error name.
|
315 554 | pub fn name(&self) -> &'static str {
|
316 555 | "ValidationException"
|
317 556 | }
|
557 + | /* ErrorImplGenerator.kt:99 */
|
318 558 | }
|
559 + | /* ErrorImplGenerator.kt:153 */
|
319 560 | impl ::std::fmt::Display for ValidationException {
|
561 + | /* ErrorImplGenerator.kt:154 */
|
320 562 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
563 + | /* ErrorImplGenerator.kt:161 */
|
321 564 | ::std::write!(f, "ValidationException")?;
|
565 + | /* ErrorImplGenerator.kt:166 */
|
322 566 | {
|
567 + | /* ErrorImplGenerator.kt:167 */
|
323 568 | ::std::write!(f, ": {}", &self.message)?;
|
569 + | /* ErrorImplGenerator.kt:166 */
|
324 570 | }
|
571 + | /* ErrorImplGenerator.kt:171 */
|
325 572 | Ok(())
|
573 + | /* ErrorImplGenerator.kt:154 */
|
326 574 | }
|
575 + | /* ErrorImplGenerator.kt:153 */
|
327 576 | }
|
577 + | /* ErrorImplGenerator.kt:175 */
|
328 578 | impl ::std::error::Error for ValidationException {}
|
579 + | /* ServerCodegenVisitor.kt:370 */
|
329 580 | impl ValidationException {
|
330 - | /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
581 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
582 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
331 583 | pub fn builder() -> crate::error::validation_exception::Builder {
|
584 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
332 585 | crate::error::validation_exception::Builder::default()
|
586 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
333 587 | }
|
588 + | /* ServerCodegenVisitor.kt:370 */
|
334 589 | }
|
335 590 |
|
591 + | /* ServerOperationErrorGenerator.kt:63 */
|
336 592 | /// Error type for the `GetPokemonSpecies` operation.
|
593 + | /* ServerOperationErrorGenerator.kt:64 */
|
337 594 | /// Each variant represents an error that can occur for the `GetPokemonSpecies` operation.
|
595 + | /* RustType.kt:516 */
|
338 596 | #[derive(::std::fmt::Debug)]
|
339 - | pub enum GetPokemonSpeciesError {
|
340 - | /// 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.
|
597 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum GetPokemonSpeciesError {
|
598 + | /// /* 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.
|
599 + | /* ServerOperationErrorGenerator.kt:71 */
|
341 600 | ValidationException(crate::error::ValidationException),
|
601 + | /* ServerOperationErrorGenerator.kt:68 */
|
342 602 | #[allow(missing_docs)] // documentation missing in model
|
603 + | /* ServerOperationErrorGenerator.kt:71 */
|
343 604 | ResourceNotFoundException(crate::error::ResourceNotFoundException),
|
605 + | /* ServerOperationErrorGenerator.kt:68 */
|
344 606 | #[allow(missing_docs)] // documentation missing in model
|
607 + | /* ServerOperationErrorGenerator.kt:71 */
|
345 608 | InternalServerError(crate::error::InternalServerError),
|
609 + | /* ServerOperationErrorGenerator.kt:66 */
|
346 610 | }
|
611 + | /* ServerOperationErrorGenerator.kt:75 */
|
347 612 | impl ::std::fmt::Display for GetPokemonSpeciesError {
|
613 + | /* ServerOperationErrorGenerator.kt:76 */
|
348 614 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
615 + | /* ServerOperationErrorGenerator.kt:139 */
|
349 616 | match &self {
|
350 - | GetPokemonSpeciesError::ValidationException(_inner) => _inner.fmt(f),
|
351 - | GetPokemonSpeciesError::ResourceNotFoundException(_inner) => _inner.fmt(f),
|
352 - | GetPokemonSpeciesError::InternalServerError(_inner) => _inner.fmt(f),
|
617 + | /* ServerOperationErrorGenerator.kt:142 */
|
618 + | GetPokemonSpeciesError::ValidationException(_inner) =>
|
619 + | /* ServerOperationErrorGenerator.kt:78 */
|
620 + | {
|
621 + | _inner.fmt(f)
|
622 + | }
|
623 + | ,
|
624 + | /* ServerOperationErrorGenerator.kt:142 */
|
625 + | GetPokemonSpeciesError::ResourceNotFoundException(_inner) =>
|
626 + | /* ServerOperationErrorGenerator.kt:78 */
|
627 + | {
|
628 + | _inner.fmt(f)
|
629 + | }
|
630 + | ,
|
631 + | /* ServerOperationErrorGenerator.kt:142 */
|
632 + | GetPokemonSpeciesError::InternalServerError(_inner) =>
|
633 + | /* ServerOperationErrorGenerator.kt:78 */
|
634 + | {
|
635 + | _inner.fmt(f)
|
636 + | }
|
637 + | /* ServerOperationErrorGenerator.kt:139 */
|
353 638 | }
|
639 + | /* ServerOperationErrorGenerator.kt:76 */
|
354 640 | }
|
641 + | /* ServerOperationErrorGenerator.kt:75 */
|
355 642 | }
|
643 + | /* ServerOperationErrorGenerator.kt:83 */
|
356 644 | impl GetPokemonSpeciesError {
|
645 + | /* ServerOperationErrorGenerator.kt:87 */
|
357 646 | /// Returns `true` if the error kind is `GetPokemonSpeciesError::ValidationException`.
|
647 + | /* ServerOperationErrorGenerator.kt:88 */
|
358 648 | pub fn is_validation_exception(&self) -> bool {
|
649 + | /* ServerOperationErrorGenerator.kt:89 */
|
359 650 | matches!(&self, GetPokemonSpeciesError::ValidationException(_))
|
651 + | /* ServerOperationErrorGenerator.kt:88 */
|
360 652 | }
|
653 + | /* ServerOperationErrorGenerator.kt:87 */
|
361 654 | /// Returns `true` if the error kind is `GetPokemonSpeciesError::ResourceNotFoundException`.
|
655 + | /* ServerOperationErrorGenerator.kt:88 */
|
362 656 | pub fn is_resource_not_found_exception(&self) -> bool {
|
657 + | /* ServerOperationErrorGenerator.kt:89 */
|
363 658 | matches!(&self, GetPokemonSpeciesError::ResourceNotFoundException(_))
|
659 + | /* ServerOperationErrorGenerator.kt:88 */
|
364 660 | }
|
661 + | /* ServerOperationErrorGenerator.kt:87 */
|
365 662 | /// Returns `true` if the error kind is `GetPokemonSpeciesError::InternalServerError`.
|
663 + | /* ServerOperationErrorGenerator.kt:88 */
|
366 664 | pub fn is_internal_server_error(&self) -> bool {
|
665 + | /* ServerOperationErrorGenerator.kt:89 */
|
367 666 | matches!(&self, GetPokemonSpeciesError::InternalServerError(_))
|
667 + | /* ServerOperationErrorGenerator.kt:88 */
|
368 668 | }
|
669 + | /* ServerOperationErrorGenerator.kt:92 */
|
369 670 | /// Returns the error name string by matching the correct variant.
|
671 + | /* ServerOperationErrorGenerator.kt:93 */
|
370 672 | pub fn name(&self) -> &'static str {
|
673 + | /* ServerOperationErrorGenerator.kt:139 */
|
371 674 | match &self {
|
372 - | GetPokemonSpeciesError::ValidationException(_inner) => _inner.name(),
|
373 - | GetPokemonSpeciesError::ResourceNotFoundException(_inner) => _inner.name(),
|
374 - | GetPokemonSpeciesError::InternalServerError(_inner) => _inner.name(),
|
675 + | /* ServerOperationErrorGenerator.kt:142 */
|
676 + | GetPokemonSpeciesError::ValidationException(_inner) =>
|
677 + | /* ServerOperationErrorGenerator.kt:95 */
|
678 + | {
|
679 + | _inner.name()
|
680 + | }
|
681 + | ,
|
682 + | /* ServerOperationErrorGenerator.kt:142 */
|
683 + | GetPokemonSpeciesError::ResourceNotFoundException(_inner) =>
|
684 + | /* ServerOperationErrorGenerator.kt:95 */
|
685 + | {
|
686 + | _inner.name()
|
687 + | }
|
688 + | ,
|
689 + | /* ServerOperationErrorGenerator.kt:142 */
|
690 + | GetPokemonSpeciesError::InternalServerError(_inner) =>
|
691 + | /* ServerOperationErrorGenerator.kt:95 */
|
692 + | {
|
693 + | _inner.name()
|
375 694 | }
|
695 + | /* ServerOperationErrorGenerator.kt:139 */
|
376 696 | }
|
697 + | /* ServerOperationErrorGenerator.kt:93 */
|
698 + | }
|
699 + | /* ServerOperationErrorGenerator.kt:83 */
|
377 700 | }
|
701 + | /* ServerOperationErrorGenerator.kt:100 */
|
378 702 | impl ::std::error::Error for GetPokemonSpeciesError {
|
703 + | /* ServerOperationErrorGenerator.kt:101 */
|
379 704 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
705 + | /* ServerOperationErrorGenerator.kt:139 */
|
380 706 | match &self {
|
381 - | GetPokemonSpeciesError::ValidationException(_inner) => Some(_inner),
|
382 - | GetPokemonSpeciesError::ResourceNotFoundException(_inner) => Some(_inner),
|
383 - | GetPokemonSpeciesError::InternalServerError(_inner) => Some(_inner),
|
707 + | /* ServerOperationErrorGenerator.kt:142 */
|
708 + | GetPokemonSpeciesError::ValidationException(_inner) =>
|
709 + | /* ServerOperationErrorGenerator.kt:103 */
|
710 + | {
|
711 + | Some(_inner)
|
384 712 | }
|
713 + | ,
|
714 + | /* ServerOperationErrorGenerator.kt:142 */
|
715 + | GetPokemonSpeciesError::ResourceNotFoundException(_inner) =>
|
716 + | /* ServerOperationErrorGenerator.kt:103 */
|
717 + | {
|
718 + | Some(_inner)
|
719 + | }
|
720 + | ,
|
721 + | /* ServerOperationErrorGenerator.kt:142 */
|
722 + | GetPokemonSpeciesError::InternalServerError(_inner) =>
|
723 + | /* ServerOperationErrorGenerator.kt:103 */
|
724 + | {
|
725 + | Some(_inner)
|
385 726 | }
|
727 + | /* ServerOperationErrorGenerator.kt:139 */
|
728 + | }
|
729 + | /* ServerOperationErrorGenerator.kt:101 */
|
730 + | }
|
731 + | /* ServerOperationErrorGenerator.kt:100 */
|
386 732 | }
|
733 + | /* ServerOperationErrorGenerator.kt:110 */
|
387 734 | impl ::std::convert::From<crate::error::ValidationException>
|
388 735 | for crate::error::GetPokemonSpeciesError
|
389 736 | {
|
737 + | /* ServerOperationErrorGenerator.kt:111 */
|
390 738 | fn from(variant: crate::error::ValidationException) -> crate::error::GetPokemonSpeciesError {
|
739 + | /* ServerOperationErrorGenerator.kt:112 */
|
391 740 | Self::ValidationException(variant)
|
741 + | /* ServerOperationErrorGenerator.kt:111 */
|
392 742 | }
|
743 + | /* ServerOperationErrorGenerator.kt:110 */
|
393 744 | }
|
745 + | /* ServerOperationErrorGenerator.kt:110 */
|
394 746 | impl ::std::convert::From<crate::error::ResourceNotFoundException>
|
395 747 | for crate::error::GetPokemonSpeciesError
|
396 748 | {
|
749 + | /* ServerOperationErrorGenerator.kt:111 */
|
397 750 | fn from(
|
398 751 | variant: crate::error::ResourceNotFoundException,
|
399 752 | ) -> crate::error::GetPokemonSpeciesError {
|
753 + | /* ServerOperationErrorGenerator.kt:112 */
|
400 754 | Self::ResourceNotFoundException(variant)
|
755 + | /* ServerOperationErrorGenerator.kt:111 */
|
401 756 | }
|
757 + | /* ServerOperationErrorGenerator.kt:110 */
|
402 758 | }
|
759 + | /* ServerOperationErrorGenerator.kt:110 */
|
403 760 | impl ::std::convert::From<crate::error::InternalServerError>
|
404 761 | for crate::error::GetPokemonSpeciesError
|
405 762 | {
|
763 + | /* ServerOperationErrorGenerator.kt:111 */
|
406 764 | fn from(variant: crate::error::InternalServerError) -> crate::error::GetPokemonSpeciesError {
|
765 + | /* ServerOperationErrorGenerator.kt:112 */
|
407 766 | Self::InternalServerError(variant)
|
767 + | /* ServerOperationErrorGenerator.kt:111 */
|
408 768 | }
|
769 + | /* ServerOperationErrorGenerator.kt:110 */
|
409 770 | }
|
410 771 |
|
772 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
411 773 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::GetPokemonSpeciesError {
|
412 774 | fn from(variant: ::pyo3::PyErr) -> crate::error::GetPokemonSpeciesError {
|
413 775 | ::pyo3::Python::with_gil(|py| {
|
414 776 | let error = variant.value(py);
|
415 777 | if let Ok(error) = error.extract::<crate::error::ValidationException>() {
|
416 778 | return error.into();
|
417 779 | }
|
418 780 | if let Ok(error) = error.extract::<crate::error::ResourceNotFoundException>() {
|
419 781 | return error.into();
|
420 782 | }
|
421 783 | crate::error::InternalServerError {
|
422 784 | message: error.to_string(),
|
423 785 | }
|
424 786 | .into()
|
425 787 | })
|
426 788 | }
|
427 789 | }
|
428 790 |
|
791 + | /* ServerOperationErrorGenerator.kt:63 */
|
429 792 | /// Error type for the `StreamPokemonRadio` operation.
|
793 + | /* ServerOperationErrorGenerator.kt:64 */
|
430 794 | /// Each variant represents an error that can occur for the `StreamPokemonRadio` operation.
|
795 + | /* RustType.kt:516 */
|
431 796 | #[derive(::std::fmt::Debug)]
|
432 - | pub enum StreamPokemonRadioError {
|
797 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum StreamPokemonRadioError {
|
798 + | /* ServerOperationErrorGenerator.kt:68 */
|
433 799 | #[allow(missing_docs)] // documentation missing in model
|
800 + | /* ServerOperationErrorGenerator.kt:71 */
|
434 801 | InternalServerError(crate::error::InternalServerError),
|
802 + | /* ServerOperationErrorGenerator.kt:66 */
|
435 803 | }
|
804 + | /* ServerOperationErrorGenerator.kt:75 */
|
436 805 | impl ::std::fmt::Display for StreamPokemonRadioError {
|
806 + | /* ServerOperationErrorGenerator.kt:76 */
|
437 807 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
808 + | /* ServerOperationErrorGenerator.kt:139 */
|
438 809 | match &self {
|
439 - | StreamPokemonRadioError::InternalServerError(_inner) => _inner.fmt(f),
|
810 + | /* ServerOperationErrorGenerator.kt:142 */
|
811 + | StreamPokemonRadioError::InternalServerError(_inner) =>
|
812 + | /* ServerOperationErrorGenerator.kt:78 */
|
813 + | {
|
814 + | _inner.fmt(f)
|
440 815 | }
|
816 + | /* ServerOperationErrorGenerator.kt:139 */
|
441 817 | }
|
818 + | /* ServerOperationErrorGenerator.kt:76 */
|
819 + | }
|
820 + | /* ServerOperationErrorGenerator.kt:75 */
|
442 821 | }
|
822 + | /* ServerOperationErrorGenerator.kt:83 */
|
443 823 | impl StreamPokemonRadioError {
|
824 + | /* ServerOperationErrorGenerator.kt:87 */
|
444 825 | /// Returns `true` if the error kind is `StreamPokemonRadioError::InternalServerError`.
|
826 + | /* ServerOperationErrorGenerator.kt:88 */
|
445 827 | pub fn is_internal_server_error(&self) -> bool {
|
828 + | /* ServerOperationErrorGenerator.kt:89 */
|
446 829 | matches!(&self, StreamPokemonRadioError::InternalServerError(_))
|
830 + | /* ServerOperationErrorGenerator.kt:88 */
|
447 831 | }
|
832 + | /* ServerOperationErrorGenerator.kt:92 */
|
448 833 | /// Returns the error name string by matching the correct variant.
|
834 + | /* ServerOperationErrorGenerator.kt:93 */
|
449 835 | pub fn name(&self) -> &'static str {
|
836 + | /* ServerOperationErrorGenerator.kt:139 */
|
450 837 | match &self {
|
451 - | StreamPokemonRadioError::InternalServerError(_inner) => _inner.name(),
|
838 + | /* ServerOperationErrorGenerator.kt:142 */
|
839 + | StreamPokemonRadioError::InternalServerError(_inner) =>
|
840 + | /* ServerOperationErrorGenerator.kt:95 */
|
841 + | {
|
842 + | _inner.name()
|
452 843 | }
|
844 + | /* ServerOperationErrorGenerator.kt:139 */
|
453 845 | }
|
846 + | /* ServerOperationErrorGenerator.kt:93 */
|
847 + | }
|
848 + | /* ServerOperationErrorGenerator.kt:83 */
|
454 849 | }
|
850 + | /* ServerOperationErrorGenerator.kt:100 */
|
455 851 | impl ::std::error::Error for StreamPokemonRadioError {
|
852 + | /* ServerOperationErrorGenerator.kt:101 */
|
456 853 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
854 + | /* ServerOperationErrorGenerator.kt:139 */
|
457 855 | match &self {
|
458 - | StreamPokemonRadioError::InternalServerError(_inner) => Some(_inner),
|
856 + | /* ServerOperationErrorGenerator.kt:142 */
|
857 + | StreamPokemonRadioError::InternalServerError(_inner) =>
|
858 + | /* ServerOperationErrorGenerator.kt:103 */
|
859 + | {
|
860 + | Some(_inner)
|
861 + | }
|
862 + | /* ServerOperationErrorGenerator.kt:139 */
|
459 863 | }
|
864 + | /* ServerOperationErrorGenerator.kt:101 */
|
460 865 | }
|
866 + | /* ServerOperationErrorGenerator.kt:100 */
|
461 867 | }
|
868 + | /* ServerOperationErrorGenerator.kt:110 */
|
462 869 | impl ::std::convert::From<crate::error::InternalServerError>
|
463 870 | for crate::error::StreamPokemonRadioError
|
464 871 | {
|
872 + | /* ServerOperationErrorGenerator.kt:111 */
|
465 873 | fn from(variant: crate::error::InternalServerError) -> crate::error::StreamPokemonRadioError {
|
874 + | /* ServerOperationErrorGenerator.kt:112 */
|
466 875 | Self::InternalServerError(variant)
|
876 + | /* ServerOperationErrorGenerator.kt:111 */
|
467 877 | }
|
878 + | /* ServerOperationErrorGenerator.kt:110 */
|
468 879 | }
|
469 880 |
|
881 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
470 882 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::StreamPokemonRadioError {
|
471 883 | fn from(variant: ::pyo3::PyErr) -> crate::error::StreamPokemonRadioError {
|
472 884 | ::pyo3::Python::with_gil(|py| {
|
473 885 | let error = variant.value(py);
|
474 886 |
|
475 887 | crate::error::InternalServerError {
|
476 888 | message: error.to_string(),
|
477 889 | }
|
478 890 | .into()
|
479 891 | })
|
480 892 | }
|
481 893 | }
|
482 894 |
|
895 + | /* ServerOperationErrorGenerator.kt:63 */
|
483 896 | /// Error type for the `CheckHealth` operation.
|
897 + | /* ServerOperationErrorGenerator.kt:64 */
|
484 898 | /// Each variant represents an error that can occur for the `CheckHealth` operation.
|
899 + | /* RustType.kt:516 */
|
485 900 | #[derive(::std::fmt::Debug)]
|
486 - | pub enum CheckHealthError {
|
901 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum CheckHealthError {
|
902 + | /* ServerOperationErrorGenerator.kt:68 */
|
487 903 | #[allow(missing_docs)] // documentation missing in model
|
904 + | /* ServerOperationErrorGenerator.kt:71 */
|
488 905 | InternalServerError(crate::error::InternalServerError),
|
906 + | /* ServerOperationErrorGenerator.kt:66 */
|
489 907 | }
|
908 + | /* ServerOperationErrorGenerator.kt:75 */
|
490 909 | impl ::std::fmt::Display for CheckHealthError {
|
910 + | /* ServerOperationErrorGenerator.kt:76 */
|
491 911 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
912 + | /* ServerOperationErrorGenerator.kt:139 */
|
492 913 | match &self {
|
493 - | CheckHealthError::InternalServerError(_inner) => _inner.fmt(f),
|
914 + | /* ServerOperationErrorGenerator.kt:142 */
|
915 + | CheckHealthError::InternalServerError(_inner) =>
|
916 + | /* ServerOperationErrorGenerator.kt:78 */
|
917 + | {
|
918 + | _inner.fmt(f)
|
919 + | }
|
920 + | /* ServerOperationErrorGenerator.kt:139 */
|
494 921 | }
|
922 + | /* ServerOperationErrorGenerator.kt:76 */
|
495 923 | }
|
924 + | /* ServerOperationErrorGenerator.kt:75 */
|
496 925 | }
|
926 + | /* ServerOperationErrorGenerator.kt:83 */
|
497 927 | impl CheckHealthError {
|
928 + | /* ServerOperationErrorGenerator.kt:87 */
|
498 929 | /// Returns `true` if the error kind is `CheckHealthError::InternalServerError`.
|
930 + | /* ServerOperationErrorGenerator.kt:88 */
|
499 931 | pub fn is_internal_server_error(&self) -> bool {
|
932 + | /* ServerOperationErrorGenerator.kt:89 */
|
500 933 | matches!(&self, CheckHealthError::InternalServerError(_))
|
934 + | /* ServerOperationErrorGenerator.kt:88 */
|
501 935 | }
|
936 + | /* ServerOperationErrorGenerator.kt:92 */
|
502 937 | /// Returns the error name string by matching the correct variant.
|
938 + | /* ServerOperationErrorGenerator.kt:93 */
|
503 939 | pub fn name(&self) -> &'static str {
|
940 + | /* ServerOperationErrorGenerator.kt:139 */
|
504 941 | match &self {
|
505 - | CheckHealthError::InternalServerError(_inner) => _inner.name(),
|
942 + | /* ServerOperationErrorGenerator.kt:142 */
|
943 + | CheckHealthError::InternalServerError(_inner) =>
|
944 + | /* ServerOperationErrorGenerator.kt:95 */
|
945 + | {
|
946 + | _inner.name()
|
947 + | }
|
948 + | /* ServerOperationErrorGenerator.kt:139 */
|
506 949 | }
|
950 + | /* ServerOperationErrorGenerator.kt:93 */
|
507 951 | }
|
952 + | /* ServerOperationErrorGenerator.kt:83 */
|
508 953 | }
|
954 + | /* ServerOperationErrorGenerator.kt:100 */
|
509 955 | impl ::std::error::Error for CheckHealthError {
|
956 + | /* ServerOperationErrorGenerator.kt:101 */
|
510 957 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
958 + | /* ServerOperationErrorGenerator.kt:139 */
|
511 959 | match &self {
|
512 - | CheckHealthError::InternalServerError(_inner) => Some(_inner),
|
960 + | /* ServerOperationErrorGenerator.kt:142 */
|
961 + | CheckHealthError::InternalServerError(_inner) =>
|
962 + | /* ServerOperationErrorGenerator.kt:103 */
|
963 + | {
|
964 + | Some(_inner)
|
513 965 | }
|
966 + | /* ServerOperationErrorGenerator.kt:139 */
|
514 967 | }
|
968 + | /* ServerOperationErrorGenerator.kt:101 */
|
969 + | }
|
970 + | /* ServerOperationErrorGenerator.kt:100 */
|
515 971 | }
|
972 + | /* ServerOperationErrorGenerator.kt:110 */
|
516 973 | impl ::std::convert::From<crate::error::InternalServerError> for crate::error::CheckHealthError {
|
974 + | /* ServerOperationErrorGenerator.kt:111 */
|
517 975 | fn from(variant: crate::error::InternalServerError) -> crate::error::CheckHealthError {
|
976 + | /* ServerOperationErrorGenerator.kt:112 */
|
518 977 | Self::InternalServerError(variant)
|
978 + | /* ServerOperationErrorGenerator.kt:111 */
|
519 979 | }
|
980 + | /* ServerOperationErrorGenerator.kt:110 */
|
520 981 | }
|
521 982 |
|
983 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
522 984 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::CheckHealthError {
|
523 985 | fn from(variant: ::pyo3::PyErr) -> crate::error::CheckHealthError {
|
524 986 | ::pyo3::Python::with_gil(|py| {
|
525 987 | let error = variant.value(py);
|
526 988 |
|
527 989 | crate::error::InternalServerError {
|
528 990 | message: error.to_string(),
|
529 991 | }
|
530 992 | .into()
|
531 993 | })
|
532 994 | }
|
533 995 | }
|
534 996 |
|
997 + | /* ServerOperationErrorGenerator.kt:63 */
|
535 998 | /// Error type for the `CapturePokemon` operation.
|
999 + | /* ServerOperationErrorGenerator.kt:64 */
|
536 1000 | /// Each variant represents an error that can occur for the `CapturePokemon` operation.
|
1001 + | /* RustType.kt:516 */
|
537 1002 | #[derive(::std::fmt::Debug)]
|
538 - | pub enum CapturePokemonError {
|
539 - | /// 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.
|
1003 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum CapturePokemonError {
|
1004 + | /// /* 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.
|
1005 + | /* ServerOperationErrorGenerator.kt:71 */
|
540 1006 | ValidationException(crate::error::ValidationException),
|
1007 + | /* ServerOperationErrorGenerator.kt:68 */
|
541 1008 | #[allow(missing_docs)] // documentation missing in model
|
1009 + | /* ServerOperationErrorGenerator.kt:71 */
|
542 1010 | MasterBallUnsuccessful(crate::error::MasterBallUnsuccessful),
|
1011 + | /* ServerOperationErrorGenerator.kt:68 */
|
543 1012 | #[allow(missing_docs)] // documentation missing in model
|
1013 + | /* ServerOperationErrorGenerator.kt:71 */
|
544 1014 | InvalidPokeballError(crate::error::InvalidPokeballError),
|
1015 + | /* ServerOperationErrorGenerator.kt:68 */
|
545 1016 | #[allow(missing_docs)] // documentation missing in model
|
1017 + | /* ServerOperationErrorGenerator.kt:71 */
|
546 1018 | ThrottlingError(crate::error::ThrottlingError),
|
1019 + | /* ServerOperationErrorGenerator.kt:68 */
|
547 1020 | #[allow(missing_docs)] // documentation missing in model
|
1021 + | /* ServerOperationErrorGenerator.kt:71 */
|
548 1022 | UnsupportedRegionError(crate::error::UnsupportedRegionError),
|
1023 + | /* ServerOperationErrorGenerator.kt:68 */
|
549 1024 | #[allow(missing_docs)] // documentation missing in model
|
1025 + | /* ServerOperationErrorGenerator.kt:71 */
|
550 1026 | InternalServerError(crate::error::InternalServerError),
|
1027 + | /* ServerOperationErrorGenerator.kt:66 */
|
551 1028 | }
|
1029 + | /* ServerOperationErrorGenerator.kt:75 */
|
552 1030 | impl ::std::fmt::Display for CapturePokemonError {
|
1031 + | /* ServerOperationErrorGenerator.kt:76 */
|
553 1032 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1033 + | /* ServerOperationErrorGenerator.kt:139 */
|
554 1034 | match &self {
|
555 - | CapturePokemonError::ValidationException(_inner) => _inner.fmt(f),
|
556 - | CapturePokemonError::MasterBallUnsuccessful(_inner) => _inner.fmt(f),
|
557 - | CapturePokemonError::InvalidPokeballError(_inner) => _inner.fmt(f),
|
558 - | CapturePokemonError::ThrottlingError(_inner) => _inner.fmt(f),
|
559 - | CapturePokemonError::UnsupportedRegionError(_inner) => _inner.fmt(f),
|
560 - | CapturePokemonError::InternalServerError(_inner) => _inner.fmt(f),
|
1035 + | /* ServerOperationErrorGenerator.kt:142 */
|
1036 + | CapturePokemonError::ValidationException(_inner) =>
|
1037 + | /* ServerOperationErrorGenerator.kt:78 */
|
1038 + | {
|
1039 + | _inner.fmt(f)
|
561 1040 | }
|
1041 + | ,
|
1042 + | /* ServerOperationErrorGenerator.kt:142 */
|
1043 + | CapturePokemonError::MasterBallUnsuccessful(_inner) =>
|
1044 + | /* ServerOperationErrorGenerator.kt:78 */
|
1045 + | {
|
1046 + | _inner.fmt(f)
|
1047 + | }
|
1048 + | ,
|
1049 + | /* ServerOperationErrorGenerator.kt:142 */
|
1050 + | CapturePokemonError::InvalidPokeballError(_inner) =>
|
1051 + | /* ServerOperationErrorGenerator.kt:78 */
|
1052 + | {
|
1053 + | _inner.fmt(f)
|
1054 + | }
|
1055 + | ,
|
1056 + | /* ServerOperationErrorGenerator.kt:142 */
|
1057 + | CapturePokemonError::ThrottlingError(_inner) =>
|
1058 + | /* ServerOperationErrorGenerator.kt:78 */
|
1059 + | {
|
1060 + | _inner.fmt(f)
|
562 1061 | }
|
1062 + | ,
|
1063 + | /* ServerOperationErrorGenerator.kt:142 */
|
1064 + | CapturePokemonError::UnsupportedRegionError(_inner) =>
|
1065 + | /* ServerOperationErrorGenerator.kt:78 */
|
1066 + | {
|
1067 + | _inner.fmt(f)
|
1068 + | }
|
1069 + | ,
|
1070 + | /* ServerOperationErrorGenerator.kt:142 */
|
1071 + | CapturePokemonError::InternalServerError(_inner) =>
|
1072 + | /* ServerOperationErrorGenerator.kt:78 */
|
1073 + | {
|
1074 + | _inner.fmt(f)
|
1075 + | }
|
1076 + | /* ServerOperationErrorGenerator.kt:139 */
|
1077 + | }
|
1078 + | /* ServerOperationErrorGenerator.kt:76 */
|
1079 + | }
|
1080 + | /* ServerOperationErrorGenerator.kt:75 */
|
563 1081 | }
|
1082 + | /* ServerOperationErrorGenerator.kt:83 */
|
564 1083 | impl CapturePokemonError {
|
1084 + | /* ServerOperationErrorGenerator.kt:87 */
|
565 1085 | /// Returns `true` if the error kind is `CapturePokemonError::ValidationException`.
|
1086 + | /* ServerOperationErrorGenerator.kt:88 */
|
566 1087 | pub fn is_validation_exception(&self) -> bool {
|
1088 + | /* ServerOperationErrorGenerator.kt:89 */
|
567 1089 | matches!(&self, CapturePokemonError::ValidationException(_))
|
1090 + | /* ServerOperationErrorGenerator.kt:88 */
|
568 1091 | }
|
1092 + | /* ServerOperationErrorGenerator.kt:87 */
|
569 1093 | /// Returns `true` if the error kind is `CapturePokemonError::MasterBallUnsuccessful`.
|
1094 + | /* ServerOperationErrorGenerator.kt:88 */
|
570 1095 | pub fn is_master_ball_unsuccessful(&self) -> bool {
|
1096 + | /* ServerOperationErrorGenerator.kt:89 */
|
571 1097 | matches!(&self, CapturePokemonError::MasterBallUnsuccessful(_))
|
1098 + | /* ServerOperationErrorGenerator.kt:88 */
|
572 1099 | }
|
1100 + | /* ServerOperationErrorGenerator.kt:87 */
|
573 1101 | /// Returns `true` if the error kind is `CapturePokemonError::InvalidPokeballError`.
|
1102 + | /* ServerOperationErrorGenerator.kt:88 */
|
574 1103 | pub fn is_invalid_pokeball_error(&self) -> bool {
|
1104 + | /* ServerOperationErrorGenerator.kt:89 */
|
575 1105 | matches!(&self, CapturePokemonError::InvalidPokeballError(_))
|
1106 + | /* ServerOperationErrorGenerator.kt:88 */
|
576 1107 | }
|
1108 + | /* ServerOperationErrorGenerator.kt:87 */
|
577 1109 | /// Returns `true` if the error kind is `CapturePokemonError::ThrottlingError`.
|
1110 + | /* ServerOperationErrorGenerator.kt:88 */
|
578 1111 | pub fn is_throttling_error(&self) -> bool {
|
1112 + | /* ServerOperationErrorGenerator.kt:89 */
|
579 1113 | matches!(&self, CapturePokemonError::ThrottlingError(_))
|
1114 + | /* ServerOperationErrorGenerator.kt:88 */
|
580 1115 | }
|
1116 + | /* ServerOperationErrorGenerator.kt:87 */
|
581 1117 | /// Returns `true` if the error kind is `CapturePokemonError::UnsupportedRegionError`.
|
1118 + | /* ServerOperationErrorGenerator.kt:88 */
|
582 1119 | pub fn is_unsupported_region_error(&self) -> bool {
|
1120 + | /* ServerOperationErrorGenerator.kt:89 */
|
583 1121 | matches!(&self, CapturePokemonError::UnsupportedRegionError(_))
|
1122 + | /* ServerOperationErrorGenerator.kt:88 */
|
584 1123 | }
|
1124 + | /* ServerOperationErrorGenerator.kt:87 */
|
585 1125 | /// Returns `true` if the error kind is `CapturePokemonError::InternalServerError`.
|
1126 + | /* ServerOperationErrorGenerator.kt:88 */
|
586 1127 | pub fn is_internal_server_error(&self) -> bool {
|
1128 + | /* ServerOperationErrorGenerator.kt:89 */
|
587 1129 | matches!(&self, CapturePokemonError::InternalServerError(_))
|
1130 + | /* ServerOperationErrorGenerator.kt:88 */
|
588 1131 | }
|
1132 + | /* ServerOperationErrorGenerator.kt:92 */
|
589 1133 | /// Returns the error name string by matching the correct variant.
|
1134 + | /* ServerOperationErrorGenerator.kt:93 */
|
590 1135 | pub fn name(&self) -> &'static str {
|
1136 + | /* ServerOperationErrorGenerator.kt:139 */
|
591 1137 | match &self {
|
592 - | CapturePokemonError::ValidationException(_inner) => _inner.name(),
|
593 - | CapturePokemonError::MasterBallUnsuccessful(_inner) => _inner.name(),
|
594 - | CapturePokemonError::InvalidPokeballError(_inner) => _inner.name(),
|
595 - | CapturePokemonError::ThrottlingError(_inner) => _inner.name(),
|
596 - | CapturePokemonError::UnsupportedRegionError(_inner) => _inner.name(),
|
597 - | CapturePokemonError::InternalServerError(_inner) => _inner.name(),
|
1138 + | /* ServerOperationErrorGenerator.kt:142 */
|
1139 + | CapturePokemonError::ValidationException(_inner) =>
|
1140 + | /* ServerOperationErrorGenerator.kt:95 */
|
1141 + | {
|
1142 + | _inner.name()
|
598 1143 | }
|
1144 + | ,
|
1145 + | /* ServerOperationErrorGenerator.kt:142 */
|
1146 + | CapturePokemonError::MasterBallUnsuccessful(_inner) =>
|
1147 + | /* ServerOperationErrorGenerator.kt:95 */
|
1148 + | {
|
1149 + | _inner.name()
|
1150 + | }
|
1151 + | ,
|
1152 + | /* ServerOperationErrorGenerator.kt:142 */
|
1153 + | CapturePokemonError::InvalidPokeballError(_inner) =>
|
1154 + | /* ServerOperationErrorGenerator.kt:95 */
|
1155 + | {
|
1156 + | _inner.name()
|
599 1157 | }
|
1158 + | ,
|
1159 + | /* ServerOperationErrorGenerator.kt:142 */
|
1160 + | CapturePokemonError::ThrottlingError(_inner) =>
|
1161 + | /* ServerOperationErrorGenerator.kt:95 */
|
1162 + | {
|
1163 + | _inner.name()
|
1164 + | }
|
1165 + | ,
|
1166 + | /* ServerOperationErrorGenerator.kt:142 */
|
1167 + | CapturePokemonError::UnsupportedRegionError(_inner) =>
|
1168 + | /* ServerOperationErrorGenerator.kt:95 */
|
1169 + | {
|
1170 + | _inner.name()
|
1171 + | }
|
1172 + | ,
|
1173 + | /* ServerOperationErrorGenerator.kt:142 */
|
1174 + | CapturePokemonError::InternalServerError(_inner) =>
|
1175 + | /* ServerOperationErrorGenerator.kt:95 */
|
1176 + | {
|
1177 + | _inner.name()
|
1178 + | }
|
1179 + | /* ServerOperationErrorGenerator.kt:139 */
|
1180 + | }
|
1181 + | /* ServerOperationErrorGenerator.kt:93 */
|
1182 + | }
|
1183 + | /* ServerOperationErrorGenerator.kt:83 */
|
600 1184 | }
|
1185 + | /* ServerOperationErrorGenerator.kt:100 */
|
601 1186 | impl ::std::error::Error for CapturePokemonError {
|
1187 + | /* ServerOperationErrorGenerator.kt:101 */
|
602 1188 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
1189 + | /* ServerOperationErrorGenerator.kt:139 */
|
603 1190 | match &self {
|
604 - | CapturePokemonError::ValidationException(_inner) => Some(_inner),
|
605 - | CapturePokemonError::MasterBallUnsuccessful(_inner) => Some(_inner),
|
606 - | CapturePokemonError::InvalidPokeballError(_inner) => Some(_inner),
|
607 - | CapturePokemonError::ThrottlingError(_inner) => Some(_inner),
|
608 - | CapturePokemonError::UnsupportedRegionError(_inner) => Some(_inner),
|
609 - | CapturePokemonError::InternalServerError(_inner) => Some(_inner),
|
1191 + | /* ServerOperationErrorGenerator.kt:142 */
|
1192 + | CapturePokemonError::ValidationException(_inner) =>
|
1193 + | /* ServerOperationErrorGenerator.kt:103 */
|
1194 + | {
|
1195 + | Some(_inner)
|
610 1196 | }
|
1197 + | ,
|
1198 + | /* ServerOperationErrorGenerator.kt:142 */
|
1199 + | CapturePokemonError::MasterBallUnsuccessful(_inner) =>
|
1200 + | /* ServerOperationErrorGenerator.kt:103 */
|
1201 + | {
|
1202 + | Some(_inner)
|
1203 + | }
|
1204 + | ,
|
1205 + | /* ServerOperationErrorGenerator.kt:142 */
|
1206 + | CapturePokemonError::InvalidPokeballError(_inner) =>
|
1207 + | /* ServerOperationErrorGenerator.kt:103 */
|
1208 + | {
|
1209 + | Some(_inner)
|
1210 + | }
|
1211 + | ,
|
1212 + | /* ServerOperationErrorGenerator.kt:142 */
|
1213 + | CapturePokemonError::ThrottlingError(_inner) =>
|
1214 + | /* ServerOperationErrorGenerator.kt:103 */
|
1215 + | {
|
1216 + | Some(_inner)
|
1217 + | }
|
1218 + | ,
|
1219 + | /* ServerOperationErrorGenerator.kt:142 */
|
1220 + | CapturePokemonError::UnsupportedRegionError(_inner) =>
|
1221 + | /* ServerOperationErrorGenerator.kt:103 */
|
1222 + | {
|
1223 + | Some(_inner)
|
1224 + | }
|
1225 + | ,
|
1226 + | /* ServerOperationErrorGenerator.kt:142 */
|
1227 + | CapturePokemonError::InternalServerError(_inner) =>
|
1228 + | /* ServerOperationErrorGenerator.kt:103 */
|
1229 + | {
|
1230 + | Some(_inner)
|
1231 + | }
|
1232 + | /* ServerOperationErrorGenerator.kt:139 */
|
611 1233 | }
|
1234 + | /* ServerOperationErrorGenerator.kt:101 */
|
1235 + | }
|
1236 + | /* ServerOperationErrorGenerator.kt:100 */
|
612 1237 | }
|
1238 + | /* ServerOperationErrorGenerator.kt:110 */
|
613 1239 | impl ::std::convert::From<crate::error::ValidationException> for crate::error::CapturePokemonError {
|
1240 + | /* ServerOperationErrorGenerator.kt:111 */
|
614 1241 | fn from(variant: crate::error::ValidationException) -> crate::error::CapturePokemonError {
|
1242 + | /* ServerOperationErrorGenerator.kt:112 */
|
615 1243 | Self::ValidationException(variant)
|
1244 + | /* ServerOperationErrorGenerator.kt:111 */
|
616 1245 | }
|
1246 + | /* ServerOperationErrorGenerator.kt:110 */
|
617 1247 | }
|
1248 + | /* ServerOperationErrorGenerator.kt:110 */
|
618 1249 | impl ::std::convert::From<crate::error::MasterBallUnsuccessful>
|
619 1250 | for crate::error::CapturePokemonError
|
620 1251 | {
|
1252 + | /* ServerOperationErrorGenerator.kt:111 */
|
621 1253 | fn from(variant: crate::error::MasterBallUnsuccessful) -> crate::error::CapturePokemonError {
|
1254 + | /* ServerOperationErrorGenerator.kt:112 */
|
622 1255 | Self::MasterBallUnsuccessful(variant)
|
1256 + | /* ServerOperationErrorGenerator.kt:111 */
|
623 1257 | }
|
1258 + | /* ServerOperationErrorGenerator.kt:110 */
|
624 1259 | }
|
1260 + | /* ServerOperationErrorGenerator.kt:110 */
|
625 1261 | impl ::std::convert::From<crate::error::InvalidPokeballError>
|
626 1262 | for crate::error::CapturePokemonError
|
627 1263 | {
|
1264 + | /* ServerOperationErrorGenerator.kt:111 */
|
628 1265 | fn from(variant: crate::error::InvalidPokeballError) -> crate::error::CapturePokemonError {
|
1266 + | /* ServerOperationErrorGenerator.kt:112 */
|
629 1267 | Self::InvalidPokeballError(variant)
|
1268 + | /* ServerOperationErrorGenerator.kt:111 */
|
630 1269 | }
|
1270 + | /* ServerOperationErrorGenerator.kt:110 */
|
631 1271 | }
|
1272 + | /* ServerOperationErrorGenerator.kt:110 */
|
632 1273 | impl ::std::convert::From<crate::error::ThrottlingError> for crate::error::CapturePokemonError {
|
1274 + | /* ServerOperationErrorGenerator.kt:111 */
|
633 1275 | fn from(variant: crate::error::ThrottlingError) -> crate::error::CapturePokemonError {
|
1276 + | /* ServerOperationErrorGenerator.kt:112 */
|
634 1277 | Self::ThrottlingError(variant)
|
1278 + | /* ServerOperationErrorGenerator.kt:111 */
|
635 1279 | }
|
1280 + | /* ServerOperationErrorGenerator.kt:110 */
|
636 1281 | }
|
1282 + | /* ServerOperationErrorGenerator.kt:110 */
|
637 1283 | impl ::std::convert::From<crate::error::UnsupportedRegionError>
|
638 1284 | for crate::error::CapturePokemonError
|
639 1285 | {
|
1286 + | /* ServerOperationErrorGenerator.kt:111 */
|
640 1287 | fn from(variant: crate::error::UnsupportedRegionError) -> crate::error::CapturePokemonError {
|
1288 + | /* ServerOperationErrorGenerator.kt:112 */
|
641 1289 | Self::UnsupportedRegionError(variant)
|
1290 + | /* ServerOperationErrorGenerator.kt:111 */
|
642 1291 | }
|
1292 + | /* ServerOperationErrorGenerator.kt:110 */
|
643 1293 | }
|
1294 + | /* ServerOperationErrorGenerator.kt:110 */
|
644 1295 | impl ::std::convert::From<crate::error::InternalServerError> for crate::error::CapturePokemonError {
|
1296 + | /* ServerOperationErrorGenerator.kt:111 */
|
645 1297 | fn from(variant: crate::error::InternalServerError) -> crate::error::CapturePokemonError {
|
1298 + | /* ServerOperationErrorGenerator.kt:112 */
|
646 1299 | Self::InternalServerError(variant)
|
1300 + | /* ServerOperationErrorGenerator.kt:111 */
|
647 1301 | }
|
1302 + | /* ServerOperationErrorGenerator.kt:110 */
|
648 1303 | }
|
649 1304 |
|
1305 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
650 1306 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::CapturePokemonError {
|
651 1307 | fn from(variant: ::pyo3::PyErr) -> crate::error::CapturePokemonError {
|
652 1308 | ::pyo3::Python::with_gil(|py| {
|
653 1309 | let error = variant.value(py);
|
654 1310 | if let Ok(error) = error.extract::<crate::error::ValidationException>() {
|
655 1311 | return error.into();
|
656 1312 | }
|
657 1313 | if let Ok(error) = error.extract::<crate::error::MasterBallUnsuccessful>() {
|
658 1314 | return error.into();
|
659 1315 | }
|
660 1316 | if let Ok(error) = error.extract::<crate::error::InvalidPokeballError>() {
|
661 1317 | return error.into();
|
662 1318 | }
|
663 1319 | if let Ok(error) = error.extract::<crate::error::ThrottlingError>() {
|
664 1320 | return error.into();
|
665 1321 | }
|
666 1322 | if let Ok(error) = error.extract::<crate::error::UnsupportedRegionError>() {
|
667 1323 | return error.into();
|
668 1324 | }
|
669 1325 | crate::error::InternalServerError {
|
670 1326 | message: error.to_string(),
|
671 1327 | }
|
672 1328 | .into()
|
673 1329 | })
|
674 1330 | }
|
675 1331 | }
|
676 1332 |
|
1333 + | /* RustType.kt:516 */
|
677 1334 | #[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
|
1335 + | /* PythonServerStructureGenerator.kt:63 */
|
678 1336 | /// :param region str:
|
679 1337 | /// :rtype None:
|
1338 + | /* StructureGenerator.kt:197 */
|
680 1339 | #[allow(missing_docs)] // documentation missing in model
|
1340 + | /* RustType.kt:516 */
|
681 1341 | #[derive(
|
682 1342 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
683 1343 | )]
|
684 - | pub struct UnsupportedRegionError {
|
1344 + | pub /* StructureGenerator.kt:201 */ struct UnsupportedRegionError {
|
1345 + | /* RustType.kt:516 */
|
685 1346 | #[pyo3(get, set)]
|
1347 + | /* PythonServerStructureGenerator.kt:80 */
|
686 1348 | /// :type str:
|
1349 + | /* StructureGenerator.kt:231 */
|
687 1350 | #[allow(missing_docs)] // documentation missing in model
|
688 1351 | pub region: ::std::string::String,
|
1352 + | /* StructureGenerator.kt:201 */
|
689 1353 | }
|
1354 + | /* StructureGenerator.kt:135 */
|
690 1355 | impl UnsupportedRegionError {
|
1356 + | /* StructureGenerator.kt:231 */
|
691 1357 | #[allow(missing_docs)] // documentation missing in model
|
1358 + | /* StructureGenerator.kt:166 */
|
692 1359 | pub fn region(&self) -> &str {
|
1360 + | /* StructureGenerator.kt:171 */
|
693 1361 | use std::ops::Deref;
|
694 1362 | self.region.deref()
|
1363 + | /* StructureGenerator.kt:166 */
|
695 1364 | }
|
1365 + | /* StructureGenerator.kt:135 */
|
696 1366 | }
|
1367 + | /* RustType.kt:516 */
|
697 1368 | #[allow(clippy::new_without_default)]
|
1369 + | /* RustType.kt:516 */
|
698 1370 | #[allow(clippy::too_many_arguments)]
|
1371 + | /* RustType.kt:516 */
|
699 1372 | #[::pyo3::pymethods]
|
1373 + | /* PythonServerStructureGenerator.kt:88 */
|
700 1374 | impl UnsupportedRegionError {
|
701 1375 | #[new]
|
702 1376 | pub fn new(region: ::std::string::String) -> Self {
|
703 1377 | Self { region }
|
704 1378 | }
|
705 1379 | fn __repr__(&self) -> String {
|
706 1380 | format!("{self:?}")
|
707 1381 | }
|
708 1382 | fn __str__(&self) -> String {
|
709 1383 | format!("{self:?}")
|
710 1384 | }
|
711 1385 | }
|
1386 + | /* ErrorImplGenerator.kt:99 */
|
712 1387 | impl UnsupportedRegionError {
|
1388 + | /* ErrorImplGenerator.kt:141 */
|
713 1389 | #[doc(hidden)]
|
714 1390 | /// Returns the error name.
|
715 1391 | pub fn name(&self) -> &'static str {
|
716 1392 | "UnsupportedRegionError"
|
717 1393 | }
|
1394 + | /* ErrorImplGenerator.kt:99 */
|
718 1395 | }
|
1396 + | /* ErrorImplGenerator.kt:153 */
|
719 1397 | impl ::std::fmt::Display for UnsupportedRegionError {
|
1398 + | /* ErrorImplGenerator.kt:154 */
|
720 1399 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1400 + | /* ErrorImplGenerator.kt:161 */
|
721 1401 | ::std::write!(f, "UnsupportedRegionError")?;
|
1402 + | /* ErrorImplGenerator.kt:171 */
|
722 1403 | Ok(())
|
1404 + | /* ErrorImplGenerator.kt:154 */
|
723 1405 | }
|
1406 + | /* ErrorImplGenerator.kt:153 */
|
724 1407 | }
|
1408 + | /* ErrorImplGenerator.kt:175 */
|
725 1409 | impl ::std::error::Error for UnsupportedRegionError {}
|
1410 + | /* ServerCodegenVisitor.kt:370 */
|
726 1411 | impl UnsupportedRegionError {
|
727 - | /// Creates a new builder-style object to manufacture [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
1412 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
1413 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
728 1414 | pub fn builder() -> crate::error::unsupported_region_error::Builder {
|
1415 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
729 1416 | crate::error::unsupported_region_error::Builder::default()
|
1417 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
730 1418 | }
|
1419 + | /* ServerCodegenVisitor.kt:370 */
|
731 1420 | }
|
732 1421 |
|
1422 + | /* RustType.kt:516 */
|
733 1423 | #[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
|
1424 + | /* PythonServerStructureGenerator.kt:63 */
|
734 1425 | /// :rtype None:
|
1426 + | /* StructureGenerator.kt:197 */
|
735 1427 | #[allow(missing_docs)] // documentation missing in model
|
1428 + | /* RustType.kt:516 */
|
736 1429 | #[derive(
|
737 1430 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
738 1431 | )]
|
739 - | pub struct ThrottlingError {}
|
1432 + | pub /* StructureGenerator.kt:201 */ struct ThrottlingError {/* StructureGenerator.kt:201 */}
|
1433 + | /* RustType.kt:516 */
|
740 1434 | #[allow(clippy::new_without_default)]
|
1435 + | /* RustType.kt:516 */
|
741 1436 | #[allow(clippy::too_many_arguments)]
|
1437 + | /* RustType.kt:516 */
|
742 1438 | #[::pyo3::pymethods]
|
1439 + | /* PythonServerStructureGenerator.kt:88 */
|
743 1440 | impl ThrottlingError {
|
744 1441 | #[new]
|
745 1442 | pub fn new() -> Self {
|
746 1443 | Self {}
|
747 1444 | }
|
748 1445 | fn __repr__(&self) -> String {
|
749 1446 | format!("{self:?}")
|
750 1447 | }
|
751 1448 | fn __str__(&self) -> String {
|
752 1449 | format!("{self:?}")
|
753 1450 | }
|
754 1451 | }
|
1452 + | /* ErrorImplGenerator.kt:99 */
|
755 1453 | impl ThrottlingError {
|
1454 + | /* ErrorImplGenerator.kt:141 */
|
756 1455 | #[doc(hidden)]
|
757 1456 | /// Returns the error name.
|
758 1457 | pub fn name(&self) -> &'static str {
|
759 1458 | "ThrottlingError"
|
760 1459 | }
|
1460 + | /* ErrorImplGenerator.kt:99 */
|
761 1461 | }
|
1462 + | /* ErrorImplGenerator.kt:153 */
|
762 1463 | impl ::std::fmt::Display for ThrottlingError {
|
1464 + | /* ErrorImplGenerator.kt:154 */
|
763 1465 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1466 + | /* ErrorImplGenerator.kt:161 */
|
764 1467 | ::std::write!(f, "ThrottlingError")?;
|
1468 + | /* ErrorImplGenerator.kt:171 */
|
765 1469 | Ok(())
|
1470 + | /* ErrorImplGenerator.kt:154 */
|
766 1471 | }
|
1472 + | /* ErrorImplGenerator.kt:153 */
|
767 1473 | }
|
1474 + | /* ErrorImplGenerator.kt:175 */
|
768 1475 | impl ::std::error::Error for ThrottlingError {}
|
1476 + | /* ServerCodegenVisitor.kt:370 */
|
769 1477 | impl ThrottlingError {
|
770 - | /// Creates a new builder-style object to manufacture [`ThrottlingError`](crate::error::ThrottlingError).
|
1478 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ThrottlingError`](crate::error::ThrottlingError).
|
1479 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
771 1480 | pub fn builder() -> crate::error::throttling_error::Builder {
|
1481 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
772 1482 | crate::error::throttling_error::Builder::default()
|
1483 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
773 1484 | }
|
1485 + | /* ServerCodegenVisitor.kt:370 */
|
774 1486 | }
|
775 1487 |
|
1488 + | /* RustType.kt:516 */
|
776 1489 | #[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
|
1490 + | /* PythonServerStructureGenerator.kt:63 */
|
777 1491 | /// :param pokeball str:
|
778 1492 | /// :rtype None:
|
1493 + | /* StructureGenerator.kt:197 */
|
779 1494 | #[allow(missing_docs)] // documentation missing in model
|
1495 + | /* RustType.kt:516 */
|
780 1496 | #[derive(
|
781 1497 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
782 1498 | )]
|
783 - | pub struct InvalidPokeballError {
|
1499 + | pub /* StructureGenerator.kt:201 */ struct InvalidPokeballError {
|
1500 + | /* RustType.kt:516 */
|
784 1501 | #[pyo3(get, set)]
|
1502 + | /* PythonServerStructureGenerator.kt:80 */
|
785 1503 | /// :type str:
|
1504 + | /* StructureGenerator.kt:231 */
|
786 1505 | #[allow(missing_docs)] // documentation missing in model
|
787 1506 | pub pokeball: ::std::string::String,
|
1507 + | /* StructureGenerator.kt:201 */
|
788 1508 | }
|
1509 + | /* StructureGenerator.kt:135 */
|
789 1510 | impl InvalidPokeballError {
|
1511 + | /* StructureGenerator.kt:231 */
|
790 1512 | #[allow(missing_docs)] // documentation missing in model
|
1513 + | /* StructureGenerator.kt:166 */
|
791 1514 | pub fn pokeball(&self) -> &str {
|
1515 + | /* StructureGenerator.kt:171 */
|
792 1516 | use std::ops::Deref;
|
793 1517 | self.pokeball.deref()
|
1518 + | /* StructureGenerator.kt:166 */
|
794 1519 | }
|
1520 + | /* StructureGenerator.kt:135 */
|
795 1521 | }
|
1522 + | /* RustType.kt:516 */
|
796 1523 | #[allow(clippy::new_without_default)]
|
1524 + | /* RustType.kt:516 */
|
797 1525 | #[allow(clippy::too_many_arguments)]
|
1526 + | /* RustType.kt:516 */
|
798 1527 | #[::pyo3::pymethods]
|
1528 + | /* PythonServerStructureGenerator.kt:88 */
|
799 1529 | impl InvalidPokeballError {
|
800 1530 | #[new]
|
801 1531 | pub fn new(pokeball: ::std::string::String) -> Self {
|
802 1532 | Self { pokeball }
|
803 1533 | }
|
804 1534 | fn __repr__(&self) -> String {
|
805 1535 | format!("{self:?}")
|
806 1536 | }
|
807 1537 | fn __str__(&self) -> String {
|
808 1538 | format!("{self:?}")
|
809 1539 | }
|
810 1540 | }
|
1541 + | /* ErrorImplGenerator.kt:99 */
|
811 1542 | impl InvalidPokeballError {
|
1543 + | /* ErrorImplGenerator.kt:141 */
|
812 1544 | #[doc(hidden)]
|
813 1545 | /// Returns the error name.
|
814 1546 | pub fn name(&self) -> &'static str {
|
815 1547 | "InvalidPokeballError"
|
816 1548 | }
|
1549 + | /* ErrorImplGenerator.kt:99 */
|
817 1550 | }
|
1551 + | /* ErrorImplGenerator.kt:153 */
|
818 1552 | impl ::std::fmt::Display for InvalidPokeballError {
|
1553 + | /* ErrorImplGenerator.kt:154 */
|
819 1554 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1555 + | /* ErrorImplGenerator.kt:161 */
|
820 1556 | ::std::write!(f, "InvalidPokeballError")?;
|
1557 + | /* ErrorImplGenerator.kt:171 */
|
821 1558 | Ok(())
|
1559 + | /* ErrorImplGenerator.kt:154 */
|
822 1560 | }
|
1561 + | /* ErrorImplGenerator.kt:153 */
|
823 1562 | }
|
1563 + | /* ErrorImplGenerator.kt:175 */
|
824 1564 | impl ::std::error::Error for InvalidPokeballError {}
|
1565 + | /* ServerCodegenVisitor.kt:370 */
|
825 1566 | impl InvalidPokeballError {
|
826 - | /// Creates a new builder-style object to manufacture [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
1567 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
1568 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
827 1569 | pub fn builder() -> crate::error::invalid_pokeball_error::Builder {
|
1570 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
828 1571 | crate::error::invalid_pokeball_error::Builder::default()
|
1572 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
829 1573 | }
|
1574 + | /* ServerCodegenVisitor.kt:370 */
|
830 1575 | }
|
831 1576 |
|
1577 + | /* RustType.kt:516 */
|
832 1578 | #[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
|
1579 + | /* PythonServerStructureGenerator.kt:63 */
|
833 1580 | /// :param message typing.Optional\[str\]:
|
834 1581 | /// :rtype None:
|
1582 + | /* StructureGenerator.kt:197 */
|
835 1583 | #[allow(missing_docs)] // documentation missing in model
|
1584 + | /* RustType.kt:516 */
|
836 1585 | #[derive(
|
837 1586 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
838 1587 | )]
|
839 - | pub struct MasterBallUnsuccessful {
|
1588 + | pub /* StructureGenerator.kt:201 */ struct MasterBallUnsuccessful {
|
1589 + | /* RustType.kt:516 */
|
840 1590 | #[pyo3(get, set)]
|
1591 + | /* PythonServerStructureGenerator.kt:80 */
|
841 1592 | /// :type typing.Optional\[str\]:
|
1593 + | /* StructureGenerator.kt:231 */
|
842 1594 | #[allow(missing_docs)] // documentation missing in model
|
843 1595 | pub message: ::std::option::Option<::std::string::String>,
|
1596 + | /* StructureGenerator.kt:201 */
|
844 1597 | }
|
1598 + | /* RustType.kt:516 */
|
845 1599 | #[allow(clippy::new_without_default)]
|
1600 + | /* RustType.kt:516 */
|
846 1601 | #[allow(clippy::too_many_arguments)]
|
1602 + | /* RustType.kt:516 */
|
847 1603 | #[::pyo3::pymethods]
|
1604 + | /* PythonServerStructureGenerator.kt:88 */
|
848 1605 | impl MasterBallUnsuccessful {
|
849 1606 | #[new]
|
850 1607 | pub fn new(message: ::std::option::Option<::std::string::String>) -> Self {
|
851 1608 | Self { message }
|
852 1609 | }
|
853 1610 | fn __repr__(&self) -> String {
|
854 1611 | format!("{self:?}")
|
855 1612 | }
|
856 1613 | fn __str__(&self) -> String {
|
857 1614 | format!("{self:?}")
|
858 1615 | }
|
859 1616 | }
|
1617 + | /* ErrorImplGenerator.kt:99 */
|
860 1618 | impl MasterBallUnsuccessful {
|
1619 + | /* ErrorImplGenerator.kt:128 */
|
861 1620 | /// Returns the error message.
|
862 1621 | pub fn message(&self) -> ::std::option::Option<&str> {
|
863 1622 | self.message.as_deref()
|
864 1623 | }
|
1624 + | /* ErrorImplGenerator.kt:141 */
|
865 1625 | #[doc(hidden)]
|
866 1626 | /// Returns the error name.
|
867 1627 | pub fn name(&self) -> &'static str {
|
868 1628 | "MasterBallUnsuccessful"
|
869 1629 | }
|
1630 + | /* ErrorImplGenerator.kt:99 */
|
870 1631 | }
|
1632 + | /* ErrorImplGenerator.kt:153 */
|
871 1633 | impl ::std::fmt::Display for MasterBallUnsuccessful {
|
1634 + | /* ErrorImplGenerator.kt:154 */
|
872 1635 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1636 + | /* ErrorImplGenerator.kt:161 */
|
873 1637 | ::std::write!(f, "MasterBallUnsuccessful")?;
|
1638 + | /* ErrorImplGenerator.kt:166 */
|
874 1639 | if let ::std::option::Option::Some(inner_1) = &self.message {
|
1640 + | /* ErrorImplGenerator.kt:166 */
|
875 1641 | {
|
1642 + | /* ErrorImplGenerator.kt:167 */
|
876 1643 | ::std::write!(f, ": {}", inner_1)?;
|
1644 + | /* ErrorImplGenerator.kt:166 */
|
877 1645 | }
|
1646 + | /* ErrorImplGenerator.kt:166 */
|
878 1647 | }
|
1648 + | /* ErrorImplGenerator.kt:171 */
|
879 1649 | Ok(())
|
1650 + | /* ErrorImplGenerator.kt:154 */
|
880 1651 | }
|
1652 + | /* ErrorImplGenerator.kt:153 */
|
881 1653 | }
|
1654 + | /* ErrorImplGenerator.kt:175 */
|
882 1655 | impl ::std::error::Error for MasterBallUnsuccessful {}
|
1656 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
883 1657 | impl crate::constrained::Constrained for crate::error::MasterBallUnsuccessful {
|
884 1658 | type Unconstrained = crate::error::master_ball_unsuccessful_internal::Builder;
|
885 1659 | }
|
1660 + | /* ServerCodegenVisitor.kt:370 */
|
886 1661 | impl MasterBallUnsuccessful {
|
887 - | /// Creates a new builder-style object to manufacture [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
1662 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
1663 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
888 1664 | pub fn builder() -> crate::error::master_ball_unsuccessful::Builder {
|
1665 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
889 1666 | crate::error::master_ball_unsuccessful::Builder::default()
|
1667 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
890 1668 | }
|
1669 + | /* ServerCodegenVisitor.kt:370 */
|
891 1670 | }
|
892 1671 |
|
1672 + | /* ServerOperationErrorGenerator.kt:63 */
|
893 1673 | /// Error type for the `CapturePokemonEvents` operation.
|
1674 + | /* ServerOperationErrorGenerator.kt:64 */
|
894 1675 | /// Each variant represents an error that can occur for the `CapturePokemonEvents` operation.
|
1676 + | /* RustType.kt:516 */
|
895 1677 | #[derive(::std::fmt::Debug)]
|
896 - | pub enum CapturePokemonEventsError {
|
1678 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum CapturePokemonEventsError {
|
1679 + | /* ServerOperationErrorGenerator.kt:68 */
|
897 1680 | #[allow(missing_docs)] // documentation missing in model
|
1681 + | /* ServerOperationErrorGenerator.kt:71 */
|
898 1682 | InvalidPokeballError(crate::error::InvalidPokeballError),
|
1683 + | /* ServerOperationErrorGenerator.kt:68 */
|
899 1684 | #[allow(missing_docs)] // documentation missing in model
|
1685 + | /* ServerOperationErrorGenerator.kt:71 */
|
900 1686 | ThrottlingError(crate::error::ThrottlingError),
|
1687 + | /* ServerOperationErrorGenerator.kt:66 */
|
901 1688 | }
|
1689 + | /* ServerOperationErrorGenerator.kt:75 */
|
902 1690 | impl ::std::fmt::Display for CapturePokemonEventsError {
|
1691 + | /* ServerOperationErrorGenerator.kt:76 */
|
903 1692 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1693 + | /* ServerOperationErrorGenerator.kt:139 */
|
904 1694 | match &self {
|
905 - | CapturePokemonEventsError::InvalidPokeballError(_inner) => _inner.fmt(f),
|
906 - | CapturePokemonEventsError::ThrottlingError(_inner) => _inner.fmt(f),
|
1695 + | /* ServerOperationErrorGenerator.kt:142 */
|
1696 + | CapturePokemonEventsError::InvalidPokeballError(_inner) =>
|
1697 + | /* ServerOperationErrorGenerator.kt:78 */
|
1698 + | {
|
1699 + | _inner.fmt(f)
|
1700 + | }
|
1701 + | ,
|
1702 + | /* ServerOperationErrorGenerator.kt:142 */
|
1703 + | CapturePokemonEventsError::ThrottlingError(_inner) =>
|
1704 + | /* ServerOperationErrorGenerator.kt:78 */
|
1705 + | {
|
1706 + | _inner.fmt(f)
|
1707 + | }
|
1708 + | /* ServerOperationErrorGenerator.kt:139 */
|
907 1709 | }
|
1710 + | /* ServerOperationErrorGenerator.kt:76 */
|
908 1711 | }
|
1712 + | /* ServerOperationErrorGenerator.kt:75 */
|
909 1713 | }
|
1714 + | /* ServerOperationErrorGenerator.kt:83 */
|
910 1715 | impl CapturePokemonEventsError {
|
1716 + | /* ServerOperationErrorGenerator.kt:87 */
|
911 1717 | /// Returns `true` if the error kind is `CapturePokemonEventsError::InvalidPokeballError`.
|
1718 + | /* ServerOperationErrorGenerator.kt:88 */
|
912 1719 | pub fn is_invalid_pokeball_error(&self) -> bool {
|
1720 + | /* ServerOperationErrorGenerator.kt:89 */
|
913 1721 | matches!(&self, CapturePokemonEventsError::InvalidPokeballError(_))
|
1722 + | /* ServerOperationErrorGenerator.kt:88 */
|
914 1723 | }
|
1724 + | /* ServerOperationErrorGenerator.kt:87 */
|
915 1725 | /// Returns `true` if the error kind is `CapturePokemonEventsError::ThrottlingError`.
|
1726 + | /* ServerOperationErrorGenerator.kt:88 */
|
916 1727 | pub fn is_throttling_error(&self) -> bool {
|
1728 + | /* ServerOperationErrorGenerator.kt:89 */
|
917 1729 | matches!(&self, CapturePokemonEventsError::ThrottlingError(_))
|
1730 + | /* ServerOperationErrorGenerator.kt:88 */
|
918 1731 | }
|
1732 + | /* ServerOperationErrorGenerator.kt:92 */
|
919 1733 | /// Returns the error name string by matching the correct variant.
|
1734 + | /* ServerOperationErrorGenerator.kt:93 */
|
920 1735 | pub fn name(&self) -> &'static str {
|
1736 + | /* ServerOperationErrorGenerator.kt:139 */
|
921 1737 | match &self {
|
922 - | CapturePokemonEventsError::InvalidPokeballError(_inner) => _inner.name(),
|
923 - | CapturePokemonEventsError::ThrottlingError(_inner) => _inner.name(),
|
1738 + | /* ServerOperationErrorGenerator.kt:142 */
|
1739 + | CapturePokemonEventsError::InvalidPokeballError(_inner) =>
|
1740 + | /* ServerOperationErrorGenerator.kt:95 */
|
1741 + | {
|
1742 + | _inner.name()
|
1743 + | }
|
1744 + | ,
|
1745 + | /* ServerOperationErrorGenerator.kt:142 */
|
1746 + | CapturePokemonEventsError::ThrottlingError(_inner) =>
|
1747 + | /* ServerOperationErrorGenerator.kt:95 */
|
1748 + | {
|
1749 + | _inner.name()
|
924 1750 | }
|
1751 + | /* ServerOperationErrorGenerator.kt:139 */
|
925 1752 | }
|
1753 + | /* ServerOperationErrorGenerator.kt:93 */
|
1754 + | }
|
1755 + | /* ServerOperationErrorGenerator.kt:83 */
|
926 1756 | }
|
1757 + | /* ServerOperationErrorGenerator.kt:100 */
|
927 1758 | impl ::std::error::Error for CapturePokemonEventsError {
|
1759 + | /* ServerOperationErrorGenerator.kt:101 */
|
928 1760 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
1761 + | /* ServerOperationErrorGenerator.kt:139 */
|
929 1762 | match &self {
|
930 - | CapturePokemonEventsError::InvalidPokeballError(_inner) => Some(_inner),
|
931 - | CapturePokemonEventsError::ThrottlingError(_inner) => Some(_inner),
|
1763 + | /* ServerOperationErrorGenerator.kt:142 */
|
1764 + | CapturePokemonEventsError::InvalidPokeballError(_inner) =>
|
1765 + | /* ServerOperationErrorGenerator.kt:103 */
|
1766 + | {
|
1767 + | Some(_inner)
|
932 1768 | }
|
1769 + | ,
|
1770 + | /* ServerOperationErrorGenerator.kt:142 */
|
1771 + | CapturePokemonEventsError::ThrottlingError(_inner) =>
|
1772 + | /* ServerOperationErrorGenerator.kt:103 */
|
1773 + | {
|
1774 + | Some(_inner)
|
1775 + | }
|
1776 + | /* ServerOperationErrorGenerator.kt:139 */
|
1777 + | }
|
1778 + | /* ServerOperationErrorGenerator.kt:101 */
|
933 1779 | }
|
1780 + | /* ServerOperationErrorGenerator.kt:100 */
|
934 1781 | }
|
1782 + | /* ServerOperationErrorGenerator.kt:110 */
|
935 1783 | impl ::std::convert::From<crate::error::InvalidPokeballError>
|
936 1784 | for crate::error::CapturePokemonEventsError
|
937 1785 | {
|
1786 + | /* ServerOperationErrorGenerator.kt:111 */
|
938 1787 | fn from(
|
939 1788 | variant: crate::error::InvalidPokeballError,
|
940 1789 | ) -> crate::error::CapturePokemonEventsError {
|
1790 + | /* ServerOperationErrorGenerator.kt:112 */
|
941 1791 | Self::InvalidPokeballError(variant)
|
1792 + | /* ServerOperationErrorGenerator.kt:111 */
|
942 1793 | }
|
1794 + | /* ServerOperationErrorGenerator.kt:110 */
|
943 1795 | }
|
1796 + | /* ServerOperationErrorGenerator.kt:110 */
|
944 1797 | impl ::std::convert::From<crate::error::ThrottlingError>
|
945 1798 | for crate::error::CapturePokemonEventsError
|
946 1799 | {
|
1800 + | /* ServerOperationErrorGenerator.kt:111 */
|
947 1801 | fn from(variant: crate::error::ThrottlingError) -> crate::error::CapturePokemonEventsError {
|
1802 + | /* ServerOperationErrorGenerator.kt:112 */
|
948 1803 | Self::ThrottlingError(variant)
|
1804 + | /* ServerOperationErrorGenerator.kt:111 */
|
949 1805 | }
|
1806 + | /* ServerOperationErrorGenerator.kt:110 */
|
950 1807 | }
|
1808 + | /* PythonServerEventStreamErrorGenerator.kt:57 */
|
951 1809 | impl<'source> ::pyo3::FromPyObject<'source> for CapturePokemonEventsError {
|
1810 + | /* PythonServerEventStreamErrorGenerator.kt:58 */
|
952 1811 | fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
1812 + | /* PythonServerEventStreamErrorGenerator.kt:61 */
|
953 1813 | if let Ok(it) = obj.extract::<crate::error::InvalidPokeballError>() {
|
954 1814 | return Ok(Self::InvalidPokeballError(it));
|
955 1815 | }
|
1816 + | /* PythonServerEventStreamErrorGenerator.kt:61 */
|
956 1817 | if let Ok(it) = obj.extract::<crate::error::ThrottlingError>() {
|
957 1818 | return Ok(Self::ThrottlingError(it));
|
958 1819 | }
|
1820 + | /* PythonServerEventStreamErrorGenerator.kt:70 */
|
959 1821 | Err(::pyo3::exceptions::PyTypeError::new_err(format!(
|
960 1822 | "failed to extract 'CapturePokemonEventsError' from '{}'",
|
961 1823 | obj
|
962 1824 | )))
|
1825 + | /* PythonServerEventStreamErrorGenerator.kt:58 */
|
963 1826 | }
|
1827 + | /* PythonServerEventStreamErrorGenerator.kt:57 */
|
964 1828 | }
|
1829 + | /* PythonServerEventStreamErrorGenerator.kt:86 */
|
965 1830 | impl ::pyo3::IntoPy<::pyo3::PyObject> for CapturePokemonEventsError {
|
1831 + | /* PythonServerEventStreamErrorGenerator.kt:87 */
|
966 1832 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
1833 + | /* PythonServerEventStreamErrorGenerator.kt:88 */
|
967 1834 | match self {
|
1835 + | /* PythonServerEventStreamErrorGenerator.kt:91 */
|
968 1836 | Self::InvalidPokeballError(it) => match ::pyo3::Py::new(py, it) {
|
969 1837 | Ok(it) => it.into_py(py),
|
970 1838 | Err(err) => err.into_py(py),
|
971 1839 | },
|
1840 + | /* PythonServerEventStreamErrorGenerator.kt:91 */
|
972 1841 | Self::ThrottlingError(it) => match ::pyo3::Py::new(py, it) {
|
973 1842 | Ok(it) => it.into_py(py),
|
974 1843 | Err(err) => err.into_py(py),
|
975 - | },
|
1844 + | }, /* PythonServerEventStreamErrorGenerator.kt:88 */
|
976 1845 | }
|
1846 + | /* PythonServerEventStreamErrorGenerator.kt:87 */
|
977 1847 | }
|
1848 + | /* PythonServerEventStreamErrorGenerator.kt:86 */
|
978 1849 | }
|
1850 + | /* PythonServerEventStreamErrorGenerator.kt:107 */
|
979 1851 | impl ::std::convert::From<CapturePokemonEventsError> for ::pyo3::PyErr {
|
1852 + | /* PythonServerEventStreamErrorGenerator.kt:108 */
|
980 1853 | fn from(err: CapturePokemonEventsError) -> ::pyo3::PyErr {
|
1854 + | /* PythonServerEventStreamErrorGenerator.kt:109 */
|
981 1855 | ::pyo3::Python::with_gil(|py| {
|
982 1856 | let py_err = ::pyo3::IntoPy::into_py(err, py);
|
983 1857 | ::pyo3::PyErr::from_value(py_err.as_ref(py))
|
984 1858 | })
|
1859 + | /* PythonServerEventStreamErrorGenerator.kt:108 */
|
985 1860 | }
|
1861 + | /* PythonServerEventStreamErrorGenerator.kt:107 */
|
986 1862 | }
|
987 1863 |
|
1864 + | /* ServerOperationErrorGenerator.kt:63 */
|
988 1865 | /// Error type for the `AttemptCapturingPokemonEvent` operation.
|
1866 + | /* ServerOperationErrorGenerator.kt:64 */
|
989 1867 | /// Each variant represents an error that can occur for the `AttemptCapturingPokemonEvent` operation.
|
1868 + | /* RustType.kt:516 */
|
990 1869 | #[derive(::std::fmt::Debug)]
|
991 - | pub enum AttemptCapturingPokemonEventError {
|
1870 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum AttemptCapturingPokemonEventError {
|
1871 + | /* ServerOperationErrorGenerator.kt:68 */
|
992 1872 | #[allow(missing_docs)] // documentation missing in model
|
1873 + | /* ServerOperationErrorGenerator.kt:71 */
|
993 1874 | MasterBallUnsuccessful(crate::error::MasterBallUnsuccessful),
|
1875 + | /* ServerOperationErrorGenerator.kt:66 */
|
994 1876 | }
|
1877 + | /* ServerOperationErrorGenerator.kt:75 */
|
995 1878 | impl ::std::fmt::Display for AttemptCapturingPokemonEventError {
|
1879 + | /* ServerOperationErrorGenerator.kt:76 */
|
996 1880 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1881 + | /* ServerOperationErrorGenerator.kt:139 */
|
997 1882 | match &self {
|
998 - | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_inner) => _inner.fmt(f),
|
1883 + | /* ServerOperationErrorGenerator.kt:142 */
|
1884 + | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_inner) =>
|
1885 + | /* ServerOperationErrorGenerator.kt:78 */
|
1886 + | {
|
1887 + | _inner.fmt(f)
|
999 1888 | }
|
1889 + | /* ServerOperationErrorGenerator.kt:139 */
|
1000 1890 | }
|
1891 + | /* ServerOperationErrorGenerator.kt:76 */
|
1892 + | }
|
1893 + | /* ServerOperationErrorGenerator.kt:75 */
|
1001 1894 | }
|
1895 + | /* ServerOperationErrorGenerator.kt:83 */
|
1002 1896 | impl AttemptCapturingPokemonEventError {
|
1897 + | /* ServerOperationErrorGenerator.kt:87 */
|
1003 1898 | /// Returns `true` if the error kind is `AttemptCapturingPokemonEventError::MasterBallUnsuccessful`.
|
1899 + | /* ServerOperationErrorGenerator.kt:88 */
|
1004 1900 | pub fn is_master_ball_unsuccessful(&self) -> bool {
|
1901 + | /* ServerOperationErrorGenerator.kt:89 */
|
1005 1902 | matches!(
|
1006 1903 | &self,
|
1007 1904 | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_)
|
1008 1905 | )
|
1906 + | /* ServerOperationErrorGenerator.kt:88 */
|
1009 1907 | }
|
1908 + | /* ServerOperationErrorGenerator.kt:92 */
|
1010 1909 | /// Returns the error name string by matching the correct variant.
|
1910 + | /* ServerOperationErrorGenerator.kt:93 */
|
1011 1911 | pub fn name(&self) -> &'static str {
|
1912 + | /* ServerOperationErrorGenerator.kt:139 */
|
1012 1913 | match &self {
|
1013 - | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_inner) => _inner.name(),
|
1914 + | /* ServerOperationErrorGenerator.kt:142 */
|
1915 + | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_inner) =>
|
1916 + | /* ServerOperationErrorGenerator.kt:95 */
|
1917 + | {
|
1918 + | _inner.name()
|
1919 + | }
|
1920 + | /* ServerOperationErrorGenerator.kt:139 */
|
1014 1921 | }
|
1922 + | /* ServerOperationErrorGenerator.kt:93 */
|
1015 1923 | }
|
1924 + | /* ServerOperationErrorGenerator.kt:83 */
|
1016 1925 | }
|
1926 + | /* ServerOperationErrorGenerator.kt:100 */
|
1017 1927 | impl ::std::error::Error for AttemptCapturingPokemonEventError {
|
1928 + | /* ServerOperationErrorGenerator.kt:101 */
|
1018 1929 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
1930 + | /* ServerOperationErrorGenerator.kt:139 */
|
1019 1931 | match &self {
|
1020 - | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_inner) => Some(_inner),
|
1932 + | /* ServerOperationErrorGenerator.kt:142 */
|
1933 + | AttemptCapturingPokemonEventError::MasterBallUnsuccessful(_inner) =>
|
1934 + | /* ServerOperationErrorGenerator.kt:103 */
|
1935 + | {
|
1936 + | Some(_inner)
|
1937 + | }
|
1938 + | /* ServerOperationErrorGenerator.kt:139 */
|
1021 1939 | }
|
1940 + | /* ServerOperationErrorGenerator.kt:101 */
|
1022 1941 | }
|
1942 + | /* ServerOperationErrorGenerator.kt:100 */
|
1023 1943 | }
|
1944 + | /* ServerOperationErrorGenerator.kt:110 */
|
1024 1945 | impl ::std::convert::From<crate::error::MasterBallUnsuccessful>
|
1025 1946 | for crate::error::AttemptCapturingPokemonEventError
|
1026 1947 | {
|
1948 + | /* ServerOperationErrorGenerator.kt:111 */
|
1027 1949 | fn from(
|
1028 1950 | variant: crate::error::MasterBallUnsuccessful,
|
1029 1951 | ) -> crate::error::AttemptCapturingPokemonEventError {
|
1952 + | /* ServerOperationErrorGenerator.kt:112 */
|
1030 1953 | Self::MasterBallUnsuccessful(variant)
|
1954 + | /* ServerOperationErrorGenerator.kt:111 */
|
1031 1955 | }
|
1956 + | /* ServerOperationErrorGenerator.kt:110 */
|
1032 1957 | }
|
1958 + | /* PythonServerEventStreamErrorGenerator.kt:57 */
|
1033 1959 | impl<'source> ::pyo3::FromPyObject<'source> for AttemptCapturingPokemonEventError {
|
1960 + | /* PythonServerEventStreamErrorGenerator.kt:58 */
|
1034 1961 | fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
1962 + | /* PythonServerEventStreamErrorGenerator.kt:61 */
|
1035 1963 | if let Ok(it) = obj.extract::<crate::error::MasterBallUnsuccessful>() {
|
1036 1964 | return Ok(Self::MasterBallUnsuccessful(it));
|
1037 1965 | }
|
1966 + | /* PythonServerEventStreamErrorGenerator.kt:70 */
|
1038 1967 | Err(::pyo3::exceptions::PyTypeError::new_err(format!(
|
1039 1968 | "failed to extract 'AttemptCapturingPokemonEventError' from '{}'",
|
1040 1969 | obj
|
1041 1970 | )))
|
1971 + | /* PythonServerEventStreamErrorGenerator.kt:58 */
|
1042 1972 | }
|
1973 + | /* PythonServerEventStreamErrorGenerator.kt:57 */
|
1043 1974 | }
|
1975 + | /* PythonServerEventStreamErrorGenerator.kt:86 */
|
1044 1976 | impl ::pyo3::IntoPy<::pyo3::PyObject> for AttemptCapturingPokemonEventError {
|
1977 + | /* PythonServerEventStreamErrorGenerator.kt:87 */
|
1045 1978 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
1979 + | /* PythonServerEventStreamErrorGenerator.kt:88 */
|
1046 1980 | match self {
|
1981 + | /* PythonServerEventStreamErrorGenerator.kt:91 */
|
1047 1982 | Self::MasterBallUnsuccessful(it) => match ::pyo3::Py::new(py, it) {
|
1048 1983 | Ok(it) => it.into_py(py),
|
1049 1984 | Err(err) => err.into_py(py),
|
1050 - | },
|
1985 + | }, /* PythonServerEventStreamErrorGenerator.kt:88 */
|
1051 1986 | }
|
1987 + | /* PythonServerEventStreamErrorGenerator.kt:87 */
|
1052 1988 | }
|
1989 + | /* PythonServerEventStreamErrorGenerator.kt:86 */
|
1053 1990 | }
|
1991 + | /* PythonServerEventStreamErrorGenerator.kt:107 */
|
1054 1992 | impl ::std::convert::From<AttemptCapturingPokemonEventError> for ::pyo3::PyErr {
|
1993 + | /* PythonServerEventStreamErrorGenerator.kt:108 */
|
1055 1994 | fn from(err: AttemptCapturingPokemonEventError) -> ::pyo3::PyErr {
|
1995 + | /* PythonServerEventStreamErrorGenerator.kt:109 */
|
1056 1996 | ::pyo3::Python::with_gil(|py| {
|
1057 1997 | let py_err = ::pyo3::IntoPy::into_py(err, py);
|
1058 1998 | ::pyo3::PyErr::from_value(py_err.as_ref(py))
|
1059 1999 | })
|
2000 + | /* PythonServerEventStreamErrorGenerator.kt:108 */
|
1060 2001 | }
|
2002 + | /* PythonServerEventStreamErrorGenerator.kt:107 */
|
1061 2003 | }
|
1062 2004 |
|
2005 + | /* ServerOperationErrorGenerator.kt:63 */
|
1063 2006 | /// Error type for the `DoNothing` operation.
|
2007 + | /* ServerOperationErrorGenerator.kt:64 */
|
1064 2008 | /// Each variant represents an error that can occur for the `DoNothing` operation.
|
2009 + | /* RustType.kt:516 */
|
1065 2010 | #[derive(::std::fmt::Debug)]
|
1066 - | pub enum DoNothingError {
|
2011 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum DoNothingError {
|
2012 + | /* ServerOperationErrorGenerator.kt:68 */
|
1067 2013 | #[allow(missing_docs)] // documentation missing in model
|
2014 + | /* ServerOperationErrorGenerator.kt:71 */
|
1068 2015 | InternalServerError(crate::error::InternalServerError),
|
2016 + | /* ServerOperationErrorGenerator.kt:66 */
|
1069 2017 | }
|
2018 + | /* ServerOperationErrorGenerator.kt:75 */
|
1070 2019 | impl ::std::fmt::Display for DoNothingError {
|
2020 + | /* ServerOperationErrorGenerator.kt:76 */
|
1071 2021 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2022 + | /* ServerOperationErrorGenerator.kt:139 */
|
1072 2023 | match &self {
|
1073 - | DoNothingError::InternalServerError(_inner) => _inner.fmt(f),
|
2024 + | /* ServerOperationErrorGenerator.kt:142 */
|
2025 + | DoNothingError::InternalServerError(_inner) =>
|
2026 + | /* ServerOperationErrorGenerator.kt:78 */
|
2027 + | {
|
2028 + | _inner.fmt(f)
|
2029 + | }
|
2030 + | /* ServerOperationErrorGenerator.kt:139 */
|
1074 2031 | }
|
2032 + | /* ServerOperationErrorGenerator.kt:76 */
|
1075 2033 | }
|
2034 + | /* ServerOperationErrorGenerator.kt:75 */
|
1076 2035 | }
|
2036 + | /* ServerOperationErrorGenerator.kt:83 */
|
1077 2037 | impl DoNothingError {
|
2038 + | /* ServerOperationErrorGenerator.kt:87 */
|
1078 2039 | /// Returns `true` if the error kind is `DoNothingError::InternalServerError`.
|
2040 + | /* ServerOperationErrorGenerator.kt:88 */
|
1079 2041 | pub fn is_internal_server_error(&self) -> bool {
|
2042 + | /* ServerOperationErrorGenerator.kt:89 */
|
1080 2043 | matches!(&self, DoNothingError::InternalServerError(_))
|
2044 + | /* ServerOperationErrorGenerator.kt:88 */
|
1081 2045 | }
|
2046 + | /* ServerOperationErrorGenerator.kt:92 */
|
1082 2047 | /// Returns the error name string by matching the correct variant.
|
2048 + | /* ServerOperationErrorGenerator.kt:93 */
|
1083 2049 | pub fn name(&self) -> &'static str {
|
2050 + | /* ServerOperationErrorGenerator.kt:139 */
|
1084 2051 | match &self {
|
1085 - | DoNothingError::InternalServerError(_inner) => _inner.name(),
|
2052 + | /* ServerOperationErrorGenerator.kt:142 */
|
2053 + | DoNothingError::InternalServerError(_inner) =>
|
2054 + | /* ServerOperationErrorGenerator.kt:95 */
|
2055 + | {
|
2056 + | _inner.name()
|
2057 + | }
|
2058 + | /* ServerOperationErrorGenerator.kt:139 */
|
1086 2059 | }
|
2060 + | /* ServerOperationErrorGenerator.kt:93 */
|
1087 2061 | }
|
2062 + | /* ServerOperationErrorGenerator.kt:83 */
|
1088 2063 | }
|
2064 + | /* ServerOperationErrorGenerator.kt:100 */
|
1089 2065 | impl ::std::error::Error for DoNothingError {
|
2066 + | /* ServerOperationErrorGenerator.kt:101 */
|
1090 2067 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
2068 + | /* ServerOperationErrorGenerator.kt:139 */
|
1091 2069 | match &self {
|
1092 - | DoNothingError::InternalServerError(_inner) => Some(_inner),
|
2070 + | /* ServerOperationErrorGenerator.kt:142 */
|
2071 + | DoNothingError::InternalServerError(_inner) =>
|
2072 + | /* ServerOperationErrorGenerator.kt:103 */
|
2073 + | {
|
2074 + | Some(_inner)
|
2075 + | }
|
2076 + | /* ServerOperationErrorGenerator.kt:139 */
|
1093 2077 | }
|
2078 + | /* ServerOperationErrorGenerator.kt:101 */
|
1094 2079 | }
|
2080 + | /* ServerOperationErrorGenerator.kt:100 */
|
1095 2081 | }
|
2082 + | /* ServerOperationErrorGenerator.kt:110 */
|
1096 2083 | impl ::std::convert::From<crate::error::InternalServerError> for crate::error::DoNothingError {
|
2084 + | /* ServerOperationErrorGenerator.kt:111 */
|
1097 2085 | fn from(variant: crate::error::InternalServerError) -> crate::error::DoNothingError {
|
2086 + | /* ServerOperationErrorGenerator.kt:112 */
|
1098 2087 | Self::InternalServerError(variant)
|
2088 + | /* ServerOperationErrorGenerator.kt:111 */
|
1099 2089 | }
|
2090 + | /* ServerOperationErrorGenerator.kt:110 */
|
1100 2091 | }
|
1101 2092 |
|
2093 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
1102 2094 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::DoNothingError {
|
1103 2095 | fn from(variant: ::pyo3::PyErr) -> crate::error::DoNothingError {
|
1104 2096 | ::pyo3::Python::with_gil(|py| {
|
1105 2097 | let error = variant.value(py);
|
1106 2098 |
|
1107 2099 | crate::error::InternalServerError {
|
1108 2100 | message: error.to_string(),
|
1109 2101 | }
|
1110 2102 | .into()
|
1111 2103 | })
|
1112 2104 | }
|
1113 2105 | }
|
1114 2106 |
|
2107 + | /* ServerOperationErrorGenerator.kt:63 */
|
1115 2108 | /// Error type for the `GetServerStatistics` operation.
|
2109 + | /* ServerOperationErrorGenerator.kt:64 */
|
1116 2110 | /// Each variant represents an error that can occur for the `GetServerStatistics` operation.
|
2111 + | /* RustType.kt:516 */
|
1117 2112 | #[derive(::std::fmt::Debug)]
|
1118 - | pub enum GetServerStatisticsError {
|
2113 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum GetServerStatisticsError {
|
2114 + | /* ServerOperationErrorGenerator.kt:68 */
|
1119 2115 | #[allow(missing_docs)] // documentation missing in model
|
2116 + | /* ServerOperationErrorGenerator.kt:71 */
|
1120 2117 | InternalServerError(crate::error::InternalServerError),
|
2118 + | /* ServerOperationErrorGenerator.kt:66 */
|
1121 2119 | }
|
2120 + | /* ServerOperationErrorGenerator.kt:75 */
|
1122 2121 | impl ::std::fmt::Display for GetServerStatisticsError {
|
2122 + | /* ServerOperationErrorGenerator.kt:76 */
|
1123 2123 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2124 + | /* ServerOperationErrorGenerator.kt:139 */
|
1124 2125 | match &self {
|
1125 - | GetServerStatisticsError::InternalServerError(_inner) => _inner.fmt(f),
|
2126 + | /* ServerOperationErrorGenerator.kt:142 */
|
2127 + | GetServerStatisticsError::InternalServerError(_inner) =>
|
2128 + | /* ServerOperationErrorGenerator.kt:78 */
|
2129 + | {
|
2130 + | _inner.fmt(f)
|
2131 + | }
|
2132 + | /* ServerOperationErrorGenerator.kt:139 */
|
1126 2133 | }
|
2134 + | /* ServerOperationErrorGenerator.kt:76 */
|
1127 2135 | }
|
2136 + | /* ServerOperationErrorGenerator.kt:75 */
|
1128 2137 | }
|
2138 + | /* ServerOperationErrorGenerator.kt:83 */
|
1129 2139 | impl GetServerStatisticsError {
|
2140 + | /* ServerOperationErrorGenerator.kt:87 */
|
1130 2141 | /// Returns `true` if the error kind is `GetServerStatisticsError::InternalServerError`.
|
2142 + | /* ServerOperationErrorGenerator.kt:88 */
|
1131 2143 | pub fn is_internal_server_error(&self) -> bool {
|
2144 + | /* ServerOperationErrorGenerator.kt:89 */
|
1132 2145 | matches!(&self, GetServerStatisticsError::InternalServerError(_))
|
2146 + | /* ServerOperationErrorGenerator.kt:88 */
|
1133 2147 | }
|
2148 + | /* ServerOperationErrorGenerator.kt:92 */
|
1134 2149 | /// Returns the error name string by matching the correct variant.
|
2150 + | /* ServerOperationErrorGenerator.kt:93 */
|
1135 2151 | pub fn name(&self) -> &'static str {
|
2152 + | /* ServerOperationErrorGenerator.kt:139 */
|
1136 2153 | match &self {
|
1137 - | GetServerStatisticsError::InternalServerError(_inner) => _inner.name(),
|
2154 + | /* ServerOperationErrorGenerator.kt:142 */
|
2155 + | GetServerStatisticsError::InternalServerError(_inner) =>
|
2156 + | /* ServerOperationErrorGenerator.kt:95 */
|
2157 + | {
|
2158 + | _inner.name()
|
2159 + | }
|
2160 + | /* ServerOperationErrorGenerator.kt:139 */
|
1138 2161 | }
|
2162 + | /* ServerOperationErrorGenerator.kt:93 */
|
1139 2163 | }
|
2164 + | /* ServerOperationErrorGenerator.kt:83 */
|
1140 2165 | }
|
2166 + | /* ServerOperationErrorGenerator.kt:100 */
|
1141 2167 | impl ::std::error::Error for GetServerStatisticsError {
|
2168 + | /* ServerOperationErrorGenerator.kt:101 */
|
1142 2169 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
2170 + | /* ServerOperationErrorGenerator.kt:139 */
|
1143 2171 | match &self {
|
1144 - | GetServerStatisticsError::InternalServerError(_inner) => Some(_inner),
|
2172 + | /* ServerOperationErrorGenerator.kt:142 */
|
2173 + | GetServerStatisticsError::InternalServerError(_inner) =>
|
2174 + | /* ServerOperationErrorGenerator.kt:103 */
|
2175 + | {
|
2176 + | Some(_inner)
|
1145 2177 | }
|
2178 + | /* ServerOperationErrorGenerator.kt:139 */
|
1146 2179 | }
|
2180 + | /* ServerOperationErrorGenerator.kt:101 */
|
2181 + | }
|
2182 + | /* ServerOperationErrorGenerator.kt:100 */
|
1147 2183 | }
|
2184 + | /* ServerOperationErrorGenerator.kt:110 */
|
1148 2185 | impl ::std::convert::From<crate::error::InternalServerError>
|
1149 2186 | for crate::error::GetServerStatisticsError
|
1150 2187 | {
|
2188 + | /* ServerOperationErrorGenerator.kt:111 */
|
1151 2189 | fn from(variant: crate::error::InternalServerError) -> crate::error::GetServerStatisticsError {
|
2190 + | /* ServerOperationErrorGenerator.kt:112 */
|
1152 2191 | Self::InternalServerError(variant)
|
2192 + | /* ServerOperationErrorGenerator.kt:111 */
|
1153 2193 | }
|
2194 + | /* ServerOperationErrorGenerator.kt:110 */
|
1154 2195 | }
|
1155 2196 |
|
2197 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
1156 2198 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::GetServerStatisticsError {
|
1157 2199 | fn from(variant: ::pyo3::PyErr) -> crate::error::GetServerStatisticsError {
|
1158 2200 | ::pyo3::Python::with_gil(|py| {
|
1159 2201 | let error = variant.value(py);
|
1160 2202 |
|
1161 2203 | crate::error::InternalServerError {
|
1162 2204 | message: error.to_string(),
|
1163 2205 | }
|
1164 2206 | .into()
|
1165 2207 | })
|
1166 2208 | }
|
1167 2209 | }
|
1168 - | /// See [`InternalServerError`](crate::error::InternalServerError).
|
2210 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`InternalServerError`](crate::error::InternalServerError).
|
1169 2211 | pub mod internal_server_error {
|
1170 2212 |
|
2213 + | /* RustType.kt:516 */
|
1171 2214 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1172 - | /// Holds one variant for each of the ways the builder can fail.
|
1173 - |
|
2215 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2216 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1174 2217 | #[allow(clippy::enum_variant_names)]
|
1175 2218 | pub enum ConstraintViolation {
|
1176 - | /// `message` was not provided but it is required when building `InternalServerError`.
|
2219 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `InternalServerError`.
|
2220 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1177 2221 | MissingMessage,
|
2222 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1178 2223 | }
|
2224 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1179 2225 | impl ::std::fmt::Display for ConstraintViolation {
|
2226 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1180 2227 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2228 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1181 2229 | match self {
|
1182 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `InternalServerError`"),
|
1183 - | }
|
2230 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `InternalServerError`"),
|
2231 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
2232 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1184 2233 | }
|
2234 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1185 2235 | }
|
2236 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1186 2237 | impl ::std::error::Error for ConstraintViolation {}
|
2238 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
|
1187 2239 | impl ::std::convert::TryFrom<Builder> for crate::error::InternalServerError {
|
1188 2240 | type Error = ConstraintViolation;
|
1189 2241 |
|
1190 2242 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1191 2243 | builder.build()
|
1192 2244 | }
|
1193 2245 | }
|
1194 - | /// A builder for [`InternalServerError`](crate::error::InternalServerError).
|
2246 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`InternalServerError`](crate::error::InternalServerError).
|
2247 + | /* RustType.kt:516 */
|
1195 2248 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2249 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1196 2250 | pub struct Builder {
|
2251 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1197 2252 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
2253 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1198 2254 | }
|
2255 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1199 2256 | impl Builder {
|
2257 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1200 2258 | #[allow(missing_docs)] // documentation missing in model
|
2259 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1201 2260 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
1202 - | self.message = Some(input);
|
2261 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2262 + | self.message =
|
2263 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
2264 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2265 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
2266 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1203 2267 | self
|
2268 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1204 2269 | }
|
1205 - | /// Consumes the builder and constructs a [`InternalServerError`](crate::error::InternalServerError).
|
1206 - | ///
|
2270 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`InternalServerError`](crate::error::InternalServerError).
|
2271 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
|
1207 2272 | /// The builder fails to construct a [`InternalServerError`](crate::error::InternalServerError) if you do not provide a value for all non-`Option`al members.
|
1208 2273 | ///
|
2274 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1209 2275 | pub fn build(self) -> Result<crate::error::InternalServerError, ConstraintViolation> {
|
1210 2276 | self.build_enforcing_required_and_enum_traits()
|
1211 2277 | }
|
2278 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1212 2279 | fn build_enforcing_required_and_enum_traits(
|
1213 2280 | self,
|
1214 2281 | ) -> Result<crate::error::InternalServerError, ConstraintViolation> {
|
1215 - | Ok(crate::error::InternalServerError {
|
1216 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
1217 - | })
|
2282 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2283 + | Ok(
|
2284 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2285 + | crate::error::InternalServerError {
|
2286 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2287 + | message: self
|
2288 + | .message
|
2289 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
2290 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
2291 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2292 + | }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2293 + | )
|
2294 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1218 2295 | }
|
2296 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1219 2297 | }
|
2298 + |
|
2299 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1220 2300 | }
|
1221 - | /// See [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
2301 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
1222 2302 | pub mod resource_not_found_exception {
|
1223 2303 |
|
2304 + | /* RustType.kt:516 */
|
1224 2305 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1225 - | /// Holds one variant for each of the ways the builder can fail.
|
1226 - |
|
2306 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2307 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1227 2308 | #[allow(clippy::enum_variant_names)]
|
1228 2309 | pub enum ConstraintViolation {
|
1229 - | /// `message` was not provided but it is required when building `ResourceNotFoundException`.
|
2310 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ResourceNotFoundException`.
|
2311 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1230 2312 | MissingMessage,
|
2313 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1231 2314 | }
|
2315 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1232 2316 | impl ::std::fmt::Display for ConstraintViolation {
|
2317 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1233 2318 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2319 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1234 2320 | match self {
|
1235 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ResourceNotFoundException`"),
|
1236 - | }
|
2321 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ResourceNotFoundException`"),
|
2322 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
2323 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1237 2324 | }
|
2325 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1238 2326 | }
|
2327 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1239 2328 | impl ::std::error::Error for ConstraintViolation {}
|
2329 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
|
1240 2330 | impl ::std::convert::TryFrom<Builder> for crate::error::ResourceNotFoundException {
|
1241 2331 | type Error = ConstraintViolation;
|
1242 2332 |
|
1243 2333 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1244 2334 | builder.build()
|
1245 2335 | }
|
1246 2336 | }
|
1247 - | /// A builder for [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
2337 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
2338 + | /* RustType.kt:516 */
|
1248 2339 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2340 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1249 2341 | pub struct Builder {
|
2342 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1250 2343 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
2344 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1251 2345 | }
|
2346 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1252 2347 | impl Builder {
|
2348 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1253 2349 | #[allow(missing_docs)] // documentation missing in model
|
2350 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1254 2351 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
1255 - | self.message = Some(input);
|
2352 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2353 + | self.message =
|
2354 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
2355 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2356 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
2357 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1256 2358 | self
|
2359 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1257 2360 | }
|
1258 - | /// Consumes the builder and constructs a [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
1259 - | ///
|
2361 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
2362 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
|
1260 2363 | /// The builder fails to construct a [`ResourceNotFoundException`](crate::error::ResourceNotFoundException) if you do not provide a value for all non-`Option`al members.
|
1261 2364 | ///
|
2365 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1262 2366 | pub fn build(self) -> Result<crate::error::ResourceNotFoundException, ConstraintViolation> {
|
1263 2367 | self.build_enforcing_required_and_enum_traits()
|
1264 2368 | }
|
2369 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1265 2370 | fn build_enforcing_required_and_enum_traits(
|
1266 2371 | self,
|
1267 2372 | ) -> Result<crate::error::ResourceNotFoundException, ConstraintViolation> {
|
1268 - | Ok(crate::error::ResourceNotFoundException {
|
1269 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
1270 - | })
|
2373 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2374 + | Ok(
|
2375 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2376 + | crate::error::ResourceNotFoundException {
|
2377 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2378 + | message: self
|
2379 + | .message
|
2380 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
2381 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
2382 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2383 + | }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2384 + | )
|
2385 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1271 2386 | }
|
2387 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1272 2388 | }
|
2389 + |
|
2390 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1273 2391 | }
|
1274 - | /// See [`StorageAccessNotAuthorized`](crate::error::StorageAccessNotAuthorized).
|
2392 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`StorageAccessNotAuthorized`](crate::error::StorageAccessNotAuthorized).
|
1275 2393 | pub mod storage_access_not_authorized {
|
1276 2394 |
|
2395 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
1277 2396 | impl ::std::convert::From<Builder> for crate::error::StorageAccessNotAuthorized {
|
1278 2397 | fn from(builder: Builder) -> Self {
|
1279 2398 | builder.build()
|
1280 2399 | }
|
1281 2400 | }
|
1282 - | /// A builder for [`StorageAccessNotAuthorized`](crate::error::StorageAccessNotAuthorized).
|
2401 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`StorageAccessNotAuthorized`](crate::error::StorageAccessNotAuthorized).
|
2402 + | /* RustType.kt:516 */
|
1283 2403 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1284 - | pub struct Builder {}
|
2404 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
2405 + | pub struct Builder {/* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */}
|
2406 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1285 2407 | impl Builder {
|
1286 - | /// Consumes the builder and constructs a [`StorageAccessNotAuthorized`](crate::error::StorageAccessNotAuthorized).
|
2408 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`StorageAccessNotAuthorized`](crate::error::StorageAccessNotAuthorized).
|
2409 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1287 2410 | pub fn build(self) -> crate::error::StorageAccessNotAuthorized {
|
1288 2411 | self.build_enforcing_required_and_enum_traits()
|
1289 2412 | }
|
2413 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1290 2414 | fn build_enforcing_required_and_enum_traits(
|
1291 2415 | self,
|
1292 2416 | ) -> crate::error::StorageAccessNotAuthorized {
|
1293 - | crate::error::StorageAccessNotAuthorized {}
|
2417 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2418 + | crate::error::StorageAccessNotAuthorized {
|
2419 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */}
|
2420 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1294 2421 | }
|
2422 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1295 2423 | }
|
2424 + |
|
2425 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1296 2426 | }
|
1297 - | /// See [`ValidationException`](crate::error::ValidationException).
|
2427 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ValidationException`](crate::error::ValidationException).
|
1298 2428 | pub mod validation_exception {
|
1299 2429 |
|
2430 + | /* RustType.kt:516 */
|
1300 2431 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1301 - | /// Holds one variant for each of the ways the builder can fail.
|
1302 - |
|
2432 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2433 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1303 2434 | #[allow(clippy::enum_variant_names)]
|
1304 2435 | pub enum ConstraintViolation {
|
1305 - | /// `message` was not provided but it is required when building `ValidationException`.
|
2436 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationException`.
|
2437 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1306 2438 | MissingMessage,
|
2439 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1307 2440 | }
|
2441 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1308 2442 | impl ::std::fmt::Display for ConstraintViolation {
|
2443 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1309 2444 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2445 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1310 2446 | match self {
|
1311 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
1312 - | }
|
2447 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
2448 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
2449 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1313 2450 | }
|
2451 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1314 2452 | }
|
2453 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1315 2454 | impl ::std::error::Error for ConstraintViolation {}
|
2455 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
|
1316 2456 | impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
|
1317 2457 | type Error = ConstraintViolation;
|
1318 2458 |
|
1319 2459 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1320 2460 | builder.build()
|
1321 2461 | }
|
1322 2462 | }
|
1323 - | /// A builder for [`ValidationException`](crate::error::ValidationException).
|
2463 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ValidationException`](crate::error::ValidationException).
|
2464 + | /* RustType.kt:516 */
|
1324 2465 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2466 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1325 2467 | pub struct Builder {
|
2468 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1326 2469 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
2470 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1327 2471 | pub(crate) field_list:
|
1328 2472 | ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
2473 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1329 2474 | }
|
2475 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1330 2476 | impl Builder {
|
1331 - | /// A summary of the validation failure.
|
2477 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */A summary of the validation failure.
|
2478 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1332 2479 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
1333 - | self.message = Some(input);
|
2480 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2481 + | self.message =
|
2482 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
2483 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2484 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
2485 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1334 2486 | self
|
2487 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1335 2488 | }
|
1336 - | /// 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.
|
2489 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */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.
|
2490 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1337 2491 | pub fn field_list(
|
1338 2492 | mut self,
|
1339 2493 | input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
1340 2494 | ) -> Self {
|
1341 - | self.field_list = input;
|
2495 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2496 + | self.field_list =
|
2497 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2498 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1342 2499 | self
|
2500 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1343 2501 | }
|
1344 - | /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
1345 - | ///
|
2502 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
2503 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
|
1346 2504 | /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if you do not provide a value for all non-`Option`al members.
|
1347 2505 | ///
|
2506 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1348 2507 | pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
1349 2508 | self.build_enforcing_required_and_enum_traits()
|
1350 2509 | }
|
2510 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1351 2511 | fn build_enforcing_required_and_enum_traits(
|
1352 2512 | self,
|
1353 2513 | ) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
1354 - | Ok(crate::error::ValidationException {
|
1355 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
2514 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2515 + | Ok(
|
2516 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2517 + | crate::error::ValidationException {
|
2518 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2519 + | message: self
|
2520 + | .message
|
2521 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
2522 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
2523 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
1356 2524 | field_list: self.field_list,
|
1357 - | })
|
2525 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2526 + | }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2527 + | )
|
2528 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1358 2529 | }
|
2530 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1359 2531 | }
|
2532 + |
|
2533 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1360 2534 | }
|
1361 - | /// See [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
2535 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
1362 2536 | pub mod unsupported_region_error {
|
1363 2537 |
|
2538 + | /* RustType.kt:516 */
|
1364 2539 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1365 - | /// Holds one variant for each of the ways the builder can fail.
|
1366 - |
|
2540 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2541 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1367 2542 | #[allow(clippy::enum_variant_names)]
|
1368 2543 | pub enum ConstraintViolation {
|
1369 - | /// `region` was not provided but it is required when building `UnsupportedRegionError`.
|
2544 + | /// /* ServerBuilderConstraintViolations.kt:138 */`region` was not provided but it is required when building `UnsupportedRegionError`.
|
2545 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1370 2546 | MissingRegion,
|
2547 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1371 2548 | }
|
2549 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1372 2550 | impl ::std::fmt::Display for ConstraintViolation {
|
2551 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1373 2552 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2553 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1374 2554 | match self {
|
1375 - | ConstraintViolation::MissingRegion => write!(f, "`region` was not provided but it is required when building `UnsupportedRegionError`"),
|
1376 - | }
|
2555 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRegion => write!(f, "`region` was not provided but it is required when building `UnsupportedRegionError`"),
|
2556 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
2557 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1377 2558 | }
|
2559 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1378 2560 | }
|
2561 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1379 2562 | impl ::std::error::Error for ConstraintViolation {}
|
2563 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
|
1380 2564 | impl ::std::convert::TryFrom<Builder> for crate::error::UnsupportedRegionError {
|
1381 2565 | type Error = ConstraintViolation;
|
1382 2566 |
|
1383 2567 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1384 2568 | builder.build()
|
1385 2569 | }
|
1386 2570 | }
|
1387 - | /// A builder for [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
2571 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
2572 + | /* RustType.kt:516 */
|
1388 2573 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2574 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1389 2575 | pub struct Builder {
|
2576 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1390 2577 | pub(crate) region: ::std::option::Option<::std::string::String>,
|
2578 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1391 2579 | }
|
2580 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1392 2581 | impl Builder {
|
2582 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1393 2583 | #[allow(missing_docs)] // documentation missing in model
|
2584 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1394 2585 | pub fn region(mut self, input: ::std::string::String) -> Self {
|
1395 - | self.region = Some(input);
|
2586 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2587 + | self.region =
|
2588 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
2589 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2590 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
2591 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1396 2592 | self
|
2593 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1397 2594 | }
|
1398 - | /// Consumes the builder and constructs a [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
1399 - | ///
|
2595 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`UnsupportedRegionError`](crate::error::UnsupportedRegionError).
|
2596 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
|
1400 2597 | /// The builder fails to construct a [`UnsupportedRegionError`](crate::error::UnsupportedRegionError) if you do not provide a value for all non-`Option`al members.
|
1401 2598 | ///
|
2599 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1402 2600 | pub fn build(self) -> Result<crate::error::UnsupportedRegionError, ConstraintViolation> {
|
1403 2601 | self.build_enforcing_required_and_enum_traits()
|
1404 2602 | }
|
2603 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1405 2604 | fn build_enforcing_required_and_enum_traits(
|
1406 2605 | self,
|
1407 2606 | ) -> Result<crate::error::UnsupportedRegionError, ConstraintViolation> {
|
1408 - | Ok(crate::error::UnsupportedRegionError {
|
1409 - | region: self.region.ok_or(ConstraintViolation::MissingRegion)?,
|
1410 - | })
|
2607 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2608 + | Ok(
|
2609 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2610 + | crate::error::UnsupportedRegionError {
|
2611 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2612 + | region: self
|
2613 + | .region
|
2614 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
2615 + | .ok_or(ConstraintViolation::MissingRegion)?,
|
2616 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2617 + | }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2618 + | )
|
2619 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1411 2620 | }
|
2621 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1412 2622 | }
|
2623 + |
|
2624 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1413 2625 | }
|
1414 - | /// See [`ThrottlingError`](crate::error::ThrottlingError).
|
2626 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ThrottlingError`](crate::error::ThrottlingError).
|
1415 2627 | pub mod throttling_error {
|
1416 2628 |
|
2629 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
1417 2630 | impl ::std::convert::From<Builder> for crate::error::ThrottlingError {
|
1418 2631 | fn from(builder: Builder) -> Self {
|
1419 2632 | builder.build()
|
1420 2633 | }
|
1421 2634 | }
|
1422 - | /// A builder for [`ThrottlingError`](crate::error::ThrottlingError).
|
2635 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ThrottlingError`](crate::error::ThrottlingError).
|
2636 + | /* RustType.kt:516 */
|
1423 2637 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1424 - | pub struct Builder {}
|
2638 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
2639 + | pub struct Builder {/* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */}
|
2640 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1425 2641 | impl Builder {
|
1426 - | /// Consumes the builder and constructs a [`ThrottlingError`](crate::error::ThrottlingError).
|
2642 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ThrottlingError`](crate::error::ThrottlingError).
|
2643 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1427 2644 | pub fn build(self) -> crate::error::ThrottlingError {
|
1428 2645 | self.build_enforcing_required_and_enum_traits()
|
1429 2646 | }
|
2647 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1430 2648 | fn build_enforcing_required_and_enum_traits(self) -> crate::error::ThrottlingError {
|
1431 - | crate::error::ThrottlingError {}
|
2649 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2650 + | crate::error::ThrottlingError {
|
2651 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */}
|
2652 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1432 2653 | }
|
2654 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1433 2655 | }
|
2656 + |
|
2657 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1434 2658 | }
|
1435 - | /// See [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
2659 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
1436 2660 | pub mod invalid_pokeball_error {
|
1437 2661 |
|
2662 + | /* RustType.kt:516 */
|
1438 2663 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1439 - | /// Holds one variant for each of the ways the builder can fail.
|
1440 - |
|
2664 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2665 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1441 2666 | #[allow(clippy::enum_variant_names)]
|
1442 2667 | pub enum ConstraintViolation {
|
1443 - | /// `pokeball` was not provided but it is required when building `InvalidPokeballError`.
|
2668 + | /// /* ServerBuilderConstraintViolations.kt:138 */`pokeball` was not provided but it is required when building `InvalidPokeballError`.
|
2669 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1444 2670 | MissingPokeball,
|
2671 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1445 2672 | }
|
2673 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1446 2674 | impl ::std::fmt::Display for ConstraintViolation {
|
2675 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1447 2676 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2677 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1448 2678 | match self {
|
1449 - | ConstraintViolation::MissingPokeball => write!(f, "`pokeball` was not provided but it is required when building `InvalidPokeballError`"),
|
1450 - | }
|
2679 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingPokeball => write!(f, "`pokeball` was not provided but it is required when building `InvalidPokeballError`"),
|
2680 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
2681 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1451 2682 | }
|
2683 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1452 2684 | }
|
2685 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1453 2686 | impl ::std::error::Error for ConstraintViolation {}
|
2687 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
|
1454 2688 | impl ::std::convert::TryFrom<Builder> for crate::error::InvalidPokeballError {
|
1455 2689 | type Error = ConstraintViolation;
|
1456 2690 |
|
1457 2691 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1458 2692 | builder.build()
|
1459 2693 | }
|
1460 2694 | }
|
1461 - | /// A builder for [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
2695 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
2696 + | /* RustType.kt:516 */
|
1462 2697 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2698 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1463 2699 | pub struct Builder {
|
2700 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1464 2701 | pub(crate) pokeball: ::std::option::Option<::std::string::String>,
|
2702 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1465 2703 | }
|
2704 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1466 2705 | impl Builder {
|
2706 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1467 2707 | #[allow(missing_docs)] // documentation missing in model
|
2708 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1468 2709 | pub fn pokeball(mut self, input: ::std::string::String) -> Self {
|
1469 - | self.pokeball = Some(input);
|
2710 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2711 + | self.pokeball =
|
2712 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
2713 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2714 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
2715 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1470 2716 | self
|
2717 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1471 2718 | }
|
1472 - | /// Consumes the builder and constructs a [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
1473 - | ///
|
2719 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`InvalidPokeballError`](crate::error::InvalidPokeballError).
|
2720 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
|
1474 2721 | /// The builder fails to construct a [`InvalidPokeballError`](crate::error::InvalidPokeballError) if you do not provide a value for all non-`Option`al members.
|
1475 2722 | ///
|
2723 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1476 2724 | pub fn build(self) -> Result<crate::error::InvalidPokeballError, ConstraintViolation> {
|
1477 2725 | self.build_enforcing_required_and_enum_traits()
|
1478 2726 | }
|
2727 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1479 2728 | fn build_enforcing_required_and_enum_traits(
|
1480 2729 | self,
|
1481 2730 | ) -> Result<crate::error::InvalidPokeballError, ConstraintViolation> {
|
1482 - | Ok(crate::error::InvalidPokeballError {
|
1483 - | pokeball: self.pokeball.ok_or(ConstraintViolation::MissingPokeball)?,
|
1484 - | })
|
2731 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2732 + | Ok(
|
2733 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2734 + | crate::error::InvalidPokeballError {
|
2735 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2736 + | pokeball: self
|
2737 + | .pokeball
|
2738 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
2739 + | .ok_or(ConstraintViolation::MissingPokeball)?,
|
2740 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2741 + | }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2742 + | )
|
2743 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1485 2744 | }
|
2745 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1486 2746 | }
|
2747 + |
|
2748 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1487 2749 | }
|
1488 - | /// See [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
2750 + | /// /* ServerBuilderGenerator.kt:171 */See [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
1489 2751 | pub(crate) mod master_ball_unsuccessful_internal {
|
1490 2752 |
|
2753 + | /* ServerBuilderGenerator.kt:461 */
|
1491 2754 | impl ::std::convert::From<Builder> for crate::error::MasterBallUnsuccessful {
|
1492 2755 | fn from(builder: Builder) -> Self {
|
1493 2756 | builder.build()
|
1494 2757 | }
|
1495 2758 | }
|
1496 - | /// A builder for [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
2759 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
2760 + | /* RustType.kt:516 */
|
1497 2761 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2762 + | /* ServerBuilderGenerator.kt:211 */
|
1498 2763 | pub(crate) struct Builder {
|
2764 + | /* ServerBuilderGenerator.kt:308 */
|
1499 2765 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
2766 + | /* ServerBuilderGenerator.kt:211 */
|
1500 2767 | }
|
2768 + | /* ServerBuilderGenerator.kt:215 */
|
1501 2769 | impl Builder {
|
2770 + | /* ServerBuilderGenerator.kt:426 */
|
1502 2771 | #[allow(missing_docs)] // documentation missing in model
|
2772 + | /* ServerBuilderGenerator.kt:428 */
|
1503 2773 | pub(crate) fn set_message(
|
1504 2774 | mut self,
|
1505 2775 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
1506 2776 | ) -> Self {
|
2777 + | /* ServerBuilderGenerator.kt:429 */
|
1507 2778 | self.message = input.map(|v| v.into());
|
1508 2779 | self
|
2780 + | /* ServerBuilderGenerator.kt:428 */
|
1509 2781 | }
|
1510 - | /// Consumes the builder and constructs a [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
2782 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
2783 + | /* ServerBuilderGenerator.kt:271 */
|
1511 2784 | pub fn build(self) -> crate::error::MasterBallUnsuccessful {
|
1512 2785 | self.build_enforcing_all_constraints()
|
1513 2786 | }
|
2787 + | /* ServerBuilderGenerator.kt:283 */
|
1514 2788 | fn build_enforcing_all_constraints(self) -> crate::error::MasterBallUnsuccessful {
|
2789 + | /* ServerBuilderGenerator.kt:542 */
|
1515 2790 | crate::error::MasterBallUnsuccessful {
|
2791 + | /* ServerBuilderGenerator.kt:546 */
|
1516 2792 | message: self.message,
|
2793 + | /* ServerBuilderGenerator.kt:542 */
|
1517 2794 | }
|
2795 + | /* ServerBuilderGenerator.kt:283 */
|
1518 2796 | }
|
2797 + | /* ServerBuilderGenerator.kt:215 */
|
1519 2798 | }
|
2799 + |
|
2800 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1520 2801 | }
|
1521 - | /// See [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
2802 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
1522 2803 | pub mod master_ball_unsuccessful {
|
1523 2804 |
|
2805 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
1524 2806 | impl ::std::convert::From<Builder> for crate::error::MasterBallUnsuccessful {
|
1525 2807 | fn from(builder: Builder) -> Self {
|
1526 2808 | builder.build()
|
1527 2809 | }
|
1528 2810 | }
|
1529 - | /// A builder for [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
2811 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
2812 + | /* RustType.kt:516 */
|
1530 2813 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2814 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1531 2815 | pub struct Builder {
|
2816 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1532 2817 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
2818 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1533 2819 | }
|
2820 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1534 2821 | impl Builder {
|
2822 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1535 2823 | #[allow(missing_docs)] // documentation missing in model
|
2824 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1536 2825 | pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1537 - | self.message = input;
|
2826 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2827 + | self.message =
|
2828 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2829 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1538 2830 | self
|
2831 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1539 2832 | }
|
1540 - | /// Consumes the builder and constructs a [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
2833 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`MasterBallUnsuccessful`](crate::error::MasterBallUnsuccessful).
|
2834 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1541 2835 | pub fn build(self) -> crate::error::MasterBallUnsuccessful {
|
1542 2836 | self.build_enforcing_required_and_enum_traits()
|
1543 2837 | }
|
2838 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1544 2839 | fn build_enforcing_required_and_enum_traits(self) -> crate::error::MasterBallUnsuccessful {
|
2840 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
1545 2841 | crate::error::MasterBallUnsuccessful {
|
2842 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
1546 2843 | message: self.message,
|
2844 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
1547 2845 | }
|
2846 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1548 2847 | }
|
2848 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1549 2849 | }
|
2850 + |
|
2851 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1550 2852 | }
|