{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.Transcribe.Types
(
transcribe
, _ConflictException
, _NotFoundException
, _InternalFailureException
, _BadRequestException
, _LimitExceededException
, LanguageCode (..)
, MediaFormat (..)
, TranscriptionJobStatus (..)
, VocabularyState (..)
, Media
, media
, mMediaFileURI
, Settings
, settings
, sVocabularyName
, sMaxSpeakerLabels
, sShowSpeakerLabels
, Transcript
, transcript
, tTranscriptFileURI
, TranscriptionJob
, transcriptionJob
, tjCreationTime
, tjFailureReason
, tjLanguageCode
, tjSettings
, tjCompletionTime
, tjMedia
, tjMediaFormat
, tjTranscriptionJobStatus
, tjTranscriptionJobName
, tjTranscript
, tjMediaSampleRateHertz
, TranscriptionJobSummary
, transcriptionJobSummary
, tjsCreationTime
, tjsFailureReason
, tjsLanguageCode
, tjsCompletionTime
, tjsTranscriptionJobStatus
, tjsTranscriptionJobName
, VocabularyInfo
, vocabularyInfo
, viLanguageCode
, viVocabularyName
, viLastModifiedTime
, viVocabularyState
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
import Network.AWS.Transcribe.Types.Product
import Network.AWS.Transcribe.Types.Sum
transcribe :: Service
transcribe =
Service
{ _svcAbbrev = "Transcribe"
, _svcSigner = v4
, _svcPrefix = "transcribe"
, _svcVersion = "2017-10-26"
, _svcEndpoint = defaultEndpoint transcribe
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "Transcribe"
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| has (hasCode "ThrottledException" . hasStatus 400) e =
Just "throttled_exception"
| has (hasStatus 429) e = Just "too_many_requests"
| has (hasCode "ThrottlingException" . hasStatus 400) e =
Just "throttling_exception"
| has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
| has (hasStatus 504) e = Just "gateway_timeout"
| has (hasCode "RequestThrottledException" . hasStatus 400) e =
Just "request_throttled_exception"
| has (hasStatus 502) e = Just "bad_gateway"
| has (hasStatus 503) e = Just "service_unavailable"
| has (hasStatus 500) e = Just "general_server_error"
| has (hasStatus 509) e = Just "limit_exceeded"
| otherwise = Nothing
_ConflictException :: AsError a => Getting (First ServiceError) a ServiceError
_ConflictException = _MatchServiceError transcribe "ConflictException"
_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_NotFoundException = _MatchServiceError transcribe "NotFoundException"
_InternalFailureException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalFailureException =
_MatchServiceError transcribe "InternalFailureException"
_BadRequestException :: AsError a => Getting (First ServiceError) a ServiceError
_BadRequestException = _MatchServiceError transcribe "BadRequestException"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException = _MatchServiceError transcribe "LimitExceededException"