{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Translate.Types
(
defaultService,
_ConcurrentModificationException,
_ConflictException,
_DetectedLanguageLowConfidenceException,
_InternalServerException,
_InvalidFilterException,
_InvalidParameterValueException,
_InvalidRequestException,
_LimitExceededException,
_ResourceNotFoundException,
_ServiceUnavailableException,
_TextSizeLimitExceededException,
_TooManyRequestsException,
_TooManyTagsException,
_UnsupportedDisplayLanguageCodeException,
_UnsupportedLanguagePairException,
Directionality (..),
DisplayLanguageCode (..),
EncryptionKeyType (..),
Formality (..),
JobStatus (..),
MergeStrategy (..),
ParallelDataFormat (..),
ParallelDataStatus (..),
Profanity (..),
TerminologyDataFormat (..),
AppliedTerminology (..),
newAppliedTerminology,
appliedTerminology_name,
appliedTerminology_terms,
EncryptionKey (..),
newEncryptionKey,
encryptionKey_type,
encryptionKey_id,
InputDataConfig (..),
newInputDataConfig,
inputDataConfig_s3Uri,
inputDataConfig_contentType,
JobDetails (..),
newJobDetails,
jobDetails_documentsWithErrorsCount,
jobDetails_inputDocumentsCount,
jobDetails_translatedDocumentsCount,
Language (..),
newLanguage,
language_languageName,
language_languageCode,
OutputDataConfig (..),
newOutputDataConfig,
outputDataConfig_encryptionKey,
outputDataConfig_s3Uri,
ParallelDataConfig (..),
newParallelDataConfig,
parallelDataConfig_s3Uri,
parallelDataConfig_format,
ParallelDataDataLocation (..),
newParallelDataDataLocation,
parallelDataDataLocation_repositoryType,
parallelDataDataLocation_location,
ParallelDataProperties (..),
newParallelDataProperties,
parallelDataProperties_arn,
parallelDataProperties_createdAt,
parallelDataProperties_description,
parallelDataProperties_encryptionKey,
parallelDataProperties_failedRecordCount,
parallelDataProperties_importedDataSize,
parallelDataProperties_importedRecordCount,
parallelDataProperties_lastUpdatedAt,
parallelDataProperties_latestUpdateAttemptAt,
parallelDataProperties_latestUpdateAttemptStatus,
parallelDataProperties_message,
parallelDataProperties_name,
parallelDataProperties_parallelDataConfig,
parallelDataProperties_skippedRecordCount,
parallelDataProperties_sourceLanguageCode,
parallelDataProperties_status,
parallelDataProperties_targetLanguageCodes,
Tag (..),
newTag,
tag_key,
tag_value,
Term (..),
newTerm,
term_sourceText,
term_targetText,
TerminologyData (..),
newTerminologyData,
terminologyData_directionality,
terminologyData_file,
terminologyData_format,
TerminologyDataLocation (..),
newTerminologyDataLocation,
terminologyDataLocation_repositoryType,
terminologyDataLocation_location,
TerminologyProperties (..),
newTerminologyProperties,
terminologyProperties_arn,
terminologyProperties_createdAt,
terminologyProperties_description,
terminologyProperties_directionality,
terminologyProperties_encryptionKey,
terminologyProperties_format,
terminologyProperties_lastUpdatedAt,
terminologyProperties_message,
terminologyProperties_name,
terminologyProperties_sizeBytes,
terminologyProperties_skippedTermCount,
terminologyProperties_sourceLanguageCode,
terminologyProperties_targetLanguageCodes,
terminologyProperties_termCount,
TextTranslationJobFilter (..),
newTextTranslationJobFilter,
textTranslationJobFilter_jobName,
textTranslationJobFilter_jobStatus,
textTranslationJobFilter_submittedAfterTime,
textTranslationJobFilter_submittedBeforeTime,
TextTranslationJobProperties (..),
newTextTranslationJobProperties,
textTranslationJobProperties_dataAccessRoleArn,
textTranslationJobProperties_endTime,
textTranslationJobProperties_inputDataConfig,
textTranslationJobProperties_jobDetails,
textTranslationJobProperties_jobId,
textTranslationJobProperties_jobName,
textTranslationJobProperties_jobStatus,
textTranslationJobProperties_message,
textTranslationJobProperties_outputDataConfig,
textTranslationJobProperties_parallelDataNames,
textTranslationJobProperties_settings,
textTranslationJobProperties_sourceLanguageCode,
textTranslationJobProperties_submittedTime,
textTranslationJobProperties_targetLanguageCodes,
textTranslationJobProperties_terminologyNames,
TranslationSettings (..),
newTranslationSettings,
translationSettings_formality,
translationSettings_profanity,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
import Amazonka.Translate.Types.AppliedTerminology
import Amazonka.Translate.Types.Directionality
import Amazonka.Translate.Types.DisplayLanguageCode
import Amazonka.Translate.Types.EncryptionKey
import Amazonka.Translate.Types.EncryptionKeyType
import Amazonka.Translate.Types.Formality
import Amazonka.Translate.Types.InputDataConfig
import Amazonka.Translate.Types.JobDetails
import Amazonka.Translate.Types.JobStatus
import Amazonka.Translate.Types.Language
import Amazonka.Translate.Types.MergeStrategy
import Amazonka.Translate.Types.OutputDataConfig
import Amazonka.Translate.Types.ParallelDataConfig
import Amazonka.Translate.Types.ParallelDataDataLocation
import Amazonka.Translate.Types.ParallelDataFormat
import Amazonka.Translate.Types.ParallelDataProperties
import Amazonka.Translate.Types.ParallelDataStatus
import Amazonka.Translate.Types.Profanity
import Amazonka.Translate.Types.Tag
import Amazonka.Translate.Types.Term
import Amazonka.Translate.Types.TerminologyData
import Amazonka.Translate.Types.TerminologyDataFormat
import Amazonka.Translate.Types.TerminologyDataLocation
import Amazonka.Translate.Types.TerminologyProperties
import Amazonka.Translate.Types.TextTranslationJobFilter
import Amazonka.Translate.Types.TextTranslationJobProperties
import Amazonka.Translate.Types.TranslationSettings
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"Translate",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"translate",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"translate",
$sel:version:Service :: ByteString
Core.version = ByteString
"2017-07-01",
$sel:s3AddressingStyle:Service :: S3AddressingStyle
Core.s3AddressingStyle = S3AddressingStyle
Core.S3AddressingStyleAuto,
$sel:endpoint:Service :: Region -> Endpoint
Core.endpoint = Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:timeout:Service :: Maybe Seconds
Core.timeout = forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:check:Service :: Status -> Bool
Core.check = Status -> Bool
Core.statusSuccess,
$sel:error:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core.error = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"Translate",
$sel:retry:Service :: Retry
Core.retry = Retry
retry
}
where
retry :: Retry
retry =
Core.Exponential
{ $sel:base:Exponential :: Double
Core.base = Double
5.0e-2,
$sel:growth:Exponential :: Int
Core.growth = Int
2,
$sel:attempts:Exponential :: Int
Core.attempts = Int
5,
$sel:check:Exponential :: ServiceError -> Maybe Text
Core.check = forall {a}. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Bool
Prelude.otherwise = forall a. Maybe a
Prelude.Nothing
_ConcurrentModificationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ConcurrentModificationException :: forall a. AsError a => Fold a ServiceError
_ConcurrentModificationException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ConcurrentModificationException"
_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ConflictException :: forall a. AsError a => Fold a ServiceError
_ConflictException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ConflictException"
_DetectedLanguageLowConfidenceException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_DetectedLanguageLowConfidenceException :: forall a. AsError a => Fold a ServiceError
_DetectedLanguageLowConfidenceException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"DetectedLanguageLowConfidenceException"
_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InternalServerException :: forall a. AsError a => Fold a ServiceError
_InternalServerException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalServerException"
_InvalidFilterException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidFilterException :: forall a. AsError a => Fold a ServiceError
_InvalidFilterException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidFilterException"
_InvalidParameterValueException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidParameterValueException :: forall a. AsError a => Fold a ServiceError
_InvalidParameterValueException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidParameterValueException"
_InvalidRequestException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidRequestException :: forall a. AsError a => Fold a ServiceError
_InvalidRequestException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidRequestException"
_LimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_LimitExceededException :: forall a. AsError a => Fold a ServiceError
_LimitExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"LimitExceededException"
_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceNotFoundException :: forall a. AsError a => Fold a ServiceError
_ResourceNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceNotFoundException"
_ServiceUnavailableException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServiceUnavailableException :: forall a. AsError a => Fold a ServiceError
_ServiceUnavailableException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ServiceUnavailableException"
_TextSizeLimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_TextSizeLimitExceededException :: forall a. AsError a => Fold a ServiceError
_TextSizeLimitExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"TextSizeLimitExceededException"
_TooManyRequestsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_TooManyRequestsException :: forall a. AsError a => Fold a ServiceError
_TooManyRequestsException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"TooManyRequestsException"
_TooManyTagsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_TooManyTagsException :: forall a. AsError a => Fold a ServiceError
_TooManyTagsException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"TooManyTagsException"
_UnsupportedDisplayLanguageCodeException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_UnsupportedDisplayLanguageCodeException :: forall a. AsError a => Fold a ServiceError
_UnsupportedDisplayLanguageCodeException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"UnsupportedDisplayLanguageCodeException"
_UnsupportedLanguagePairException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_UnsupportedLanguagePairException :: forall a. AsError a => Fold a ServiceError
_UnsupportedLanguagePairException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"UnsupportedLanguagePairException"