1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /// Error type for the `GetServerStatistics` operation.
|
3 + | /// Each variant represents an error that can occur for the `GetServerStatistics` operation.
|
4 + | #[derive(::std::fmt::Debug)]
|
5 + | pub enum GetServerStatisticsError {
|
6 + | #[allow(missing_docs)] // documentation missing in model
|
7 + | InternalServerError(crate::error::InternalServerError),
|
8 + | }
|
9 + | impl ::std::fmt::Display for GetServerStatisticsError {
|
10 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
11 + | match &self {
|
12 + | GetServerStatisticsError::InternalServerError(_inner) => _inner.fmt(f),
|
13 + | }
|
14 + | }
|
15 + | }
|
16 + | impl GetServerStatisticsError {
|
17 + | /// Returns `true` if the error kind is `GetServerStatisticsError::InternalServerError`.
|
18 + | pub fn is_internal_server_error(&self) -> bool {
|
19 + | matches!(&self, GetServerStatisticsError::InternalServerError(_))
|
20 + | }
|
21 + | /// Returns the error name string by matching the correct variant.
|
22 + | pub fn name(&self) -> &'static str {
|
23 + | match &self {
|
24 + | GetServerStatisticsError::InternalServerError(_inner) => _inner.name(),
|
25 + | }
|
26 + | }
|
27 + | }
|
28 + | impl ::std::error::Error for GetServerStatisticsError {
|
29 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
30 + | match &self {
|
31 + | GetServerStatisticsError::InternalServerError(_inner) => Some(_inner),
|
32 + | }
|
33 + | }
|
34 + | }
|
35 + | impl ::std::convert::From<crate::error::InternalServerError>
|
36 + | for crate::error::GetServerStatisticsError
|
37 + | {
|
38 + | fn from(variant: crate::error::InternalServerError) -> crate::error::GetServerStatisticsError {
|
39 + | Self::InternalServerError(variant)
|
40 + | }
|
41 + | }
|
42 + |
|
43 + | impl ::std::convert::From<::napi::Error> for crate::error::GetServerStatisticsError {
|
44 + | fn from(variant: ::napi::Error) -> crate::error::GetServerStatisticsError {
|
45 + | crate::error::InternalServerError {
|
46 + | message: variant.to_string(),
|
47 + | }
|
48 + | .into()
|
49 + | }
|
50 + | }
|
51 + |
|
52 + | /// Error type for the `DoNothing` operation.
|
53 + | /// Each variant represents an error that can occur for the `DoNothing` operation.
|
54 + | #[derive(::std::fmt::Debug)]
|
55 + | pub enum DoNothingError {
|
56 + | #[allow(missing_docs)] // documentation missing in model
|
57 + | InternalServerError(crate::error::InternalServerError),
|
58 + | }
|
59 + | impl ::std::fmt::Display for DoNothingError {
|
60 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
61 + | match &self {
|
62 + | DoNothingError::InternalServerError(_inner) => _inner.fmt(f),
|
63 + | }
|
64 + | }
|
65 + | }
|
66 + | impl DoNothingError {
|
67 + | /// Returns `true` if the error kind is `DoNothingError::InternalServerError`.
|
68 + | pub fn is_internal_server_error(&self) -> bool {
|
69 + | matches!(&self, DoNothingError::InternalServerError(_))
|
70 + | }
|
71 + | /// Returns the error name string by matching the correct variant.
|
72 + | pub fn name(&self) -> &'static str {
|
73 + | match &self {
|
74 + | DoNothingError::InternalServerError(_inner) => _inner.name(),
|
75 + | }
|
76 + | }
|
77 + | }
|
78 + | impl ::std::error::Error for DoNothingError {
|
79 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
80 + | match &self {
|
81 + | DoNothingError::InternalServerError(_inner) => Some(_inner),
|
82 + | }
|
83 + | }
|
84 + | }
|
85 + | impl ::std::convert::From<crate::error::InternalServerError> for crate::error::DoNothingError {
|
86 + | fn from(variant: crate::error::InternalServerError) -> crate::error::DoNothingError {
|
87 + | Self::InternalServerError(variant)
|
88 + | }
|
89 + | }
|
90 + |
|
91 + | impl ::std::convert::From<::napi::Error> for crate::error::DoNothingError {
|
92 + | fn from(variant: ::napi::Error) -> crate::error::DoNothingError {
|
93 + | crate::error::InternalServerError {
|
94 + | message: variant.to_string(),
|
95 + | }
|
96 + | .into()
|
97 + | }
|
98 + | }
|
99 + |
|
100 + | /// Error type for the `CheckHealth` operation.
|
101 + | /// Each variant represents an error that can occur for the `CheckHealth` operation.
|
102 + | #[derive(::std::fmt::Debug)]
|
103 + | pub enum CheckHealthError {
|
104 + | #[allow(missing_docs)] // documentation missing in model
|
105 + | InternalServerError(crate::error::InternalServerError),
|
106 + | }
|
107 + | impl ::std::fmt::Display for CheckHealthError {
|
108 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
109 + | match &self {
|
110 + | CheckHealthError::InternalServerError(_inner) => _inner.fmt(f),
|
111 + | }
|
112 + | }
|
113 + | }
|
114 + | impl CheckHealthError {
|
115 + | /// Returns `true` if the error kind is `CheckHealthError::InternalServerError`.
|
116 + | pub fn is_internal_server_error(&self) -> bool {
|
117 + | matches!(&self, CheckHealthError::InternalServerError(_))
|
118 + | }
|
119 + | /// Returns the error name string by matching the correct variant.
|
120 + | pub fn name(&self) -> &'static str {
|
121 + | match &self {
|
122 + | CheckHealthError::InternalServerError(_inner) => _inner.name(),
|
123 + | }
|
124 + | }
|
125 + | }
|
126 + | impl ::std::error::Error for CheckHealthError {
|
127 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
128 + | match &self {
|
129 + | CheckHealthError::InternalServerError(_inner) => Some(_inner),
|
130 + | }
|
131 + | }
|
132 + | }
|
133 + | impl ::std::convert::From<crate::error::InternalServerError> for crate::error::CheckHealthError {
|
134 + | fn from(variant: crate::error::InternalServerError) -> crate::error::CheckHealthError {
|
135 + | Self::InternalServerError(variant)
|
136 + | }
|
137 + | }
|
138 + |
|
139 + | impl ::std::convert::From<::napi::Error> for crate::error::CheckHealthError {
|
140 + | fn from(variant: ::napi::Error) -> crate::error::CheckHealthError {
|
141 + | crate::error::InternalServerError {
|
142 + | message: variant.to_string(),
|
143 + | }
|
144 + | .into()
|
145 + | }
|
146 + | }
|
147 + |
|
148 + | #[::napi_derive::napi(constructor)]
|
149 + | #[allow(missing_docs)] // documentation missing in model
|
150 + | #[derive(
|
151 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
152 + | )]
|
153 + | pub struct InternalServerError {
|
154 + | #[allow(missing_docs)] // documentation missing in model
|
155 + | pub message: ::std::string::String,
|
156 + | }
|
157 + | impl InternalServerError {
|
158 + | /// Returns the error message.
|
159 + | pub fn message(&self) -> &str {
|
160 + | &self.message
|
161 + | }
|
162 + | #[doc(hidden)]
|
163 + | /// Returns the error name.
|
164 + | pub fn name(&self) -> &'static str {
|
165 + | "InternalServerError"
|
166 + | }
|
167 + | }
|
168 + | impl ::std::fmt::Display for InternalServerError {
|
169 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
170 + | ::std::write!(f, "InternalServerError")?;
|
171 + | {
|
172 + | ::std::write!(f, ": {}", &self.message)?;
|
173 + | }
|
174 + | Ok(())
|
175 + | }
|
176 + | }
|
177 + | impl ::std::error::Error for InternalServerError {}
|
178 + | impl InternalServerError {
|
179 + | /// Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
|
180 + | pub fn builder() -> crate::error::internal_server_error::Builder {
|
181 + | crate::error::internal_server_error::Builder::default()
|
182 + | }
|
183 + | }
|
184 + |
|
2 185 | /// Error type for the `GetPokemonSpecies` operation.
|
3 186 | /// Each variant represents an error that can occur for the `GetPokemonSpecies` operation.
|
4 187 | #[derive(::std::fmt::Debug)]
|
5 188 | pub enum GetPokemonSpeciesError {
|
6 189 | #[allow(missing_docs)] // documentation missing in model
|
7 190 | ResourceNotFoundException(crate::error::ResourceNotFoundException),
|
8 191 | /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
9 192 | ValidationException(crate::error::ValidationException),
|
10 193 | #[allow(missing_docs)] // documentation missing in model
|
11 194 | InternalServerError(crate::error::InternalServerError),
|
81 264 | }
|
82 265 | .into()
|
83 266 | }
|
84 267 | }
|
85 268 |
|
86 269 | #[::napi_derive::napi(constructor)]
|
87 270 | #[allow(missing_docs)] // documentation missing in model
|
88 271 | #[derive(
|
89 272 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
90 273 | )]
|
91 - | pub struct InternalServerError {
|
274 + | pub struct ResourceNotFoundException {
|
92 275 | #[allow(missing_docs)] // documentation missing in model
|
93 276 | pub message: ::std::string::String,
|
94 277 | }
|
95 - | impl InternalServerError {
|
278 + | impl ResourceNotFoundException {
|
96 279 | /// Returns the error message.
|
97 280 | pub fn message(&self) -> &str {
|
98 281 | &self.message
|
99 282 | }
|
100 283 | #[doc(hidden)]
|
101 284 | /// Returns the error name.
|
102 285 | pub fn name(&self) -> &'static str {
|
103 - | "InternalServerError"
|
286 + | "ResourceNotFoundException"
|
104 287 | }
|
105 288 | }
|
106 - | impl ::std::fmt::Display for InternalServerError {
|
289 + | impl ::std::fmt::Display for ResourceNotFoundException {
|
107 290 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
108 - | ::std::write!(f, "InternalServerError")?;
|
291 + | ::std::write!(f, "ResourceNotFoundException")?;
|
109 292 | {
|
110 293 | ::std::write!(f, ": {}", &self.message)?;
|
111 294 | }
|
112 295 | Ok(())
|
113 296 | }
|
114 297 | }
|
115 - | impl ::std::error::Error for InternalServerError {}
|
116 - | impl InternalServerError {
|
117 - | /// Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
|
118 - | pub fn builder() -> crate::error::internal_server_error::Builder {
|
119 - | crate::error::internal_server_error::Builder::default()
|
298 + | impl ::std::error::Error for ResourceNotFoundException {}
|
299 + | impl ResourceNotFoundException {
|
300 + | /// Creates a new builder-style object to manufacture [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
301 + | pub fn builder() -> crate::error::resource_not_found_exception::Builder {
|
302 + | crate::error::resource_not_found_exception::Builder::default()
|
120 303 | }
|
121 304 | }
|
122 305 |
|
123 306 | #[::napi_derive::napi(constructor)]
|
124 307 | /// 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.
|
125 308 | #[derive(
|
126 309 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
127 310 | )]
|
128 311 | pub struct ValidationException {
|
129 312 | /// A summary of the validation failure.
|
130 313 | pub message: ::std::string::String,
|
131 314 | /// 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.
|
132 315 | pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
133 316 | }
|
134 317 | impl ValidationException {
|
135 318 | /// 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.
|
136 319 | pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
|
137 320 | self.field_list.as_deref()
|
138 321 | }
|
139 322 | }
|
140 323 | impl ValidationException {
|
141 324 | /// Returns the error message.
|
142 325 | pub fn message(&self) -> &str {
|
143 326 | &self.message
|
144 327 | }
|
145 328 | #[doc(hidden)]
|
146 329 | /// Returns the error name.
|
147 330 | pub fn name(&self) -> &'static str {
|
148 331 | "ValidationException"
|
149 332 | }
|
150 333 | }
|
151 334 | impl ::std::fmt::Display for ValidationException {
|
152 335 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
153 336 | ::std::write!(f, "ValidationException")?;
|
154 337 | {
|
155 338 | ::std::write!(f, ": {}", &self.message)?;
|
156 339 | }
|
157 340 | Ok(())
|
158 341 | }
|
159 342 | }
|
160 343 | impl ::std::error::Error for ValidationException {}
|
161 344 | impl ValidationException {
|
162 345 | /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
163 346 | pub fn builder() -> crate::error::validation_exception::Builder {
|
164 347 | crate::error::validation_exception::Builder::default()
|
165 348 | }
|
166 349 | }
|
167 - |
|
168 - | #[::napi_derive::napi(constructor)]
|
169 - | #[allow(missing_docs)] // documentation missing in model
|
170 - | #[derive(
|
171 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
172 - | )]
|
173 - | pub struct ResourceNotFoundException {
|
174 - | #[allow(missing_docs)] // documentation missing in model
|
175 - | pub message: ::std::string::String,
|
176 - | }
|
177 - | impl ResourceNotFoundException {
|
178 - | /// Returns the error message.
|
179 - | pub fn message(&self) -> &str {
|
180 - | &self.message
|
181 - | }
|
182 - | #[doc(hidden)]
|
183 - | /// Returns the error name.
|
184 - | pub fn name(&self) -> &'static str {
|
185 - | "ResourceNotFoundException"
|
186 - | }
|
187 - | }
|
188 - | impl ::std::fmt::Display for ResourceNotFoundException {
|
189 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
190 - | ::std::write!(f, "ResourceNotFoundException")?;
|
191 - | {
|
192 - | ::std::write!(f, ": {}", &self.message)?;
|
193 - | }
|
194 - | Ok(())
|
195 - | }
|
196 - | }
|
197 - | impl ::std::error::Error for ResourceNotFoundException {}
|
198 - | impl ResourceNotFoundException {
|
199 - | /// Creates a new builder-style object to manufacture [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
200 - | pub fn builder() -> crate::error::resource_not_found_exception::Builder {
|
201 - | crate::error::resource_not_found_exception::Builder::default()
|
202 - | }
|
203 - | }
|
204 - |
|
205 - | /// Error type for the `CheckHealth` operation.
|
206 - | /// Each variant represents an error that can occur for the `CheckHealth` operation.
|
207 - | #[derive(::std::fmt::Debug)]
|
208 - | pub enum CheckHealthError {
|
209 - | #[allow(missing_docs)] // documentation missing in model
|
210 - | InternalServerError(crate::error::InternalServerError),
|
211 - | }
|
212 - | impl ::std::fmt::Display for CheckHealthError {
|
213 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
214 - | match &self {
|
215 - | CheckHealthError::InternalServerError(_inner) => _inner.fmt(f),
|
216 - | }
|
217 - | }
|
218 - | }
|
219 - | impl CheckHealthError {
|
220 - | /// Returns `true` if the error kind is `CheckHealthError::InternalServerError`.
|
221 - | pub fn is_internal_server_error(&self) -> bool {
|
222 - | matches!(&self, CheckHealthError::InternalServerError(_))
|
223 - | }
|
224 - | /// Returns the error name string by matching the correct variant.
|
225 - | pub fn name(&self) -> &'static str {
|
226 - | match &self {
|
227 - | CheckHealthError::InternalServerError(_inner) => _inner.name(),
|
228 - | }
|
229 - | }
|
230 - | }
|
231 - | impl ::std::error::Error for CheckHealthError {
|
232 - | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
233 - | match &self {
|
234 - | CheckHealthError::InternalServerError(_inner) => Some(_inner),
|
235 - | }
|
236 - | }
|
237 - | }
|
238 - | impl ::std::convert::From<crate::error::InternalServerError> for crate::error::CheckHealthError {
|
239 - | fn from(variant: crate::error::InternalServerError) -> crate::error::CheckHealthError {
|
240 - | Self::InternalServerError(variant)
|
241 - | }
|
242 - | }
|
243 - |
|
244 - | impl ::std::convert::From<::napi::Error> for crate::error::CheckHealthError {
|
245 - | fn from(variant: ::napi::Error) -> crate::error::CheckHealthError {
|
246 - | crate::error::InternalServerError {
|
247 - | message: variant.to_string(),
|
248 - | }
|
249 - | .into()
|
250 - | }
|
251 - | }
|
252 - |
|
253 - | /// Error type for the `DoNothing` operation.
|
254 - | /// Each variant represents an error that can occur for the `DoNothing` operation.
|
255 - | #[derive(::std::fmt::Debug)]
|
256 - | pub enum DoNothingError {
|
257 - | #[allow(missing_docs)] // documentation missing in model
|
258 - | InternalServerError(crate::error::InternalServerError),
|
259 - | }
|
260 - | impl ::std::fmt::Display for DoNothingError {
|
261 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
262 - | match &self {
|
263 - | DoNothingError::InternalServerError(_inner) => _inner.fmt(f),
|
264 - | }
|
265 - | }
|
266 - | }
|
267 - | impl DoNothingError {
|
268 - | /// Returns `true` if the error kind is `DoNothingError::InternalServerError`.
|
269 - | pub fn is_internal_server_error(&self) -> bool {
|
270 - | matches!(&self, DoNothingError::InternalServerError(_))
|
271 - | }
|
272 - | /// Returns the error name string by matching the correct variant.
|
273 - | pub fn name(&self) -> &'static str {
|
274 - | match &self {
|
275 - | DoNothingError::InternalServerError(_inner) => _inner.name(),
|
276 - | }
|
277 - | }
|
278 - | }
|
279 - | impl ::std::error::Error for DoNothingError {
|
280 - | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
281 - | match &self {
|
282 - | DoNothingError::InternalServerError(_inner) => Some(_inner),
|
283 - | }
|
284 - | }
|
285 - | }
|
286 - | impl ::std::convert::From<crate::error::InternalServerError> for crate::error::DoNothingError {
|
287 - | fn from(variant: crate::error::InternalServerError) -> crate::error::DoNothingError {
|
288 - | Self::InternalServerError(variant)
|
289 - | }
|
290 - | }
|
291 - |
|
292 - | impl ::std::convert::From<::napi::Error> for crate::error::DoNothingError {
|
293 - | fn from(variant: ::napi::Error) -> crate::error::DoNothingError {
|
294 - | crate::error::InternalServerError {
|
295 - | message: variant.to_string(),
|
296 - | }
|
297 - | .into()
|
298 - | }
|
299 - | }
|
300 - |
|
301 - | /// Error type for the `GetServerStatistics` operation.
|
302 - | /// Each variant represents an error that can occur for the `GetServerStatistics` operation.
|
303 - | #[derive(::std::fmt::Debug)]
|
304 - | pub enum GetServerStatisticsError {
|
305 - | #[allow(missing_docs)] // documentation missing in model
|
306 - | InternalServerError(crate::error::InternalServerError),
|
307 - | }
|
308 - | impl ::std::fmt::Display for GetServerStatisticsError {
|
309 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
310 - | match &self {
|
311 - | GetServerStatisticsError::InternalServerError(_inner) => _inner.fmt(f),
|
312 - | }
|
313 - | }
|
314 - | }
|
315 - | impl GetServerStatisticsError {
|
316 - | /// Returns `true` if the error kind is `GetServerStatisticsError::InternalServerError`.
|
317 - | pub fn is_internal_server_error(&self) -> bool {
|
318 - | matches!(&self, GetServerStatisticsError::InternalServerError(_))
|
319 - | }
|
320 - | /// Returns the error name string by matching the correct variant.
|
321 - | pub fn name(&self) -> &'static str {
|
322 - | match &self {
|
323 - | GetServerStatisticsError::InternalServerError(_inner) => _inner.name(),
|
324 - | }
|
325 - | }
|
326 - | }
|
327 - | impl ::std::error::Error for GetServerStatisticsError {
|
328 - | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
329 - | match &self {
|
330 - | GetServerStatisticsError::InternalServerError(_inner) => Some(_inner),
|
331 - | }
|
332 - | }
|
333 - | }
|
334 - | impl ::std::convert::From<crate::error::InternalServerError>
|
335 - | for crate::error::GetServerStatisticsError
|
336 - | {
|
337 - | fn from(variant: crate::error::InternalServerError) -> crate::error::GetServerStatisticsError {
|
338 - | Self::InternalServerError(variant)
|
339 - | }
|
340 - | }
|
341 - |
|
342 - | impl ::std::convert::From<::napi::Error> for crate::error::GetServerStatisticsError {
|
343 - | fn from(variant: ::napi::Error) -> crate::error::GetServerStatisticsError {
|
344 - | crate::error::InternalServerError {
|
345 - | message: variant.to_string(),
|
346 - | }
|
347 - | .into()
|
348 - | }
|
349 - | }
|
350 350 | /// See [`InternalServerError`](crate::error::InternalServerError).
|
351 351 | pub mod internal_server_error {
|
352 352 |
|
353 353 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
354 354 | /// Holds one variant for each of the ways the builder can fail.
|
355 355 | #[allow(clippy::enum_variant_names)]
|
356 356 | pub enum ConstraintViolation {
|
357 357 | /// `message` was not provided but it is required when building `InternalServerError`.
|
358 358 | MissingMessage,
|
359 359 | }
|
360 360 | impl ::std::fmt::Display for ConstraintViolation {
|
361 361 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
362 362 | match self {
|
363 363 | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `InternalServerError`"),
|
364 364 | }
|
365 365 | }
|
366 366 | }
|
367 367 | impl ::std::error::Error for ConstraintViolation {}
|
368 368 | impl ::std::convert::TryFrom<Builder> for crate::error::InternalServerError {
|
369 369 | type Error = ConstraintViolation;
|
370 370 |
|
371 371 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
372 372 | builder.build()
|
373 373 | }
|
374 374 | }
|
375 375 | /// A builder for [`InternalServerError`](crate::error::InternalServerError).
|
376 376 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
377 377 | pub struct Builder {
|
378 378 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
379 379 | }
|
380 380 | impl Builder {
|
381 381 | #[allow(missing_docs)] // documentation missing in model
|
382 382 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
383 383 | self.message = Some(input);
|
384 384 | self
|
385 385 | }
|
386 386 | /// Consumes the builder and constructs a [`InternalServerError`](crate::error::InternalServerError).
|
387 387 | ///
|
388 388 | /// The builder fails to construct a [`InternalServerError`](crate::error::InternalServerError) if you do not provide a value for all non-`Option`al members.
|
389 389 | ///
|
390 390 | pub fn build(self) -> Result<crate::error::InternalServerError, ConstraintViolation> {
|
391 391 | self.build_enforcing_required_and_enum_traits()
|
392 392 | }
|
393 393 | fn build_enforcing_required_and_enum_traits(
|
394 394 | self,
|
395 395 | ) -> Result<crate::error::InternalServerError, ConstraintViolation> {
|
396 396 | Ok(crate::error::InternalServerError {
|
397 397 | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
398 398 | })
|
399 399 | }
|
400 400 | }
|
401 401 | }
|
402 - | /// See [`ValidationException`](crate::error::ValidationException).
|
403 - | pub mod validation_exception {
|
402 + | /// See [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
403 + | pub mod resource_not_found_exception {
|
404 404 |
|
405 405 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
406 406 | /// Holds one variant for each of the ways the builder can fail.
|
407 407 | #[allow(clippy::enum_variant_names)]
|
408 408 | pub enum ConstraintViolation {
|
409 - | /// `message` was not provided but it is required when building `ValidationException`.
|
409 + | /// `message` was not provided but it is required when building `ResourceNotFoundException`.
|
410 410 | MissingMessage,
|
411 411 | }
|
412 412 | impl ::std::fmt::Display for ConstraintViolation {
|
413 413 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
414 414 | match self {
|
415 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
415 + | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ResourceNotFoundException`"),
|
416 416 | }
|
417 417 | }
|
418 418 | }
|
419 419 | impl ::std::error::Error for ConstraintViolation {}
|
420 - | impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
|
420 + | impl ::std::convert::TryFrom<Builder> for crate::error::ResourceNotFoundException {
|
421 421 | type Error = ConstraintViolation;
|
422 422 |
|
423 423 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
424 424 | builder.build()
|
425 425 | }
|
426 426 | }
|
427 - | /// A builder for [`ValidationException`](crate::error::ValidationException).
|
427 + | /// A builder for [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
428 428 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
429 429 | pub struct Builder {
|
430 430 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
431 - | pub(crate) field_list:
|
432 - | ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
433 431 | }
|
434 432 | impl Builder {
|
435 - | /// A summary of the validation failure.
|
433 + | #[allow(missing_docs)] // documentation missing in model
|
436 434 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
437 435 | self.message = Some(input);
|
438 436 | self
|
439 437 | }
|
440 - | /// 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.
|
441 - | pub fn field_list(
|
442 - | mut self,
|
443 - | input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
444 - | ) -> Self {
|
445 - | self.field_list = input;
|
446 - | self
|
447 - | }
|
448 - | /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
438 + | /// Consumes the builder and constructs a [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
449 439 | ///
|
450 - | /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if you do not provide a value for all non-`Option`al members.
|
440 + | /// The builder fails to construct a [`ResourceNotFoundException`](crate::error::ResourceNotFoundException) if you do not provide a value for all non-`Option`al members.
|
451 441 | ///
|
452 - | pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
442 + | pub fn build(self) -> Result<crate::error::ResourceNotFoundException, ConstraintViolation> {
|
453 443 | self.build_enforcing_required_and_enum_traits()
|
454 444 | }
|
455 445 | fn build_enforcing_required_and_enum_traits(
|
456 446 | self,
|
457 - | ) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
458 - | Ok(crate::error::ValidationException {
|
447 + | ) -> Result<crate::error::ResourceNotFoundException, ConstraintViolation> {
|
448 + | Ok(crate::error::ResourceNotFoundException {
|
459 449 | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
460 - | field_list: self.field_list,
|
461 450 | })
|
462 451 | }
|
463 452 | }
|
464 453 | }
|
465 - | /// See [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
466 - | pub mod resource_not_found_exception {
|
454 + | /// See [`ValidationException`](crate::error::ValidationException).
|
455 + | pub mod validation_exception {
|
467 456 |
|
468 457 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
469 458 | /// Holds one variant for each of the ways the builder can fail.
|
470 459 | #[allow(clippy::enum_variant_names)]
|
471 460 | pub enum ConstraintViolation {
|
472 - | /// `message` was not provided but it is required when building `ResourceNotFoundException`.
|
461 + | /// `message` was not provided but it is required when building `ValidationException`.
|
473 462 | MissingMessage,
|
474 463 | }
|
475 464 | impl ::std::fmt::Display for ConstraintViolation {
|
476 465 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
477 466 | match self {
|
478 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ResourceNotFoundException`"),
|
467 + | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
479 468 | }
|
480 469 | }
|
481 470 | }
|
482 471 | impl ::std::error::Error for ConstraintViolation {}
|
483 - | impl ::std::convert::TryFrom<Builder> for crate::error::ResourceNotFoundException {
|
472 + | impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
|
484 473 | type Error = ConstraintViolation;
|
485 474 |
|
486 475 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
487 476 | builder.build()
|
488 477 | }
|
489 478 | }
|
490 - | /// A builder for [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
479 + | /// A builder for [`ValidationException`](crate::error::ValidationException).
|
491 480 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
492 481 | pub struct Builder {
|
493 482 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
483 + | pub(crate) field_list:
|
484 + | ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
494 485 | }
|
495 486 | impl Builder {
|
496 - | #[allow(missing_docs)] // documentation missing in model
|
487 + | /// A summary of the validation failure.
|
497 488 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
498 489 | self.message = Some(input);
|
499 490 | self
|
500 491 | }
|
501 - | /// Consumes the builder and constructs a [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
492 + | /// 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.
|
493 + | pub fn field_list(
|
494 + | mut self,
|
495 + | input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
496 + | ) -> Self {
|
497 + | self.field_list = input;
|
498 + | self
|
499 + | }
|
500 + | /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
502 501 | ///
|
503 - | /// The builder fails to construct a [`ResourceNotFoundException`](crate::error::ResourceNotFoundException) if you do not provide a value for all non-`Option`al members.
|
502 + | /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if you do not provide a value for all non-`Option`al members.
|
504 503 | ///
|
505 - | pub fn build(self) -> Result<crate::error::ResourceNotFoundException, ConstraintViolation> {
|
504 + | pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
506 505 | self.build_enforcing_required_and_enum_traits()
|
507 506 | }
|
508 507 | fn build_enforcing_required_and_enum_traits(
|
509 508 | self,
|
510 - | ) -> Result<crate::error::ResourceNotFoundException, ConstraintViolation> {
|
511 - | Ok(crate::error::ResourceNotFoundException {
|
509 + | ) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
510 + | Ok(crate::error::ValidationException {
|
512 511 | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
512 + | field_list: self.field_list,
|
513 513 | })
|
514 514 | }
|
515 515 | }
|
516 516 | }
|