#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
InternalFailureException(crate::error::InternalFailureException),
LimitExceededException(crate::error::LimitExceededException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::BadRequestException(inner) => inner.fmt(f),
Error::ConflictException(inner) => inner.fmt(f),
Error::InternalFailureException(inner) => inner.fmt(f),
Error::LimitExceededException(inner) => inner.fmt(f),
Error::ServiceUnavailableException(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::StartCallAnalyticsStreamTranscriptionError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::StartCallAnalyticsStreamTranscriptionError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::StartCallAnalyticsStreamTranscriptionError> for Error {
fn from(err: crate::error::StartCallAnalyticsStreamTranscriptionError) -> Self {
match err.kind {
crate::error::StartCallAnalyticsStreamTranscriptionErrorKind::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::error::StartCallAnalyticsStreamTranscriptionErrorKind::BadRequestException(inner) => Error::BadRequestException(inner),
crate::error::StartCallAnalyticsStreamTranscriptionErrorKind::InternalFailureException(inner) => Error::InternalFailureException(inner),
crate::error::StartCallAnalyticsStreamTranscriptionErrorKind::ConflictException(inner) => Error::ConflictException(inner),
crate::error::StartCallAnalyticsStreamTranscriptionErrorKind::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::error::StartCallAnalyticsStreamTranscriptionErrorKind::Unhandled(inner) => Error::Unhandled(crate::error::Unhandled::new(inner.into())),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::error::StartMedicalStreamTranscriptionError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::StartMedicalStreamTranscriptionError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::StartMedicalStreamTranscriptionError> for Error {
fn from(err: crate::error::StartMedicalStreamTranscriptionError) -> Self {
match err.kind {
crate::error::StartMedicalStreamTranscriptionErrorKind::ServiceUnavailableException(
inner,
) => Error::ServiceUnavailableException(inner),
crate::error::StartMedicalStreamTranscriptionErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::StartMedicalStreamTranscriptionErrorKind::InternalFailureException(
inner,
) => Error::InternalFailureException(inner),
crate::error::StartMedicalStreamTranscriptionErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::StartMedicalStreamTranscriptionErrorKind::LimitExceededException(
inner,
) => Error::LimitExceededException(inner),
crate::error::StartMedicalStreamTranscriptionErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::StartStreamTranscriptionError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::StartStreamTranscriptionError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::StartStreamTranscriptionError> for Error {
fn from(err: crate::error::StartStreamTranscriptionError) -> Self {
match err.kind {
crate::error::StartStreamTranscriptionErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::StartStreamTranscriptionErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::StartStreamTranscriptionErrorKind::InternalFailureException(inner) => {
Error::InternalFailureException(inner)
}
crate::error::StartStreamTranscriptionErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::StartStreamTranscriptionErrorKind::LimitExceededException(inner) => {
Error::LimitExceededException(inner)
}
crate::error::StartStreamTranscriptionErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::AudioStreamError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::AudioStreamError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::AudioStreamError> for Error {
fn from(err: crate::error::AudioStreamError) -> Self {
match err.kind {
crate::error::AudioStreamErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::CallAnalyticsTranscriptResultStreamError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::CallAnalyticsTranscriptResultStreamError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::CallAnalyticsTranscriptResultStreamError> for Error {
fn from(err: crate::error::CallAnalyticsTranscriptResultStreamError) -> Self {
match err.kind {
crate::error::CallAnalyticsTranscriptResultStreamErrorKind::BadRequestException(inner) => Error::BadRequestException(inner),
crate::error::CallAnalyticsTranscriptResultStreamErrorKind::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::error::CallAnalyticsTranscriptResultStreamErrorKind::InternalFailureException(inner) => Error::InternalFailureException(inner),
crate::error::CallAnalyticsTranscriptResultStreamErrorKind::ConflictException(inner) => Error::ConflictException(inner),
crate::error::CallAnalyticsTranscriptResultStreamErrorKind::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::error::CallAnalyticsTranscriptResultStreamErrorKind::Unhandled(inner) => Error::Unhandled(crate::error::Unhandled::new(inner.into())),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::MedicalTranscriptResultStreamError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::MedicalTranscriptResultStreamError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::MedicalTranscriptResultStreamError> for Error {
fn from(err: crate::error::MedicalTranscriptResultStreamError) -> Self {
match err.kind {
crate::error::MedicalTranscriptResultStreamErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::MedicalTranscriptResultStreamErrorKind::LimitExceededException(inner) => {
Error::LimitExceededException(inner)
}
crate::error::MedicalTranscriptResultStreamErrorKind::InternalFailureException(
inner,
) => Error::InternalFailureException(inner),
crate::error::MedicalTranscriptResultStreamErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::MedicalTranscriptResultStreamErrorKind::ServiceUnavailableException(
inner,
) => Error::ServiceUnavailableException(inner),
crate::error::MedicalTranscriptResultStreamErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::TranscriptResultStreamError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::TranscriptResultStreamError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::TranscriptResultStreamError> for Error {
fn from(err: crate::error::TranscriptResultStreamError) -> Self {
match err.kind {
crate::error::TranscriptResultStreamErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::TranscriptResultStreamErrorKind::LimitExceededException(inner) => {
Error::LimitExceededException(inner)
}
crate::error::TranscriptResultStreamErrorKind::InternalFailureException(inner) => {
Error::InternalFailureException(inner)
}
crate::error::TranscriptResultStreamErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::TranscriptResultStreamErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::TranscriptResultStreamErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl std::error::Error for Error {}