{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.VoiceId.Types
(
defaultService,
_AccessDeniedException,
_ConflictException,
_InternalServerException,
_ResourceNotFoundException,
_ServiceQuotaExceededException,
_ThrottlingException,
_ValidationException,
AuthenticationDecision (..),
DomainStatus (..),
DuplicateRegistrationAction (..),
ExistingEnrollmentAction (..),
FraudDetectionAction (..),
FraudDetectionDecision (..),
FraudDetectionReason (..),
FraudsterRegistrationJobStatus (..),
ServerSideEncryptionUpdateStatus (..),
SpeakerEnrollmentJobStatus (..),
SpeakerStatus (..),
StreamingStatus (..),
AuthenticationConfiguration (..),
newAuthenticationConfiguration,
authenticationConfiguration_acceptanceThreshold,
AuthenticationResult (..),
newAuthenticationResult,
authenticationResult_audioAggregationEndedAt,
authenticationResult_audioAggregationStartedAt,
authenticationResult_authenticationResultId,
authenticationResult_configuration,
authenticationResult_customerSpeakerId,
authenticationResult_decision,
authenticationResult_generatedSpeakerId,
authenticationResult_score,
Domain (..),
newDomain,
domain_arn,
domain_createdAt,
domain_description,
domain_domainId,
domain_domainStatus,
domain_name,
domain_serverSideEncryptionConfiguration,
domain_serverSideEncryptionUpdateDetails,
domain_updatedAt,
DomainSummary (..),
newDomainSummary,
domainSummary_arn,
domainSummary_createdAt,
domainSummary_description,
domainSummary_domainId,
domainSummary_domainStatus,
domainSummary_name,
domainSummary_serverSideEncryptionConfiguration,
domainSummary_serverSideEncryptionUpdateDetails,
domainSummary_updatedAt,
EnrollmentConfig (..),
newEnrollmentConfig,
enrollmentConfig_existingEnrollmentAction,
enrollmentConfig_fraudDetectionConfig,
EnrollmentJobFraudDetectionConfig (..),
newEnrollmentJobFraudDetectionConfig,
enrollmentJobFraudDetectionConfig_fraudDetectionAction,
enrollmentJobFraudDetectionConfig_riskThreshold,
FailureDetails (..),
newFailureDetails,
failureDetails_message,
failureDetails_statusCode,
FraudDetectionConfiguration (..),
newFraudDetectionConfiguration,
fraudDetectionConfiguration_riskThreshold,
FraudDetectionResult (..),
newFraudDetectionResult,
fraudDetectionResult_audioAggregationEndedAt,
fraudDetectionResult_audioAggregationStartedAt,
fraudDetectionResult_configuration,
fraudDetectionResult_decision,
fraudDetectionResult_fraudDetectionResultId,
fraudDetectionResult_reasons,
fraudDetectionResult_riskDetails,
FraudRiskDetails (..),
newFraudRiskDetails,
fraudRiskDetails_knownFraudsterRisk,
fraudRiskDetails_voiceSpoofingRisk,
Fraudster (..),
newFraudster,
fraudster_createdAt,
fraudster_domainId,
fraudster_generatedFraudsterId,
FraudsterRegistrationJob (..),
newFraudsterRegistrationJob,
fraudsterRegistrationJob_createdAt,
fraudsterRegistrationJob_dataAccessRoleArn,
fraudsterRegistrationJob_domainId,
fraudsterRegistrationJob_endedAt,
fraudsterRegistrationJob_failureDetails,
fraudsterRegistrationJob_inputDataConfig,
fraudsterRegistrationJob_jobId,
fraudsterRegistrationJob_jobName,
fraudsterRegistrationJob_jobProgress,
fraudsterRegistrationJob_jobStatus,
fraudsterRegistrationJob_outputDataConfig,
fraudsterRegistrationJob_registrationConfig,
FraudsterRegistrationJobSummary (..),
newFraudsterRegistrationJobSummary,
fraudsterRegistrationJobSummary_createdAt,
fraudsterRegistrationJobSummary_domainId,
fraudsterRegistrationJobSummary_endedAt,
fraudsterRegistrationJobSummary_failureDetails,
fraudsterRegistrationJobSummary_jobId,
fraudsterRegistrationJobSummary_jobName,
fraudsterRegistrationJobSummary_jobProgress,
fraudsterRegistrationJobSummary_jobStatus,
InputDataConfig (..),
newInputDataConfig,
inputDataConfig_s3Uri,
JobProgress (..),
newJobProgress,
jobProgress_percentComplete,
KnownFraudsterRisk (..),
newKnownFraudsterRisk,
knownFraudsterRisk_generatedFraudsterId,
knownFraudsterRisk_riskScore,
OutputDataConfig (..),
newOutputDataConfig,
outputDataConfig_kmsKeyId,
outputDataConfig_s3Uri,
RegistrationConfig (..),
newRegistrationConfig,
registrationConfig_duplicateRegistrationAction,
registrationConfig_fraudsterSimilarityThreshold,
ServerSideEncryptionConfiguration (..),
newServerSideEncryptionConfiguration,
serverSideEncryptionConfiguration_kmsKeyId,
ServerSideEncryptionUpdateDetails (..),
newServerSideEncryptionUpdateDetails,
serverSideEncryptionUpdateDetails_message,
serverSideEncryptionUpdateDetails_oldKmsKeyId,
serverSideEncryptionUpdateDetails_updateStatus,
Speaker (..),
newSpeaker,
speaker_createdAt,
speaker_customerSpeakerId,
speaker_domainId,
speaker_generatedSpeakerId,
speaker_lastAccessedAt,
speaker_status,
speaker_updatedAt,
SpeakerEnrollmentJob (..),
newSpeakerEnrollmentJob,
speakerEnrollmentJob_createdAt,
speakerEnrollmentJob_dataAccessRoleArn,
speakerEnrollmentJob_domainId,
speakerEnrollmentJob_endedAt,
speakerEnrollmentJob_enrollmentConfig,
speakerEnrollmentJob_failureDetails,
speakerEnrollmentJob_inputDataConfig,
speakerEnrollmentJob_jobId,
speakerEnrollmentJob_jobName,
speakerEnrollmentJob_jobProgress,
speakerEnrollmentJob_jobStatus,
speakerEnrollmentJob_outputDataConfig,
SpeakerEnrollmentJobSummary (..),
newSpeakerEnrollmentJobSummary,
speakerEnrollmentJobSummary_createdAt,
speakerEnrollmentJobSummary_domainId,
speakerEnrollmentJobSummary_endedAt,
speakerEnrollmentJobSummary_failureDetails,
speakerEnrollmentJobSummary_jobId,
speakerEnrollmentJobSummary_jobName,
speakerEnrollmentJobSummary_jobProgress,
speakerEnrollmentJobSummary_jobStatus,
SpeakerSummary (..),
newSpeakerSummary,
speakerSummary_createdAt,
speakerSummary_customerSpeakerId,
speakerSummary_domainId,
speakerSummary_generatedSpeakerId,
speakerSummary_lastAccessedAt,
speakerSummary_status,
speakerSummary_updatedAt,
Tag (..),
newTag,
tag_key,
tag_value,
VoiceSpoofingRisk (..),
newVoiceSpoofingRisk,
voiceSpoofingRisk_riskScore,
)
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.VoiceId.Types.AuthenticationConfiguration
import Amazonka.VoiceId.Types.AuthenticationDecision
import Amazonka.VoiceId.Types.AuthenticationResult
import Amazonka.VoiceId.Types.Domain
import Amazonka.VoiceId.Types.DomainStatus
import Amazonka.VoiceId.Types.DomainSummary
import Amazonka.VoiceId.Types.DuplicateRegistrationAction
import Amazonka.VoiceId.Types.EnrollmentConfig
import Amazonka.VoiceId.Types.EnrollmentJobFraudDetectionConfig
import Amazonka.VoiceId.Types.ExistingEnrollmentAction
import Amazonka.VoiceId.Types.FailureDetails
import Amazonka.VoiceId.Types.FraudDetectionAction
import Amazonka.VoiceId.Types.FraudDetectionConfiguration
import Amazonka.VoiceId.Types.FraudDetectionDecision
import Amazonka.VoiceId.Types.FraudDetectionReason
import Amazonka.VoiceId.Types.FraudDetectionResult
import Amazonka.VoiceId.Types.FraudRiskDetails
import Amazonka.VoiceId.Types.Fraudster
import Amazonka.VoiceId.Types.FraudsterRegistrationJob
import Amazonka.VoiceId.Types.FraudsterRegistrationJobStatus
import Amazonka.VoiceId.Types.FraudsterRegistrationJobSummary
import Amazonka.VoiceId.Types.InputDataConfig
import Amazonka.VoiceId.Types.JobProgress
import Amazonka.VoiceId.Types.KnownFraudsterRisk
import Amazonka.VoiceId.Types.OutputDataConfig
import Amazonka.VoiceId.Types.RegistrationConfig
import Amazonka.VoiceId.Types.ServerSideEncryptionConfiguration
import Amazonka.VoiceId.Types.ServerSideEncryptionUpdateDetails
import Amazonka.VoiceId.Types.ServerSideEncryptionUpdateStatus
import Amazonka.VoiceId.Types.Speaker
import Amazonka.VoiceId.Types.SpeakerEnrollmentJob
import Amazonka.VoiceId.Types.SpeakerEnrollmentJobStatus
import Amazonka.VoiceId.Types.SpeakerEnrollmentJobSummary
import Amazonka.VoiceId.Types.SpeakerStatus
import Amazonka.VoiceId.Types.SpeakerSummary
import Amazonka.VoiceId.Types.StreamingStatus
import Amazonka.VoiceId.Types.Tag
import Amazonka.VoiceId.Types.VoiceSpoofingRisk
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"VoiceId",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"voiceid",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"voiceid",
$sel:version:Service :: ByteString
Core.version = ByteString
"2021-09-27",
$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
"VoiceId",
$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
_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_AccessDeniedException :: forall a. AsError a => Fold a ServiceError
_AccessDeniedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AccessDeniedException"
_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"
_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"
_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"
_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServiceQuotaExceededException :: forall a. AsError a => Fold a ServiceError
_ServiceQuotaExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ServiceQuotaExceededException"
_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ThrottlingException :: forall a. AsError a => Fold a ServiceError
_ThrottlingException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ThrottlingException"
_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ValidationException :: forall a. AsError a => Fold a ServiceError
_ValidationException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ValidationException"