35 35 | }
|
36 36 | }
|
37 37 | impl ::std::error::Error for ExtraError {}
|
38 38 | impl ExtraError {
|
39 39 | /// Creates a new builder-style object to manufacture [`ExtraError`](crate::error::ExtraError).
|
40 40 | pub fn builder() -> crate::error::extra_error::Builder {
|
41 41 | crate::error::extra_error::Builder::default()
|
42 42 | }
|
43 43 | }
|
44 44 |
|
45 - | /// Error type for the `HttpStringPayload2` operation.
|
46 - | /// Each variant represents an error that can occur for the `HttpStringPayload2` operation.
|
45 + | /// Error type for the `QueryPrecedence` operation.
|
46 + | /// Each variant represents an error that can occur for the `QueryPrecedence` operation.
|
47 47 | #[derive(::std::fmt::Debug)]
|
48 - | pub enum HttpStringPayload2Error {
|
48 + | pub enum QueryPrecedenceError {
|
49 49 | #[allow(missing_docs)] // documentation missing in model
|
50 50 | ExtraError(crate::error::ExtraError),
|
51 51 | #[allow(missing_docs)] // documentation missing in model
|
52 52 | InternalServerError(crate::error::InternalServerError),
|
53 53 | }
|
54 - | impl ::std::fmt::Display for HttpStringPayload2Error {
|
54 + | impl ::std::fmt::Display for QueryPrecedenceError {
|
55 55 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
56 56 | match &self {
|
57 - | HttpStringPayload2Error::ExtraError(_inner) => _inner.fmt(f),
|
58 - | HttpStringPayload2Error::InternalServerError(_inner) => _inner.fmt(f),
|
57 + | QueryPrecedenceError::ExtraError(_inner) => _inner.fmt(f),
|
58 + | QueryPrecedenceError::InternalServerError(_inner) => _inner.fmt(f),
|
59 59 | }
|
60 60 | }
|
61 61 | }
|
62 - | impl HttpStringPayload2Error {
|
63 - | /// Returns `true` if the error kind is `HttpStringPayload2Error::ExtraError`.
|
62 + | impl QueryPrecedenceError {
|
63 + | /// Returns `true` if the error kind is `QueryPrecedenceError::ExtraError`.
|
64 64 | pub fn is_extra_error(&self) -> bool {
|
65 - | matches!(&self, HttpStringPayload2Error::ExtraError(_))
|
65 + | matches!(&self, QueryPrecedenceError::ExtraError(_))
|
66 66 | }
|
67 - | /// Returns `true` if the error kind is `HttpStringPayload2Error::InternalServerError`.
|
67 + | /// Returns `true` if the error kind is `QueryPrecedenceError::InternalServerError`.
|
68 68 | pub fn is_internal_server_error(&self) -> bool {
|
69 - | matches!(&self, HttpStringPayload2Error::InternalServerError(_))
|
69 + | matches!(&self, QueryPrecedenceError::InternalServerError(_))
|
70 70 | }
|
71 71 | /// Returns the error name string by matching the correct variant.
|
72 72 | pub fn name(&self) -> &'static str {
|
73 73 | match &self {
|
74 - | HttpStringPayload2Error::ExtraError(_inner) => _inner.name(),
|
75 - | HttpStringPayload2Error::InternalServerError(_inner) => _inner.name(),
|
74 + | QueryPrecedenceError::ExtraError(_inner) => _inner.name(),
|
75 + | QueryPrecedenceError::InternalServerError(_inner) => _inner.name(),
|
76 76 | }
|
77 77 | }
|
78 78 | }
|
79 - | impl ::std::error::Error for HttpStringPayload2Error {
|
79 + | impl ::std::error::Error for QueryPrecedenceError {
|
80 80 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
81 81 | match &self {
|
82 - | HttpStringPayload2Error::ExtraError(_inner) => Some(_inner),
|
83 - | HttpStringPayload2Error::InternalServerError(_inner) => Some(_inner),
|
82 + | QueryPrecedenceError::ExtraError(_inner) => Some(_inner),
|
83 + | QueryPrecedenceError::InternalServerError(_inner) => Some(_inner),
|
84 84 | }
|
85 85 | }
|
86 86 | }
|
87 - | impl ::std::convert::From<crate::error::ExtraError> for crate::error::HttpStringPayload2Error {
|
88 - | fn from(variant: crate::error::ExtraError) -> crate::error::HttpStringPayload2Error {
|
87 + | impl ::std::convert::From<crate::error::ExtraError> for crate::error::QueryPrecedenceError {
|
88 + | fn from(variant: crate::error::ExtraError) -> crate::error::QueryPrecedenceError {
|
89 89 | Self::ExtraError(variant)
|
90 90 | }
|
91 91 | }
|
92 92 | impl ::std::convert::From<crate::error::InternalServerError>
|
93 - | for crate::error::HttpStringPayload2Error
|
93 + | for crate::error::QueryPrecedenceError
|
94 94 | {
|
95 - | fn from(variant: crate::error::InternalServerError) -> crate::error::HttpStringPayload2Error {
|
95 + | fn from(variant: crate::error::InternalServerError) -> crate::error::QueryPrecedenceError {
|
96 96 | Self::InternalServerError(variant)
|
97 97 | }
|
98 98 | }
|
99 99 |
|
100 - | impl ::std::convert::From<::pyo3::PyErr> for crate::error::HttpStringPayload2Error {
|
101 - | fn from(variant: ::pyo3::PyErr) -> crate::error::HttpStringPayload2Error {
|
100 + | impl ::std::convert::From<::pyo3::PyErr> for crate::error::QueryPrecedenceError {
|
101 + | fn from(variant: ::pyo3::PyErr) -> crate::error::QueryPrecedenceError {
|
102 102 | ::pyo3::Python::with_gil(|py| {
|
103 103 | let error = variant.value(py);
|
104 104 | if let Ok(error) = error.extract::<crate::error::ExtraError>() {
|
105 105 | return error.into();
|
106 106 | }
|
107 107 | crate::error::InternalServerError {
|
108 108 | message: error.to_string(),
|
109 109 | }
|
110 110 | .into()
|
111 111 | })
|
161 161 | }
|
162 162 | }
|
163 163 | impl ::std::error::Error for InternalServerError {}
|
164 164 | impl InternalServerError {
|
165 165 | /// Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
|
166 166 | pub fn builder() -> crate::error::internal_server_error::Builder {
|
167 167 | crate::error::internal_server_error::Builder::default()
|
168 168 | }
|
169 169 | }
|
170 170 |
|
171 - | /// Error type for the `HttpEnumPayload2` operation.
|
172 - | /// Each variant represents an error that can occur for the `HttpEnumPayload2` operation.
|
173 - | #[derive(::std::fmt::Debug)]
|
174 - | pub enum HttpEnumPayload2Error {
|
175 - | /// 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.
|
176 - | ValidationException(crate::error::ValidationException),
|
177 - | #[allow(missing_docs)] // documentation missing in model
|
178 - | ExtraError(crate::error::ExtraError),
|
179 - | #[allow(missing_docs)] // documentation missing in model
|
180 - | InternalServerError(crate::error::InternalServerError),
|
181 - | }
|
182 - | impl ::std::fmt::Display for HttpEnumPayload2Error {
|
183 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
184 - | match &self {
|
185 - | HttpEnumPayload2Error::ValidationException(_inner) => _inner.fmt(f),
|
186 - | HttpEnumPayload2Error::ExtraError(_inner) => _inner.fmt(f),
|
187 - | HttpEnumPayload2Error::InternalServerError(_inner) => _inner.fmt(f),
|
188 - | }
|
189 - | }
|
190 - | }
|
191 - | impl HttpEnumPayload2Error {
|
192 - | /// Returns `true` if the error kind is `HttpEnumPayload2Error::ValidationException`.
|
193 - | pub fn is_validation_exception(&self) -> bool {
|
194 - | matches!(&self, HttpEnumPayload2Error::ValidationException(_))
|
195 - | }
|
196 - | /// Returns `true` if the error kind is `HttpEnumPayload2Error::ExtraError`.
|
197 - | pub fn is_extra_error(&self) -> bool {
|
198 - | matches!(&self, HttpEnumPayload2Error::ExtraError(_))
|
199 - | }
|
200 - | /// Returns `true` if the error kind is `HttpEnumPayload2Error::InternalServerError`.
|
201 - | pub fn is_internal_server_error(&self) -> bool {
|
202 - | matches!(&self, HttpEnumPayload2Error::InternalServerError(_))
|
203 - | }
|
204 - | /// Returns the error name string by matching the correct variant.
|
205 - | pub fn name(&self) -> &'static str {
|
206 - | match &self {
|
207 - | HttpEnumPayload2Error::ValidationException(_inner) => _inner.name(),
|
208 - | HttpEnumPayload2Error::ExtraError(_inner) => _inner.name(),
|
209 - | HttpEnumPayload2Error::InternalServerError(_inner) => _inner.name(),
|
210 - | }
|
211 - | }
|
212 - | }
|
213 - | impl ::std::error::Error for HttpEnumPayload2Error {
|
214 - | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
215 - | match &self {
|
216 - | HttpEnumPayload2Error::ValidationException(_inner) => Some(_inner),
|
217 - | HttpEnumPayload2Error::ExtraError(_inner) => Some(_inner),
|
218 - | HttpEnumPayload2Error::InternalServerError(_inner) => Some(_inner),
|
219 - | }
|
220 - | }
|
221 - | }
|
222 - | impl ::std::convert::From<crate::error::ValidationException>
|
223 - | for crate::error::HttpEnumPayload2Error
|
224 - | {
|
225 - | fn from(variant: crate::error::ValidationException) -> crate::error::HttpEnumPayload2Error {
|
226 - | Self::ValidationException(variant)
|
227 - | }
|
228 - | }
|
229 - | impl ::std::convert::From<crate::error::ExtraError> for crate::error::HttpEnumPayload2Error {
|
230 - | fn from(variant: crate::error::ExtraError) -> crate::error::HttpEnumPayload2Error {
|
231 - | Self::ExtraError(variant)
|
232 - | }
|
233 - | }
|
234 - | impl ::std::convert::From<crate::error::InternalServerError>
|
235 - | for crate::error::HttpEnumPayload2Error
|
236 - | {
|
237 - | fn from(variant: crate::error::InternalServerError) -> crate::error::HttpEnumPayload2Error {
|
238 - | Self::InternalServerError(variant)
|
239 - | }
|
240 - | }
|
241 - |
|
242 - | impl ::std::convert::From<::pyo3::PyErr> for crate::error::HttpEnumPayload2Error {
|
243 - | fn from(variant: ::pyo3::PyErr) -> crate::error::HttpEnumPayload2Error {
|
244 - | ::pyo3::Python::with_gil(|py| {
|
245 - | let error = variant.value(py);
|
246 - | if let Ok(error) = error.extract::<crate::error::ValidationException>() {
|
247 - | return error.into();
|
248 - | }
|
249 - | if let Ok(error) = error.extract::<crate::error::ExtraError>() {
|
250 - | return error.into();
|
251 - | }
|
252 - | crate::error::InternalServerError {
|
253 - | message: error.to_string(),
|
254 - | }
|
255 - | .into()
|
256 - | })
|
257 - | }
|
258 - | }
|
259 - |
|
260 - | #[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
|
261 - | /// :param message str:
|
262 - | /// :param field_list typing.Optional\[typing.List\[rest_json_extras.model.ValidationExceptionField\]\]:
|
263 - | /// :rtype None:
|
264 - | /// 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.
|
265 - | #[derive(
|
266 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
267 - | )]
|
268 - | pub struct ValidationException {
|
269 - | #[pyo3(get, set)]
|
270 - | /// :type str:
|
271 - | /// A summary of the validation failure.
|
272 - | pub message: ::std::string::String,
|
273 - | #[pyo3(get, set)]
|
274 - | /// :type typing.Optional\[typing.List\[rest_json_extras.model.ValidationExceptionField\]\]:
|
275 - | /// 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.
|
276 - | pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
277 - | }
|
278 - | impl ValidationException {
|
279 - | /// 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.
|
280 - | pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
|
281 - | self.field_list.as_deref()
|
282 - | }
|
283 - | }
|
284 - | #[allow(clippy::new_without_default)]
|
285 - | #[allow(clippy::too_many_arguments)]
|
286 - | #[::pyo3::pymethods]
|
287 - | impl ValidationException {
|
288 - | #[new]
|
289 - | pub fn new(
|
290 - | message: ::std::string::String,
|
291 - | field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
292 - | ) -> Self {
|
293 - | Self {
|
294 - | message,
|
295 - | field_list,
|
296 - | }
|
297 - | }
|
298 - | fn __repr__(&self) -> String {
|
299 - | format!("{self:?}")
|
300 - | }
|
301 - | fn __str__(&self) -> String {
|
302 - | format!("{self:?}")
|
303 - | }
|
304 - | }
|
305 - | impl ValidationException {
|
306 - | /// Returns the error message.
|
307 - | pub fn message(&self) -> &str {
|
308 - | &self.message
|
309 - | }
|
310 - | #[doc(hidden)]
|
311 - | /// Returns the error name.
|
312 - | pub fn name(&self) -> &'static str {
|
313 - | "ValidationException"
|
314 - | }
|
315 - | }
|
316 - | impl ::std::fmt::Display for ValidationException {
|
317 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
318 - | ::std::write!(f, "ValidationException")?;
|
319 - | {
|
320 - | ::std::write!(f, ": {}", &self.message)?;
|
321 - | }
|
322 - | Ok(())
|
323 - | }
|
324 - | }
|
325 - | impl ::std::error::Error for ValidationException {}
|
326 - | impl ValidationException {
|
327 - | /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
328 - | pub fn builder() -> crate::error::validation_exception::Builder {
|
329 - | crate::error::validation_exception::Builder::default()
|
330 - | }
|
331 - | }
|
332 - |
|
333 - | /// Error type for the `MalformedContentTypeWithBody2` operation.
|
334 - | /// Each variant represents an error that can occur for the `MalformedContentTypeWithBody2` operation.
|
335 - | #[derive(::std::fmt::Debug)]
|
336 - | pub enum MalformedContentTypeWithBody2Error {
|
337 - | #[allow(missing_docs)] // documentation missing in model
|
338 - | ExtraError(crate::error::ExtraError),
|
339 - | #[allow(missing_docs)] // documentation missing in model
|
340 - | InternalServerError(crate::error::InternalServerError),
|
341 - | }
|
342 - | impl ::std::fmt::Display for MalformedContentTypeWithBody2Error {
|
343 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
344 - | match &self {
|
345 - | MalformedContentTypeWithBody2Error::ExtraError(_inner) => _inner.fmt(f),
|
346 - | MalformedContentTypeWithBody2Error::InternalServerError(_inner) => _inner.fmt(f),
|
347 - | }
|
348 - | }
|
349 - | }
|
350 - | impl MalformedContentTypeWithBody2Error {
|
351 - | /// Returns `true` if the error kind is `MalformedContentTypeWithBody2Error::ExtraError`.
|
352 - | pub fn is_extra_error(&self) -> bool {
|
353 - | matches!(&self, MalformedContentTypeWithBody2Error::ExtraError(_))
|
354 - | }
|
355 - | /// Returns `true` if the error kind is `MalformedContentTypeWithBody2Error::InternalServerError`.
|
356 - | pub fn is_internal_server_error(&self) -> bool {
|
357 - | matches!(
|
358 - | &self,
|
359 - | MalformedContentTypeWithBody2Error::InternalServerError(_)
|
360 - | )
|
361 - | }
|
362 - | /// Returns the error name string by matching the correct variant.
|
363 - | pub fn name(&self) -> &'static str {
|
364 - | match &self {
|
365 - | MalformedContentTypeWithBody2Error::ExtraError(_inner) => _inner.name(),
|
366 - | MalformedContentTypeWithBody2Error::InternalServerError(_inner) => _inner.name(),
|
367 - | }
|
368 - | }
|
369 - | }
|
370 - | impl ::std::error::Error for MalformedContentTypeWithBody2Error {
|
371 - | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
372 - | match &self {
|
373 - | MalformedContentTypeWithBody2Error::ExtraError(_inner) => Some(_inner),
|
374 - | MalformedContentTypeWithBody2Error::InternalServerError(_inner) => Some(_inner),
|
375 - | }
|
376 - | }
|
377 - | }
|
378 - | impl ::std::convert::From<crate::error::ExtraError>
|
379 - | for crate::error::MalformedContentTypeWithBody2Error
|
380 - | {
|
381 - | fn from(variant: crate::error::ExtraError) -> crate::error::MalformedContentTypeWithBody2Error {
|
382 - | Self::ExtraError(variant)
|
383 - | }
|
384 - | }
|
385 - | impl ::std::convert::From<crate::error::InternalServerError>
|
386 - | for crate::error::MalformedContentTypeWithBody2Error
|
387 - | {
|
388 - | fn from(
|
389 - | variant: crate::error::InternalServerError,
|
390 - | ) -> crate::error::MalformedContentTypeWithBody2Error {
|
391 - | Self::InternalServerError(variant)
|
392 - | }
|
393 - | }
|
394 - |
|
395 - | impl ::std::convert::From<::pyo3::PyErr> for crate::error::MalformedContentTypeWithBody2Error {
|
396 - | fn from(variant: ::pyo3::PyErr) -> crate::error::MalformedContentTypeWithBody2Error {
|
397 - | ::pyo3::Python::with_gil(|py| {
|
398 - | let error = variant.value(py);
|
399 - | if let Ok(error) = error.extract::<crate::error::ExtraError>() {
|
400 - | return error.into();
|
401 - | }
|
402 - | crate::error::InternalServerError {
|
403 - | message: error.to_string(),
|
404 - | }
|
405 - | .into()
|
406 - | })
|
407 - | }
|
408 - | }
|
409 - |
|
410 - | /// Error type for the `HttpPayloadTraits2` operation.
|
411 - | /// Each variant represents an error that can occur for the `HttpPayloadTraits2` operation.
|
412 - | #[derive(::std::fmt::Debug)]
|
413 - | pub enum HttpPayloadTraits2Error {
|
414 - | #[allow(missing_docs)] // documentation missing in model
|
415 - | ExtraError(crate::error::ExtraError),
|
416 - | #[allow(missing_docs)] // documentation missing in model
|
417 - | InternalServerError(crate::error::InternalServerError),
|
418 - | }
|
419 - | impl ::std::fmt::Display for HttpPayloadTraits2Error {
|
420 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
421 - | match &self {
|
422 - | HttpPayloadTraits2Error::ExtraError(_inner) => _inner.fmt(f),
|
423 - | HttpPayloadTraits2Error::InternalServerError(_inner) => _inner.fmt(f),
|
424 - | }
|
425 - | }
|
426 - | }
|
427 - | impl HttpPayloadTraits2Error {
|
428 - | /// Returns `true` if the error kind is `HttpPayloadTraits2Error::ExtraError`.
|
429 - | pub fn is_extra_error(&self) -> bool {
|
430 - | matches!(&self, HttpPayloadTraits2Error::ExtraError(_))
|
431 - | }
|
432 - | /// Returns `true` if the error kind is `HttpPayloadTraits2Error::InternalServerError`.
|
433 - | pub fn is_internal_server_error(&self) -> bool {
|
434 - | matches!(&self, HttpPayloadTraits2Error::InternalServerError(_))
|
435 - | }
|
436 - | /// Returns the error name string by matching the correct variant.
|
437 - | pub fn name(&self) -> &'static str {
|
438 - | match &self {
|
439 - | HttpPayloadTraits2Error::ExtraError(_inner) => _inner.name(),
|
440 - | HttpPayloadTraits2Error::InternalServerError(_inner) => _inner.name(),
|
441 - | }
|
442 - | }
|
443 - | }
|
444 - | impl ::std::error::Error for HttpPayloadTraits2Error {
|
445 - | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
446 - | match &self {
|
447 - | HttpPayloadTraits2Error::ExtraError(_inner) => Some(_inner),
|
448 - | HttpPayloadTraits2Error::InternalServerError(_inner) => Some(_inner),
|
449 - | }
|
450 - | }
|
451 - | }
|
452 - | impl ::std::convert::From<crate::error::ExtraError> for crate::error::HttpPayloadTraits2Error {
|
453 - | fn from(variant: crate::error::ExtraError) -> crate::error::HttpPayloadTraits2Error {
|
454 - | Self::ExtraError(variant)
|
455 - | }
|
456 - | }
|
457 - | impl ::std::convert::From<crate::error::InternalServerError>
|
458 - | for crate::error::HttpPayloadTraits2Error
|
459 - | {
|
460 - | fn from(variant: crate::error::InternalServerError) -> crate::error::HttpPayloadTraits2Error {
|
461 - | Self::InternalServerError(variant)
|
462 - | }
|
463 - | }
|
464 - |
|
465 - | impl ::std::convert::From<::pyo3::PyErr> for crate::error::HttpPayloadTraits2Error {
|
466 - | fn from(variant: ::pyo3::PyErr) -> crate::error::HttpPayloadTraits2Error {
|
467 - | ::pyo3::Python::with_gil(|py| {
|
468 - | let error = variant.value(py);
|
469 - | if let Ok(error) = error.extract::<crate::error::ExtraError>() {
|
470 - | return error.into();
|
471 - | }
|
472 - | crate::error::InternalServerError {
|
473 - | message: error.to_string(),
|
474 - | }
|
475 - | .into()
|
476 - | })
|
477 - | }
|
478 - | }
|
479 - |
|
480 - | /// Error type for the `QueryPrecedence` operation.
|
481 - | /// Each variant represents an error that can occur for the `QueryPrecedence` operation.
|
482 - | #[derive(::std::fmt::Debug)]
|
483 - | pub enum QueryPrecedenceError {
|
484 - | #[allow(missing_docs)] // documentation missing in model
|
485 - | ExtraError(crate::error::ExtraError),
|
486 - | #[allow(missing_docs)] // documentation missing in model
|
487 - | InternalServerError(crate::error::InternalServerError),
|
488 - | }
|
489 - | impl ::std::fmt::Display for QueryPrecedenceError {
|
490 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
491 - | match &self {
|
492 - | QueryPrecedenceError::ExtraError(_inner) => _inner.fmt(f),
|
493 - | QueryPrecedenceError::InternalServerError(_inner) => _inner.fmt(f),
|
494 - | }
|
495 - | }
|
496 - | }
|
497 - | impl QueryPrecedenceError {
|
498 - | /// Returns `true` if the error kind is `QueryPrecedenceError::ExtraError`.
|
499 - | pub fn is_extra_error(&self) -> bool {
|
500 - | matches!(&self, QueryPrecedenceError::ExtraError(_))
|
501 - | }
|
502 - | /// Returns `true` if the error kind is `QueryPrecedenceError::InternalServerError`.
|
503 - | pub fn is_internal_server_error(&self) -> bool {
|
504 - | matches!(&self, QueryPrecedenceError::InternalServerError(_))
|
505 - | }
|
506 - | /// Returns the error name string by matching the correct variant.
|
507 - | pub fn name(&self) -> &'static str {
|
508 - | match &self {
|
509 - | QueryPrecedenceError::ExtraError(_inner) => _inner.name(),
|
510 - | QueryPrecedenceError::InternalServerError(_inner) => _inner.name(),
|
511 - | }
|
512 - | }
|
513 - | }
|
514 - | impl ::std::error::Error for QueryPrecedenceError {
|
515 - | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
516 - | match &self {
|
517 - | QueryPrecedenceError::ExtraError(_inner) => Some(_inner),
|
518 - | QueryPrecedenceError::InternalServerError(_inner) => Some(_inner),
|
519 - | }
|
520 - | }
|
521 - | }
|
522 - | impl ::std::convert::From<crate::error::ExtraError> for crate::error::QueryPrecedenceError {
|
523 - | fn from(variant: crate::error::ExtraError) -> crate::error::QueryPrecedenceError {
|
524 - | Self::ExtraError(variant)
|
525 - | }
|
526 - | }
|
527 - | impl ::std::convert::From<crate::error::InternalServerError>
|
528 - | for crate::error::QueryPrecedenceError
|
529 - | {
|
530 - | fn from(variant: crate::error::InternalServerError) -> crate::error::QueryPrecedenceError {
|
531 - | Self::InternalServerError(variant)
|
532 - | }
|
533 - | }
|
534 - |
|
535 - | impl ::std::convert::From<::pyo3::PyErr> for crate::error::QueryPrecedenceError {
|
536 - | fn from(variant: ::pyo3::PyErr) -> crate::error::QueryPrecedenceError {
|
537 - | ::pyo3::Python::with_gil(|py| {
|
538 - | let error = variant.value(py);
|
539 - | if let Ok(error) = error.extract::<crate::error::ExtraError>() {
|
540 - | return error.into();
|
541 - | }
|
542 - | crate::error::InternalServerError {
|
543 - | message: error.to_string(),
|
544 - | }
|
545 - | .into()
|
546 - | })
|
547 - | }
|
548 - | }
|
549 - |
|
550 171 | /// Error type for the `EmptyStructWithContentOnWireOp` operation.
|
551 172 | /// Each variant represents an error that can occur for the `EmptyStructWithContentOnWireOp` operation.
|
552 173 | #[derive(::std::fmt::Debug)]
|
553 174 | pub enum EmptyStructWithContentOnWireOpError {
|
554 175 | #[allow(missing_docs)] // documentation missing in model
|
555 176 | ExtraError(crate::error::ExtraError),
|
556 177 | #[allow(missing_docs)] // documentation missing in model
|
557 178 | InternalServerError(crate::error::InternalServerError),
|
558 179 | }
|
559 180 | impl ::std::fmt::Display for EmptyStructWithContentOnWireOpError {
|
937 558 | return error.into();
|
938 559 | }
|
939 560 | crate::error::InternalServerError {
|
940 561 | message: error.to_string(),
|
941 562 | }
|
942 563 | .into()
|
943 564 | })
|
944 565 | }
|
945 566 | }
|
946 567 |
|
568 + | #[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
|
569 + | /// :param message str:
|
570 + | /// :param field_list typing.Optional\[typing.List\[rest_json_extras.model.ValidationExceptionField\]\]:
|
571 + | /// :rtype None:
|
572 + | /// 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.
|
573 + | #[derive(
|
574 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
575 + | )]
|
576 + | pub struct ValidationException {
|
577 + | #[pyo3(get, set)]
|
578 + | /// :type str:
|
579 + | /// A summary of the validation failure.
|
580 + | pub message: ::std::string::String,
|
581 + | #[pyo3(get, set)]
|
582 + | /// :type typing.Optional\[typing.List\[rest_json_extras.model.ValidationExceptionField\]\]:
|
583 + | /// 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.
|
584 + | pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
585 + | }
|
586 + | impl ValidationException {
|
587 + | /// 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.
|
588 + | pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
|
589 + | self.field_list.as_deref()
|
590 + | }
|
591 + | }
|
592 + | #[allow(clippy::new_without_default)]
|
593 + | #[allow(clippy::too_many_arguments)]
|
594 + | #[::pyo3::pymethods]
|
595 + | impl ValidationException {
|
596 + | #[new]
|
597 + | pub fn new(
|
598 + | message: ::std::string::String,
|
599 + | field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
600 + | ) -> Self {
|
601 + | Self {
|
602 + | message,
|
603 + | field_list,
|
604 + | }
|
605 + | }
|
606 + | fn __repr__(&self) -> String {
|
607 + | format!("{self:?}")
|
608 + | }
|
609 + | fn __str__(&self) -> String {
|
610 + | format!("{self:?}")
|
611 + | }
|
612 + | }
|
613 + | impl ValidationException {
|
614 + | /// Returns the error message.
|
615 + | pub fn message(&self) -> &str {
|
616 + | &self.message
|
617 + | }
|
618 + | #[doc(hidden)]
|
619 + | /// Returns the error name.
|
620 + | pub fn name(&self) -> &'static str {
|
621 + | "ValidationException"
|
622 + | }
|
623 + | }
|
624 + | impl ::std::fmt::Display for ValidationException {
|
625 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
626 + | ::std::write!(f, "ValidationException")?;
|
627 + | {
|
628 + | ::std::write!(f, ": {}", &self.message)?;
|
629 + | }
|
630 + | Ok(())
|
631 + | }
|
632 + | }
|
633 + | impl ::std::error::Error for ValidationException {}
|
634 + | impl ValidationException {
|
635 + | /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
636 + | pub fn builder() -> crate::error::validation_exception::Builder {
|
637 + | crate::error::validation_exception::Builder::default()
|
638 + | }
|
639 + | }
|
640 + |
|
947 641 | /// Error type for the `PrimitiveIntOp` operation.
|
948 642 | /// Each variant represents an error that can occur for the `PrimitiveIntOp` operation.
|
949 643 | #[derive(::std::fmt::Debug)]
|
950 644 | pub enum PrimitiveIntOpError {
|
951 645 | #[allow(missing_docs)] // documentation missing in model
|
952 646 | ExtraError(crate::error::ExtraError),
|
953 647 | #[allow(missing_docs)] // documentation missing in model
|
954 648 | InternalServerError(crate::error::InternalServerError),
|
955 649 | }
|
956 650 | impl ::std::fmt::Display for PrimitiveIntOpError {
|