245 245 |
|
246 246 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StartMedicalStreamTranscriptionEndpointParamsInterceptor {
|
247 247 | fn name(&self) -> &'static str {
|
248 248 | "StartMedicalStreamTranscriptionEndpointParamsInterceptor"
|
249 249 | }
|
250 250 |
|
251 251 | fn read_before_execution(
|
252 252 | &self,
|
253 253 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
254 254 | '_,
|
255 255 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
256 256 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
257 257 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
258 258 | >,
|
259 259 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
260 260 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
261 261 | let _input = context
|
262 262 | .input()
|
263 263 | .downcast_ref::<StartMedicalStreamTranscriptionInput>()
|
264 264 | .ok_or("failed to downcast to StartMedicalStreamTranscriptionInput")?;
|
265 265 |
|
266 266 | let params = crate::config::endpoint::Params::builder()
|
267 267 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
268 268 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
269 269 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
270 270 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
271 271 | .build()
|
272 272 | .map_err(|err| {
|
273 273 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
274 274 | })?;
|
275 + |
|
275 276 | cfg.interceptor_state()
|
276 277 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
278 + |
|
277 279 | ::std::result::Result::Ok(())
|
278 280 | }
|
279 281 | }
|
280 282 |
|
281 283 | // The get_* functions below are generated from JMESPath expressions in the
|
282 284 | // operationContextParams trait. They target the operation's input shape.
|
283 285 |
|
284 286 | /// Error type for the `StartMedicalStreamTranscriptionError` operation.
|
285 287 | #[non_exhaustive]
|
286 288 | #[derive(::std::fmt::Debug)]
|
287 289 | pub enum StartMedicalStreamTranscriptionError {
|
288 290 | /// <p>The service is currently unavailable. Try your request later.</p>
|
289 291 | ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
|
290 292 | /// <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 not valid values. Check the specified parameters and try your request again.</p>
|
291 293 | BadRequestException(crate::types::error::BadRequestException),
|
292 294 | /// <p>A problem occurred while processing the audio. Amazon Transcribe terminated processing.</p>
|
293 295 | InternalFailureException(crate::types::error::InternalFailureException),
|
294 296 | /// <p>A new stream started with the same session ID. The current stream has been terminated.</p>
|
295 297 | ConflictException(crate::types::error::ConflictException),
|
296 298 | /// <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>
|
297 299 | LimitExceededException(crate::types::error::LimitExceededException),
|
298 300 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
299 301 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
300 302 | variable wildcard pattern and check `.code()`:
|
301 303 | \
|
302 304 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
303 305 | \
|
304 306 | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-StartMedicalStreamTranscriptionError) for what information is available for the error.")]
|
305 307 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
306 308 | }
|