1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - | pub use crate::types::error::_service_unavailable_exception::ServiceUnavailableException;
|
2 + | pub use crate::types::error::_bad_request_exception::BadRequestException;
|
3 + |
|
4 + | pub use crate::types::error::_internal_failure_exception::InternalFailureException;
|
3 5 |
|
4 6 | pub use crate::types::error::_limit_exceeded_exception::LimitExceededException;
|
5 7 |
|
6 - | pub use crate::types::error::_internal_failure_exception::InternalFailureException;
|
8 + | pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundException;
|
7 9 |
|
8 10 | pub use crate::types::error::_conflict_exception::ConflictException;
|
9 11 |
|
10 - | pub use crate::types::error::_bad_request_exception::BadRequestException;
|
12 + | pub use crate::types::error::_service_unavailable_exception::ServiceUnavailableException;
|
11 13 |
|
12 - | /// Error type for the `TranscriptResultStreamError` operation.
|
14 + | /// Error type for the `AudioStreamError` operation.
|
13 15 | #[non_exhaustive]
|
14 16 | #[derive(::std::fmt::Debug)]
|
15 - | pub enum TranscriptResultStreamError {
|
16 - | /// <p>One or more arguments to the <code>StartStreamTranscription</code>, <code>StartMedicalStreamTranscription</code>, or <code>StartCallAnalyticsStreamTranscription</code> operation was not valid. For example, <code>MediaEncoding</code> or <code>LanguageCode</code> used unsupported values. Check the specified parameters and try your request again.</p>
|
17 - | BadRequestException(crate::types::error::BadRequestException),
|
18 - | /// <p>Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length limit. Break your audio stream into smaller chunks and try your request again.</p>
|
19 - | LimitExceededException(crate::types::error::LimitExceededException),
|
20 - | /// <p>A problem occurred while processing the audio. Amazon Transcribe terminated processing.</p>
|
21 - | InternalFailureException(crate::types::error::InternalFailureException),
|
22 - | /// <p>A new stream started with the same session ID. The current stream has been terminated.</p>
|
23 - | ConflictException(crate::types::error::ConflictException),
|
24 - | /// <p>The service is currently unavailable. Try your request later.</p>
|
25 - | ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
|
17 + | pub enum AudioStreamError {
|
26 18 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
27 19 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
28 20 | variable wildcard pattern and check `.code()`:
|
29 21 | \
|
30 22 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
31 23 | \
|
32 - | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-TranscriptResultStreamError) for what information is available for the error.")]
|
24 + | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-AudioStreamError) for what information is available for the error.")]
|
33 25 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
34 26 | }
|
35 - | impl TranscriptResultStreamError {
|
36 - | /// Creates the `TranscriptResultStreamError::Unhandled` variant from any error type.
|
27 + | impl AudioStreamError {
|
28 + | /// Creates the `AudioStreamError::Unhandled` variant from any error type.
|
37 29 | pub fn unhandled(
|
38 30 | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
39 31 | ) -> Self {
|
40 32 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
41 33 | source: err.into(),
|
42 34 | meta: ::std::default::Default::default(),
|
43 35 | })
|
44 36 | }
|
45 37 |
|
46 - | /// Creates the `TranscriptResultStreamError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
38 + | /// Creates the `AudioStreamError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
47 39 | pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
48 40 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
49 41 | source: err.clone().into(),
|
50 42 | meta: err,
|
51 43 | })
|
52 44 | }
|
53 45 | ///
|
54 46 | /// Returns error metadata, which includes the error code, message,
|
55 47 | /// request ID, and potentially additional information.
|
56 48 | ///
|
57 49 | pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
58 50 | match self {
|
59 - | Self::BadRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
60 - | Self::LimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
61 - | Self::InternalFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
62 - | Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
63 - | Self::ServiceUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
64 51 | Self::Unhandled(e) => &e.meta,
|
65 52 | }
|
66 53 | }
|
67 - | /// Returns `true` if the error kind is `TranscriptResultStreamError::BadRequestException`.
|
68 - | pub fn is_bad_request_exception(&self) -> bool {
|
69 - | matches!(self, Self::BadRequestException(_))
|
70 - | }
|
71 - | /// Returns `true` if the error kind is `TranscriptResultStreamError::LimitExceededException`.
|
72 - | pub fn is_limit_exceeded_exception(&self) -> bool {
|
73 - | matches!(self, Self::LimitExceededException(_))
|
74 - | }
|
75 - | /// Returns `true` if the error kind is `TranscriptResultStreamError::InternalFailureException`.
|
76 - | pub fn is_internal_failure_exception(&self) -> bool {
|
77 - | matches!(self, Self::InternalFailureException(_))
|
78 - | }
|
79 - | /// Returns `true` if the error kind is `TranscriptResultStreamError::ConflictException`.
|
80 - | pub fn is_conflict_exception(&self) -> bool {
|
81 - | matches!(self, Self::ConflictException(_))
|
82 - | }
|
83 - | /// Returns `true` if the error kind is `TranscriptResultStreamError::ServiceUnavailableException`.
|
84 - | pub fn is_service_unavailable_exception(&self) -> bool {
|
85 - | matches!(self, Self::ServiceUnavailableException(_))
|
86 - | }
|
87 54 | }
|
88 - | impl ::std::error::Error for TranscriptResultStreamError {
|
55 + | impl ::std::error::Error for AudioStreamError {
|
89 56 | fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
90 57 | match self {
|
91 - | Self::BadRequestException(_inner) => ::std::option::Option::Some(_inner),
|
92 - | Self::LimitExceededException(_inner) => ::std::option::Option::Some(_inner),
|
93 - | Self::InternalFailureException(_inner) => ::std::option::Option::Some(_inner),
|
94 - | Self::ConflictException(_inner) => ::std::option::Option::Some(_inner),
|
95 - | Self::ServiceUnavailableException(_inner) => ::std::option::Option::Some(_inner),
|
96 58 | Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
|
97 59 | }
|
98 60 | }
|
99 61 | }
|
100 - | impl ::std::fmt::Display for TranscriptResultStreamError {
|
62 + | impl ::std::fmt::Display for AudioStreamError {
|
101 63 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
102 64 | match self {
|
103 - | Self::BadRequestException(_inner) => _inner.fmt(f),
|
104 - | Self::LimitExceededException(_inner) => _inner.fmt(f),
|
105 - | Self::InternalFailureException(_inner) => _inner.fmt(f),
|
106 - | Self::ConflictException(_inner) => _inner.fmt(f),
|
107 - | Self::ServiceUnavailableException(_inner) => _inner.fmt(f),
|
108 65 | Self::Unhandled(_inner) => {
|
109 66 | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
110 67 | write!(f, "unhandled error ({code})")
|
111 68 | } else {
|
112 69 | f.write_str("unhandled error")
|
113 70 | }
|
114 71 | }
|
115 72 | }
|
116 73 | }
|
117 74 | }
|
118 - | impl ::aws_smithy_types::retry::ProvideErrorKind for TranscriptResultStreamError {
|
75 + | impl ::aws_smithy_types::retry::ProvideErrorKind for AudioStreamError {
|
119 76 | fn code(&self) -> ::std::option::Option<&str> {
|
120 77 | ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
|
121 78 | }
|
122 79 | fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
|
123 80 | ::std::option::Option::None
|
124 81 | }
|
125 82 | }
|
126 - | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for TranscriptResultStreamError {
|
83 + | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for AudioStreamError {
|
127 84 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
128 85 | match self {
|
129 - | Self::BadRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
130 - | Self::LimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
131 - | Self::InternalFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
132 - | Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
133 - | Self::ServiceUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
134 86 | Self::Unhandled(_inner) => &_inner.meta,
|
135 87 | }
|
136 88 | }
|
137 89 | }
|
138 - | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for TranscriptResultStreamError {
|
90 + | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for AudioStreamError {
|
139 91 | fn create_unhandled_error(
|
140 92 | source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
|
141 93 | meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
142 94 | ) -> Self {
|
143 95 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
144 96 | source,
|
145 97 | meta: meta.unwrap_or_default(),
|
146 98 | })
|
147 99 | }
|
148 100 | }
|
149 - | impl ::aws_types::request_id::RequestId for crate::types::error::TranscriptResultStreamError {
|
101 + | impl ::aws_types::request_id::RequestId for crate::types::error::AudioStreamError {
|
150 102 | fn request_id(&self) -> Option<&str> {
|
151 103 | self.meta().request_id()
|
152 104 | }
|
153 105 | }
|
154 106 |
|
155 - | /// Error type for the `AudioStreamError` operation.
|
107 + | /// Error type for the `CallAnalyticsTranscriptResultStreamError` operation.
|
156 108 | #[non_exhaustive]
|
157 109 | #[derive(::std::fmt::Debug)]
|
158 - | pub enum AudioStreamError {
|
110 + | pub enum CallAnalyticsTranscriptResultStreamError {
|
111 + | /// <p>One or more arguments to the <code>StartStreamTranscription</code>, <code>StartMedicalStreamTranscription</code>, or <code>StartCallAnalyticsStreamTranscription</code> operation was not valid. For example, <code>MediaEncoding</code> or <code>LanguageCode</code> used unsupported values. Check the specified parameters and try your request again.</p>
|
112 + | BadRequestException(crate::types::error::BadRequestException),
|
113 + | /// <p>Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length limit. Break your audio stream into smaller chunks and try your request again.</p>
|
114 + | LimitExceededException(crate::types::error::LimitExceededException),
|
115 + | /// <p>A problem occurred while processing the audio. Amazon Transcribe terminated processing.</p>
|
116 + | InternalFailureException(crate::types::error::InternalFailureException),
|
117 + | /// <p>A new stream started with the same session ID. The current stream has been terminated.</p>
|
118 + | ConflictException(crate::types::error::ConflictException),
|
119 + | /// <p>The service is currently unavailable. Try your request later.</p>
|
120 + | ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
|
159 121 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
160 122 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
161 123 | variable wildcard pattern and check `.code()`:
|
162 124 | \
|
163 125 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
164 126 | \
|
165 - | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-AudioStreamError) for what information is available for the error.")]
|
127 + | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CallAnalyticsTranscriptResultStreamError) for what information is available for the error.")]
|
166 128 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
167 129 | }
|
168 - | impl AudioStreamError {
|
169 - | /// Creates the `AudioStreamError::Unhandled` variant from any error type.
|
130 + | impl CallAnalyticsTranscriptResultStreamError {
|
131 + | /// Creates the `CallAnalyticsTranscriptResultStreamError::Unhandled` variant from any error type.
|
170 132 | pub fn unhandled(
|
171 133 | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
172 134 | ) -> Self {
|
173 135 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
174 136 | source: err.into(),
|
175 137 | meta: ::std::default::Default::default(),
|
176 138 | })
|
177 139 | }
|
178 140 |
|
179 - | /// Creates the `AudioStreamError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
141 + | /// Creates the `CallAnalyticsTranscriptResultStreamError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
180 142 | pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
181 143 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
182 144 | source: err.clone().into(),
|
183 145 | meta: err,
|
184 146 | })
|
185 147 | }
|
186 148 | ///
|
187 149 | /// Returns error metadata, which includes the error code, message,
|
188 150 | /// request ID, and potentially additional information.
|
189 151 | ///
|
190 152 | pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
191 153 | match self {
|
154 + | Self::BadRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
155 + | Self::LimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
156 + | Self::InternalFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
157 + | Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
158 + | Self::ServiceUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
192 159 | Self::Unhandled(e) => &e.meta,
|
193 160 | }
|
194 161 | }
|
162 + | /// Returns `true` if the error kind is `CallAnalyticsTranscriptResultStreamError::BadRequestException`.
|
163 + | pub fn is_bad_request_exception(&self) -> bool {
|
164 + | matches!(self, Self::BadRequestException(_))
|
165 + | }
|
166 + | /// Returns `true` if the error kind is `CallAnalyticsTranscriptResultStreamError::LimitExceededException`.
|
167 + | pub fn is_limit_exceeded_exception(&self) -> bool {
|
168 + | matches!(self, Self::LimitExceededException(_))
|
169 + | }
|
170 + | /// Returns `true` if the error kind is `CallAnalyticsTranscriptResultStreamError::InternalFailureException`.
|
171 + | pub fn is_internal_failure_exception(&self) -> bool {
|
172 + | matches!(self, Self::InternalFailureException(_))
|
173 + | }
|
174 + | /// Returns `true` if the error kind is `CallAnalyticsTranscriptResultStreamError::ConflictException`.
|
175 + | pub fn is_conflict_exception(&self) -> bool {
|
176 + | matches!(self, Self::ConflictException(_))
|
177 + | }
|
178 + | /// Returns `true` if the error kind is `CallAnalyticsTranscriptResultStreamError::ServiceUnavailableException`.
|
179 + | pub fn is_service_unavailable_exception(&self) -> bool {
|
180 + | matches!(self, Self::ServiceUnavailableException(_))
|
181 + | }
|
195 182 | }
|
196 - | impl ::std::error::Error for AudioStreamError {
|
183 + | impl ::std::error::Error for CallAnalyticsTranscriptResultStreamError {
|
197 184 | fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
198 185 | match self {
|
186 + | Self::BadRequestException(_inner) => ::std::option::Option::Some(_inner),
|
187 + | Self::LimitExceededException(_inner) => ::std::option::Option::Some(_inner),
|
188 + | Self::InternalFailureException(_inner) => ::std::option::Option::Some(_inner),
|
189 + | Self::ConflictException(_inner) => ::std::option::Option::Some(_inner),
|
190 + | Self::ServiceUnavailableException(_inner) => ::std::option::Option::Some(_inner),
|
199 191 | Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
|
200 192 | }
|
201 193 | }
|
202 194 | }
|
203 - | impl ::std::fmt::Display for AudioStreamError {
|
195 + | impl ::std::fmt::Display for CallAnalyticsTranscriptResultStreamError {
|
204 196 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
205 197 | match self {
|
198 + | Self::BadRequestException(_inner) => _inner.fmt(f),
|
199 + | Self::LimitExceededException(_inner) => _inner.fmt(f),
|
200 + | Self::InternalFailureException(_inner) => _inner.fmt(f),
|
201 + | Self::ConflictException(_inner) => _inner.fmt(f),
|
202 + | Self::ServiceUnavailableException(_inner) => _inner.fmt(f),
|
206 203 | Self::Unhandled(_inner) => {
|
207 204 | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
208 205 | write!(f, "unhandled error ({code})")
|
209 206 | } else {
|
210 207 | f.write_str("unhandled error")
|
211 208 | }
|
212 209 | }
|
213 210 | }
|
214 211 | }
|
215 212 | }
|
216 - | impl ::aws_smithy_types::retry::ProvideErrorKind for AudioStreamError {
|
213 + | impl ::aws_smithy_types::retry::ProvideErrorKind for CallAnalyticsTranscriptResultStreamError {
|
217 214 | fn code(&self) -> ::std::option::Option<&str> {
|
218 215 | ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
|
219 216 | }
|
220 217 | fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
|
221 218 | ::std::option::Option::None
|
222 219 | }
|
223 220 | }
|
224 - | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for AudioStreamError {
|
221 + | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CallAnalyticsTranscriptResultStreamError {
|
225 222 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
226 223 | match self {
|
224 + | Self::BadRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
225 + | Self::LimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
226 + | Self::InternalFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
227 + | Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
228 + | Self::ServiceUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
227 229 | Self::Unhandled(_inner) => &_inner.meta,
|
228 230 | }
|
229 231 | }
|
230 232 | }
|
231 - | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for AudioStreamError {
|
233 + | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CallAnalyticsTranscriptResultStreamError {
|
232 234 | fn create_unhandled_error(
|
233 235 | source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
|
234 236 | meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
235 237 | ) -> Self {
|
236 238 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
237 239 | source,
|
238 240 | meta: meta.unwrap_or_default(),
|
239 241 | })
|
240 242 | }
|
241 243 | }
|
242 - | impl ::aws_types::request_id::RequestId for crate::types::error::AudioStreamError {
|
244 + | impl ::aws_types::request_id::RequestId for crate::types::error::CallAnalyticsTranscriptResultStreamError {
|
243 245 | fn request_id(&self) -> Option<&str> {
|
244 246 | self.meta().request_id()
|
245 247 | }
|
246 248 | }
|
247 249 |
|
248 - | /// Error type for the `MedicalTranscriptResultStreamError` operation.
|
250 + | /// Error type for the `MedicalScribeInputStreamError` operation.
|
249 251 | #[non_exhaustive]
|
250 252 | #[derive(::std::fmt::Debug)]
|
251 - | pub enum MedicalTranscriptResultStreamError {
|
252 - | /// <p>One or more arguments to the <code>StartStreamTranscription</code>, <code>StartMedicalStreamTranscription</code>, or <code>StartCallAnalyticsStreamTranscription</code> operation was not valid. For example, <code>MediaEncoding</code> or <code>LanguageCode</code> used unsupported values. Check the specified parameters and try your request again.</p>
|
253 - | BadRequestException(crate::types::error::BadRequestException),
|
254 - | /// <p>Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length limit. Break your audio stream into smaller chunks and try your request again.</p>
|
255 - | LimitExceededException(crate::types::error::LimitExceededException),
|
256 - | /// <p>A problem occurred while processing the audio. Amazon Transcribe terminated processing.</p>
|
257 - | InternalFailureException(crate::types::error::InternalFailureException),
|
258 - | /// <p>A new stream started with the same session ID. The current stream has been terminated.</p>
|
259 - | ConflictException(crate::types::error::ConflictException),
|
260 - | /// <p>The service is currently unavailable. Try your request later.</p>
|
261 - | ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
|
253 + | pub enum MedicalScribeInputStreamError {
|
262 254 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
263 255 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
264 256 | variable wildcard pattern and check `.code()`:
|
265 257 | \
|
266 258 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
267 259 | \
|
268 - | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-MedicalTranscriptResultStreamError) for what information is available for the error.")]
|
260 + | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-MedicalScribeInputStreamError) for what information is available for the error.")]
|
269 261 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
270 262 | }
|
271 - | impl MedicalTranscriptResultStreamError {
|
272 - | /// Creates the `MedicalTranscriptResultStreamError::Unhandled` variant from any error type.
|
263 + | impl MedicalScribeInputStreamError {
|
264 + | /// Creates the `MedicalScribeInputStreamError::Unhandled` variant from any error type.
|
273 265 | pub fn unhandled(
|
274 266 | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
275 267 | ) -> Self {
|
276 268 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
277 269 | source: err.into(),
|
278 270 | meta: ::std::default::Default::default(),
|
279 271 | })
|
280 272 | }
|
281 273 |
|
282 - | /// Creates the `MedicalTranscriptResultStreamError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
274 + | /// Creates the `MedicalScribeInputStreamError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
283 275 | pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
284 276 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
285 277 | source: err.clone().into(),
|
286 278 | meta: err,
|
287 279 | })
|
288 280 | }
|
289 281 | ///
|
290 282 | /// Returns error metadata, which includes the error code, message,
|
291 283 | /// request ID, and potentially additional information.
|
292 284 | ///
|
293 285 | pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
294 286 | match self {
|
295 - | Self::BadRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
296 - | Self::LimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
297 - | Self::InternalFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
298 - | Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
299 - | Self::ServiceUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
300 287 | Self::Unhandled(e) => &e.meta,
|
301 288 | }
|
302 289 | }
|
303 - | /// Returns `true` if the error kind is `MedicalTranscriptResultStreamError::BadRequestException`.
|
304 - | pub fn is_bad_request_exception(&self) -> bool {
|
305 - | matches!(self, Self::BadRequestException(_))
|
306 - | }
|
307 - | /// Returns `true` if the error kind is `MedicalTranscriptResultStreamError::LimitExceededException`.
|
308 - | pub fn is_limit_exceeded_exception(&self) -> bool {
|
309 - | matches!(self, Self::LimitExceededException(_))
|
310 - | }
|
311 - | /// Returns `true` if the error kind is `MedicalTranscriptResultStreamError::InternalFailureException`.
|
312 - | pub fn is_internal_failure_exception(&self) -> bool {
|
313 - | matches!(self, Self::InternalFailureException(_))
|
314 - | }
|
315 - | /// Returns `true` if the error kind is `MedicalTranscriptResultStreamError::ConflictException`.
|
316 - | pub fn is_conflict_exception(&self) -> bool {
|
317 - | matches!(self, Self::ConflictException(_))
|
318 - | }
|
319 - | /// Returns `true` if the error kind is `MedicalTranscriptResultStreamError::ServiceUnavailableException`.
|
320 - | pub fn is_service_unavailable_exception(&self) -> bool {
|
321 - | matches!(self, Self::ServiceUnavailableException(_))
|
322 - | }
|
323 290 | }
|
324 - | impl ::std::error::Error for MedicalTranscriptResultStreamError {
|
291 + | impl ::std::error::Error for MedicalScribeInputStreamError {
|
325 292 | fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
326 293 | match self {
|
327 - | Self::BadRequestException(_inner) => ::std::option::Option::Some(_inner),
|
328 - | Self::LimitExceededException(_inner) => ::std::option::Option::Some(_inner),
|
329 - | Self::InternalFailureException(_inner) => ::std::option::Option::Some(_inner),
|
330 - | Self::ConflictException(_inner) => ::std::option::Option::Some(_inner),
|
331 - | Self::ServiceUnavailableException(_inner) => ::std::option::Option::Some(_inner),
|
332 294 | Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
|
333 295 | }
|
334 296 | }
|
335 297 | }
|
336 - | impl ::std::fmt::Display for MedicalTranscriptResultStreamError {
|
298 + | impl ::std::fmt::Display for MedicalScribeInputStreamError {
|
337 299 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
338 300 | match self {
|
339 - | Self::BadRequestException(_inner) => _inner.fmt(f),
|
340 - | Self::LimitExceededException(_inner) => _inner.fmt(f),
|
341 - | Self::InternalFailureException(_inner) => _inner.fmt(f),
|
342 - | Self::ConflictException(_inner) => _inner.fmt(f),
|
343 - | Self::ServiceUnavailableException(_inner) => _inner.fmt(f),
|
344 301 | Self::Unhandled(_inner) => {
|
345 302 | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
346 303 | write!(f, "unhandled error ({code})")
|
347 304 | } else {
|
348 305 | f.write_str("unhandled error")
|
349 306 | }
|
350 307 | }
|
351 308 | }
|
352 309 | }
|
353 310 | }
|
354 - | impl ::aws_smithy_types::retry::ProvideErrorKind for MedicalTranscriptResultStreamError {
|
311 + | impl ::aws_smithy_types::retry::ProvideErrorKind for MedicalScribeInputStreamError {
|
355 312 | fn code(&self) -> ::std::option::Option<&str> {
|
356 313 | ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
|
357 314 | }
|
358 315 | fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
|
359 316 | ::std::option::Option::None
|
360 317 | }
|
361 318 | }
|
362 - | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for MedicalTranscriptResultStreamError {
|
319 + | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for MedicalScribeInputStreamError {
|
363 320 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
364 321 | match self {
|
365 - | Self::BadRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
366 - | Self::LimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
367 - | Self::InternalFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
368 - | Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
369 - | Self::ServiceUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
370 322 | Self::Unhandled(_inner) => &_inner.meta,
|
371 323 | }
|
372 324 | }
|
373 325 | }
|
374 - | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for MedicalTranscriptResultStreamError {
|
326 + | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for MedicalScribeInputStreamError {
|
375 327 | fn create_unhandled_error(
|
376 328 | source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
|
377 329 | meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
378 330 | ) -> Self {
|
379 331 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
380 332 | source,
|
381 333 | meta: meta.unwrap_or_default(),
|
382 334 | })
|
383 335 | }
|
384 336 | }
|
385 - | impl ::aws_types::request_id::RequestId for crate::types::error::MedicalTranscriptResultStreamError {
|
337 + | impl ::aws_types::request_id::RequestId for crate::types::error::MedicalScribeInputStreamError {
|
386 338 | fn request_id(&self) -> Option<&str> {
|
387 339 | self.meta().request_id()
|
388 340 | }
|
389 341 | }
|
390 342 |
|
391 343 | /// Error type for the `MedicalScribeResultStreamError` operation.
|
392 344 | #[non_exhaustive]
|
393 345 | #[derive(::std::fmt::Debug)]
|
394 346 | pub enum MedicalScribeResultStreamError {
|
395 347 | /// <p>One or more arguments to the <code>StartStreamTranscription</code>, <code>StartMedicalStreamTranscription</code>, or <code>StartCallAnalyticsStreamTranscription</code> operation was not valid. For example, <code>MediaEncoding</code> or <code>LanguageCode</code> used unsupported values. Check the specified parameters and try your request again.</p>
|
524 476 | meta: meta.unwrap_or_default(),
|
525 477 | })
|
526 478 | }
|
527 479 | }
|
528 480 | impl ::aws_types::request_id::RequestId for crate::types::error::MedicalScribeResultStreamError {
|
529 481 | fn request_id(&self) -> Option<&str> {
|
530 482 | self.meta().request_id()
|
531 483 | }
|
532 484 | }
|
533 485 |
|
534 - | /// Error type for the `MedicalScribeInputStreamError` operation.
|
486 + | /// Error type for the `MedicalTranscriptResultStreamError` operation.
|
535 487 | #[non_exhaustive]
|
536 488 | #[derive(::std::fmt::Debug)]
|
537 - | pub enum MedicalScribeInputStreamError {
|
489 + | pub enum MedicalTranscriptResultStreamError {
|
490 + | /// <p>One or more arguments to the <code>StartStreamTranscription</code>, <code>StartMedicalStreamTranscription</code>, or <code>StartCallAnalyticsStreamTranscription</code> operation was not valid. For example, <code>MediaEncoding</code> or <code>LanguageCode</code> used unsupported values. Check the specified parameters and try your request again.</p>
|
491 + | BadRequestException(crate::types::error::BadRequestException),
|
492 + | /// <p>Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length limit. Break your audio stream into smaller chunks and try your request again.</p>
|
493 + | LimitExceededException(crate::types::error::LimitExceededException),
|
494 + | /// <p>A problem occurred while processing the audio. Amazon Transcribe terminated processing.</p>
|
495 + | InternalFailureException(crate::types::error::InternalFailureException),
|
496 + | /// <p>A new stream started with the same session ID. The current stream has been terminated.</p>
|
497 + | ConflictException(crate::types::error::ConflictException),
|
498 + | /// <p>The service is currently unavailable. Try your request later.</p>
|
499 + | ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
|
538 500 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
539 501 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
540 502 | variable wildcard pattern and check `.code()`:
|
541 503 | \
|
542 504 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
543 505 | \
|
544 - | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-MedicalScribeInputStreamError) for what information is available for the error.")]
|
506 + | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-MedicalTranscriptResultStreamError) for what information is available for the error.")]
|
545 507 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
546 508 | }
|
547 - | impl MedicalScribeInputStreamError {
|
548 - | /// Creates the `MedicalScribeInputStreamError::Unhandled` variant from any error type.
|
509 + | impl MedicalTranscriptResultStreamError {
|
510 + | /// Creates the `MedicalTranscriptResultStreamError::Unhandled` variant from any error type.
|
549 511 | pub fn unhandled(
|
550 512 | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
551 513 | ) -> Self {
|
552 514 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
553 515 | source: err.into(),
|
554 516 | meta: ::std::default::Default::default(),
|
555 517 | })
|
556 518 | }
|
557 519 |
|
558 - | /// Creates the `MedicalScribeInputStreamError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
520 + | /// Creates the `MedicalTranscriptResultStreamError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
559 521 | pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
560 522 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
561 523 | source: err.clone().into(),
|
562 524 | meta: err,
|
563 525 | })
|
564 526 | }
|
565 527 | ///
|
566 528 | /// Returns error metadata, which includes the error code, message,
|
567 529 | /// request ID, and potentially additional information.
|
568 530 | ///
|
569 531 | pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
570 532 | match self {
|
533 + | Self::BadRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
534 + | Self::LimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
535 + | Self::InternalFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
536 + | Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
537 + | Self::ServiceUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
571 538 | Self::Unhandled(e) => &e.meta,
|
572 539 | }
|
573 540 | }
|
541 + | /// Returns `true` if the error kind is `MedicalTranscriptResultStreamError::BadRequestException`.
|
542 + | pub fn is_bad_request_exception(&self) -> bool {
|
543 + | matches!(self, Self::BadRequestException(_))
|
544 + | }
|
545 + | /// Returns `true` if the error kind is `MedicalTranscriptResultStreamError::LimitExceededException`.
|
546 + | pub fn is_limit_exceeded_exception(&self) -> bool {
|
547 + | matches!(self, Self::LimitExceededException(_))
|
548 + | }
|
549 + | /// Returns `true` if the error kind is `MedicalTranscriptResultStreamError::InternalFailureException`.
|
550 + | pub fn is_internal_failure_exception(&self) -> bool {
|
551 + | matches!(self, Self::InternalFailureException(_))
|
552 + | }
|
553 + | /// Returns `true` if the error kind is `MedicalTranscriptResultStreamError::ConflictException`.
|
554 + | pub fn is_conflict_exception(&self) -> bool {
|
555 + | matches!(self, Self::ConflictException(_))
|
556 + | }
|
557 + | /// Returns `true` if the error kind is `MedicalTranscriptResultStreamError::ServiceUnavailableException`.
|
558 + | pub fn is_service_unavailable_exception(&self) -> bool {
|
559 + | matches!(self, Self::ServiceUnavailableException(_))
|
560 + | }
|
574 561 | }
|
575 - | impl ::std::error::Error for MedicalScribeInputStreamError {
|
562 + | impl ::std::error::Error for MedicalTranscriptResultStreamError {
|
576 563 | fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
577 564 | match self {
|
565 + | Self::BadRequestException(_inner) => ::std::option::Option::Some(_inner),
|
566 + | Self::LimitExceededException(_inner) => ::std::option::Option::Some(_inner),
|
567 + | Self::InternalFailureException(_inner) => ::std::option::Option::Some(_inner),
|
568 + | Self::ConflictException(_inner) => ::std::option::Option::Some(_inner),
|
569 + | Self::ServiceUnavailableException(_inner) => ::std::option::Option::Some(_inner),
|
578 570 | Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
|
579 571 | }
|
580 572 | }
|
581 573 | }
|
582 - | impl ::std::fmt::Display for MedicalScribeInputStreamError {
|
574 + | impl ::std::fmt::Display for MedicalTranscriptResultStreamError {
|
583 575 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
584 576 | match self {
|
577 + | Self::BadRequestException(_inner) => _inner.fmt(f),
|
578 + | Self::LimitExceededException(_inner) => _inner.fmt(f),
|
579 + | Self::InternalFailureException(_inner) => _inner.fmt(f),
|
580 + | Self::ConflictException(_inner) => _inner.fmt(f),
|
581 + | Self::ServiceUnavailableException(_inner) => _inner.fmt(f),
|
585 582 | Self::Unhandled(_inner) => {
|
586 583 | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
587 584 | write!(f, "unhandled error ({code})")
|
588 585 | } else {
|
589 586 | f.write_str("unhandled error")
|
590 587 | }
|
591 588 | }
|
592 589 | }
|
593 590 | }
|
594 591 | }
|
595 - | impl ::aws_smithy_types::retry::ProvideErrorKind for MedicalScribeInputStreamError {
|
592 + | impl ::aws_smithy_types::retry::ProvideErrorKind for MedicalTranscriptResultStreamError {
|
596 593 | fn code(&self) -> ::std::option::Option<&str> {
|
597 594 | ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
|
598 595 | }
|
599 596 | fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
|
600 597 | ::std::option::Option::None
|
601 598 | }
|
602 599 | }
|
603 - | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for MedicalScribeInputStreamError {
|
600 + | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for MedicalTranscriptResultStreamError {
|
604 601 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
605 602 | match self {
|
603 + | Self::BadRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
604 + | Self::LimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
605 + | Self::InternalFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
606 + | Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
607 + | Self::ServiceUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
606 608 | Self::Unhandled(_inner) => &_inner.meta,
|
607 609 | }
|
608 610 | }
|
609 611 | }
|
610 - | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for MedicalScribeInputStreamError {
|
612 + | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for MedicalTranscriptResultStreamError {
|
611 613 | fn create_unhandled_error(
|
612 614 | source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
|
613 615 | meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
614 616 | ) -> Self {
|
615 617 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
616 618 | source,
|
617 619 | meta: meta.unwrap_or_default(),
|
618 620 | })
|
619 621 | }
|
620 622 | }
|
621 - | impl ::aws_types::request_id::RequestId for crate::types::error::MedicalScribeInputStreamError {
|
623 + | impl ::aws_types::request_id::RequestId for crate::types::error::MedicalTranscriptResultStreamError {
|
622 624 | fn request_id(&self) -> Option<&str> {
|
623 625 | self.meta().request_id()
|
624 626 | }
|
625 627 | }
|
626 628 |
|
627 - | /// Error type for the `CallAnalyticsTranscriptResultStreamError` operation.
|
629 + | /// Error type for the `TranscriptResultStreamError` operation.
|
628 630 | #[non_exhaustive]
|
629 631 | #[derive(::std::fmt::Debug)]
|
630 - | pub enum CallAnalyticsTranscriptResultStreamError {
|
632 + | pub enum TranscriptResultStreamError {
|
631 633 | /// <p>One or more arguments to the <code>StartStreamTranscription</code>, <code>StartMedicalStreamTranscription</code>, or <code>StartCallAnalyticsStreamTranscription</code> operation was not valid. For example, <code>MediaEncoding</code> or <code>LanguageCode</code> used unsupported values. Check the specified parameters and try your request again.</p>
|
632 634 | BadRequestException(crate::types::error::BadRequestException),
|
633 635 | /// <p>Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length limit. Break your audio stream into smaller chunks and try your request again.</p>
|
634 636 | LimitExceededException(crate::types::error::LimitExceededException),
|
635 637 | /// <p>A problem occurred while processing the audio. Amazon Transcribe terminated processing.</p>
|
636 638 | InternalFailureException(crate::types::error::InternalFailureException),
|
637 639 | /// <p>A new stream started with the same session ID. The current stream has been terminated.</p>
|
638 640 | ConflictException(crate::types::error::ConflictException),
|
639 641 | /// <p>The service is currently unavailable. Try your request later.</p>
|
640 642 | ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
|
641 643 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
642 644 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
643 645 | variable wildcard pattern and check `.code()`:
|
644 646 | \
|
645 647 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
646 648 | \
|
647 - | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CallAnalyticsTranscriptResultStreamError) for what information is available for the error.")]
|
649 + | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-TranscriptResultStreamError) for what information is available for the error.")]
|
648 650 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
649 651 | }
|
650 - | impl CallAnalyticsTranscriptResultStreamError {
|
651 - | /// Creates the `CallAnalyticsTranscriptResultStreamError::Unhandled` variant from any error type.
|
652 + | impl TranscriptResultStreamError {
|
653 + | /// Creates the `TranscriptResultStreamError::Unhandled` variant from any error type.
|
652 654 | pub fn unhandled(
|
653 655 | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
654 656 | ) -> Self {
|
655 657 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
656 658 | source: err.into(),
|
657 659 | meta: ::std::default::Default::default(),
|
658 660 | })
|
659 661 | }
|
660 662 |
|
661 - | /// Creates the `CallAnalyticsTranscriptResultStreamError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
663 + | /// Creates the `TranscriptResultStreamError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
662 664 | pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
663 665 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
664 666 | source: err.clone().into(),
|
665 667 | meta: err,
|
666 668 | })
|
667 669 | }
|
668 670 | ///
|
669 671 | /// Returns error metadata, which includes the error code, message,
|
670 672 | /// request ID, and potentially additional information.
|
671 673 | ///
|
672 674 | pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
673 675 | match self {
|
674 676 | Self::BadRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
675 677 | Self::LimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
676 678 | Self::InternalFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
677 679 | Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
678 680 | Self::ServiceUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
679 681 | Self::Unhandled(e) => &e.meta,
|
680 682 | }
|
681 683 | }
|
682 - | /// Returns `true` if the error kind is `CallAnalyticsTranscriptResultStreamError::BadRequestException`.
|
684 + | /// Returns `true` if the error kind is `TranscriptResultStreamError::BadRequestException`.
|
683 685 | pub fn is_bad_request_exception(&self) -> bool {
|
684 686 | matches!(self, Self::BadRequestException(_))
|
685 687 | }
|
686 - | /// Returns `true` if the error kind is `CallAnalyticsTranscriptResultStreamError::LimitExceededException`.
|
688 + | /// Returns `true` if the error kind is `TranscriptResultStreamError::LimitExceededException`.
|
687 689 | pub fn is_limit_exceeded_exception(&self) -> bool {
|
688 690 | matches!(self, Self::LimitExceededException(_))
|
689 691 | }
|
690 - | /// Returns `true` if the error kind is `CallAnalyticsTranscriptResultStreamError::InternalFailureException`.
|
692 + | /// Returns `true` if the error kind is `TranscriptResultStreamError::InternalFailureException`.
|
691 693 | pub fn is_internal_failure_exception(&self) -> bool {
|
692 694 | matches!(self, Self::InternalFailureException(_))
|
693 695 | }
|
694 - | /// Returns `true` if the error kind is `CallAnalyticsTranscriptResultStreamError::ConflictException`.
|
696 + | /// Returns `true` if the error kind is `TranscriptResultStreamError::ConflictException`.
|
695 697 | pub fn is_conflict_exception(&self) -> bool {
|
696 698 | matches!(self, Self::ConflictException(_))
|
697 699 | }
|
698 - | /// Returns `true` if the error kind is `CallAnalyticsTranscriptResultStreamError::ServiceUnavailableException`.
|
700 + | /// Returns `true` if the error kind is `TranscriptResultStreamError::ServiceUnavailableException`.
|
699 701 | pub fn is_service_unavailable_exception(&self) -> bool {
|
700 702 | matches!(self, Self::ServiceUnavailableException(_))
|
701 703 | }
|
702 704 | }
|
703 - | impl ::std::error::Error for CallAnalyticsTranscriptResultStreamError {
|
705 + | impl ::std::error::Error for TranscriptResultStreamError {
|
704 706 | fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
705 707 | match self {
|
706 708 | Self::BadRequestException(_inner) => ::std::option::Option::Some(_inner),
|
707 709 | Self::LimitExceededException(_inner) => ::std::option::Option::Some(_inner),
|
708 710 | Self::InternalFailureException(_inner) => ::std::option::Option::Some(_inner),
|
709 711 | Self::ConflictException(_inner) => ::std::option::Option::Some(_inner),
|
710 712 | Self::ServiceUnavailableException(_inner) => ::std::option::Option::Some(_inner),
|
711 713 | Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
|
712 714 | }
|
713 715 | }
|
714 716 | }
|
715 - | impl ::std::fmt::Display for CallAnalyticsTranscriptResultStreamError {
|
717 + | impl ::std::fmt::Display for TranscriptResultStreamError {
|
716 718 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
717 719 | match self {
|
718 720 | Self::BadRequestException(_inner) => _inner.fmt(f),
|
719 721 | Self::LimitExceededException(_inner) => _inner.fmt(f),
|
720 722 | Self::InternalFailureException(_inner) => _inner.fmt(f),
|
721 723 | Self::ConflictException(_inner) => _inner.fmt(f),
|
722 724 | Self::ServiceUnavailableException(_inner) => _inner.fmt(f),
|
723 725 | Self::Unhandled(_inner) => {
|
724 726 | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
725 727 | write!(f, "unhandled error ({code})")
|
726 728 | } else {
|
727 729 | f.write_str("unhandled error")
|
728 730 | }
|
729 731 | }
|
730 732 | }
|
731 733 | }
|
732 734 | }
|
733 - | impl ::aws_smithy_types::retry::ProvideErrorKind for CallAnalyticsTranscriptResultStreamError {
|
735 + | impl ::aws_smithy_types::retry::ProvideErrorKind for TranscriptResultStreamError {
|
734 736 | fn code(&self) -> ::std::option::Option<&str> {
|
735 737 | ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
|
736 738 | }
|
737 739 | fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
|
738 740 | ::std::option::Option::None
|
739 741 | }
|
740 742 | }
|
741 - | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CallAnalyticsTranscriptResultStreamError {
|
743 + | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for TranscriptResultStreamError {
|
742 744 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
743 745 | match self {
|
744 746 | Self::BadRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
745 747 | Self::LimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
746 748 | Self::InternalFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
747 749 | Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
748 750 | Self::ServiceUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
749 751 | Self::Unhandled(_inner) => &_inner.meta,
|
750 752 | }
|
751 753 | }
|
752 754 | }
|
753 - | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CallAnalyticsTranscriptResultStreamError {
|
755 + | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for TranscriptResultStreamError {
|
754 756 | fn create_unhandled_error(
|
755 757 | source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
|
756 758 | meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
757 759 | ) -> Self {
|
758 760 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
759 761 | source,
|
760 762 | meta: meta.unwrap_or_default(),
|
761 763 | })
|
762 764 | }
|
763 765 | }
|
764 - | impl ::aws_types::request_id::RequestId for crate::types::error::CallAnalyticsTranscriptResultStreamError {
|
766 + | impl ::aws_types::request_id::RequestId for crate::types::error::TranscriptResultStreamError {
|
765 767 | fn request_id(&self) -> Option<&str> {
|
766 768 | self.meta().request_id()
|
767 769 | }
|
768 770 | }
|
769 771 |
|
770 - | pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundException;
|
771 - |
|
772 772 | mod _bad_request_exception;
|
773 773 |
|
774 774 | mod _conflict_exception;
|
775 775 |
|
776 776 | mod _internal_failure_exception;
|
777 777 |
|
778 778 | mod _limit_exceeded_exception;
|
779 779 |
|
780 780 | mod _resource_not_found_exception;
|
781 781 |
|