#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartStreamTranscriptionError {
pub kind: StartStreamTranscriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartStreamTranscriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartStreamTranscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartStreamTranscriptionErrorKind {
ServiceUnavailableException(crate::error::ServiceUnavailableException),
BadRequestException(crate::error::BadRequestException),
InternalFailureException(crate::error::InternalFailureException),
ConflictException(crate::error::ConflictException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartStreamTranscriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartStreamTranscriptionErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
StartStreamTranscriptionErrorKind::BadRequestException(_inner) => _inner.fmt(f),
StartStreamTranscriptionErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
StartStreamTranscriptionErrorKind::ConflictException(_inner) => _inner.fmt(f),
StartStreamTranscriptionErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
StartStreamTranscriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartStreamTranscriptionError {
fn code(&self) -> Option<&str> {
StartStreamTranscriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartStreamTranscriptionError {
pub fn new(kind: StartStreamTranscriptionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: StartStreamTranscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartStreamTranscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
StartStreamTranscriptionErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
StartStreamTranscriptionErrorKind::BadRequestException(_)
)
}
pub fn is_internal_failure_exception(&self) -> bool {
matches!(
&self.kind,
StartStreamTranscriptionErrorKind::InternalFailureException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
StartStreamTranscriptionErrorKind::ConflictException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartStreamTranscriptionErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for StartStreamTranscriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartStreamTranscriptionErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
StartStreamTranscriptionErrorKind::BadRequestException(_inner) => Some(_inner),
StartStreamTranscriptionErrorKind::InternalFailureException(_inner) => Some(_inner),
StartStreamTranscriptionErrorKind::ConflictException(_inner) => Some(_inner),
StartStreamTranscriptionErrorKind::LimitExceededException(_inner) => Some(_inner),
StartStreamTranscriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConflictException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ConflictException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConflictException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConflictException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ConflictException {}
pub mod conflict_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ConflictException {
crate::error::ConflictException {
message: self.message,
}
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalFailureException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalFailureException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalFailureException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalFailureException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalFailureException {}
pub mod internal_failure_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalFailureException {
crate::error::InternalFailureException {
message: self.message,
}
}
}
}
impl InternalFailureException {
pub fn builder() -> crate::error::internal_failure_exception::Builder {
crate::error::internal_failure_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BadRequestException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl BadRequestException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BadRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BadRequestException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for BadRequestException {}
pub mod bad_request_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::BadRequestException {
crate::error::BadRequestException {
message: self.message,
}
}
}
}
impl BadRequestException {
pub fn builder() -> crate::error::bad_request_exception::Builder {
crate::error::bad_request_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceUnavailableException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceUnavailableException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceUnavailableException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceUnavailableException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceUnavailableException {}
pub mod service_unavailable_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ServiceUnavailableException {
crate::error::ServiceUnavailableException {
message: self.message,
}
}
}
}
impl ServiceUnavailableException {
pub fn builder() -> crate::error::service_unavailable_exception::Builder {
crate::error::service_unavailable_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TranscriptResultStreamError {
pub kind: TranscriptResultStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TranscriptResultStreamError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TranscriptResultStreamErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TranscriptResultStreamErrorKind {
BadRequestException(crate::error::BadRequestException),
LimitExceededException(crate::error::LimitExceededException),
InternalFailureException(crate::error::InternalFailureException),
ConflictException(crate::error::ConflictException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TranscriptResultStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TranscriptResultStreamErrorKind::BadRequestException(_inner) => _inner.fmt(f),
TranscriptResultStreamErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
TranscriptResultStreamErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
TranscriptResultStreamErrorKind::ConflictException(_inner) => _inner.fmt(f),
TranscriptResultStreamErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
TranscriptResultStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TranscriptResultStreamError {
fn code(&self) -> Option<&str> {
TranscriptResultStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TranscriptResultStreamError {
pub fn new(kind: TranscriptResultStreamErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TranscriptResultStreamErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TranscriptResultStreamErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
TranscriptResultStreamErrorKind::BadRequestException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
TranscriptResultStreamErrorKind::LimitExceededException(_)
)
}
pub fn is_internal_failure_exception(&self) -> bool {
matches!(
&self.kind,
TranscriptResultStreamErrorKind::InternalFailureException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
TranscriptResultStreamErrorKind::ConflictException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
TranscriptResultStreamErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for TranscriptResultStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TranscriptResultStreamErrorKind::BadRequestException(_inner) => Some(_inner),
TranscriptResultStreamErrorKind::LimitExceededException(_inner) => Some(_inner),
TranscriptResultStreamErrorKind::InternalFailureException(_inner) => Some(_inner),
TranscriptResultStreamErrorKind::ConflictException(_inner) => Some(_inner),
TranscriptResultStreamErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
TranscriptResultStreamErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AudioStreamError {
pub kind: AudioStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AudioStreamError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AudioStreamErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AudioStreamErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AudioStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AudioStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AudioStreamError {
fn code(&self) -> Option<&str> {
AudioStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AudioStreamError {
pub fn new(kind: AudioStreamErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: AudioStreamErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AudioStreamErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
}
impl std::error::Error for AudioStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AudioStreamErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartMedicalStreamTranscriptionError {
pub kind: StartMedicalStreamTranscriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartMedicalStreamTranscriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartMedicalStreamTranscriptionErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartMedicalStreamTranscriptionErrorKind {
ServiceUnavailableException(crate::error::ServiceUnavailableException),
BadRequestException(crate::error::BadRequestException),
InternalFailureException(crate::error::InternalFailureException),
ConflictException(crate::error::ConflictException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartMedicalStreamTranscriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartMedicalStreamTranscriptionErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
StartMedicalStreamTranscriptionErrorKind::BadRequestException(_inner) => _inner.fmt(f),
StartMedicalStreamTranscriptionErrorKind::InternalFailureException(_inner) => {
_inner.fmt(f)
}
StartMedicalStreamTranscriptionErrorKind::ConflictException(_inner) => _inner.fmt(f),
StartMedicalStreamTranscriptionErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
StartMedicalStreamTranscriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartMedicalStreamTranscriptionError {
fn code(&self) -> Option<&str> {
StartMedicalStreamTranscriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartMedicalStreamTranscriptionError {
pub fn new(
kind: StartMedicalStreamTranscriptionErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: StartMedicalStreamTranscriptionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartMedicalStreamTranscriptionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
StartMedicalStreamTranscriptionErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
StartMedicalStreamTranscriptionErrorKind::BadRequestException(_)
)
}
pub fn is_internal_failure_exception(&self) -> bool {
matches!(
&self.kind,
StartMedicalStreamTranscriptionErrorKind::InternalFailureException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
StartMedicalStreamTranscriptionErrorKind::ConflictException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartMedicalStreamTranscriptionErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for StartMedicalStreamTranscriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartMedicalStreamTranscriptionErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
StartMedicalStreamTranscriptionErrorKind::BadRequestException(_inner) => Some(_inner),
StartMedicalStreamTranscriptionErrorKind::InternalFailureException(_inner) => {
Some(_inner)
}
StartMedicalStreamTranscriptionErrorKind::ConflictException(_inner) => Some(_inner),
StartMedicalStreamTranscriptionErrorKind::LimitExceededException(_inner) => {
Some(_inner)
}
StartMedicalStreamTranscriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct MedicalTranscriptResultStreamError {
pub kind: MedicalTranscriptResultStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for MedicalTranscriptResultStreamError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: MedicalTranscriptResultStreamErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum MedicalTranscriptResultStreamErrorKind {
BadRequestException(crate::error::BadRequestException),
LimitExceededException(crate::error::LimitExceededException),
InternalFailureException(crate::error::InternalFailureException),
ConflictException(crate::error::ConflictException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for MedicalTranscriptResultStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
MedicalTranscriptResultStreamErrorKind::BadRequestException(_inner) => _inner.fmt(f),
MedicalTranscriptResultStreamErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
MedicalTranscriptResultStreamErrorKind::InternalFailureException(_inner) => {
_inner.fmt(f)
}
MedicalTranscriptResultStreamErrorKind::ConflictException(_inner) => _inner.fmt(f),
MedicalTranscriptResultStreamErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
MedicalTranscriptResultStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for MedicalTranscriptResultStreamError {
fn code(&self) -> Option<&str> {
MedicalTranscriptResultStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl MedicalTranscriptResultStreamError {
pub fn new(
kind: MedicalTranscriptResultStreamErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: MedicalTranscriptResultStreamErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: MedicalTranscriptResultStreamErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
MedicalTranscriptResultStreamErrorKind::BadRequestException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
MedicalTranscriptResultStreamErrorKind::LimitExceededException(_)
)
}
pub fn is_internal_failure_exception(&self) -> bool {
matches!(
&self.kind,
MedicalTranscriptResultStreamErrorKind::InternalFailureException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
MedicalTranscriptResultStreamErrorKind::ConflictException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
MedicalTranscriptResultStreamErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for MedicalTranscriptResultStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
MedicalTranscriptResultStreamErrorKind::BadRequestException(_inner) => Some(_inner),
MedicalTranscriptResultStreamErrorKind::LimitExceededException(_inner) => Some(_inner),
MedicalTranscriptResultStreamErrorKind::InternalFailureException(_inner) => {
Some(_inner)
}
MedicalTranscriptResultStreamErrorKind::ConflictException(_inner) => Some(_inner),
MedicalTranscriptResultStreamErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
MedicalTranscriptResultStreamErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartCallAnalyticsStreamTranscriptionError {
pub kind: StartCallAnalyticsStreamTranscriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartCallAnalyticsStreamTranscriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartCallAnalyticsStreamTranscriptionErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartCallAnalyticsStreamTranscriptionErrorKind {
ServiceUnavailableException(crate::error::ServiceUnavailableException),
BadRequestException(crate::error::BadRequestException),
InternalFailureException(crate::error::InternalFailureException),
ConflictException(crate::error::ConflictException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartCallAnalyticsStreamTranscriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartCallAnalyticsStreamTranscriptionErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
StartCallAnalyticsStreamTranscriptionErrorKind::BadRequestException(_inner) => {
_inner.fmt(f)
}
StartCallAnalyticsStreamTranscriptionErrorKind::InternalFailureException(_inner) => {
_inner.fmt(f)
}
StartCallAnalyticsStreamTranscriptionErrorKind::ConflictException(_inner) => {
_inner.fmt(f)
}
StartCallAnalyticsStreamTranscriptionErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
StartCallAnalyticsStreamTranscriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartCallAnalyticsStreamTranscriptionError {
fn code(&self) -> Option<&str> {
StartCallAnalyticsStreamTranscriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartCallAnalyticsStreamTranscriptionError {
pub fn new(
kind: StartCallAnalyticsStreamTranscriptionErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: StartCallAnalyticsStreamTranscriptionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartCallAnalyticsStreamTranscriptionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
StartCallAnalyticsStreamTranscriptionErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
StartCallAnalyticsStreamTranscriptionErrorKind::BadRequestException(_)
)
}
pub fn is_internal_failure_exception(&self) -> bool {
matches!(
&self.kind,
StartCallAnalyticsStreamTranscriptionErrorKind::InternalFailureException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
StartCallAnalyticsStreamTranscriptionErrorKind::ConflictException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartCallAnalyticsStreamTranscriptionErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for StartCallAnalyticsStreamTranscriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartCallAnalyticsStreamTranscriptionErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
StartCallAnalyticsStreamTranscriptionErrorKind::BadRequestException(_inner) => {
Some(_inner)
}
StartCallAnalyticsStreamTranscriptionErrorKind::InternalFailureException(_inner) => {
Some(_inner)
}
StartCallAnalyticsStreamTranscriptionErrorKind::ConflictException(_inner) => {
Some(_inner)
}
StartCallAnalyticsStreamTranscriptionErrorKind::LimitExceededException(_inner) => {
Some(_inner)
}
StartCallAnalyticsStreamTranscriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CallAnalyticsTranscriptResultStreamError {
pub kind: CallAnalyticsTranscriptResultStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CallAnalyticsTranscriptResultStreamError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CallAnalyticsTranscriptResultStreamErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CallAnalyticsTranscriptResultStreamErrorKind {
BadRequestException(crate::error::BadRequestException),
LimitExceededException(crate::error::LimitExceededException),
InternalFailureException(crate::error::InternalFailureException),
ConflictException(crate::error::ConflictException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CallAnalyticsTranscriptResultStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CallAnalyticsTranscriptResultStreamErrorKind::BadRequestException(_inner) => {
_inner.fmt(f)
}
CallAnalyticsTranscriptResultStreamErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
CallAnalyticsTranscriptResultStreamErrorKind::InternalFailureException(_inner) => {
_inner.fmt(f)
}
CallAnalyticsTranscriptResultStreamErrorKind::ConflictException(_inner) => {
_inner.fmt(f)
}
CallAnalyticsTranscriptResultStreamErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
CallAnalyticsTranscriptResultStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CallAnalyticsTranscriptResultStreamError {
fn code(&self) -> Option<&str> {
CallAnalyticsTranscriptResultStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CallAnalyticsTranscriptResultStreamError {
pub fn new(
kind: CallAnalyticsTranscriptResultStreamErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CallAnalyticsTranscriptResultStreamErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CallAnalyticsTranscriptResultStreamErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
CallAnalyticsTranscriptResultStreamErrorKind::BadRequestException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CallAnalyticsTranscriptResultStreamErrorKind::LimitExceededException(_)
)
}
pub fn is_internal_failure_exception(&self) -> bool {
matches!(
&self.kind,
CallAnalyticsTranscriptResultStreamErrorKind::InternalFailureException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CallAnalyticsTranscriptResultStreamErrorKind::ConflictException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CallAnalyticsTranscriptResultStreamErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for CallAnalyticsTranscriptResultStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CallAnalyticsTranscriptResultStreamErrorKind::BadRequestException(_inner) => {
Some(_inner)
}
CallAnalyticsTranscriptResultStreamErrorKind::LimitExceededException(_inner) => {
Some(_inner)
}
CallAnalyticsTranscriptResultStreamErrorKind::InternalFailureException(_inner) => {
Some(_inner)
}
CallAnalyticsTranscriptResultStreamErrorKind::ConflictException(_inner) => Some(_inner),
CallAnalyticsTranscriptResultStreamErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
CallAnalyticsTranscriptResultStreamErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[derive(Debug)]
pub struct Unhandled {
source: Box<dyn std::error::Error + Send + Sync + 'static>,
}
impl Unhandled {
#[allow(unused)]
pub(crate) fn new(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self { source }
}
}
impl std::fmt::Display for Unhandled {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "unhandled error")
}
}
impl std::error::Error for Unhandled {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
Some(self.source.as_ref() as _)
}
}