1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | #[allow(missing_docs)] // documentation missing in model
|
3 + | #[derive(
|
4 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
5 + | )]
|
6 + | pub struct ExtraError {}
|
7 + | impl ExtraError {
|
8 + | #[doc(hidden)]
|
9 + | /// Returns the error name.
|
10 + | pub fn name(&self) -> &'static str {
|
11 + | "ExtraError"
|
12 + | }
|
13 + | }
|
14 + | impl ::std::fmt::Display for ExtraError {
|
15 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
16 + | ::std::write!(f, "ExtraError")?;
|
17 + | Ok(())
|
18 + | }
|
19 + | }
|
20 + | impl ::std::error::Error for ExtraError {}
|
21 + | impl ExtraError {
|
22 + | /// Creates a new builder-style object to manufacture [`ExtraError`](crate::error::ExtraError).
|
23 + | pub fn builder() -> crate::error::extra_error::Builder {
|
24 + | crate::error::extra_error::Builder::default()
|
25 + | }
|
26 + | }
|
27 + |
|
28 + | /// Error type for the `HttpQueryParamsOnlyOperation` operation.
|
29 + | /// Each variant represents an error that can occur for the `HttpQueryParamsOnlyOperation` operation.
|
30 + | #[derive(::std::fmt::Debug)]
|
31 + | pub enum HttpQueryParamsOnlyOperationError {
|
32 + | #[allow(missing_docs)] // documentation missing in model
|
33 + | ExtraError(crate::error::ExtraError),
|
34 + | }
|
35 + | impl ::std::fmt::Display for HttpQueryParamsOnlyOperationError {
|
36 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
37 + | match &self {
|
38 + | HttpQueryParamsOnlyOperationError::ExtraError(_inner) => _inner.fmt(f),
|
39 + | }
|
40 + | }
|
41 + | }
|
42 + | impl HttpQueryParamsOnlyOperationError {
|
43 + | /// Returns `true` if the error kind is `HttpQueryParamsOnlyOperationError::ExtraError`.
|
44 + | pub fn is_extra_error(&self) -> bool {
|
45 + | matches!(&self, HttpQueryParamsOnlyOperationError::ExtraError(_))
|
46 + | }
|
47 + | /// Returns the error name string by matching the correct variant.
|
48 + | pub fn name(&self) -> &'static str {
|
49 + | match &self {
|
50 + | HttpQueryParamsOnlyOperationError::ExtraError(_inner) => _inner.name(),
|
51 + | }
|
52 + | }
|
53 + | }
|
54 + | impl ::std::error::Error for HttpQueryParamsOnlyOperationError {
|
55 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
56 + | match &self {
|
57 + | HttpQueryParamsOnlyOperationError::ExtraError(_inner) => Some(_inner),
|
58 + | }
|
59 + | }
|
60 + | }
|
61 + | impl ::std::convert::From<crate::error::ExtraError>
|
62 + | for crate::error::HttpQueryParamsOnlyOperationError
|
63 + | {
|
64 + | fn from(variant: crate::error::ExtraError) -> crate::error::HttpQueryParamsOnlyOperationError {
|
65 + | Self::ExtraError(variant)
|
66 + | }
|
67 + | }
|
68 + |
|
69 + | /// Error type for the `QueryPrecedence` operation.
|
70 + | /// Each variant represents an error that can occur for the `QueryPrecedence` operation.
|
71 + | #[derive(::std::fmt::Debug)]
|
72 + | pub enum QueryPrecedenceError {
|
73 + | #[allow(missing_docs)] // documentation missing in model
|
74 + | ExtraError(crate::error::ExtraError),
|
75 + | }
|
76 + | impl ::std::fmt::Display for QueryPrecedenceError {
|
77 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
78 + | match &self {
|
79 + | QueryPrecedenceError::ExtraError(_inner) => _inner.fmt(f),
|
80 + | }
|
81 + | }
|
82 + | }
|
83 + | impl QueryPrecedenceError {
|
84 + | /// Returns `true` if the error kind is `QueryPrecedenceError::ExtraError`.
|
85 + | pub fn is_extra_error(&self) -> bool {
|
86 + | matches!(&self, QueryPrecedenceError::ExtraError(_))
|
87 + | }
|
88 + | /// Returns the error name string by matching the correct variant.
|
89 + | pub fn name(&self) -> &'static str {
|
90 + | match &self {
|
91 + | QueryPrecedenceError::ExtraError(_inner) => _inner.name(),
|
92 + | }
|
93 + | }
|
94 + | }
|
95 + | impl ::std::error::Error for QueryPrecedenceError {
|
96 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
97 + | match &self {
|
98 + | QueryPrecedenceError::ExtraError(_inner) => Some(_inner),
|
99 + | }
|
100 + | }
|
101 + | }
|
102 + | impl ::std::convert::From<crate::error::ExtraError> for crate::error::QueryPrecedenceError {
|
103 + | fn from(variant: crate::error::ExtraError) -> crate::error::QueryPrecedenceError {
|
104 + | Self::ExtraError(variant)
|
105 + | }
|
106 + | }
|
107 + |
|
108 + | /// Error type for the `EmptyStructWithContentOnWireOp` operation.
|
109 + | /// Each variant represents an error that can occur for the `EmptyStructWithContentOnWireOp` operation.
|
110 + | #[derive(::std::fmt::Debug)]
|
111 + | pub enum EmptyStructWithContentOnWireOpError {
|
112 + | #[allow(missing_docs)] // documentation missing in model
|
113 + | ExtraError(crate::error::ExtraError),
|
114 + | }
|
115 + | impl ::std::fmt::Display for EmptyStructWithContentOnWireOpError {
|
116 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
117 + | match &self {
|
118 + | EmptyStructWithContentOnWireOpError::ExtraError(_inner) => _inner.fmt(f),
|
119 + | }
|
120 + | }
|
121 + | }
|
122 + | impl EmptyStructWithContentOnWireOpError {
|
123 + | /// Returns `true` if the error kind is `EmptyStructWithContentOnWireOpError::ExtraError`.
|
124 + | pub fn is_extra_error(&self) -> bool {
|
125 + | matches!(&self, EmptyStructWithContentOnWireOpError::ExtraError(_))
|
126 + | }
|
127 + | /// Returns the error name string by matching the correct variant.
|
128 + | pub fn name(&self) -> &'static str {
|
129 + | match &self {
|
130 + | EmptyStructWithContentOnWireOpError::ExtraError(_inner) => _inner.name(),
|
131 + | }
|
132 + | }
|
133 + | }
|
134 + | impl ::std::error::Error for EmptyStructWithContentOnWireOpError {
|
135 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
136 + | match &self {
|
137 + | EmptyStructWithContentOnWireOpError::ExtraError(_inner) => Some(_inner),
|
138 + | }
|
139 + | }
|
140 + | }
|
141 + | impl ::std::convert::From<crate::error::ExtraError>
|
142 + | for crate::error::EmptyStructWithContentOnWireOpError
|
143 + | {
|
144 + | fn from(
|
145 + | variant: crate::error::ExtraError,
|
146 + | ) -> crate::error::EmptyStructWithContentOnWireOpError {
|
147 + | Self::ExtraError(variant)
|
148 + | }
|
149 + | }
|
150 + |
|
151 + | /// Error type for the `CaseInsensitiveErrorOperation` operation.
|
152 + | /// Each variant represents an error that can occur for the `CaseInsensitiveErrorOperation` operation.
|
153 + | #[derive(::std::fmt::Debug)]
|
154 + | pub enum CaseInsensitiveErrorOperationError {
|
155 + | #[allow(missing_docs)] // documentation missing in model
|
156 + | CaseInsensitiveError(crate::error::CaseInsensitiveError),
|
157 + | #[allow(missing_docs)] // documentation missing in model
|
158 + | ExtraError(crate::error::ExtraError),
|
159 + | }
|
160 + | impl ::std::fmt::Display for CaseInsensitiveErrorOperationError {
|
161 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
162 + | match &self {
|
163 + | CaseInsensitiveErrorOperationError::CaseInsensitiveError(_inner) => _inner.fmt(f),
|
164 + | CaseInsensitiveErrorOperationError::ExtraError(_inner) => _inner.fmt(f),
|
165 + | }
|
166 + | }
|
167 + | }
|
168 + | impl CaseInsensitiveErrorOperationError {
|
169 + | /// Returns `true` if the error kind is `CaseInsensitiveErrorOperationError::CaseInsensitiveError`.
|
170 + | pub fn is_case_insensitive_error(&self) -> bool {
|
171 + | matches!(
|
172 + | &self,
|
173 + | CaseInsensitiveErrorOperationError::CaseInsensitiveError(_)
|
174 + | )
|
175 + | }
|
176 + | /// Returns `true` if the error kind is `CaseInsensitiveErrorOperationError::ExtraError`.
|
177 + | pub fn is_extra_error(&self) -> bool {
|
178 + | matches!(&self, CaseInsensitiveErrorOperationError::ExtraError(_))
|
179 + | }
|
180 + | /// Returns the error name string by matching the correct variant.
|
181 + | pub fn name(&self) -> &'static str {
|
182 + | match &self {
|
183 + | CaseInsensitiveErrorOperationError::CaseInsensitiveError(_inner) => _inner.name(),
|
184 + | CaseInsensitiveErrorOperationError::ExtraError(_inner) => _inner.name(),
|
185 + | }
|
186 + | }
|
187 + | }
|
188 + | impl ::std::error::Error for CaseInsensitiveErrorOperationError {
|
189 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
190 + | match &self {
|
191 + | CaseInsensitiveErrorOperationError::CaseInsensitiveError(_inner) => Some(_inner),
|
192 + | CaseInsensitiveErrorOperationError::ExtraError(_inner) => Some(_inner),
|
193 + | }
|
194 + | }
|
195 + | }
|
196 + | impl ::std::convert::From<crate::error::CaseInsensitiveError>
|
197 + | for crate::error::CaseInsensitiveErrorOperationError
|
198 + | {
|
199 + | fn from(
|
200 + | variant: crate::error::CaseInsensitiveError,
|
201 + | ) -> crate::error::CaseInsensitiveErrorOperationError {
|
202 + | Self::CaseInsensitiveError(variant)
|
203 + | }
|
204 + | }
|
205 + | impl ::std::convert::From<crate::error::ExtraError>
|
206 + | for crate::error::CaseInsensitiveErrorOperationError
|
207 + | {
|
208 + | fn from(variant: crate::error::ExtraError) -> crate::error::CaseInsensitiveErrorOperationError {
|
209 + | Self::ExtraError(variant)
|
210 + | }
|
211 + | }
|
212 + |
|
213 + | #[allow(missing_docs)] // documentation missing in model
|
214 + | #[derive(
|
215 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
216 + | )]
|
217 + | pub struct CaseInsensitiveError {
|
218 + | #[allow(missing_docs)] // documentation missing in model
|
219 + | pub message: ::std::option::Option<::std::string::String>,
|
220 + | }
|
221 + | impl CaseInsensitiveError {
|
222 + | /// Returns the error message.
|
223 + | pub fn message(&self) -> ::std::option::Option<&str> {
|
224 + | self.message.as_deref()
|
225 + | }
|
226 + | #[doc(hidden)]
|
227 + | /// Returns the error name.
|
228 + | pub fn name(&self) -> &'static str {
|
229 + | "CaseInsensitiveError"
|
230 + | }
|
231 + | }
|
232 + | impl ::std::fmt::Display for CaseInsensitiveError {
|
233 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
234 + | ::std::write!(f, "CaseInsensitiveError")?;
|
235 + | if let ::std::option::Option::Some(inner_1) = &self.message {
|
236 + | {
|
237 + | ::std::write!(f, ": {inner_1}")?;
|
238 + | }
|
239 + | }
|
240 + | Ok(())
|
241 + | }
|
242 + | }
|
243 + | impl ::std::error::Error for CaseInsensitiveError {}
|
244 + | impl CaseInsensitiveError {
|
245 + | /// Creates a new builder-style object to manufacture [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
|
246 + | pub fn builder() -> crate::error::case_insensitive_error::Builder {
|
247 + | crate::error::case_insensitive_error::Builder::default()
|
248 + | }
|
249 + | }
|
250 + |
|
251 + | /// Error type for the `NullInNonSparse` operation.
|
252 + | /// Each variant represents an error that can occur for the `NullInNonSparse` operation.
|
253 + | #[derive(::std::fmt::Debug)]
|
254 + | pub enum NullInNonSparseError {
|
255 + | #[allow(missing_docs)] // documentation missing in model
|
256 + | ExtraError(crate::error::ExtraError),
|
257 + | }
|
258 + | impl ::std::fmt::Display for NullInNonSparseError {
|
259 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
260 + | match &self {
|
261 + | NullInNonSparseError::ExtraError(_inner) => _inner.fmt(f),
|
262 + | }
|
263 + | }
|
264 + | }
|
265 + | impl NullInNonSparseError {
|
266 + | /// Returns `true` if the error kind is `NullInNonSparseError::ExtraError`.
|
267 + | pub fn is_extra_error(&self) -> bool {
|
268 + | matches!(&self, NullInNonSparseError::ExtraError(_))
|
269 + | }
|
270 + | /// Returns the error name string by matching the correct variant.
|
271 + | pub fn name(&self) -> &'static str {
|
272 + | match &self {
|
273 + | NullInNonSparseError::ExtraError(_inner) => _inner.name(),
|
274 + | }
|
275 + | }
|
276 + | }
|
277 + | impl ::std::error::Error for NullInNonSparseError {
|
278 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
279 + | match &self {
|
280 + | NullInNonSparseError::ExtraError(_inner) => Some(_inner),
|
281 + | }
|
282 + | }
|
283 + | }
|
284 + | impl ::std::convert::From<crate::error::ExtraError> for crate::error::NullInNonSparseError {
|
285 + | fn from(variant: crate::error::ExtraError) -> crate::error::NullInNonSparseError {
|
286 + | Self::ExtraError(variant)
|
287 + | }
|
288 + | }
|
289 + |
|
290 + | /// Error type for the `EscapedStringValues` operation.
|
291 + | /// Each variant represents an error that can occur for the `EscapedStringValues` operation.
|
292 + | #[derive(::std::fmt::Debug)]
|
293 + | pub enum EscapedStringValuesError {
|
294 + | /// 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.
|
295 + | ValidationException(crate::error::ValidationException),
|
296 + | #[allow(missing_docs)] // documentation missing in model
|
297 + | ExtraError(crate::error::ExtraError),
|
298 + | }
|
299 + | impl ::std::fmt::Display for EscapedStringValuesError {
|
300 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
301 + | match &self {
|
302 + | EscapedStringValuesError::ValidationException(_inner) => _inner.fmt(f),
|
303 + | EscapedStringValuesError::ExtraError(_inner) => _inner.fmt(f),
|
304 + | }
|
305 + | }
|
306 + | }
|
307 + | impl EscapedStringValuesError {
|
308 + | /// Returns `true` if the error kind is `EscapedStringValuesError::ValidationException`.
|
309 + | pub fn is_validation_exception(&self) -> bool {
|
310 + | matches!(&self, EscapedStringValuesError::ValidationException(_))
|
311 + | }
|
312 + | /// Returns `true` if the error kind is `EscapedStringValuesError::ExtraError`.
|
313 + | pub fn is_extra_error(&self) -> bool {
|
314 + | matches!(&self, EscapedStringValuesError::ExtraError(_))
|
315 + | }
|
316 + | /// Returns the error name string by matching the correct variant.
|
317 + | pub fn name(&self) -> &'static str {
|
318 + | match &self {
|
319 + | EscapedStringValuesError::ValidationException(_inner) => _inner.name(),
|
320 + | EscapedStringValuesError::ExtraError(_inner) => _inner.name(),
|
321 + | }
|
322 + | }
|
323 + | }
|
324 + | impl ::std::error::Error for EscapedStringValuesError {
|
325 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
326 + | match &self {
|
327 + | EscapedStringValuesError::ValidationException(_inner) => Some(_inner),
|
328 + | EscapedStringValuesError::ExtraError(_inner) => Some(_inner),
|
329 + | }
|
330 + | }
|
331 + | }
|
332 + | impl ::std::convert::From<crate::error::ValidationException>
|
333 + | for crate::error::EscapedStringValuesError
|
334 + | {
|
335 + | fn from(variant: crate::error::ValidationException) -> crate::error::EscapedStringValuesError {
|
336 + | Self::ValidationException(variant)
|
337 + | }
|
338 + | }
|
339 + | impl ::std::convert::From<crate::error::ExtraError> for crate::error::EscapedStringValuesError {
|
340 + | fn from(variant: crate::error::ExtraError) -> crate::error::EscapedStringValuesError {
|
341 + | Self::ExtraError(variant)
|
342 + | }
|
343 + | }
|
344 + |
|
345 + | /// 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.
|
346 + | #[derive(
|
347 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
348 + | )]
|
349 + | pub struct ValidationException {
|
350 + | /// A summary of the validation failure.
|
351 + | pub message: ::std::string::String,
|
352 + | /// 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.
|
353 + | pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
354 + | }
|
355 + | impl ValidationException {
|
356 + | /// 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.
|
357 + | pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
|
358 + | self.field_list.as_deref()
|
359 + | }
|
360 + | }
|
361 + | impl ValidationException {
|
362 + | /// Returns the error message.
|
363 + | pub fn message(&self) -> &str {
|
364 + | &self.message
|
365 + | }
|
366 + | #[doc(hidden)]
|
367 + | /// Returns the error name.
|
368 + | pub fn name(&self) -> &'static str {
|
369 + | "ValidationException"
|
370 + | }
|
371 + | }
|
372 + | impl ::std::fmt::Display for ValidationException {
|
373 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
374 + | ::std::write!(f, "ValidationException")?;
|
375 + | {
|
376 + | ::std::write!(f, ": {}", &self.message)?;
|
377 + | }
|
378 + | Ok(())
|
379 + | }
|
380 + | }
|
381 + | impl ::std::error::Error for ValidationException {}
|
382 + | impl ValidationException {
|
383 + | /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
384 + | pub fn builder() -> crate::error::validation_exception::Builder {
|
385 + | crate::error::validation_exception::Builder::default()
|
386 + | }
|
387 + | }
|
388 + |
|
389 + | /// Error type for the `PrimitiveIntOp` operation.
|
390 + | /// Each variant represents an error that can occur for the `PrimitiveIntOp` operation.
|
391 + | #[derive(::std::fmt::Debug)]
|
392 + | pub enum PrimitiveIntOpError {
|
393 + | #[allow(missing_docs)] // documentation missing in model
|
394 + | ExtraError(crate::error::ExtraError),
|
395 + | }
|
396 + | impl ::std::fmt::Display for PrimitiveIntOpError {
|
397 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
398 + | match &self {
|
399 + | PrimitiveIntOpError::ExtraError(_inner) => _inner.fmt(f),
|
400 + | }
|
401 + | }
|
402 + | }
|
403 + | impl PrimitiveIntOpError {
|
404 + | /// Returns `true` if the error kind is `PrimitiveIntOpError::ExtraError`.
|
405 + | pub fn is_extra_error(&self) -> bool {
|
406 + | matches!(&self, PrimitiveIntOpError::ExtraError(_))
|
407 + | }
|
408 + | /// Returns the error name string by matching the correct variant.
|
409 + | pub fn name(&self) -> &'static str {
|
410 + | match &self {
|
411 + | PrimitiveIntOpError::ExtraError(_inner) => _inner.name(),
|
412 + | }
|
413 + | }
|
414 + | }
|
415 + | impl ::std::error::Error for PrimitiveIntOpError {
|
416 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
417 + | match &self {
|
418 + | PrimitiveIntOpError::ExtraError(_inner) => Some(_inner),
|
419 + | }
|
420 + | }
|
421 + | }
|
422 + | impl ::std::convert::From<crate::error::ExtraError> for crate::error::PrimitiveIntOpError {
|
423 + | fn from(variant: crate::error::ExtraError) -> crate::error::PrimitiveIntOpError {
|
424 + | Self::ExtraError(variant)
|
425 + | }
|
426 + | }
|
427 + |
|
428 + | /// Error type for the `MapWithEnumKeyOp` operation.
|
429 + | /// Each variant represents an error that can occur for the `MapWithEnumKeyOp` operation.
|
430 + | #[derive(::std::fmt::Debug)]
|
431 + | pub enum MapWithEnumKeyOpError {
|
432 + | /// 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.
|
433 + | ValidationException(crate::error::ValidationException),
|
434 + | #[allow(missing_docs)] // documentation missing in model
|
435 + | ExtraError(crate::error::ExtraError),
|
436 + | }
|
437 + | impl ::std::fmt::Display for MapWithEnumKeyOpError {
|
438 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
439 + | match &self {
|
440 + | MapWithEnumKeyOpError::ValidationException(_inner) => _inner.fmt(f),
|
441 + | MapWithEnumKeyOpError::ExtraError(_inner) => _inner.fmt(f),
|
442 + | }
|
443 + | }
|
444 + | }
|
445 + | impl MapWithEnumKeyOpError {
|
446 + | /// Returns `true` if the error kind is `MapWithEnumKeyOpError::ValidationException`.
|
447 + | pub fn is_validation_exception(&self) -> bool {
|
448 + | matches!(&self, MapWithEnumKeyOpError::ValidationException(_))
|
449 + | }
|
450 + | /// Returns `true` if the error kind is `MapWithEnumKeyOpError::ExtraError`.
|
451 + | pub fn is_extra_error(&self) -> bool {
|
452 + | matches!(&self, MapWithEnumKeyOpError::ExtraError(_))
|
453 + | }
|
454 + | /// Returns the error name string by matching the correct variant.
|
455 + | pub fn name(&self) -> &'static str {
|
456 + | match &self {
|
457 + | MapWithEnumKeyOpError::ValidationException(_inner) => _inner.name(),
|
458 + | MapWithEnumKeyOpError::ExtraError(_inner) => _inner.name(),
|
459 + | }
|
460 + | }
|
461 + | }
|
462 + | impl ::std::error::Error for MapWithEnumKeyOpError {
|
463 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
464 + | match &self {
|
465 + | MapWithEnumKeyOpError::ValidationException(_inner) => Some(_inner),
|
466 + | MapWithEnumKeyOpError::ExtraError(_inner) => Some(_inner),
|
467 + | }
|
468 + | }
|
469 + | }
|
470 + | impl ::std::convert::From<crate::error::ValidationException>
|
471 + | for crate::error::MapWithEnumKeyOpError
|
472 + | {
|
473 + | fn from(variant: crate::error::ValidationException) -> crate::error::MapWithEnumKeyOpError {
|
474 + | Self::ValidationException(variant)
|
475 + | }
|
476 + | }
|
477 + | impl ::std::convert::From<crate::error::ExtraError> for crate::error::MapWithEnumKeyOpError {
|
478 + | fn from(variant: crate::error::ExtraError) -> crate::error::MapWithEnumKeyOpError {
|
479 + | Self::ExtraError(variant)
|
480 + | }
|
481 + | }
|
482 + |
|
483 + | /// Error type for the `StatusResponse` operation.
|
484 + | /// Each variant represents an error that can occur for the `StatusResponse` operation.
|
485 + | #[derive(::std::fmt::Debug)]
|
486 + | pub enum StatusResponseError {
|
487 + | #[allow(missing_docs)] // documentation missing in model
|
488 + | ExtraError(crate::error::ExtraError),
|
489 + | }
|
490 + | impl ::std::fmt::Display for StatusResponseError {
|
491 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
492 + | match &self {
|
493 + | StatusResponseError::ExtraError(_inner) => _inner.fmt(f),
|
494 + | }
|
495 + | }
|
496 + | }
|
497 + | impl StatusResponseError {
|
498 + | /// Returns `true` if the error kind is `StatusResponseError::ExtraError`.
|
499 + | pub fn is_extra_error(&self) -> bool {
|
500 + | matches!(&self, StatusResponseError::ExtraError(_))
|
501 + | }
|
502 + | /// Returns the error name string by matching the correct variant.
|
503 + | pub fn name(&self) -> &'static str {
|
504 + | match &self {
|
505 + | StatusResponseError::ExtraError(_inner) => _inner.name(),
|
506 + | }
|
507 + | }
|
508 + | }
|
509 + | impl ::std::error::Error for StatusResponseError {
|
510 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
511 + | match &self {
|
512 + | StatusResponseError::ExtraError(_inner) => Some(_inner),
|
513 + | }
|
514 + | }
|
515 + | }
|
516 + | impl ::std::convert::From<crate::error::ExtraError> for crate::error::StatusResponseError {
|
517 + | fn from(variant: crate::error::ExtraError) -> crate::error::StatusResponseError {
|
518 + | Self::ExtraError(variant)
|
519 + | }
|
520 + | }
|
521 + |
|
522 + | /// Error type for the `EnumQuery` operation.
|
523 + | /// Each variant represents an error that can occur for the `EnumQuery` operation.
|
524 + | #[derive(::std::fmt::Debug)]
|
525 + | pub enum EnumQueryError {
|
526 + | /// 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.
|
527 + | ValidationException(crate::error::ValidationException),
|
528 + | #[allow(missing_docs)] // documentation missing in model
|
529 + | ExtraError(crate::error::ExtraError),
|
530 + | }
|
531 + | impl ::std::fmt::Display for EnumQueryError {
|
532 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
533 + | match &self {
|
534 + | EnumQueryError::ValidationException(_inner) => _inner.fmt(f),
|
535 + | EnumQueryError::ExtraError(_inner) => _inner.fmt(f),
|
536 + | }
|
537 + | }
|
538 + | }
|
539 + | impl EnumQueryError {
|
540 + | /// Returns `true` if the error kind is `EnumQueryError::ValidationException`.
|
541 + | pub fn is_validation_exception(&self) -> bool {
|
542 + | matches!(&self, EnumQueryError::ValidationException(_))
|
543 + | }
|
544 + | /// Returns `true` if the error kind is `EnumQueryError::ExtraError`.
|
545 + | pub fn is_extra_error(&self) -> bool {
|
546 + | matches!(&self, EnumQueryError::ExtraError(_))
|
547 + | }
|
548 + | /// Returns the error name string by matching the correct variant.
|
549 + | pub fn name(&self) -> &'static str {
|
550 + | match &self {
|
551 + | EnumQueryError::ValidationException(_inner) => _inner.name(),
|
552 + | EnumQueryError::ExtraError(_inner) => _inner.name(),
|
553 + | }
|
554 + | }
|
555 + | }
|
556 + | impl ::std::error::Error for EnumQueryError {
|
557 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
558 + | match &self {
|
559 + | EnumQueryError::ValidationException(_inner) => Some(_inner),
|
560 + | EnumQueryError::ExtraError(_inner) => Some(_inner),
|
561 + | }
|
562 + | }
|
563 + | }
|
564 + | impl ::std::convert::From<crate::error::ValidationException> for crate::error::EnumQueryError {
|
565 + | fn from(variant: crate::error::ValidationException) -> crate::error::EnumQueryError {
|
566 + | Self::ValidationException(variant)
|
567 + | }
|
568 + | }
|
569 + | impl ::std::convert::From<crate::error::ExtraError> for crate::error::EnumQueryError {
|
570 + | fn from(variant: crate::error::ExtraError) -> crate::error::EnumQueryError {
|
571 + | Self::ExtraError(variant)
|
572 + | }
|
573 + | }
|
574 + |
|
575 + | /// Error type for the `PrimitiveIntHeader` operation.
|
576 + | /// Each variant represents an error that can occur for the `PrimitiveIntHeader` operation.
|
577 + | #[derive(::std::fmt::Debug)]
|
578 + | pub enum PrimitiveIntHeaderError {
|
579 + | /// 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.
|
580 + | ValidationException(crate::error::ValidationException),
|
581 + | #[allow(missing_docs)] // documentation missing in model
|
582 + | ExtraError(crate::error::ExtraError),
|
583 + | }
|
584 + | impl ::std::fmt::Display for PrimitiveIntHeaderError {
|
585 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
586 + | match &self {
|
587 + | PrimitiveIntHeaderError::ValidationException(_inner) => _inner.fmt(f),
|
588 + | PrimitiveIntHeaderError::ExtraError(_inner) => _inner.fmt(f),
|
589 + | }
|
590 + | }
|
591 + | }
|
592 + | impl PrimitiveIntHeaderError {
|
593 + | /// Returns `true` if the error kind is `PrimitiveIntHeaderError::ValidationException`.
|
594 + | pub fn is_validation_exception(&self) -> bool {
|
595 + | matches!(&self, PrimitiveIntHeaderError::ValidationException(_))
|
596 + | }
|
597 + | /// Returns `true` if the error kind is `PrimitiveIntHeaderError::ExtraError`.
|
598 + | pub fn is_extra_error(&self) -> bool {
|
599 + | matches!(&self, PrimitiveIntHeaderError::ExtraError(_))
|
600 + | }
|
601 + | /// Returns the error name string by matching the correct variant.
|
602 + | pub fn name(&self) -> &'static str {
|
603 + | match &self {
|
604 + | PrimitiveIntHeaderError::ValidationException(_inner) => _inner.name(),
|
605 + | PrimitiveIntHeaderError::ExtraError(_inner) => _inner.name(),
|
606 + | }
|
607 + | }
|
608 + | }
|
609 + | impl ::std::error::Error for PrimitiveIntHeaderError {
|
610 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
611 + | match &self {
|
612 + | PrimitiveIntHeaderError::ValidationException(_inner) => Some(_inner),
|
613 + | PrimitiveIntHeaderError::ExtraError(_inner) => Some(_inner),
|
614 + | }
|
615 + | }
|
616 + | }
|
617 + | impl ::std::convert::From<crate::error::ValidationException>
|
618 + | for crate::error::PrimitiveIntHeaderError
|
619 + | {
|
620 + | fn from(variant: crate::error::ValidationException) -> crate::error::PrimitiveIntHeaderError {
|
621 + | Self::ValidationException(variant)
|
622 + | }
|
623 + | }
|
624 + | impl ::std::convert::From<crate::error::ExtraError> for crate::error::PrimitiveIntHeaderError {
|
625 + | fn from(variant: crate::error::ExtraError) -> crate::error::PrimitiveIntHeaderError {
|
626 + | Self::ExtraError(variant)
|
627 + | }
|
628 + | }
|
629 + |
|
630 + | /// Error type for the `StringPayload` operation.
|
631 + | /// Each variant represents an error that can occur for the `StringPayload` operation.
|
632 + | #[derive(::std::fmt::Debug)]
|
633 + | pub enum StringPayloadError {
|
634 + | #[allow(missing_docs)] // documentation missing in model
|
635 + | ExtraError(crate::error::ExtraError),
|
636 + | }
|
637 + | impl ::std::fmt::Display for StringPayloadError {
|
638 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
639 + | match &self {
|
640 + | StringPayloadError::ExtraError(_inner) => _inner.fmt(f),
|
641 + | }
|
642 + | }
|
643 + | }
|
644 + | impl StringPayloadError {
|
645 + | /// Returns `true` if the error kind is `StringPayloadError::ExtraError`.
|
646 + | pub fn is_extra_error(&self) -> bool {
|
647 + | matches!(&self, StringPayloadError::ExtraError(_))
|
648 + | }
|
649 + | /// Returns the error name string by matching the correct variant.
|
650 + | pub fn name(&self) -> &'static str {
|
651 + | match &self {
|
652 + | StringPayloadError::ExtraError(_inner) => _inner.name(),
|
653 + | }
|
654 + | }
|
655 + | }
|
656 + | impl ::std::error::Error for StringPayloadError {
|
657 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
658 + | match &self {
|
659 + | StringPayloadError::ExtraError(_inner) => Some(_inner),
|
660 + | }
|
661 + | }
|
662 + | }
|
663 + | impl ::std::convert::From<crate::error::ExtraError> for crate::error::StringPayloadError {
|
664 + | fn from(variant: crate::error::ExtraError) -> crate::error::StringPayloadError {
|
665 + | Self::ExtraError(variant)
|
666 + | }
|
667 + | }
|
668 + | /// See [`ExtraError`](crate::error::ExtraError).
|
669 + | pub mod extra_error {
|
670 + |
|
671 + | impl ::std::convert::From<Builder> for crate::error::ExtraError {
|
672 + | fn from(builder: Builder) -> Self {
|
673 + | builder.build()
|
674 + | }
|
675 + | }
|
676 + | /// A builder for [`ExtraError`](crate::error::ExtraError).
|
677 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
678 + | pub struct Builder {}
|
679 + | impl Builder {
|
680 + | /// Consumes the builder and constructs a [`ExtraError`](crate::error::ExtraError).
|
681 + | pub fn build(self) -> crate::error::ExtraError {
|
682 + | self.build_enforcing_all_constraints()
|
683 + | }
|
684 + | fn build_enforcing_all_constraints(self) -> crate::error::ExtraError {
|
685 + | crate::error::ExtraError {}
|
686 + | }
|
687 + | }
|
688 + | }
|
689 + | /// See [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
|
690 + | pub mod case_insensitive_error {
|
691 + |
|
692 + | impl ::std::convert::From<Builder> for crate::error::CaseInsensitiveError {
|
693 + | fn from(builder: Builder) -> Self {
|
694 + | builder.build()
|
695 + | }
|
696 + | }
|
697 + | /// A builder for [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
|
698 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
699 + | pub struct Builder {
|
700 + | pub(crate) message: ::std::option::Option<::std::string::String>,
|
701 + | }
|
702 + | impl Builder {
|
703 + | #[allow(missing_docs)] // documentation missing in model
|
704 + | pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
705 + | self.message = input;
|
706 + | self
|
707 + | }
|
708 + | /// Consumes the builder and constructs a [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
|
709 + | pub fn build(self) -> crate::error::CaseInsensitiveError {
|
710 + | self.build_enforcing_all_constraints()
|
711 + | }
|
712 + | fn build_enforcing_all_constraints(self) -> crate::error::CaseInsensitiveError {
|
713 + | crate::error::CaseInsensitiveError {
|
714 + | message: self.message,
|
715 + | }
|
716 + | }
|
717 + | }
|
718 + | }
|
719 + | /// See [`ValidationException`](crate::error::ValidationException).
|
720 + | pub mod validation_exception {
|
721 + |
|
722 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
723 + | /// Holds one variant for each of the ways the builder can fail.
|
724 + | #[non_exhaustive]
|
725 + | #[allow(clippy::enum_variant_names)]
|
726 + | pub enum ConstraintViolation {
|
727 + | /// `message` was not provided but it is required when building `ValidationException`.
|
728 + | MissingMessage,
|
729 + | }
|
730 + | impl ::std::fmt::Display for ConstraintViolation {
|
731 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
732 + | match self {
|
733 + | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
734 + | }
|
735 + | }
|
736 + | }
|
737 + | impl ::std::error::Error for ConstraintViolation {}
|
738 + | impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
|
739 + | type Error = ConstraintViolation;
|
740 + |
|
741 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
742 + | builder.build()
|
743 + | }
|
744 + | }
|
745 + | /// A builder for [`ValidationException`](crate::error::ValidationException).
|
746 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
747 + | pub struct Builder {
|
748 + | pub(crate) message: ::std::option::Option<::std::string::String>,
|
749 + | pub(crate) field_list:
|
750 + | ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
751 + | }
|
752 + | impl Builder {
|
753 + | /// A summary of the validation failure.
|
754 + | pub fn message(mut self, input: ::std::string::String) -> Self {
|
755 + | self.message = Some(input);
|
756 + | self
|
757 + | }
|
758 + | /// 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.
|
759 + | pub fn field_list(
|
760 + | mut self,
|
761 + | input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
762 + | ) -> Self {
|
763 + | self.field_list = input;
|
764 + | self
|
765 + | }
|
766 + | /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
767 + | ///
|
768 + | /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if a [`ConstraintViolation`] occurs.
|
769 + | ///
|
770 + | pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
771 + | self.build_enforcing_all_constraints()
|
772 + | }
|
773 + | fn build_enforcing_all_constraints(
|
774 + | self,
|
775 + | ) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
776 + | Ok(crate::error::ValidationException {
|
777 + | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
778 + | field_list: self.field_list,
|
779 + | })
|
780 + | }
|
781 + | }
|
782 + | }
|