1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /// Error type for the `StartSnapshot` operation.
|
3 + | /// Each variant represents an error that can occur for the `StartSnapshot` operation.
|
4 + | #[derive(::std::fmt::Debug)]
|
5 + | pub enum StartSnapshotError {
|
6 + | /// <p>An internal error has occurred.</p>
|
7 + | InternalServerException(crate::error::InternalServerException),
|
8 + | /// <p>The specified resource does not exist.</p>
|
9 + | ResourceNotFoundException(crate::error::ResourceNotFoundException),
|
10 + | /// <p>You do not have sufficient access to perform this action.</p>
|
11 + | AccessDeniedException(crate::error::AccessDeniedException),
|
12 + | /// <p>The request uses the same client token as a previous, but non-identical request.</p>
|
13 + | ConflictException(crate::error::ConflictException),
|
14 + | /// <p>The number of API requests has exceed the maximum allowed API request throttling limit.</p>
|
15 + | RequestThrottledException(crate::error::RequestThrottledException),
|
16 + | /// <p>Your current service quotas do not allow you to perform this action.</p>
|
17 + | ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
|
18 + | /// <p>You have reached the limit for concurrent API requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapi-performance">Optimizing performance of the EBS direct APIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
19 + | ConcurrentLimitExceededException(crate::error::ConcurrentLimitExceededException),
|
20 + | /// 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.
|
21 + | ValidationException(crate::error::ValidationException),
|
22 + | }
|
23 + | impl ::std::fmt::Display for StartSnapshotError {
|
24 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
25 + | match &self {
|
26 + | StartSnapshotError::InternalServerException(_inner) => _inner.fmt(f),
|
27 + | StartSnapshotError::ResourceNotFoundException(_inner) => _inner.fmt(f),
|
28 + | StartSnapshotError::AccessDeniedException(_inner) => _inner.fmt(f),
|
29 + | StartSnapshotError::ConflictException(_inner) => _inner.fmt(f),
|
30 + | StartSnapshotError::RequestThrottledException(_inner) => _inner.fmt(f),
|
31 + | StartSnapshotError::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
|
32 + | StartSnapshotError::ConcurrentLimitExceededException(_inner) => _inner.fmt(f),
|
33 + | StartSnapshotError::ValidationException(_inner) => _inner.fmt(f),
|
34 + | }
|
35 + | }
|
36 + | }
|
37 + | impl StartSnapshotError {
|
38 + | /// Returns `true` if the error kind is `StartSnapshotError::InternalServerException`.
|
39 + | pub fn is_internal_server_exception(&self) -> bool {
|
40 + | matches!(&self, StartSnapshotError::InternalServerException(_))
|
41 + | }
|
42 + | /// Returns `true` if the error kind is `StartSnapshotError::ResourceNotFoundException`.
|
43 + | pub fn is_resource_not_found_exception(&self) -> bool {
|
44 + | matches!(&self, StartSnapshotError::ResourceNotFoundException(_))
|
45 + | }
|
46 + | /// Returns `true` if the error kind is `StartSnapshotError::AccessDeniedException`.
|
47 + | pub fn is_access_denied_exception(&self) -> bool {
|
48 + | matches!(&self, StartSnapshotError::AccessDeniedException(_))
|
49 + | }
|
50 + | /// Returns `true` if the error kind is `StartSnapshotError::ConflictException`.
|
51 + | pub fn is_conflict_exception(&self) -> bool {
|
52 + | matches!(&self, StartSnapshotError::ConflictException(_))
|
53 + | }
|
54 + | /// Returns `true` if the error kind is `StartSnapshotError::RequestThrottledException`.
|
55 + | pub fn is_request_throttled_exception(&self) -> bool {
|
56 + | matches!(&self, StartSnapshotError::RequestThrottledException(_))
|
57 + | }
|
58 + | /// Returns `true` if the error kind is `StartSnapshotError::ServiceQuotaExceededException`.
|
59 + | pub fn is_service_quota_exceeded_exception(&self) -> bool {
|
60 + | matches!(&self, StartSnapshotError::ServiceQuotaExceededException(_))
|
61 + | }
|
62 + | /// Returns `true` if the error kind is `StartSnapshotError::ConcurrentLimitExceededException`.
|
63 + | pub fn is_concurrent_limit_exceeded_exception(&self) -> bool {
|
64 + | matches!(
|
65 + | &self,
|
66 + | StartSnapshotError::ConcurrentLimitExceededException(_)
|
67 + | )
|
68 + | }
|
69 + | /// Returns `true` if the error kind is `StartSnapshotError::ValidationException`.
|
70 + | pub fn is_validation_exception(&self) -> bool {
|
71 + | matches!(&self, StartSnapshotError::ValidationException(_))
|
72 + | }
|
73 + | /// Returns the error name string by matching the correct variant.
|
74 + | pub fn name(&self) -> &'static str {
|
75 + | match &self {
|
76 + | StartSnapshotError::InternalServerException(_inner) => _inner.name(),
|
77 + | StartSnapshotError::ResourceNotFoundException(_inner) => _inner.name(),
|
78 + | StartSnapshotError::AccessDeniedException(_inner) => _inner.name(),
|
79 + | StartSnapshotError::ConflictException(_inner) => _inner.name(),
|
80 + | StartSnapshotError::RequestThrottledException(_inner) => _inner.name(),
|
81 + | StartSnapshotError::ServiceQuotaExceededException(_inner) => _inner.name(),
|
82 + | StartSnapshotError::ConcurrentLimitExceededException(_inner) => _inner.name(),
|
83 + | StartSnapshotError::ValidationException(_inner) => _inner.name(),
|
84 + | }
|
85 + | }
|
86 + | }
|
87 + | impl ::std::error::Error for StartSnapshotError {
|
88 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
89 + | match &self {
|
90 + | StartSnapshotError::InternalServerException(_inner) => Some(_inner),
|
91 + | StartSnapshotError::ResourceNotFoundException(_inner) => Some(_inner),
|
92 + | StartSnapshotError::AccessDeniedException(_inner) => Some(_inner),
|
93 + | StartSnapshotError::ConflictException(_inner) => Some(_inner),
|
94 + | StartSnapshotError::RequestThrottledException(_inner) => Some(_inner),
|
95 + | StartSnapshotError::ServiceQuotaExceededException(_inner) => Some(_inner),
|
96 + | StartSnapshotError::ConcurrentLimitExceededException(_inner) => Some(_inner),
|
97 + | StartSnapshotError::ValidationException(_inner) => Some(_inner),
|
98 + | }
|
99 + | }
|
100 + | }
|
101 + | impl ::std::convert::From<crate::error::InternalServerException>
|
102 + | for crate::error::StartSnapshotError
|
103 + | {
|
104 + | fn from(variant: crate::error::InternalServerException) -> crate::error::StartSnapshotError {
|
105 + | Self::InternalServerException(variant)
|
106 + | }
|
107 + | }
|
108 + | impl ::std::convert::From<crate::error::ResourceNotFoundException>
|
109 + | for crate::error::StartSnapshotError
|
110 + | {
|
111 + | fn from(variant: crate::error::ResourceNotFoundException) -> crate::error::StartSnapshotError {
|
112 + | Self::ResourceNotFoundException(variant)
|
113 + | }
|
114 + | }
|
115 + | impl ::std::convert::From<crate::error::AccessDeniedException>
|
116 + | for crate::error::StartSnapshotError
|
117 + | {
|
118 + | fn from(variant: crate::error::AccessDeniedException) -> crate::error::StartSnapshotError {
|
119 + | Self::AccessDeniedException(variant)
|
120 + | }
|
121 + | }
|
122 + | impl ::std::convert::From<crate::error::ConflictException> for crate::error::StartSnapshotError {
|
123 + | fn from(variant: crate::error::ConflictException) -> crate::error::StartSnapshotError {
|
124 + | Self::ConflictException(variant)
|
125 + | }
|
126 + | }
|
127 + | impl ::std::convert::From<crate::error::RequestThrottledException>
|
128 + | for crate::error::StartSnapshotError
|
129 + | {
|
130 + | fn from(variant: crate::error::RequestThrottledException) -> crate::error::StartSnapshotError {
|
131 + | Self::RequestThrottledException(variant)
|
132 + | }
|
133 + | }
|
134 + | impl ::std::convert::From<crate::error::ServiceQuotaExceededException>
|
135 + | for crate::error::StartSnapshotError
|
136 + | {
|
137 + | fn from(
|
138 + | variant: crate::error::ServiceQuotaExceededException,
|
139 + | ) -> crate::error::StartSnapshotError {
|
140 + | Self::ServiceQuotaExceededException(variant)
|
141 + | }
|
142 + | }
|
143 + | impl ::std::convert::From<crate::error::ConcurrentLimitExceededException>
|
144 + | for crate::error::StartSnapshotError
|
145 + | {
|
146 + | fn from(
|
147 + | variant: crate::error::ConcurrentLimitExceededException,
|
148 + | ) -> crate::error::StartSnapshotError {
|
149 + | Self::ConcurrentLimitExceededException(variant)
|
150 + | }
|
151 + | }
|
152 + | impl ::std::convert::From<crate::error::ValidationException> for crate::error::StartSnapshotError {
|
153 + | fn from(variant: crate::error::ValidationException) -> crate::error::StartSnapshotError {
|
154 + | Self::ValidationException(variant)
|
155 + | }
|
156 + | }
|
157 + |
|
158 + | /// 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.
|
159 + | #[derive(
|
160 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
161 + | )]
|
162 + | pub struct ValidationException {
|
163 + | /// A summary of the validation failure.
|
164 + | pub message: ::std::string::String,
|
165 + | /// 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.
|
166 + | pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
167 + | }
|
168 + | impl ValidationException {
|
169 + | /// 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.
|
170 + | pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
|
171 + | self.field_list.as_deref()
|
172 + | }
|
173 + | }
|
174 + | impl ValidationException {
|
175 + | /// Returns the error message.
|
176 + | pub fn message(&self) -> &str {
|
177 + | &self.message
|
178 + | }
|
179 + | #[doc(hidden)]
|
180 + | /// Returns the error name.
|
181 + | pub fn name(&self) -> &'static str {
|
182 + | "ValidationException"
|
183 + | }
|
184 + | }
|
185 + | impl ::std::fmt::Display for ValidationException {
|
186 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
187 + | ::std::write!(f, "ValidationException")?;
|
188 + | {
|
189 + | ::std::write!(f, ": {}", &self.message)?;
|
190 + | }
|
191 + | Ok(())
|
192 + | }
|
193 + | }
|
194 + | impl ::std::error::Error for ValidationException {}
|
195 + | impl ValidationException {
|
196 + | /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
197 + | pub fn builder() -> crate::error::validation_exception::Builder {
|
198 + | crate::error::validation_exception::Builder::default()
|
199 + | }
|
200 + | }
|
201 + |
|
202 + | /// <p>You have reached the limit for concurrent API requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapi-performance">Optimizing performance of the EBS direct APIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
203 + | #[derive(
|
204 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
205 + | )]
|
206 + | pub struct ConcurrentLimitExceededException {
|
207 + | #[allow(missing_docs)] // documentation missing in model
|
208 + | pub message: ::std::option::Option<crate::model::ErrorMessage>,
|
209 + | }
|
210 + | impl ConcurrentLimitExceededException {
|
211 + | /// Returns the error message.
|
212 + | pub fn message(&self) -> Option<&crate::model::ErrorMessage> {
|
213 + | self.message.as_ref()
|
214 + | }
|
215 + | #[doc(hidden)]
|
216 + | /// Returns the error name.
|
217 + | pub fn name(&self) -> &'static str {
|
218 + | "ConcurrentLimitExceededException"
|
219 + | }
|
220 + | }
|
221 + | impl ::std::fmt::Display for ConcurrentLimitExceededException {
|
222 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
223 + | ::std::write!(f, "ConcurrentLimitExceededException")?;
|
224 + | if let ::std::option::Option::Some(inner_1) = &self.message {
|
225 + | {
|
226 + | ::std::write!(f, ": {inner_1}")?;
|
227 + | }
|
228 + | }
|
229 + | Ok(())
|
230 + | }
|
231 + | }
|
232 + | impl ::std::error::Error for ConcurrentLimitExceededException {}
|
233 + | impl ConcurrentLimitExceededException {
|
234 + | /// Creates a new builder-style object to manufacture [`ConcurrentLimitExceededException`](crate::error::ConcurrentLimitExceededException).
|
235 + | pub fn builder() -> crate::error::concurrent_limit_exceeded_exception::Builder {
|
236 + | crate::error::concurrent_limit_exceeded_exception::Builder::default()
|
237 + | }
|
238 + | }
|
239 + |
|
240 + | /// <p>Your current service quotas do not allow you to perform this action.</p>
|
241 + | #[derive(
|
242 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
243 + | )]
|
244 + | pub struct ServiceQuotaExceededException {
|
245 + | /// <p>The reason for the exception.</p>
|
246 + | pub reason: ::std::option::Option<crate::model::ServiceQuotaExceededExceptionReason>,
|
247 + | #[allow(missing_docs)] // documentation missing in model
|
248 + | pub message: ::std::option::Option<crate::model::ErrorMessage>,
|
249 + | }
|
250 + | impl ServiceQuotaExceededException {
|
251 + | /// <p>The reason for the exception.</p>
|
252 + | pub fn reason(
|
253 + | &self,
|
254 + | ) -> ::std::option::Option<&crate::model::ServiceQuotaExceededExceptionReason> {
|
255 + | self.reason.as_ref()
|
256 + | }
|
257 + | }
|
258 + | impl ServiceQuotaExceededException {
|
259 + | /// Returns the error message.
|
260 + | pub fn message(&self) -> Option<&crate::model::ErrorMessage> {
|
261 + | self.message.as_ref()
|
262 + | }
|
263 + | #[doc(hidden)]
|
264 + | /// Returns the error name.
|
265 + | pub fn name(&self) -> &'static str {
|
266 + | "ServiceQuotaExceededException"
|
267 + | }
|
268 + | }
|
269 + | impl ::std::fmt::Display for ServiceQuotaExceededException {
|
270 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
271 + | ::std::write!(f, "ServiceQuotaExceededException")?;
|
272 + | if let ::std::option::Option::Some(inner_2) = &self.message {
|
273 + | {
|
274 + | ::std::write!(f, ": {inner_2}")?;
|
275 + | }
|
276 + | }
|
277 + | Ok(())
|
278 + | }
|
279 + | }
|
280 + | impl ::std::error::Error for ServiceQuotaExceededException {}
|
281 + | impl ServiceQuotaExceededException {
|
282 + | /// Creates a new builder-style object to manufacture [`ServiceQuotaExceededException`](crate::error::ServiceQuotaExceededException).
|
283 + | pub fn builder() -> crate::error::service_quota_exceeded_exception::Builder {
|
284 + | crate::error::service_quota_exceeded_exception::Builder::default()
|
285 + | }
|
286 + | }
|
287 + |
|
288 + | /// <p>The number of API requests has exceed the maximum allowed API request throttling limit.</p>
|
289 + | #[derive(
|
290 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
291 + | )]
|
292 + | pub struct RequestThrottledException {
|
293 + | #[allow(missing_docs)] // documentation missing in model
|
294 + | pub message: ::std::option::Option<crate::model::ErrorMessage>,
|
295 + | /// <p>The reason for the exception.</p>
|
296 + | pub reason: ::std::option::Option<crate::model::RequestThrottledExceptionReason>,
|
297 + | }
|
298 + | impl RequestThrottledException {
|
299 + | /// <p>The reason for the exception.</p>
|
300 + | pub fn reason(&self) -> ::std::option::Option<&crate::model::RequestThrottledExceptionReason> {
|
301 + | self.reason.as_ref()
|
302 + | }
|
303 + | }
|
304 + | impl RequestThrottledException {
|
305 + | /// Returns the error message.
|
306 + | pub fn message(&self) -> Option<&crate::model::ErrorMessage> {
|
307 + | self.message.as_ref()
|
308 + | }
|
309 + | #[doc(hidden)]
|
310 + | /// Returns the error name.
|
311 + | pub fn name(&self) -> &'static str {
|
312 + | "RequestThrottledException"
|
313 + | }
|
314 + | }
|
315 + | impl ::std::fmt::Display for RequestThrottledException {
|
316 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
317 + | ::std::write!(f, "RequestThrottledException")?;
|
318 + | if let ::std::option::Option::Some(inner_3) = &self.message {
|
319 + | {
|
320 + | ::std::write!(f, ": {inner_3}")?;
|
321 + | }
|
322 + | }
|
323 + | Ok(())
|
324 + | }
|
325 + | }
|
326 + | impl ::std::error::Error for RequestThrottledException {}
|
327 + | impl RequestThrottledException {
|
328 + | /// Creates a new builder-style object to manufacture [`RequestThrottledException`](crate::error::RequestThrottledException).
|
329 + | pub fn builder() -> crate::error::request_throttled_exception::Builder {
|
330 + | crate::error::request_throttled_exception::Builder::default()
|
331 + | }
|
332 + | }
|
333 + |
|
334 + | /// <p>The request uses the same client token as a previous, but non-identical request.</p>
|
335 + | #[derive(
|
336 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
337 + | )]
|
338 + | pub struct ConflictException {
|
339 + | #[allow(missing_docs)] // documentation missing in model
|
340 + | pub message: ::std::option::Option<crate::model::ErrorMessage>,
|
341 + | }
|
342 + | impl ConflictException {
|
343 + | /// Returns the error message.
|
344 + | pub fn message(&self) -> Option<&crate::model::ErrorMessage> {
|
345 + | self.message.as_ref()
|
346 + | }
|
347 + | #[doc(hidden)]
|
348 + | /// Returns the error name.
|
349 + | pub fn name(&self) -> &'static str {
|
350 + | "ConflictException"
|
351 + | }
|
352 + | }
|
353 + | impl ::std::fmt::Display for ConflictException {
|
354 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
355 + | ::std::write!(f, "ConflictException")?;
|
356 + | if let ::std::option::Option::Some(inner_4) = &self.message {
|
357 + | {
|
358 + | ::std::write!(f, ": {inner_4}")?;
|
359 + | }
|
360 + | }
|
361 + | Ok(())
|
362 + | }
|
363 + | }
|
364 + | impl ::std::error::Error for ConflictException {}
|
365 + | impl ConflictException {
|
366 + | /// Creates a new builder-style object to manufacture [`ConflictException`](crate::error::ConflictException).
|
367 + | pub fn builder() -> crate::error::conflict_exception::Builder {
|
368 + | crate::error::conflict_exception::Builder::default()
|
369 + | }
|
370 + | }
|
371 + |
|
372 + | /// <p>You do not have sufficient access to perform this action.</p>
|
373 + | #[derive(
|
374 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
375 + | )]
|
376 + | pub struct AccessDeniedException {
|
377 + | #[allow(missing_docs)] // documentation missing in model
|
378 + | pub message: ::std::option::Option<crate::model::ErrorMessage>,
|
379 + | /// <p>The reason for the exception.</p>
|
380 + | pub reason: crate::model::AccessDeniedExceptionReason,
|
381 + | }
|
382 + | impl AccessDeniedException {
|
383 + | /// <p>The reason for the exception.</p>
|
384 + | pub fn reason(&self) -> &crate::model::AccessDeniedExceptionReason {
|
385 + | &self.reason
|
386 + | }
|
387 + | }
|
388 + | impl AccessDeniedException {
|
389 + | /// Returns the error message.
|
390 + | pub fn message(&self) -> Option<&crate::model::ErrorMessage> {
|
391 + | self.message.as_ref()
|
392 + | }
|
393 + | #[doc(hidden)]
|
394 + | /// Returns the error name.
|
395 + | pub fn name(&self) -> &'static str {
|
396 + | "AccessDeniedException"
|
397 + | }
|
398 + | }
|
399 + | impl ::std::fmt::Display for AccessDeniedException {
|
400 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
401 + | ::std::write!(f, "AccessDeniedException")?;
|
402 + | if let ::std::option::Option::Some(inner_5) = &self.message {
|
403 + | {
|
404 + | ::std::write!(f, ": {inner_5}")?;
|
405 + | }
|
406 + | }
|
407 + | Ok(())
|
408 + | }
|
409 + | }
|
410 + | impl ::std::error::Error for AccessDeniedException {}
|
411 + | impl AccessDeniedException {
|
412 + | /// Creates a new builder-style object to manufacture [`AccessDeniedException`](crate::error::AccessDeniedException).
|
413 + | pub fn builder() -> crate::error::access_denied_exception::Builder {
|
414 + | crate::error::access_denied_exception::Builder::default()
|
415 + | }
|
416 + | }
|
417 + |
|
418 + | /// <p>The specified resource does not exist.</p>
|
419 + | #[derive(
|
420 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
421 + | )]
|
422 + | pub struct ResourceNotFoundException {
|
423 + | #[allow(missing_docs)] // documentation missing in model
|
424 + | pub message: ::std::option::Option<crate::model::ErrorMessage>,
|
425 + | /// <p>The reason for the exception.</p>
|
426 + | pub reason: ::std::option::Option<crate::model::ResourceNotFoundExceptionReason>,
|
427 + | }
|
428 + | impl ResourceNotFoundException {
|
429 + | /// <p>The reason for the exception.</p>
|
430 + | pub fn reason(&self) -> ::std::option::Option<&crate::model::ResourceNotFoundExceptionReason> {
|
431 + | self.reason.as_ref()
|
432 + | }
|
433 + | }
|
434 + | impl ResourceNotFoundException {
|
435 + | /// Returns the error message.
|
436 + | pub fn message(&self) -> Option<&crate::model::ErrorMessage> {
|
437 + | self.message.as_ref()
|
438 + | }
|
439 + | #[doc(hidden)]
|
440 + | /// Returns the error name.
|
441 + | pub fn name(&self) -> &'static str {
|
442 + | "ResourceNotFoundException"
|
443 + | }
|
444 + | }
|
445 + | impl ::std::fmt::Display for ResourceNotFoundException {
|
446 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
447 + | ::std::write!(f, "ResourceNotFoundException")?;
|
448 + | if let ::std::option::Option::Some(inner_6) = &self.message {
|
449 + | {
|
450 + | ::std::write!(f, ": {inner_6}")?;
|
451 + | }
|
452 + | }
|
453 + | Ok(())
|
454 + | }
|
455 + | }
|
456 + | impl ::std::error::Error for ResourceNotFoundException {}
|
457 + | impl ResourceNotFoundException {
|
458 + | /// Creates a new builder-style object to manufacture [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
459 + | pub fn builder() -> crate::error::resource_not_found_exception::Builder {
|
460 + | crate::error::resource_not_found_exception::Builder::default()
|
461 + | }
|
462 + | }
|
463 + |
|
464 + | /// <p>An internal error has occurred.</p>
|
465 + | #[derive(
|
466 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
467 + | )]
|
468 + | pub struct InternalServerException {
|
469 + | #[allow(missing_docs)] // documentation missing in model
|
470 + | pub message: ::std::option::Option<crate::model::ErrorMessage>,
|
471 + | }
|
472 + | impl InternalServerException {
|
473 + | /// Returns the error message.
|
474 + | pub fn message(&self) -> Option<&crate::model::ErrorMessage> {
|
475 + | self.message.as_ref()
|
476 + | }
|
477 + | #[doc(hidden)]
|
478 + | /// Returns the error name.
|
479 + | pub fn name(&self) -> &'static str {
|
480 + | "InternalServerException"
|
481 + | }
|
482 + | }
|
483 + | impl ::std::fmt::Display for InternalServerException {
|
484 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
485 + | ::std::write!(f, "InternalServerException")?;
|
486 + | if let ::std::option::Option::Some(inner_7) = &self.message {
|
487 + | {
|
488 + | ::std::write!(f, ": {inner_7}")?;
|
489 + | }
|
490 + | }
|
491 + | Ok(())
|
492 + | }
|
493 + | }
|
494 + | impl ::std::error::Error for InternalServerException {}
|
495 + | impl InternalServerException {
|
496 + | /// Creates a new builder-style object to manufacture [`InternalServerException`](crate::error::InternalServerException).
|
497 + | pub fn builder() -> crate::error::internal_server_exception::Builder {
|
498 + | crate::error::internal_server_exception::Builder::default()
|
499 + | }
|
500 + | }
|
501 + |
|
502 + | /// Error type for the `PutSnapshotBlock` operation.
|
503 + | /// Each variant represents an error that can occur for the `PutSnapshotBlock` operation.
|
504 + | #[derive(::std::fmt::Debug)]
|
505 + | pub enum PutSnapshotBlockError {
|
506 + | /// <p>An internal error has occurred.</p>
|
507 + | InternalServerException(crate::error::InternalServerException),
|
508 + | /// <p>The specified resource does not exist.</p>
|
509 + | ResourceNotFoundException(crate::error::ResourceNotFoundException),
|
510 + | /// <p>You do not have sufficient access to perform this action.</p>
|
511 + | AccessDeniedException(crate::error::AccessDeniedException),
|
512 + | /// <p>The number of API requests has exceed the maximum allowed API request throttling limit.</p>
|
513 + | RequestThrottledException(crate::error::RequestThrottledException),
|
514 + | /// <p>Your current service quotas do not allow you to perform this action.</p>
|
515 + | ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
|
516 + | /// 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.
|
517 + | ValidationException(crate::error::ValidationException),
|
518 + | }
|
519 + | impl ::std::fmt::Display for PutSnapshotBlockError {
|
520 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
521 + | match &self {
|
522 + | PutSnapshotBlockError::InternalServerException(_inner) => _inner.fmt(f),
|
523 + | PutSnapshotBlockError::ResourceNotFoundException(_inner) => _inner.fmt(f),
|
524 + | PutSnapshotBlockError::AccessDeniedException(_inner) => _inner.fmt(f),
|
525 + | PutSnapshotBlockError::RequestThrottledException(_inner) => _inner.fmt(f),
|
526 + | PutSnapshotBlockError::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
|
527 + | PutSnapshotBlockError::ValidationException(_inner) => _inner.fmt(f),
|
528 + | }
|
529 + | }
|
530 + | }
|
531 + | impl PutSnapshotBlockError {
|
532 + | /// Returns `true` if the error kind is `PutSnapshotBlockError::InternalServerException`.
|
533 + | pub fn is_internal_server_exception(&self) -> bool {
|
534 + | matches!(&self, PutSnapshotBlockError::InternalServerException(_))
|
535 + | }
|
536 + | /// Returns `true` if the error kind is `PutSnapshotBlockError::ResourceNotFoundException`.
|
537 + | pub fn is_resource_not_found_exception(&self) -> bool {
|
538 + | matches!(&self, PutSnapshotBlockError::ResourceNotFoundException(_))
|
539 + | }
|
540 + | /// Returns `true` if the error kind is `PutSnapshotBlockError::AccessDeniedException`.
|
541 + | pub fn is_access_denied_exception(&self) -> bool {
|
542 + | matches!(&self, PutSnapshotBlockError::AccessDeniedException(_))
|
543 + | }
|
544 + | /// Returns `true` if the error kind is `PutSnapshotBlockError::RequestThrottledException`.
|
545 + | pub fn is_request_throttled_exception(&self) -> bool {
|
546 + | matches!(&self, PutSnapshotBlockError::RequestThrottledException(_))
|
547 + | }
|
548 + | /// Returns `true` if the error kind is `PutSnapshotBlockError::ServiceQuotaExceededException`.
|
549 + | pub fn is_service_quota_exceeded_exception(&self) -> bool {
|
550 + | matches!(
|
551 + | &self,
|
552 + | PutSnapshotBlockError::ServiceQuotaExceededException(_)
|
553 + | )
|
554 + | }
|
555 + | /// Returns `true` if the error kind is `PutSnapshotBlockError::ValidationException`.
|
556 + | pub fn is_validation_exception(&self) -> bool {
|
557 + | matches!(&self, PutSnapshotBlockError::ValidationException(_))
|
558 + | }
|
559 + | /// Returns the error name string by matching the correct variant.
|
560 + | pub fn name(&self) -> &'static str {
|
561 + | match &self {
|
562 + | PutSnapshotBlockError::InternalServerException(_inner) => _inner.name(),
|
563 + | PutSnapshotBlockError::ResourceNotFoundException(_inner) => _inner.name(),
|
564 + | PutSnapshotBlockError::AccessDeniedException(_inner) => _inner.name(),
|
565 + | PutSnapshotBlockError::RequestThrottledException(_inner) => _inner.name(),
|
566 + | PutSnapshotBlockError::ServiceQuotaExceededException(_inner) => _inner.name(),
|
567 + | PutSnapshotBlockError::ValidationException(_inner) => _inner.name(),
|
568 + | }
|
569 + | }
|
570 + | }
|
571 + | impl ::std::error::Error for PutSnapshotBlockError {
|
572 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
573 + | match &self {
|
574 + | PutSnapshotBlockError::InternalServerException(_inner) => Some(_inner),
|
575 + | PutSnapshotBlockError::ResourceNotFoundException(_inner) => Some(_inner),
|
576 + | PutSnapshotBlockError::AccessDeniedException(_inner) => Some(_inner),
|
577 + | PutSnapshotBlockError::RequestThrottledException(_inner) => Some(_inner),
|
578 + | PutSnapshotBlockError::ServiceQuotaExceededException(_inner) => Some(_inner),
|
579 + | PutSnapshotBlockError::ValidationException(_inner) => Some(_inner),
|
580 + | }
|
581 + | }
|
582 + | }
|
583 + | impl ::std::convert::From<crate::error::InternalServerException>
|
584 + | for crate::error::PutSnapshotBlockError
|
585 + | {
|
586 + | fn from(variant: crate::error::InternalServerException) -> crate::error::PutSnapshotBlockError {
|
587 + | Self::InternalServerException(variant)
|
588 + | }
|
589 + | }
|
590 + | impl ::std::convert::From<crate::error::ResourceNotFoundException>
|
591 + | for crate::error::PutSnapshotBlockError
|
592 + | {
|
593 + | fn from(
|
594 + | variant: crate::error::ResourceNotFoundException,
|
595 + | ) -> crate::error::PutSnapshotBlockError {
|
596 + | Self::ResourceNotFoundException(variant)
|
597 + | }
|
598 + | }
|
599 + | impl ::std::convert::From<crate::error::AccessDeniedException>
|
600 + | for crate::error::PutSnapshotBlockError
|
601 + | {
|
602 + | fn from(variant: crate::error::AccessDeniedException) -> crate::error::PutSnapshotBlockError {
|
603 + | Self::AccessDeniedException(variant)
|
604 + | }
|
605 + | }
|
606 + | impl ::std::convert::From<crate::error::RequestThrottledException>
|
607 + | for crate::error::PutSnapshotBlockError
|
608 + | {
|
609 + | fn from(
|
610 + | variant: crate::error::RequestThrottledException,
|
611 + | ) -> crate::error::PutSnapshotBlockError {
|
612 + | Self::RequestThrottledException(variant)
|
613 + | }
|
614 + | }
|
615 + | impl ::std::convert::From<crate::error::ServiceQuotaExceededException>
|
616 + | for crate::error::PutSnapshotBlockError
|
617 + | {
|
618 + | fn from(
|
619 + | variant: crate::error::ServiceQuotaExceededException,
|
620 + | ) -> crate::error::PutSnapshotBlockError {
|
621 + | Self::ServiceQuotaExceededException(variant)
|
622 + | }
|
623 + | }
|
624 + | impl ::std::convert::From<crate::error::ValidationException>
|
625 + | for crate::error::PutSnapshotBlockError
|
626 + | {
|
627 + | fn from(variant: crate::error::ValidationException) -> crate::error::PutSnapshotBlockError {
|
628 + | Self::ValidationException(variant)
|
629 + | }
|
630 + | }
|
631 + |
|
632 + | /// Error type for the `ListSnapshotBlocks` operation.
|
633 + | /// Each variant represents an error that can occur for the `ListSnapshotBlocks` operation.
|
634 + | #[derive(::std::fmt::Debug)]
|
635 + | pub enum ListSnapshotBlocksError {
|
636 + | /// <p>An internal error has occurred.</p>
|
637 + | InternalServerException(crate::error::InternalServerException),
|
638 + | /// <p>The specified resource does not exist.</p>
|
639 + | ResourceNotFoundException(crate::error::ResourceNotFoundException),
|
640 + | /// <p>You do not have sufficient access to perform this action.</p>
|
641 + | AccessDeniedException(crate::error::AccessDeniedException),
|
642 + | /// <p>The number of API requests has exceed the maximum allowed API request throttling limit.</p>
|
643 + | RequestThrottledException(crate::error::RequestThrottledException),
|
644 + | /// <p>Your current service quotas do not allow you to perform this action.</p>
|
645 + | ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
|
646 + | /// 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.
|
647 + | ValidationException(crate::error::ValidationException),
|
648 + | }
|
649 + | impl ::std::fmt::Display for ListSnapshotBlocksError {
|
650 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
651 + | match &self {
|
652 + | ListSnapshotBlocksError::InternalServerException(_inner) => _inner.fmt(f),
|
653 + | ListSnapshotBlocksError::ResourceNotFoundException(_inner) => _inner.fmt(f),
|
654 + | ListSnapshotBlocksError::AccessDeniedException(_inner) => _inner.fmt(f),
|
655 + | ListSnapshotBlocksError::RequestThrottledException(_inner) => _inner.fmt(f),
|
656 + | ListSnapshotBlocksError::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
|
657 + | ListSnapshotBlocksError::ValidationException(_inner) => _inner.fmt(f),
|
658 + | }
|
659 + | }
|
660 + | }
|
661 + | impl ListSnapshotBlocksError {
|
662 + | /// Returns `true` if the error kind is `ListSnapshotBlocksError::InternalServerException`.
|
663 + | pub fn is_internal_server_exception(&self) -> bool {
|
664 + | matches!(&self, ListSnapshotBlocksError::InternalServerException(_))
|
665 + | }
|
666 + | /// Returns `true` if the error kind is `ListSnapshotBlocksError::ResourceNotFoundException`.
|
667 + | pub fn is_resource_not_found_exception(&self) -> bool {
|
668 + | matches!(&self, ListSnapshotBlocksError::ResourceNotFoundException(_))
|
669 + | }
|
670 + | /// Returns `true` if the error kind is `ListSnapshotBlocksError::AccessDeniedException`.
|
671 + | pub fn is_access_denied_exception(&self) -> bool {
|
672 + | matches!(&self, ListSnapshotBlocksError::AccessDeniedException(_))
|
673 + | }
|
674 + | /// Returns `true` if the error kind is `ListSnapshotBlocksError::RequestThrottledException`.
|
675 + | pub fn is_request_throttled_exception(&self) -> bool {
|
676 + | matches!(&self, ListSnapshotBlocksError::RequestThrottledException(_))
|
677 + | }
|
678 + | /// Returns `true` if the error kind is `ListSnapshotBlocksError::ServiceQuotaExceededException`.
|
679 + | pub fn is_service_quota_exceeded_exception(&self) -> bool {
|
680 + | matches!(
|
681 + | &self,
|
682 + | ListSnapshotBlocksError::ServiceQuotaExceededException(_)
|
683 + | )
|
684 + | }
|
685 + | /// Returns `true` if the error kind is `ListSnapshotBlocksError::ValidationException`.
|
686 + | pub fn is_validation_exception(&self) -> bool {
|
687 + | matches!(&self, ListSnapshotBlocksError::ValidationException(_))
|
688 + | }
|
689 + | /// Returns the error name string by matching the correct variant.
|
690 + | pub fn name(&self) -> &'static str {
|
691 + | match &self {
|
692 + | ListSnapshotBlocksError::InternalServerException(_inner) => _inner.name(),
|
693 + | ListSnapshotBlocksError::ResourceNotFoundException(_inner) => _inner.name(),
|
694 + | ListSnapshotBlocksError::AccessDeniedException(_inner) => _inner.name(),
|
695 + | ListSnapshotBlocksError::RequestThrottledException(_inner) => _inner.name(),
|
696 + | ListSnapshotBlocksError::ServiceQuotaExceededException(_inner) => _inner.name(),
|
697 + | ListSnapshotBlocksError::ValidationException(_inner) => _inner.name(),
|
698 + | }
|
699 + | }
|
700 + | }
|
701 + | impl ::std::error::Error for ListSnapshotBlocksError {
|
702 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
703 + | match &self {
|
704 + | ListSnapshotBlocksError::InternalServerException(_inner) => Some(_inner),
|
705 + | ListSnapshotBlocksError::ResourceNotFoundException(_inner) => Some(_inner),
|
706 + | ListSnapshotBlocksError::AccessDeniedException(_inner) => Some(_inner),
|
707 + | ListSnapshotBlocksError::RequestThrottledException(_inner) => Some(_inner),
|
708 + | ListSnapshotBlocksError::ServiceQuotaExceededException(_inner) => Some(_inner),
|
709 + | ListSnapshotBlocksError::ValidationException(_inner) => Some(_inner),
|
710 + | }
|
711 + | }
|
712 + | }
|
713 + | impl ::std::convert::From<crate::error::InternalServerException>
|
714 + | for crate::error::ListSnapshotBlocksError
|
715 + | {
|
716 + | fn from(
|
717 + | variant: crate::error::InternalServerException,
|
718 + | ) -> crate::error::ListSnapshotBlocksError {
|
719 + | Self::InternalServerException(variant)
|
720 + | }
|
721 + | }
|
722 + | impl ::std::convert::From<crate::error::ResourceNotFoundException>
|
723 + | for crate::error::ListSnapshotBlocksError
|
724 + | {
|
725 + | fn from(
|
726 + | variant: crate::error::ResourceNotFoundException,
|
727 + | ) -> crate::error::ListSnapshotBlocksError {
|
728 + | Self::ResourceNotFoundException(variant)
|
729 + | }
|
730 + | }
|
731 + | impl ::std::convert::From<crate::error::AccessDeniedException>
|
732 + | for crate::error::ListSnapshotBlocksError
|
733 + | {
|
734 + | fn from(variant: crate::error::AccessDeniedException) -> crate::error::ListSnapshotBlocksError {
|
735 + | Self::AccessDeniedException(variant)
|
736 + | }
|
737 + | }
|
738 + | impl ::std::convert::From<crate::error::RequestThrottledException>
|
739 + | for crate::error::ListSnapshotBlocksError
|
740 + | {
|
741 + | fn from(
|
742 + | variant: crate::error::RequestThrottledException,
|
743 + | ) -> crate::error::ListSnapshotBlocksError {
|
744 + | Self::RequestThrottledException(variant)
|
745 + | }
|
746 + | }
|
747 + | impl ::std::convert::From<crate::error::ServiceQuotaExceededException>
|
748 + | for crate::error::ListSnapshotBlocksError
|
749 + | {
|
750 + | fn from(
|
751 + | variant: crate::error::ServiceQuotaExceededException,
|
752 + | ) -> crate::error::ListSnapshotBlocksError {
|
753 + | Self::ServiceQuotaExceededException(variant)
|
754 + | }
|
755 + | }
|
756 + | impl ::std::convert::From<crate::error::ValidationException>
|
757 + | for crate::error::ListSnapshotBlocksError
|
758 + | {
|
759 + | fn from(variant: crate::error::ValidationException) -> crate::error::ListSnapshotBlocksError {
|
760 + | Self::ValidationException(variant)
|
761 + | }
|
762 + | }
|
763 + |
|
764 + | /// Error type for the `ListChangedBlocks` operation.
|
765 + | /// Each variant represents an error that can occur for the `ListChangedBlocks` operation.
|
766 + | #[derive(::std::fmt::Debug)]
|
767 + | pub enum ListChangedBlocksError {
|
768 + | /// <p>An internal error has occurred.</p>
|
769 + | InternalServerException(crate::error::InternalServerException),
|
770 + | /// <p>The specified resource does not exist.</p>
|
771 + | ResourceNotFoundException(crate::error::ResourceNotFoundException),
|
772 + | /// <p>You do not have sufficient access to perform this action.</p>
|
773 + | AccessDeniedException(crate::error::AccessDeniedException),
|
774 + | /// <p>The number of API requests has exceed the maximum allowed API request throttling limit.</p>
|
775 + | RequestThrottledException(crate::error::RequestThrottledException),
|
776 + | /// <p>Your current service quotas do not allow you to perform this action.</p>
|
777 + | ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
|
778 + | /// 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.
|
779 + | ValidationException(crate::error::ValidationException),
|
780 + | }
|
781 + | impl ::std::fmt::Display for ListChangedBlocksError {
|
782 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
783 + | match &self {
|
784 + | ListChangedBlocksError::InternalServerException(_inner) => _inner.fmt(f),
|
785 + | ListChangedBlocksError::ResourceNotFoundException(_inner) => _inner.fmt(f),
|
786 + | ListChangedBlocksError::AccessDeniedException(_inner) => _inner.fmt(f),
|
787 + | ListChangedBlocksError::RequestThrottledException(_inner) => _inner.fmt(f),
|
788 + | ListChangedBlocksError::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
|
789 + | ListChangedBlocksError::ValidationException(_inner) => _inner.fmt(f),
|
790 + | }
|
791 + | }
|
792 + | }
|
793 + | impl ListChangedBlocksError {
|
794 + | /// Returns `true` if the error kind is `ListChangedBlocksError::InternalServerException`.
|
795 + | pub fn is_internal_server_exception(&self) -> bool {
|
796 + | matches!(&self, ListChangedBlocksError::InternalServerException(_))
|
797 + | }
|
798 + | /// Returns `true` if the error kind is `ListChangedBlocksError::ResourceNotFoundException`.
|
799 + | pub fn is_resource_not_found_exception(&self) -> bool {
|
800 + | matches!(&self, ListChangedBlocksError::ResourceNotFoundException(_))
|
801 + | }
|
802 + | /// Returns `true` if the error kind is `ListChangedBlocksError::AccessDeniedException`.
|
803 + | pub fn is_access_denied_exception(&self) -> bool {
|
804 + | matches!(&self, ListChangedBlocksError::AccessDeniedException(_))
|
805 + | }
|
806 + | /// Returns `true` if the error kind is `ListChangedBlocksError::RequestThrottledException`.
|
807 + | pub fn is_request_throttled_exception(&self) -> bool {
|
808 + | matches!(&self, ListChangedBlocksError::RequestThrottledException(_))
|
809 + | }
|
810 + | /// Returns `true` if the error kind is `ListChangedBlocksError::ServiceQuotaExceededException`.
|
811 + | pub fn is_service_quota_exceeded_exception(&self) -> bool {
|
812 + | matches!(
|
813 + | &self,
|
814 + | ListChangedBlocksError::ServiceQuotaExceededException(_)
|
815 + | )
|
816 + | }
|
817 + | /// Returns `true` if the error kind is `ListChangedBlocksError::ValidationException`.
|
818 + | pub fn is_validation_exception(&self) -> bool {
|
819 + | matches!(&self, ListChangedBlocksError::ValidationException(_))
|
820 + | }
|
821 + | /// Returns the error name string by matching the correct variant.
|
822 + | pub fn name(&self) -> &'static str {
|
823 + | match &self {
|
824 + | ListChangedBlocksError::InternalServerException(_inner) => _inner.name(),
|
825 + | ListChangedBlocksError::ResourceNotFoundException(_inner) => _inner.name(),
|
826 + | ListChangedBlocksError::AccessDeniedException(_inner) => _inner.name(),
|
827 + | ListChangedBlocksError::RequestThrottledException(_inner) => _inner.name(),
|
828 + | ListChangedBlocksError::ServiceQuotaExceededException(_inner) => _inner.name(),
|
829 + | ListChangedBlocksError::ValidationException(_inner) => _inner.name(),
|
830 + | }
|
831 + | }
|
832 + | }
|
833 + | impl ::std::error::Error for ListChangedBlocksError {
|
834 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
835 + | match &self {
|
836 + | ListChangedBlocksError::InternalServerException(_inner) => Some(_inner),
|
837 + | ListChangedBlocksError::ResourceNotFoundException(_inner) => Some(_inner),
|
838 + | ListChangedBlocksError::AccessDeniedException(_inner) => Some(_inner),
|
839 + | ListChangedBlocksError::RequestThrottledException(_inner) => Some(_inner),
|
840 + | ListChangedBlocksError::ServiceQuotaExceededException(_inner) => Some(_inner),
|
841 + | ListChangedBlocksError::ValidationException(_inner) => Some(_inner),
|
842 + | }
|
843 + | }
|
844 + | }
|
845 + | impl ::std::convert::From<crate::error::InternalServerException>
|
846 + | for crate::error::ListChangedBlocksError
|
847 + | {
|
848 + | fn from(
|
849 + | variant: crate::error::InternalServerException,
|
850 + | ) -> crate::error::ListChangedBlocksError {
|
851 + | Self::InternalServerException(variant)
|
852 + | }
|
853 + | }
|
854 + | impl ::std::convert::From<crate::error::ResourceNotFoundException>
|
855 + | for crate::error::ListChangedBlocksError
|
856 + | {
|
857 + | fn from(
|
858 + | variant: crate::error::ResourceNotFoundException,
|
859 + | ) -> crate::error::ListChangedBlocksError {
|
860 + | Self::ResourceNotFoundException(variant)
|
861 + | }
|
862 + | }
|
863 + | impl ::std::convert::From<crate::error::AccessDeniedException>
|
864 + | for crate::error::ListChangedBlocksError
|
865 + | {
|
866 + | fn from(variant: crate::error::AccessDeniedException) -> crate::error::ListChangedBlocksError {
|
867 + | Self::AccessDeniedException(variant)
|
868 + | }
|
869 + | }
|
870 + | impl ::std::convert::From<crate::error::RequestThrottledException>
|
871 + | for crate::error::ListChangedBlocksError
|
872 + | {
|
873 + | fn from(
|
874 + | variant: crate::error::RequestThrottledException,
|
875 + | ) -> crate::error::ListChangedBlocksError {
|
876 + | Self::RequestThrottledException(variant)
|
877 + | }
|
878 + | }
|
879 + | impl ::std::convert::From<crate::error::ServiceQuotaExceededException>
|
880 + | for crate::error::ListChangedBlocksError
|
881 + | {
|
882 + | fn from(
|
883 + | variant: crate::error::ServiceQuotaExceededException,
|
884 + | ) -> crate::error::ListChangedBlocksError {
|
885 + | Self::ServiceQuotaExceededException(variant)
|
886 + | }
|
887 + | }
|
888 + | impl ::std::convert::From<crate::error::ValidationException>
|
889 + | for crate::error::ListChangedBlocksError
|
890 + | {
|
891 + | fn from(variant: crate::error::ValidationException) -> crate::error::ListChangedBlocksError {
|
892 + | Self::ValidationException(variant)
|
893 + | }
|
894 + | }
|
895 + |
|
896 + | /// Error type for the `GetSnapshotBlock` operation.
|
897 + | /// Each variant represents an error that can occur for the `GetSnapshotBlock` operation.
|
898 + | #[derive(::std::fmt::Debug)]
|
899 + | pub enum GetSnapshotBlockError {
|
900 + | /// <p>An internal error has occurred.</p>
|
901 + | InternalServerException(crate::error::InternalServerException),
|
902 + | /// <p>The specified resource does not exist.</p>
|
903 + | ResourceNotFoundException(crate::error::ResourceNotFoundException),
|
904 + | /// <p>You do not have sufficient access to perform this action.</p>
|
905 + | AccessDeniedException(crate::error::AccessDeniedException),
|
906 + | /// <p>The number of API requests has exceed the maximum allowed API request throttling limit.</p>
|
907 + | RequestThrottledException(crate::error::RequestThrottledException),
|
908 + | /// <p>Your current service quotas do not allow you to perform this action.</p>
|
909 + | ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
|
910 + | /// 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.
|
911 + | ValidationException(crate::error::ValidationException),
|
912 + | }
|
913 + | impl ::std::fmt::Display for GetSnapshotBlockError {
|
914 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
915 + | match &self {
|
916 + | GetSnapshotBlockError::InternalServerException(_inner) => _inner.fmt(f),
|
917 + | GetSnapshotBlockError::ResourceNotFoundException(_inner) => _inner.fmt(f),
|
918 + | GetSnapshotBlockError::AccessDeniedException(_inner) => _inner.fmt(f),
|
919 + | GetSnapshotBlockError::RequestThrottledException(_inner) => _inner.fmt(f),
|
920 + | GetSnapshotBlockError::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
|
921 + | GetSnapshotBlockError::ValidationException(_inner) => _inner.fmt(f),
|
922 + | }
|
923 + | }
|
924 + | }
|
925 + | impl GetSnapshotBlockError {
|
926 + | /// Returns `true` if the error kind is `GetSnapshotBlockError::InternalServerException`.
|
927 + | pub fn is_internal_server_exception(&self) -> bool {
|
928 + | matches!(&self, GetSnapshotBlockError::InternalServerException(_))
|
929 + | }
|
930 + | /// Returns `true` if the error kind is `GetSnapshotBlockError::ResourceNotFoundException`.
|
931 + | pub fn is_resource_not_found_exception(&self) -> bool {
|
932 + | matches!(&self, GetSnapshotBlockError::ResourceNotFoundException(_))
|
933 + | }
|
934 + | /// Returns `true` if the error kind is `GetSnapshotBlockError::AccessDeniedException`.
|
935 + | pub fn is_access_denied_exception(&self) -> bool {
|
936 + | matches!(&self, GetSnapshotBlockError::AccessDeniedException(_))
|
937 + | }
|
938 + | /// Returns `true` if the error kind is `GetSnapshotBlockError::RequestThrottledException`.
|
939 + | pub fn is_request_throttled_exception(&self) -> bool {
|
940 + | matches!(&self, GetSnapshotBlockError::RequestThrottledException(_))
|
941 + | }
|
942 + | /// Returns `true` if the error kind is `GetSnapshotBlockError::ServiceQuotaExceededException`.
|
943 + | pub fn is_service_quota_exceeded_exception(&self) -> bool {
|
944 + | matches!(
|
945 + | &self,
|
946 + | GetSnapshotBlockError::ServiceQuotaExceededException(_)
|
947 + | )
|
948 + | }
|
949 + | /// Returns `true` if the error kind is `GetSnapshotBlockError::ValidationException`.
|
950 + | pub fn is_validation_exception(&self) -> bool {
|
951 + | matches!(&self, GetSnapshotBlockError::ValidationException(_))
|
952 + | }
|
953 + | /// Returns the error name string by matching the correct variant.
|
954 + | pub fn name(&self) -> &'static str {
|
955 + | match &self {
|
956 + | GetSnapshotBlockError::InternalServerException(_inner) => _inner.name(),
|
957 + | GetSnapshotBlockError::ResourceNotFoundException(_inner) => _inner.name(),
|
958 + | GetSnapshotBlockError::AccessDeniedException(_inner) => _inner.name(),
|
959 + | GetSnapshotBlockError::RequestThrottledException(_inner) => _inner.name(),
|
960 + | GetSnapshotBlockError::ServiceQuotaExceededException(_inner) => _inner.name(),
|
961 + | GetSnapshotBlockError::ValidationException(_inner) => _inner.name(),
|
962 + | }
|
963 + | }
|
964 + | }
|
965 + | impl ::std::error::Error for GetSnapshotBlockError {
|
966 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
967 + | match &self {
|
968 + | GetSnapshotBlockError::InternalServerException(_inner) => Some(_inner),
|
969 + | GetSnapshotBlockError::ResourceNotFoundException(_inner) => Some(_inner),
|
970 + | GetSnapshotBlockError::AccessDeniedException(_inner) => Some(_inner),
|
971 + | GetSnapshotBlockError::RequestThrottledException(_inner) => Some(_inner),
|
972 + | GetSnapshotBlockError::ServiceQuotaExceededException(_inner) => Some(_inner),
|
973 + | GetSnapshotBlockError::ValidationException(_inner) => Some(_inner),
|
974 + | }
|
975 + | }
|
976 + | }
|
977 + | impl ::std::convert::From<crate::error::InternalServerException>
|
978 + | for crate::error::GetSnapshotBlockError
|
979 + | {
|
980 + | fn from(variant: crate::error::InternalServerException) -> crate::error::GetSnapshotBlockError {
|
981 + | Self::InternalServerException(variant)
|
982 + | }
|
983 + | }
|
984 + | impl ::std::convert::From<crate::error::ResourceNotFoundException>
|
985 + | for crate::error::GetSnapshotBlockError
|
986 + | {
|
987 + | fn from(
|
988 + | variant: crate::error::ResourceNotFoundException,
|
989 + | ) -> crate::error::GetSnapshotBlockError {
|
990 + | Self::ResourceNotFoundException(variant)
|
991 + | }
|
992 + | }
|
993 + | impl ::std::convert::From<crate::error::AccessDeniedException>
|
994 + | for crate::error::GetSnapshotBlockError
|
995 + | {
|
996 + | fn from(variant: crate::error::AccessDeniedException) -> crate::error::GetSnapshotBlockError {
|
997 + | Self::AccessDeniedException(variant)
|
998 + | }
|
999 + | }
|
1000 + | impl ::std::convert::From<crate::error::RequestThrottledException>
|
1001 + | for crate::error::GetSnapshotBlockError
|
1002 + | {
|
1003 + | fn from(
|
1004 + | variant: crate::error::RequestThrottledException,
|
1005 + | ) -> crate::error::GetSnapshotBlockError {
|
1006 + | Self::RequestThrottledException(variant)
|
1007 + | }
|
1008 + | }
|
1009 + | impl ::std::convert::From<crate::error::ServiceQuotaExceededException>
|
1010 + | for crate::error::GetSnapshotBlockError
|
1011 + | {
|
1012 + | fn from(
|
1013 + | variant: crate::error::ServiceQuotaExceededException,
|
1014 + | ) -> crate::error::GetSnapshotBlockError {
|
1015 + | Self::ServiceQuotaExceededException(variant)
|
1016 + | }
|
1017 + | }
|
1018 + | impl ::std::convert::From<crate::error::ValidationException>
|
1019 + | for crate::error::GetSnapshotBlockError
|
1020 + | {
|
1021 + | fn from(variant: crate::error::ValidationException) -> crate::error::GetSnapshotBlockError {
|
1022 + | Self::ValidationException(variant)
|
1023 + | }
|
1024 + | }
|
1025 + |
|
1026 + | /// Error type for the `CompleteSnapshot` operation.
|
1027 + | /// Each variant represents an error that can occur for the `CompleteSnapshot` operation.
|
1028 + | #[derive(::std::fmt::Debug)]
|
1029 + | pub enum CompleteSnapshotError {
|
1030 + | /// <p>An internal error has occurred.</p>
|
1031 + | InternalServerException(crate::error::InternalServerException),
|
1032 + | /// <p>The specified resource does not exist.</p>
|
1033 + | ResourceNotFoundException(crate::error::ResourceNotFoundException),
|
1034 + | /// <p>You do not have sufficient access to perform this action.</p>
|
1035 + | AccessDeniedException(crate::error::AccessDeniedException),
|
1036 + | /// <p>The number of API requests has exceed the maximum allowed API request throttling limit.</p>
|
1037 + | RequestThrottledException(crate::error::RequestThrottledException),
|
1038 + | /// <p>Your current service quotas do not allow you to perform this action.</p>
|
1039 + | ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
|
1040 + | /// 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.
|
1041 + | ValidationException(crate::error::ValidationException),
|
1042 + | }
|
1043 + | impl ::std::fmt::Display for CompleteSnapshotError {
|
1044 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1045 + | match &self {
|
1046 + | CompleteSnapshotError::InternalServerException(_inner) => _inner.fmt(f),
|
1047 + | CompleteSnapshotError::ResourceNotFoundException(_inner) => _inner.fmt(f),
|
1048 + | CompleteSnapshotError::AccessDeniedException(_inner) => _inner.fmt(f),
|
1049 + | CompleteSnapshotError::RequestThrottledException(_inner) => _inner.fmt(f),
|
1050 + | CompleteSnapshotError::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
|
1051 + | CompleteSnapshotError::ValidationException(_inner) => _inner.fmt(f),
|
1052 + | }
|
1053 + | }
|
1054 + | }
|
1055 + | impl CompleteSnapshotError {
|
1056 + | /// Returns `true` if the error kind is `CompleteSnapshotError::InternalServerException`.
|
1057 + | pub fn is_internal_server_exception(&self) -> bool {
|
1058 + | matches!(&self, CompleteSnapshotError::InternalServerException(_))
|
1059 + | }
|
1060 + | /// Returns `true` if the error kind is `CompleteSnapshotError::ResourceNotFoundException`.
|
1061 + | pub fn is_resource_not_found_exception(&self) -> bool {
|
1062 + | matches!(&self, CompleteSnapshotError::ResourceNotFoundException(_))
|
1063 + | }
|
1064 + | /// Returns `true` if the error kind is `CompleteSnapshotError::AccessDeniedException`.
|
1065 + | pub fn is_access_denied_exception(&self) -> bool {
|
1066 + | matches!(&self, CompleteSnapshotError::AccessDeniedException(_))
|
1067 + | }
|
1068 + | /// Returns `true` if the error kind is `CompleteSnapshotError::RequestThrottledException`.
|
1069 + | pub fn is_request_throttled_exception(&self) -> bool {
|
1070 + | matches!(&self, CompleteSnapshotError::RequestThrottledException(_))
|
1071 + | }
|
1072 + | /// Returns `true` if the error kind is `CompleteSnapshotError::ServiceQuotaExceededException`.
|
1073 + | pub fn is_service_quota_exceeded_exception(&self) -> bool {
|
1074 + | matches!(
|
1075 + | &self,
|
1076 + | CompleteSnapshotError::ServiceQuotaExceededException(_)
|
1077 + | )
|
1078 + | }
|
1079 + | /// Returns `true` if the error kind is `CompleteSnapshotError::ValidationException`.
|
1080 + | pub fn is_validation_exception(&self) -> bool {
|
1081 + | matches!(&self, CompleteSnapshotError::ValidationException(_))
|
1082 + | }
|
1083 + | /// Returns the error name string by matching the correct variant.
|
1084 + | pub fn name(&self) -> &'static str {
|
1085 + | match &self {
|
1086 + | CompleteSnapshotError::InternalServerException(_inner) => _inner.name(),
|
1087 + | CompleteSnapshotError::ResourceNotFoundException(_inner) => _inner.name(),
|
1088 + | CompleteSnapshotError::AccessDeniedException(_inner) => _inner.name(),
|
1089 + | CompleteSnapshotError::RequestThrottledException(_inner) => _inner.name(),
|
1090 + | CompleteSnapshotError::ServiceQuotaExceededException(_inner) => _inner.name(),
|
1091 + | CompleteSnapshotError::ValidationException(_inner) => _inner.name(),
|
1092 + | }
|
1093 + | }
|
1094 + | }
|
1095 + | impl ::std::error::Error for CompleteSnapshotError {
|
1096 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
1097 + | match &self {
|
1098 + | CompleteSnapshotError::InternalServerException(_inner) => Some(_inner),
|
1099 + | CompleteSnapshotError::ResourceNotFoundException(_inner) => Some(_inner),
|
1100 + | CompleteSnapshotError::AccessDeniedException(_inner) => Some(_inner),
|
1101 + | CompleteSnapshotError::RequestThrottledException(_inner) => Some(_inner),
|
1102 + | CompleteSnapshotError::ServiceQuotaExceededException(_inner) => Some(_inner),
|
1103 + | CompleteSnapshotError::ValidationException(_inner) => Some(_inner),
|
1104 + | }
|
1105 + | }
|
1106 + | }
|
1107 + | impl ::std::convert::From<crate::error::InternalServerException>
|
1108 + | for crate::error::CompleteSnapshotError
|
1109 + | {
|
1110 + | fn from(variant: crate::error::InternalServerException) -> crate::error::CompleteSnapshotError {
|
1111 + | Self::InternalServerException(variant)
|
1112 + | }
|
1113 + | }
|
1114 + | impl ::std::convert::From<crate::error::ResourceNotFoundException>
|
1115 + | for crate::error::CompleteSnapshotError
|
1116 + | {
|
1117 + | fn from(
|
1118 + | variant: crate::error::ResourceNotFoundException,
|
1119 + | ) -> crate::error::CompleteSnapshotError {
|
1120 + | Self::ResourceNotFoundException(variant)
|
1121 + | }
|
1122 + | }
|
1123 + | impl ::std::convert::From<crate::error::AccessDeniedException>
|
1124 + | for crate::error::CompleteSnapshotError
|
1125 + | {
|
1126 + | fn from(variant: crate::error::AccessDeniedException) -> crate::error::CompleteSnapshotError {
|
1127 + | Self::AccessDeniedException(variant)
|
1128 + | }
|
1129 + | }
|
1130 + | impl ::std::convert::From<crate::error::RequestThrottledException>
|
1131 + | for crate::error::CompleteSnapshotError
|
1132 + | {
|
1133 + | fn from(
|
1134 + | variant: crate::error::RequestThrottledException,
|
1135 + | ) -> crate::error::CompleteSnapshotError {
|
1136 + | Self::RequestThrottledException(variant)
|
1137 + | }
|
1138 + | }
|
1139 + | impl ::std::convert::From<crate::error::ServiceQuotaExceededException>
|
1140 + | for crate::error::CompleteSnapshotError
|
1141 + | {
|
1142 + | fn from(
|
1143 + | variant: crate::error::ServiceQuotaExceededException,
|
1144 + | ) -> crate::error::CompleteSnapshotError {
|
1145 + | Self::ServiceQuotaExceededException(variant)
|
1146 + | }
|
1147 + | }
|
1148 + | impl ::std::convert::From<crate::error::ValidationException>
|
1149 + | for crate::error::CompleteSnapshotError
|
1150 + | {
|
1151 + | fn from(variant: crate::error::ValidationException) -> crate::error::CompleteSnapshotError {
|
1152 + | Self::ValidationException(variant)
|
1153 + | }
|
1154 + | }
|
1155 + | /// See [`ValidationException`](crate::error::ValidationException).
|
1156 + | pub mod validation_exception {
|
1157 + |
|
1158 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1159 + | /// Holds one variant for each of the ways the builder can fail.
|
1160 + | #[non_exhaustive]
|
1161 + | #[allow(clippy::enum_variant_names)]
|
1162 + | pub enum ConstraintViolation {
|
1163 + | /// `message` was not provided but it is required when building `ValidationException`.
|
1164 + | MissingMessage,
|
1165 + | }
|
1166 + | impl ::std::fmt::Display for ConstraintViolation {
|
1167 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1168 + | match self {
|
1169 + | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
1170 + | }
|
1171 + | }
|
1172 + | }
|
1173 + | impl ::std::error::Error for ConstraintViolation {}
|
1174 + | impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
|
1175 + | type Error = ConstraintViolation;
|
1176 + |
|
1177 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1178 + | builder.build()
|
1179 + | }
|
1180 + | }
|
1181 + | /// A builder for [`ValidationException`](crate::error::ValidationException).
|
1182 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1183 + | pub struct Builder {
|
1184 + | pub(crate) message: ::std::option::Option<::std::string::String>,
|
1185 + | pub(crate) field_list:
|
1186 + | ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
1187 + | }
|
1188 + | impl Builder {
|
1189 + | /// A summary of the validation failure.
|
1190 + | pub fn message(mut self, input: ::std::string::String) -> Self {
|
1191 + | self.message = Some(input);
|
1192 + | self
|
1193 + | }
|
1194 + | /// 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.
|
1195 + | pub fn field_list(
|
1196 + | mut self,
|
1197 + | input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
1198 + | ) -> Self {
|
1199 + | self.field_list = input;
|
1200 + | self
|
1201 + | }
|
1202 + | /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
1203 + | ///
|
1204 + | /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if a [`ConstraintViolation`] occurs.
|
1205 + | ///
|
1206 + | pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
1207 + | self.build_enforcing_all_constraints()
|
1208 + | }
|
1209 + | fn build_enforcing_all_constraints(
|
1210 + | self,
|
1211 + | ) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
1212 + | Ok(crate::error::ValidationException {
|
1213 + | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
1214 + | field_list: self.field_list,
|
1215 + | })
|
1216 + | }
|
1217 + | }
|
1218 + | }
|
1219 + | /// See [`ConcurrentLimitExceededException`](crate::error::ConcurrentLimitExceededException).
|
1220 + | pub mod concurrent_limit_exceeded_exception {
|
1221 + |
|
1222 + | impl ::std::convert::From<Builder> for crate::error::ConcurrentLimitExceededException {
|
1223 + | fn from(builder: Builder) -> Self {
|
1224 + | builder.build()
|
1225 + | }
|
1226 + | }
|
1227 + | /// A builder for [`ConcurrentLimitExceededException`](crate::error::ConcurrentLimitExceededException).
|
1228 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1229 + | pub struct Builder {
|
1230 + | pub(crate) message: ::std::option::Option<crate::model::ErrorMessage>,
|
1231 + | }
|
1232 + | impl Builder {
|
1233 + | #[allow(missing_docs)] // documentation missing in model
|
1234 + | pub fn message(mut self, input: ::std::option::Option<crate::model::ErrorMessage>) -> Self {
|
1235 + | self.message = input;
|
1236 + | self
|
1237 + | }
|
1238 + | /// Consumes the builder and constructs a [`ConcurrentLimitExceededException`](crate::error::ConcurrentLimitExceededException).
|
1239 + | pub fn build(self) -> crate::error::ConcurrentLimitExceededException {
|
1240 + | self.build_enforcing_all_constraints()
|
1241 + | }
|
1242 + | fn build_enforcing_all_constraints(self) -> crate::error::ConcurrentLimitExceededException {
|
1243 + | crate::error::ConcurrentLimitExceededException {
|
1244 + | message: self.message,
|
1245 + | }
|
1246 + | }
|
1247 + | }
|
1248 + | }
|
1249 + | /// See [`ServiceQuotaExceededException`](crate::error::ServiceQuotaExceededException).
|
1250 + | pub mod service_quota_exceeded_exception {
|
1251 + |
|
1252 + | impl ::std::convert::From<Builder> for crate::error::ServiceQuotaExceededException {
|
1253 + | fn from(builder: Builder) -> Self {
|
1254 + | builder.build()
|
1255 + | }
|
1256 + | }
|
1257 + | /// A builder for [`ServiceQuotaExceededException`](crate::error::ServiceQuotaExceededException).
|
1258 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1259 + | pub struct Builder {
|
1260 + | pub(crate) reason: ::std::option::Option<crate::model::ServiceQuotaExceededExceptionReason>,
|
1261 + | pub(crate) message: ::std::option::Option<crate::model::ErrorMessage>,
|
1262 + | }
|
1263 + | impl Builder {
|
1264 + | /// <p>The reason for the exception.</p>
|
1265 + | pub fn reason(
|
1266 + | mut self,
|
1267 + | input: ::std::option::Option<crate::model::ServiceQuotaExceededExceptionReason>,
|
1268 + | ) -> Self {
|
1269 + | self.reason = input;
|
1270 + | self
|
1271 + | }
|
1272 + | #[allow(missing_docs)] // documentation missing in model
|
1273 + | pub fn message(mut self, input: ::std::option::Option<crate::model::ErrorMessage>) -> Self {
|
1274 + | self.message = input;
|
1275 + | self
|
1276 + | }
|
1277 + | /// Consumes the builder and constructs a [`ServiceQuotaExceededException`](crate::error::ServiceQuotaExceededException).
|
1278 + | pub fn build(self) -> crate::error::ServiceQuotaExceededException {
|
1279 + | self.build_enforcing_all_constraints()
|
1280 + | }
|
1281 + | fn build_enforcing_all_constraints(self) -> crate::error::ServiceQuotaExceededException {
|
1282 + | crate::error::ServiceQuotaExceededException {
|
1283 + | reason: self.reason,
|
1284 + | message: self.message,
|
1285 + | }
|
1286 + | }
|
1287 + | }
|
1288 + | }
|
1289 + | /// See [`RequestThrottledException`](crate::error::RequestThrottledException).
|
1290 + | pub mod request_throttled_exception {
|
1291 + |
|
1292 + | impl ::std::convert::From<Builder> for crate::error::RequestThrottledException {
|
1293 + | fn from(builder: Builder) -> Self {
|
1294 + | builder.build()
|
1295 + | }
|
1296 + | }
|
1297 + | /// A builder for [`RequestThrottledException`](crate::error::RequestThrottledException).
|
1298 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1299 + | pub struct Builder {
|
1300 + | pub(crate) message: ::std::option::Option<crate::model::ErrorMessage>,
|
1301 + | pub(crate) reason: ::std::option::Option<crate::model::RequestThrottledExceptionReason>,
|
1302 + | }
|
1303 + | impl Builder {
|
1304 + | #[allow(missing_docs)] // documentation missing in model
|
1305 + | pub fn message(mut self, input: ::std::option::Option<crate::model::ErrorMessage>) -> Self {
|
1306 + | self.message = input;
|
1307 + | self
|
1308 + | }
|
1309 + | /// <p>The reason for the exception.</p>
|
1310 + | pub fn reason(
|
1311 + | mut self,
|
1312 + | input: ::std::option::Option<crate::model::RequestThrottledExceptionReason>,
|
1313 + | ) -> Self {
|
1314 + | self.reason = input;
|
1315 + | self
|
1316 + | }
|
1317 + | /// Consumes the builder and constructs a [`RequestThrottledException`](crate::error::RequestThrottledException).
|
1318 + | pub fn build(self) -> crate::error::RequestThrottledException {
|
1319 + | self.build_enforcing_all_constraints()
|
1320 + | }
|
1321 + | fn build_enforcing_all_constraints(self) -> crate::error::RequestThrottledException {
|
1322 + | crate::error::RequestThrottledException {
|
1323 + | message: self.message,
|
1324 + | reason: self.reason,
|
1325 + | }
|
1326 + | }
|
1327 + | }
|
1328 + | }
|
1329 + | /// See [`ConflictException`](crate::error::ConflictException).
|
1330 + | pub mod conflict_exception {
|
1331 + |
|
1332 + | impl ::std::convert::From<Builder> for crate::error::ConflictException {
|
1333 + | fn from(builder: Builder) -> Self {
|
1334 + | builder.build()
|
1335 + | }
|
1336 + | }
|
1337 + | /// A builder for [`ConflictException`](crate::error::ConflictException).
|
1338 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1339 + | pub struct Builder {
|
1340 + | pub(crate) message: ::std::option::Option<crate::model::ErrorMessage>,
|
1341 + | }
|
1342 + | impl Builder {
|
1343 + | #[allow(missing_docs)] // documentation missing in model
|
1344 + | pub fn message(mut self, input: ::std::option::Option<crate::model::ErrorMessage>) -> Self {
|
1345 + | self.message = input;
|
1346 + | self
|
1347 + | }
|
1348 + | /// Consumes the builder and constructs a [`ConflictException`](crate::error::ConflictException).
|
1349 + | pub fn build(self) -> crate::error::ConflictException {
|
1350 + | self.build_enforcing_all_constraints()
|
1351 + | }
|
1352 + | fn build_enforcing_all_constraints(self) -> crate::error::ConflictException {
|
1353 + | crate::error::ConflictException {
|
1354 + | message: self.message,
|
1355 + | }
|
1356 + | }
|
1357 + | }
|
1358 + | }
|
1359 + | /// See [`AccessDeniedException`](crate::error::AccessDeniedException).
|
1360 + | pub mod access_denied_exception {
|
1361 + |
|
1362 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1363 + | /// Holds one variant for each of the ways the builder can fail.
|
1364 + | #[non_exhaustive]
|
1365 + | #[allow(clippy::enum_variant_names)]
|
1366 + | pub enum ConstraintViolation {
|
1367 + | /// `reason` was not provided but it is required when building `AccessDeniedException`.
|
1368 + | MissingReason,
|
1369 + | }
|
1370 + | impl ::std::fmt::Display for ConstraintViolation {
|
1371 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1372 + | match self {
|
1373 + | ConstraintViolation::MissingReason => write!(f, "`reason` was not provided but it is required when building `AccessDeniedException`"),
|
1374 + | }
|
1375 + | }
|
1376 + | }
|
1377 + | impl ::std::error::Error for ConstraintViolation {}
|
1378 + | impl ::std::convert::TryFrom<Builder> for crate::error::AccessDeniedException {
|
1379 + | type Error = ConstraintViolation;
|
1380 + |
|
1381 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1382 + | builder.build()
|
1383 + | }
|
1384 + | }
|
1385 + | /// A builder for [`AccessDeniedException`](crate::error::AccessDeniedException).
|
1386 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1387 + | pub struct Builder {
|
1388 + | pub(crate) message: ::std::option::Option<crate::model::ErrorMessage>,
|
1389 + | pub(crate) reason: ::std::option::Option<crate::model::AccessDeniedExceptionReason>,
|
1390 + | }
|
1391 + | impl Builder {
|
1392 + | #[allow(missing_docs)] // documentation missing in model
|
1393 + | pub fn message(mut self, input: ::std::option::Option<crate::model::ErrorMessage>) -> Self {
|
1394 + | self.message = input;
|
1395 + | self
|
1396 + | }
|
1397 + | /// <p>The reason for the exception.</p>
|
1398 + | pub fn reason(mut self, input: crate::model::AccessDeniedExceptionReason) -> Self {
|
1399 + | self.reason = Some(input);
|
1400 + | self
|
1401 + | }
|
1402 + | /// Consumes the builder and constructs a [`AccessDeniedException`](crate::error::AccessDeniedException).
|
1403 + | ///
|
1404 + | /// The builder fails to construct a [`AccessDeniedException`](crate::error::AccessDeniedException) if a [`ConstraintViolation`] occurs.
|
1405 + | ///
|
1406 + | pub fn build(self) -> Result<crate::error::AccessDeniedException, ConstraintViolation> {
|
1407 + | self.build_enforcing_all_constraints()
|
1408 + | }
|
1409 + | fn build_enforcing_all_constraints(
|
1410 + | self,
|
1411 + | ) -> Result<crate::error::AccessDeniedException, ConstraintViolation> {
|
1412 + | Ok(crate::error::AccessDeniedException {
|
1413 + | message: self.message,
|
1414 + | reason: self.reason.ok_or(ConstraintViolation::MissingReason)?,
|
1415 + | })
|
1416 + | }
|
1417 + | }
|
1418 + | }
|
1419 + | /// See [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
1420 + | pub mod resource_not_found_exception {
|
1421 + |
|
1422 + | impl ::std::convert::From<Builder> for crate::error::ResourceNotFoundException {
|
1423 + | fn from(builder: Builder) -> Self {
|
1424 + | builder.build()
|
1425 + | }
|
1426 + | }
|
1427 + | /// A builder for [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
1428 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1429 + | pub struct Builder {
|
1430 + | pub(crate) message: ::std::option::Option<crate::model::ErrorMessage>,
|
1431 + | pub(crate) reason: ::std::option::Option<crate::model::ResourceNotFoundExceptionReason>,
|
1432 + | }
|
1433 + | impl Builder {
|
1434 + | #[allow(missing_docs)] // documentation missing in model
|
1435 + | pub fn message(mut self, input: ::std::option::Option<crate::model::ErrorMessage>) -> Self {
|
1436 + | self.message = input;
|
1437 + | self
|
1438 + | }
|
1439 + | /// <p>The reason for the exception.</p>
|
1440 + | pub fn reason(
|
1441 + | mut self,
|
1442 + | input: ::std::option::Option<crate::model::ResourceNotFoundExceptionReason>,
|
1443 + | ) -> Self {
|
1444 + | self.reason = input;
|
1445 + | self
|
1446 + | }
|
1447 + | /// Consumes the builder and constructs a [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
1448 + | pub fn build(self) -> crate::error::ResourceNotFoundException {
|
1449 + | self.build_enforcing_all_constraints()
|
1450 + | }
|
1451 + | fn build_enforcing_all_constraints(self) -> crate::error::ResourceNotFoundException {
|
1452 + | crate::error::ResourceNotFoundException {
|
1453 + | message: self.message,
|
1454 + | reason: self.reason,
|
1455 + | }
|
1456 + | }
|
1457 + | }
|
1458 + | }
|
1459 + | /// See [`InternalServerException`](crate::error::InternalServerException).
|
1460 + | pub mod internal_server_exception {
|
1461 + |
|
1462 + | impl ::std::convert::From<Builder> for crate::error::InternalServerException {
|
1463 + | fn from(builder: Builder) -> Self {
|
1464 + | builder.build()
|
1465 + | }
|
1466 + | }
|
1467 + | /// A builder for [`InternalServerException`](crate::error::InternalServerException).
|
1468 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1469 + | pub struct Builder {
|
1470 + | pub(crate) message: ::std::option::Option<crate::model::ErrorMessage>,
|
1471 + | }
|
1472 + | impl Builder {
|
1473 + | #[allow(missing_docs)] // documentation missing in model
|
1474 + | pub fn message(mut self, input: ::std::option::Option<crate::model::ErrorMessage>) -> Self {
|
1475 + | self.message = input;
|
1476 + | self
|
1477 + | }
|
1478 + | /// Consumes the builder and constructs a [`InternalServerException`](crate::error::InternalServerException).
|
1479 + | pub fn build(self) -> crate::error::InternalServerException {
|
1480 + | self.build_enforcing_all_constraints()
|
1481 + | }
|
1482 + | fn build_enforcing_all_constraints(self) -> crate::error::InternalServerException {
|
1483 + | crate::error::InternalServerException {
|
1484 + | message: self.message,
|
1485 + | }
|
1486 + | }
|
1487 + | }
|
1488 + | }
|