1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 EngineNotSupportedException(crate::types::error::EngineNotSupportedException),
8 InvalidLexiconException(crate::types::error::InvalidLexiconException),
10 InvalidNextTokenException(crate::types::error::InvalidNextTokenException),
12 InvalidS3BucketException(crate::types::error::InvalidS3BucketException),
14 InvalidS3KeyException(crate::types::error::InvalidS3KeyException),
16 InvalidSampleRateException(crate::types::error::InvalidSampleRateException),
18 InvalidSnsTopicArnException(crate::types::error::InvalidSnsTopicArnException),
20 InvalidSsmlException(crate::types::error::InvalidSsmlException),
22 InvalidTaskIdException(crate::types::error::InvalidTaskIdException),
24 LanguageNotSupportedException(crate::types::error::LanguageNotSupportedException),
26 LexiconNotFoundException(crate::types::error::LexiconNotFoundException),
29 LexiconSizeExceededException(crate::types::error::LexiconSizeExceededException),
31 MarksNotSupportedForFormatException(crate::types::error::MarksNotSupportedForFormatException),
33 MaxLexemeLengthExceededException(crate::types::error::MaxLexemeLengthExceededException),
35 MaxLexiconsNumberExceededException(crate::types::error::MaxLexiconsNumberExceededException),
37 ServiceFailureException(crate::types::error::ServiceFailureException),
39 SsmlMarksNotSupportedForTextTypeException(crate::types::error::SsmlMarksNotSupportedForTextTypeException),
41 SynthesisTaskNotFoundException(crate::types::error::SynthesisTaskNotFoundException),
43 TextLengthExceededException(crate::types::error::TextLengthExceededException),
45 UnsupportedPlsAlphabetException(crate::types::error::UnsupportedPlsAlphabetException),
47 UnsupportedPlsLanguageException(crate::types::error::UnsupportedPlsLanguageException),
49 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
51 variable wildcard pattern and check `.code()`:
52 \
53 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
54 \
55 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
56 Unhandled(crate::error::sealed_unhandled::Unhandled),
57}
58impl ::std::fmt::Display for Error {
59 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
60 match self {
61 Error::EngineNotSupportedException(inner) => inner.fmt(f),
62 Error::InvalidLexiconException(inner) => inner.fmt(f),
63 Error::InvalidNextTokenException(inner) => inner.fmt(f),
64 Error::InvalidS3BucketException(inner) => inner.fmt(f),
65 Error::InvalidS3KeyException(inner) => inner.fmt(f),
66 Error::InvalidSampleRateException(inner) => inner.fmt(f),
67 Error::InvalidSnsTopicArnException(inner) => inner.fmt(f),
68 Error::InvalidSsmlException(inner) => inner.fmt(f),
69 Error::InvalidTaskIdException(inner) => inner.fmt(f),
70 Error::LanguageNotSupportedException(inner) => inner.fmt(f),
71 Error::LexiconNotFoundException(inner) => inner.fmt(f),
72 Error::LexiconSizeExceededException(inner) => inner.fmt(f),
73 Error::MarksNotSupportedForFormatException(inner) => inner.fmt(f),
74 Error::MaxLexemeLengthExceededException(inner) => inner.fmt(f),
75 Error::MaxLexiconsNumberExceededException(inner) => inner.fmt(f),
76 Error::ServiceFailureException(inner) => inner.fmt(f),
77 Error::SsmlMarksNotSupportedForTextTypeException(inner) => inner.fmt(f),
78 Error::SynthesisTaskNotFoundException(inner) => inner.fmt(f),
79 Error::TextLengthExceededException(inner) => inner.fmt(f),
80 Error::UnsupportedPlsAlphabetException(inner) => inner.fmt(f),
81 Error::UnsupportedPlsLanguageException(inner) => inner.fmt(f),
82 Error::Unhandled(_) => {
83 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
84 write!(f, "unhandled error ({code})")
85 } else {
86 f.write_str("unhandled error")
87 }
88 }
89 }
90 }
91}
92impl From<::aws_smithy_types::error::operation::BuildError> for Error {
93 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
94 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
95 source: value.into(),
96 meta: ::std::default::Default::default(),
97 })
98 }
99}
100impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
101 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
102 match self {
103 Self::EngineNotSupportedException(inner) => inner.meta(),
104 Self::InvalidLexiconException(inner) => inner.meta(),
105 Self::InvalidNextTokenException(inner) => inner.meta(),
106 Self::InvalidS3BucketException(inner) => inner.meta(),
107 Self::InvalidS3KeyException(inner) => inner.meta(),
108 Self::InvalidSampleRateException(inner) => inner.meta(),
109 Self::InvalidSnsTopicArnException(inner) => inner.meta(),
110 Self::InvalidSsmlException(inner) => inner.meta(),
111 Self::InvalidTaskIdException(inner) => inner.meta(),
112 Self::LanguageNotSupportedException(inner) => inner.meta(),
113 Self::LexiconNotFoundException(inner) => inner.meta(),
114 Self::LexiconSizeExceededException(inner) => inner.meta(),
115 Self::MarksNotSupportedForFormatException(inner) => inner.meta(),
116 Self::MaxLexemeLengthExceededException(inner) => inner.meta(),
117 Self::MaxLexiconsNumberExceededException(inner) => inner.meta(),
118 Self::ServiceFailureException(inner) => inner.meta(),
119 Self::SsmlMarksNotSupportedForTextTypeException(inner) => inner.meta(),
120 Self::SynthesisTaskNotFoundException(inner) => inner.meta(),
121 Self::TextLengthExceededException(inner) => inner.meta(),
122 Self::UnsupportedPlsAlphabetException(inner) => inner.meta(),
123 Self::UnsupportedPlsLanguageException(inner) => inner.meta(),
124 Self::Unhandled(inner) => &inner.meta,
125 }
126 }
127}
128impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_lexicon::DeleteLexiconError, R>> for Error
129where
130 R: Send + Sync + std::fmt::Debug + 'static,
131{
132 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_lexicon::DeleteLexiconError, R>) -> Self {
133 match err {
134 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
135 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
136 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
137 source: err.into(),
138 }),
139 }
140 }
141}
142impl From<crate::operation::delete_lexicon::DeleteLexiconError> for Error {
143 fn from(err: crate::operation::delete_lexicon::DeleteLexiconError) -> Self {
144 match err {
145 crate::operation::delete_lexicon::DeleteLexiconError::LexiconNotFoundException(inner) => Error::LexiconNotFoundException(inner),
146 crate::operation::delete_lexicon::DeleteLexiconError::ServiceFailureException(inner) => Error::ServiceFailureException(inner),
147 crate::operation::delete_lexicon::DeleteLexiconError::Unhandled(inner) => Error::Unhandled(inner),
148 }
149 }
150}
151impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_voices::DescribeVoicesError, R>> for Error
152where
153 R: Send + Sync + std::fmt::Debug + 'static,
154{
155 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_voices::DescribeVoicesError, R>) -> Self {
156 match err {
157 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
158 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
159 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
160 source: err.into(),
161 }),
162 }
163 }
164}
165impl From<crate::operation::describe_voices::DescribeVoicesError> for Error {
166 fn from(err: crate::operation::describe_voices::DescribeVoicesError) -> Self {
167 match err {
168 crate::operation::describe_voices::DescribeVoicesError::InvalidNextTokenException(inner) => Error::InvalidNextTokenException(inner),
169 crate::operation::describe_voices::DescribeVoicesError::ServiceFailureException(inner) => Error::ServiceFailureException(inner),
170 crate::operation::describe_voices::DescribeVoicesError::Unhandled(inner) => Error::Unhandled(inner),
171 }
172 }
173}
174impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_lexicon::GetLexiconError, R>> for Error
175where
176 R: Send + Sync + std::fmt::Debug + 'static,
177{
178 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_lexicon::GetLexiconError, R>) -> Self {
179 match err {
180 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
181 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
182 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
183 source: err.into(),
184 }),
185 }
186 }
187}
188impl From<crate::operation::get_lexicon::GetLexiconError> for Error {
189 fn from(err: crate::operation::get_lexicon::GetLexiconError) -> Self {
190 match err {
191 crate::operation::get_lexicon::GetLexiconError::LexiconNotFoundException(inner) => Error::LexiconNotFoundException(inner),
192 crate::operation::get_lexicon::GetLexiconError::ServiceFailureException(inner) => Error::ServiceFailureException(inner),
193 crate::operation::get_lexicon::GetLexiconError::Unhandled(inner) => Error::Unhandled(inner),
194 }
195 }
196}
197impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskError, R>>
198 for Error
199where
200 R: Send + Sync + std::fmt::Debug + 'static,
201{
202 fn from(
203 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskError, R>,
204 ) -> Self {
205 match err {
206 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
207 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
208 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
209 source: err.into(),
210 }),
211 }
212 }
213}
214impl From<crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskError> for Error {
215 fn from(err: crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskError) -> Self {
216 match err {
217 crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskError::InvalidTaskIdException(inner) => {
218 Error::InvalidTaskIdException(inner)
219 }
220 crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskError::ServiceFailureException(inner) => {
221 Error::ServiceFailureException(inner)
222 }
223 crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskError::SynthesisTaskNotFoundException(inner) => {
224 Error::SynthesisTaskNotFoundException(inner)
225 }
226 crate::operation::get_speech_synthesis_task::GetSpeechSynthesisTaskError::Unhandled(inner) => Error::Unhandled(inner),
227 }
228 }
229}
230impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_lexicons::ListLexiconsError, R>> for Error
231where
232 R: Send + Sync + std::fmt::Debug + 'static,
233{
234 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_lexicons::ListLexiconsError, R>) -> Self {
235 match err {
236 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
237 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
238 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
239 source: err.into(),
240 }),
241 }
242 }
243}
244impl From<crate::operation::list_lexicons::ListLexiconsError> for Error {
245 fn from(err: crate::operation::list_lexicons::ListLexiconsError) -> Self {
246 match err {
247 crate::operation::list_lexicons::ListLexiconsError::InvalidNextTokenException(inner) => Error::InvalidNextTokenException(inner),
248 crate::operation::list_lexicons::ListLexiconsError::ServiceFailureException(inner) => Error::ServiceFailureException(inner),
249 crate::operation::list_lexicons::ListLexiconsError::Unhandled(inner) => Error::Unhandled(inner),
250 }
251 }
252}
253impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError, R>>
254 for Error
255where
256 R: Send + Sync + std::fmt::Debug + 'static,
257{
258 fn from(
259 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError, R>,
260 ) -> Self {
261 match err {
262 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
263 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
264 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
265 source: err.into(),
266 }),
267 }
268 }
269}
270impl From<crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError> for Error {
271 fn from(err: crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError) -> Self {
272 match err {
273 crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError::InvalidNextTokenException(inner) => {
274 Error::InvalidNextTokenException(inner)
275 }
276 crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError::ServiceFailureException(inner) => {
277 Error::ServiceFailureException(inner)
278 }
279 crate::operation::list_speech_synthesis_tasks::ListSpeechSynthesisTasksError::Unhandled(inner) => Error::Unhandled(inner),
280 }
281 }
282}
283impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_lexicon::PutLexiconError, R>> for Error
284where
285 R: Send + Sync + std::fmt::Debug + 'static,
286{
287 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_lexicon::PutLexiconError, R>) -> Self {
288 match err {
289 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
290 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
291 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
292 source: err.into(),
293 }),
294 }
295 }
296}
297impl From<crate::operation::put_lexicon::PutLexiconError> for Error {
298 fn from(err: crate::operation::put_lexicon::PutLexiconError) -> Self {
299 match err {
300 crate::operation::put_lexicon::PutLexiconError::InvalidLexiconException(inner) => Error::InvalidLexiconException(inner),
301 crate::operation::put_lexicon::PutLexiconError::LexiconSizeExceededException(inner) => Error::LexiconSizeExceededException(inner),
302 crate::operation::put_lexicon::PutLexiconError::MaxLexemeLengthExceededException(inner) => Error::MaxLexemeLengthExceededException(inner),
303 crate::operation::put_lexicon::PutLexiconError::MaxLexiconsNumberExceededException(inner) => {
304 Error::MaxLexiconsNumberExceededException(inner)
305 }
306 crate::operation::put_lexicon::PutLexiconError::ServiceFailureException(inner) => Error::ServiceFailureException(inner),
307 crate::operation::put_lexicon::PutLexiconError::UnsupportedPlsAlphabetException(inner) => Error::UnsupportedPlsAlphabetException(inner),
308 crate::operation::put_lexicon::PutLexiconError::UnsupportedPlsLanguageException(inner) => Error::UnsupportedPlsLanguageException(inner),
309 crate::operation::put_lexicon::PutLexiconError::Unhandled(inner) => Error::Unhandled(inner),
310 }
311 }
312}
313impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError, R>>
314 for Error
315where
316 R: Send + Sync + std::fmt::Debug + 'static,
317{
318 fn from(
319 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError, R>,
320 ) -> Self {
321 match err {
322 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
323 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
324 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
325 source: err.into(),
326 }),
327 }
328 }
329}
330impl From<crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError> for Error {
331 fn from(err: crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError) -> Self {
332 match err {
333 crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::EngineNotSupportedException(inner) => {
334 Error::EngineNotSupportedException(inner)
335 }
336 crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::InvalidS3BucketException(inner) => {
337 Error::InvalidS3BucketException(inner)
338 }
339 crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::InvalidS3KeyException(inner) => {
340 Error::InvalidS3KeyException(inner)
341 }
342 crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::InvalidSampleRateException(inner) => {
343 Error::InvalidSampleRateException(inner)
344 }
345 crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::InvalidSnsTopicArnException(inner) => {
346 Error::InvalidSnsTopicArnException(inner)
347 }
348 crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::InvalidSsmlException(inner) => {
349 Error::InvalidSsmlException(inner)
350 }
351 crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::LanguageNotSupportedException(inner) => {
352 Error::LanguageNotSupportedException(inner)
353 }
354 crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::LexiconNotFoundException(inner) => {
355 Error::LexiconNotFoundException(inner)
356 }
357 crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::MarksNotSupportedForFormatException(inner) => {
358 Error::MarksNotSupportedForFormatException(inner)
359 }
360 crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::ServiceFailureException(inner) => {
361 Error::ServiceFailureException(inner)
362 }
363 crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::SsmlMarksNotSupportedForTextTypeException(inner) => {
364 Error::SsmlMarksNotSupportedForTextTypeException(inner)
365 }
366 crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::TextLengthExceededException(inner) => {
367 Error::TextLengthExceededException(inner)
368 }
369 crate::operation::start_speech_synthesis_task::StartSpeechSynthesisTaskError::Unhandled(inner) => Error::Unhandled(inner),
370 }
371 }
372}
373impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::synthesize_speech::SynthesizeSpeechError, R>> for Error
374where
375 R: Send + Sync + std::fmt::Debug + 'static,
376{
377 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::synthesize_speech::SynthesizeSpeechError, R>) -> Self {
378 match err {
379 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
380 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
381 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
382 source: err.into(),
383 }),
384 }
385 }
386}
387impl From<crate::operation::synthesize_speech::SynthesizeSpeechError> for Error {
388 fn from(err: crate::operation::synthesize_speech::SynthesizeSpeechError) -> Self {
389 match err {
390 crate::operation::synthesize_speech::SynthesizeSpeechError::EngineNotSupportedException(inner) => {
391 Error::EngineNotSupportedException(inner)
392 }
393 crate::operation::synthesize_speech::SynthesizeSpeechError::InvalidSampleRateException(inner) => Error::InvalidSampleRateException(inner),
394 crate::operation::synthesize_speech::SynthesizeSpeechError::InvalidSsmlException(inner) => Error::InvalidSsmlException(inner),
395 crate::operation::synthesize_speech::SynthesizeSpeechError::LanguageNotSupportedException(inner) => {
396 Error::LanguageNotSupportedException(inner)
397 }
398 crate::operation::synthesize_speech::SynthesizeSpeechError::LexiconNotFoundException(inner) => Error::LexiconNotFoundException(inner),
399 crate::operation::synthesize_speech::SynthesizeSpeechError::MarksNotSupportedForFormatException(inner) => {
400 Error::MarksNotSupportedForFormatException(inner)
401 }
402 crate::operation::synthesize_speech::SynthesizeSpeechError::ServiceFailureException(inner) => Error::ServiceFailureException(inner),
403 crate::operation::synthesize_speech::SynthesizeSpeechError::SsmlMarksNotSupportedForTextTypeException(inner) => {
404 Error::SsmlMarksNotSupportedForTextTypeException(inner)
405 }
406 crate::operation::synthesize_speech::SynthesizeSpeechError::TextLengthExceededException(inner) => {
407 Error::TextLengthExceededException(inner)
408 }
409 crate::operation::synthesize_speech::SynthesizeSpeechError::Unhandled(inner) => Error::Unhandled(inner),
410 }
411 }
412}
413impl ::std::error::Error for Error {
414 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
415 match self {
416 Error::EngineNotSupportedException(inner) => inner.source(),
417 Error::InvalidLexiconException(inner) => inner.source(),
418 Error::InvalidNextTokenException(inner) => inner.source(),
419 Error::InvalidS3BucketException(inner) => inner.source(),
420 Error::InvalidS3KeyException(inner) => inner.source(),
421 Error::InvalidSampleRateException(inner) => inner.source(),
422 Error::InvalidSnsTopicArnException(inner) => inner.source(),
423 Error::InvalidSsmlException(inner) => inner.source(),
424 Error::InvalidTaskIdException(inner) => inner.source(),
425 Error::LanguageNotSupportedException(inner) => inner.source(),
426 Error::LexiconNotFoundException(inner) => inner.source(),
427 Error::LexiconSizeExceededException(inner) => inner.source(),
428 Error::MarksNotSupportedForFormatException(inner) => inner.source(),
429 Error::MaxLexemeLengthExceededException(inner) => inner.source(),
430 Error::MaxLexiconsNumberExceededException(inner) => inner.source(),
431 Error::ServiceFailureException(inner) => inner.source(),
432 Error::SsmlMarksNotSupportedForTextTypeException(inner) => inner.source(),
433 Error::SynthesisTaskNotFoundException(inner) => inner.source(),
434 Error::TextLengthExceededException(inner) => inner.source(),
435 Error::UnsupportedPlsAlphabetException(inner) => inner.source(),
436 Error::UnsupportedPlsLanguageException(inner) => inner.source(),
437 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
438 }
439 }
440}
441impl ::aws_types::request_id::RequestId for Error {
442 fn request_id(&self) -> Option<&str> {
443 match self {
444 Self::EngineNotSupportedException(e) => e.request_id(),
445 Self::InvalidLexiconException(e) => e.request_id(),
446 Self::InvalidNextTokenException(e) => e.request_id(),
447 Self::InvalidS3BucketException(e) => e.request_id(),
448 Self::InvalidS3KeyException(e) => e.request_id(),
449 Self::InvalidSampleRateException(e) => e.request_id(),
450 Self::InvalidSnsTopicArnException(e) => e.request_id(),
451 Self::InvalidSsmlException(e) => e.request_id(),
452 Self::InvalidTaskIdException(e) => e.request_id(),
453 Self::LanguageNotSupportedException(e) => e.request_id(),
454 Self::LexiconNotFoundException(e) => e.request_id(),
455 Self::LexiconSizeExceededException(e) => e.request_id(),
456 Self::MarksNotSupportedForFormatException(e) => e.request_id(),
457 Self::MaxLexemeLengthExceededException(e) => e.request_id(),
458 Self::MaxLexiconsNumberExceededException(e) => e.request_id(),
459 Self::ServiceFailureException(e) => e.request_id(),
460 Self::SsmlMarksNotSupportedForTextTypeException(e) => e.request_id(),
461 Self::SynthesisTaskNotFoundException(e) => e.request_id(),
462 Self::TextLengthExceededException(e) => e.request_id(),
463 Self::UnsupportedPlsAlphabetException(e) => e.request_id(),
464 Self::UnsupportedPlsLanguageException(e) => e.request_id(),
465 Self::Unhandled(e) => e.meta.request_id(),
466 }
467 }
468}