{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.VoiceId.Types.FraudsterRegistrationJob
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.VoiceId.Types.FraudsterRegistrationJob where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.VoiceId.Types.FailureDetails
import Amazonka.VoiceId.Types.FraudsterRegistrationJobStatus
import Amazonka.VoiceId.Types.InputDataConfig
import Amazonka.VoiceId.Types.JobProgress
import Amazonka.VoiceId.Types.OutputDataConfig
import Amazonka.VoiceId.Types.RegistrationConfig

-- | Contains all the information about a fraudster registration job.
--
-- /See:/ 'newFraudsterRegistrationJob' smart constructor.
data FraudsterRegistrationJob = FraudsterRegistrationJob'
  { -- | Contains details that are populated when an entire batch job fails. In
    -- cases of individual registration job failures, the batch job as a whole
    -- doesn\'t fail; it is completed with a @JobStatus@ of
    -- @COMPLETED_WITH_ERRORS@. You can use the job output file to identify the
    -- individual registration requests that failed.
    FraudsterRegistrationJob -> Maybe FailureDetails
failureDetails :: Prelude.Maybe FailureDetails,
    -- | The service-generated identifier for the fraudster registration job.
    FraudsterRegistrationJob -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | A timestamp showing the creation time of the fraudster registration job.
    FraudsterRegistrationJob -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The client-provied name for the fraudster registration job.
    FraudsterRegistrationJob -> Maybe (Sensitive Text)
jobName :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | A timestamp showing when the fraudster registration job ended.
    FraudsterRegistrationJob -> Maybe POSIX
endedAt :: Prelude.Maybe Core.POSIX,
    -- | The input data config containing an S3 URI for the input manifest file
    -- that contains the list of fraudster registration job requests.
    FraudsterRegistrationJob -> Maybe InputDataConfig
inputDataConfig :: Prelude.Maybe InputDataConfig,
    -- | Shows the completed percentage of registration requests listed in the
    -- input file.
    FraudsterRegistrationJob -> Maybe JobProgress
jobProgress :: Prelude.Maybe JobProgress,
    -- | The output data config containing the S3 location where you want Voice
    -- ID to write your job output file; you must also include a KMS Key ID in
    -- order to encrypt the file.
    FraudsterRegistrationJob -> Maybe OutputDataConfig
outputDataConfig :: Prelude.Maybe OutputDataConfig,
    -- | The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions
    -- to access customer\'s buckets to read the input manifest file and write
    -- the job output file.
    FraudsterRegistrationJob -> Maybe Text
dataAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the domain containing the fraudster registration job.
    FraudsterRegistrationJob -> Maybe Text
domainId :: Prelude.Maybe Prelude.Text,
    -- | The current status of the fraudster registration job.
    FraudsterRegistrationJob -> Maybe FraudsterRegistrationJobStatus
jobStatus :: Prelude.Maybe FraudsterRegistrationJobStatus,
    -- | The registration config containing details such as the action to take
    -- when a duplicate fraudster is detected, and the similarity threshold to
    -- use for detecting a duplicate fraudster.
    FraudsterRegistrationJob -> Maybe RegistrationConfig
registrationConfig :: Prelude.Maybe RegistrationConfig
  }
  deriving (FraudsterRegistrationJob -> FraudsterRegistrationJob -> Bool
(FraudsterRegistrationJob -> FraudsterRegistrationJob -> Bool)
-> (FraudsterRegistrationJob -> FraudsterRegistrationJob -> Bool)
-> Eq FraudsterRegistrationJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FraudsterRegistrationJob -> FraudsterRegistrationJob -> Bool
$c/= :: FraudsterRegistrationJob -> FraudsterRegistrationJob -> Bool
== :: FraudsterRegistrationJob -> FraudsterRegistrationJob -> Bool
$c== :: FraudsterRegistrationJob -> FraudsterRegistrationJob -> Bool
Prelude.Eq, Int -> FraudsterRegistrationJob -> ShowS
[FraudsterRegistrationJob] -> ShowS
FraudsterRegistrationJob -> String
(Int -> FraudsterRegistrationJob -> ShowS)
-> (FraudsterRegistrationJob -> String)
-> ([FraudsterRegistrationJob] -> ShowS)
-> Show FraudsterRegistrationJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FraudsterRegistrationJob] -> ShowS
$cshowList :: [FraudsterRegistrationJob] -> ShowS
show :: FraudsterRegistrationJob -> String
$cshow :: FraudsterRegistrationJob -> String
showsPrec :: Int -> FraudsterRegistrationJob -> ShowS
$cshowsPrec :: Int -> FraudsterRegistrationJob -> ShowS
Prelude.Show, (forall x.
 FraudsterRegistrationJob -> Rep FraudsterRegistrationJob x)
-> (forall x.
    Rep FraudsterRegistrationJob x -> FraudsterRegistrationJob)
-> Generic FraudsterRegistrationJob
forall x.
Rep FraudsterRegistrationJob x -> FraudsterRegistrationJob
forall x.
FraudsterRegistrationJob -> Rep FraudsterRegistrationJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FraudsterRegistrationJob x -> FraudsterRegistrationJob
$cfrom :: forall x.
FraudsterRegistrationJob -> Rep FraudsterRegistrationJob x
Prelude.Generic)

-- |
-- Create a value of 'FraudsterRegistrationJob' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'failureDetails', 'fraudsterRegistrationJob_failureDetails' - Contains details that are populated when an entire batch job fails. In
-- cases of individual registration job failures, the batch job as a whole
-- doesn\'t fail; it is completed with a @JobStatus@ of
-- @COMPLETED_WITH_ERRORS@. You can use the job output file to identify the
-- individual registration requests that failed.
--
-- 'jobId', 'fraudsterRegistrationJob_jobId' - The service-generated identifier for the fraudster registration job.
--
-- 'createdAt', 'fraudsterRegistrationJob_createdAt' - A timestamp showing the creation time of the fraudster registration job.
--
-- 'jobName', 'fraudsterRegistrationJob_jobName' - The client-provied name for the fraudster registration job.
--
-- 'endedAt', 'fraudsterRegistrationJob_endedAt' - A timestamp showing when the fraudster registration job ended.
--
-- 'inputDataConfig', 'fraudsterRegistrationJob_inputDataConfig' - The input data config containing an S3 URI for the input manifest file
-- that contains the list of fraudster registration job requests.
--
-- 'jobProgress', 'fraudsterRegistrationJob_jobProgress' - Shows the completed percentage of registration requests listed in the
-- input file.
--
-- 'outputDataConfig', 'fraudsterRegistrationJob_outputDataConfig' - The output data config containing the S3 location where you want Voice
-- ID to write your job output file; you must also include a KMS Key ID in
-- order to encrypt the file.
--
-- 'dataAccessRoleArn', 'fraudsterRegistrationJob_dataAccessRoleArn' - The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions
-- to access customer\'s buckets to read the input manifest file and write
-- the job output file.
--
-- 'domainId', 'fraudsterRegistrationJob_domainId' - The identifier of the domain containing the fraudster registration job.
--
-- 'jobStatus', 'fraudsterRegistrationJob_jobStatus' - The current status of the fraudster registration job.
--
-- 'registrationConfig', 'fraudsterRegistrationJob_registrationConfig' - The registration config containing details such as the action to take
-- when a duplicate fraudster is detected, and the similarity threshold to
-- use for detecting a duplicate fraudster.
newFraudsterRegistrationJob ::
  FraudsterRegistrationJob
newFraudsterRegistrationJob :: FraudsterRegistrationJob
newFraudsterRegistrationJob =
  FraudsterRegistrationJob' :: Maybe FailureDetails
-> Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe InputDataConfig
-> Maybe JobProgress
-> Maybe OutputDataConfig
-> Maybe Text
-> Maybe Text
-> Maybe FraudsterRegistrationJobStatus
-> Maybe RegistrationConfig
-> FraudsterRegistrationJob
FraudsterRegistrationJob'
    { $sel:failureDetails:FraudsterRegistrationJob' :: Maybe FailureDetails
failureDetails =
        Maybe FailureDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:FraudsterRegistrationJob' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:FraudsterRegistrationJob' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:jobName:FraudsterRegistrationJob' :: Maybe (Sensitive Text)
jobName = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:endedAt:FraudsterRegistrationJob' :: Maybe POSIX
endedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:inputDataConfig:FraudsterRegistrationJob' :: Maybe InputDataConfig
inputDataConfig = Maybe InputDataConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:jobProgress:FraudsterRegistrationJob' :: Maybe JobProgress
jobProgress = Maybe JobProgress
forall a. Maybe a
Prelude.Nothing,
      $sel:outputDataConfig:FraudsterRegistrationJob' :: Maybe OutputDataConfig
outputDataConfig = Maybe OutputDataConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:dataAccessRoleArn:FraudsterRegistrationJob' :: Maybe Text
dataAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:domainId:FraudsterRegistrationJob' :: Maybe Text
domainId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:FraudsterRegistrationJob' :: Maybe FraudsterRegistrationJobStatus
jobStatus = Maybe FraudsterRegistrationJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:registrationConfig:FraudsterRegistrationJob' :: Maybe RegistrationConfig
registrationConfig = Maybe RegistrationConfig
forall a. Maybe a
Prelude.Nothing
    }

-- | Contains details that are populated when an entire batch job fails. In
-- cases of individual registration job failures, the batch job as a whole
-- doesn\'t fail; it is completed with a @JobStatus@ of
-- @COMPLETED_WITH_ERRORS@. You can use the job output file to identify the
-- individual registration requests that failed.
fraudsterRegistrationJob_failureDetails :: Lens.Lens' FraudsterRegistrationJob (Prelude.Maybe FailureDetails)
fraudsterRegistrationJob_failureDetails :: (Maybe FailureDetails -> f (Maybe FailureDetails))
-> FraudsterRegistrationJob -> f FraudsterRegistrationJob
fraudsterRegistrationJob_failureDetails = (FraudsterRegistrationJob -> Maybe FailureDetails)
-> (FraudsterRegistrationJob
    -> Maybe FailureDetails -> FraudsterRegistrationJob)
-> Lens
     FraudsterRegistrationJob
     FraudsterRegistrationJob
     (Maybe FailureDetails)
     (Maybe FailureDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FraudsterRegistrationJob' {Maybe FailureDetails
failureDetails :: Maybe FailureDetails
$sel:failureDetails:FraudsterRegistrationJob' :: FraudsterRegistrationJob -> Maybe FailureDetails
failureDetails} -> Maybe FailureDetails
failureDetails) (\s :: FraudsterRegistrationJob
s@FraudsterRegistrationJob' {} Maybe FailureDetails
a -> FraudsterRegistrationJob
s {$sel:failureDetails:FraudsterRegistrationJob' :: Maybe FailureDetails
failureDetails = Maybe FailureDetails
a} :: FraudsterRegistrationJob)

-- | The service-generated identifier for the fraudster registration job.
fraudsterRegistrationJob_jobId :: Lens.Lens' FraudsterRegistrationJob (Prelude.Maybe Prelude.Text)
fraudsterRegistrationJob_jobId :: (Maybe Text -> f (Maybe Text))
-> FraudsterRegistrationJob -> f FraudsterRegistrationJob
fraudsterRegistrationJob_jobId = (FraudsterRegistrationJob -> Maybe Text)
-> (FraudsterRegistrationJob
    -> Maybe Text -> FraudsterRegistrationJob)
-> Lens
     FraudsterRegistrationJob
     FraudsterRegistrationJob
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FraudsterRegistrationJob' {Maybe Text
jobId :: Maybe Text
$sel:jobId:FraudsterRegistrationJob' :: FraudsterRegistrationJob -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: FraudsterRegistrationJob
s@FraudsterRegistrationJob' {} Maybe Text
a -> FraudsterRegistrationJob
s {$sel:jobId:FraudsterRegistrationJob' :: Maybe Text
jobId = Maybe Text
a} :: FraudsterRegistrationJob)

-- | A timestamp showing the creation time of the fraudster registration job.
fraudsterRegistrationJob_createdAt :: Lens.Lens' FraudsterRegistrationJob (Prelude.Maybe Prelude.UTCTime)
fraudsterRegistrationJob_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> FraudsterRegistrationJob -> f FraudsterRegistrationJob
fraudsterRegistrationJob_createdAt = (FraudsterRegistrationJob -> Maybe POSIX)
-> (FraudsterRegistrationJob
    -> Maybe POSIX -> FraudsterRegistrationJob)
-> Lens
     FraudsterRegistrationJob
     FraudsterRegistrationJob
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FraudsterRegistrationJob' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:FraudsterRegistrationJob' :: FraudsterRegistrationJob -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: FraudsterRegistrationJob
s@FraudsterRegistrationJob' {} Maybe POSIX
a -> FraudsterRegistrationJob
s {$sel:createdAt:FraudsterRegistrationJob' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: FraudsterRegistrationJob) ((Maybe POSIX -> f (Maybe POSIX))
 -> FraudsterRegistrationJob -> f FraudsterRegistrationJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> FraudsterRegistrationJob
-> f FraudsterRegistrationJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The client-provied name for the fraudster registration job.
fraudsterRegistrationJob_jobName :: Lens.Lens' FraudsterRegistrationJob (Prelude.Maybe Prelude.Text)
fraudsterRegistrationJob_jobName :: (Maybe Text -> f (Maybe Text))
-> FraudsterRegistrationJob -> f FraudsterRegistrationJob
fraudsterRegistrationJob_jobName = (FraudsterRegistrationJob -> Maybe (Sensitive Text))
-> (FraudsterRegistrationJob
    -> Maybe (Sensitive Text) -> FraudsterRegistrationJob)
-> Lens
     FraudsterRegistrationJob
     FraudsterRegistrationJob
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FraudsterRegistrationJob' {Maybe (Sensitive Text)
jobName :: Maybe (Sensitive Text)
$sel:jobName:FraudsterRegistrationJob' :: FraudsterRegistrationJob -> Maybe (Sensitive Text)
jobName} -> Maybe (Sensitive Text)
jobName) (\s :: FraudsterRegistrationJob
s@FraudsterRegistrationJob' {} Maybe (Sensitive Text)
a -> FraudsterRegistrationJob
s {$sel:jobName:FraudsterRegistrationJob' :: Maybe (Sensitive Text)
jobName = Maybe (Sensitive Text)
a} :: FraudsterRegistrationJob) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> FraudsterRegistrationJob -> f FraudsterRegistrationJob)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> FraudsterRegistrationJob
-> f FraudsterRegistrationJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | A timestamp showing when the fraudster registration job ended.
fraudsterRegistrationJob_endedAt :: Lens.Lens' FraudsterRegistrationJob (Prelude.Maybe Prelude.UTCTime)
fraudsterRegistrationJob_endedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> FraudsterRegistrationJob -> f FraudsterRegistrationJob
fraudsterRegistrationJob_endedAt = (FraudsterRegistrationJob -> Maybe POSIX)
-> (FraudsterRegistrationJob
    -> Maybe POSIX -> FraudsterRegistrationJob)
-> Lens
     FraudsterRegistrationJob
     FraudsterRegistrationJob
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FraudsterRegistrationJob' {Maybe POSIX
endedAt :: Maybe POSIX
$sel:endedAt:FraudsterRegistrationJob' :: FraudsterRegistrationJob -> Maybe POSIX
endedAt} -> Maybe POSIX
endedAt) (\s :: FraudsterRegistrationJob
s@FraudsterRegistrationJob' {} Maybe POSIX
a -> FraudsterRegistrationJob
s {$sel:endedAt:FraudsterRegistrationJob' :: Maybe POSIX
endedAt = Maybe POSIX
a} :: FraudsterRegistrationJob) ((Maybe POSIX -> f (Maybe POSIX))
 -> FraudsterRegistrationJob -> f FraudsterRegistrationJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> FraudsterRegistrationJob
-> f FraudsterRegistrationJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The input data config containing an S3 URI for the input manifest file
-- that contains the list of fraudster registration job requests.
fraudsterRegistrationJob_inputDataConfig :: Lens.Lens' FraudsterRegistrationJob (Prelude.Maybe InputDataConfig)
fraudsterRegistrationJob_inputDataConfig :: (Maybe InputDataConfig -> f (Maybe InputDataConfig))
-> FraudsterRegistrationJob -> f FraudsterRegistrationJob
fraudsterRegistrationJob_inputDataConfig = (FraudsterRegistrationJob -> Maybe InputDataConfig)
-> (FraudsterRegistrationJob
    -> Maybe InputDataConfig -> FraudsterRegistrationJob)
-> Lens
     FraudsterRegistrationJob
     FraudsterRegistrationJob
     (Maybe InputDataConfig)
     (Maybe InputDataConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FraudsterRegistrationJob' {Maybe InputDataConfig
inputDataConfig :: Maybe InputDataConfig
$sel:inputDataConfig:FraudsterRegistrationJob' :: FraudsterRegistrationJob -> Maybe InputDataConfig
inputDataConfig} -> Maybe InputDataConfig
inputDataConfig) (\s :: FraudsterRegistrationJob
s@FraudsterRegistrationJob' {} Maybe InputDataConfig
a -> FraudsterRegistrationJob
s {$sel:inputDataConfig:FraudsterRegistrationJob' :: Maybe InputDataConfig
inputDataConfig = Maybe InputDataConfig
a} :: FraudsterRegistrationJob)

-- | Shows the completed percentage of registration requests listed in the
-- input file.
fraudsterRegistrationJob_jobProgress :: Lens.Lens' FraudsterRegistrationJob (Prelude.Maybe JobProgress)
fraudsterRegistrationJob_jobProgress :: (Maybe JobProgress -> f (Maybe JobProgress))
-> FraudsterRegistrationJob -> f FraudsterRegistrationJob
fraudsterRegistrationJob_jobProgress = (FraudsterRegistrationJob -> Maybe JobProgress)
-> (FraudsterRegistrationJob
    -> Maybe JobProgress -> FraudsterRegistrationJob)
-> Lens
     FraudsterRegistrationJob
     FraudsterRegistrationJob
     (Maybe JobProgress)
     (Maybe JobProgress)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FraudsterRegistrationJob' {Maybe JobProgress
jobProgress :: Maybe JobProgress
$sel:jobProgress:FraudsterRegistrationJob' :: FraudsterRegistrationJob -> Maybe JobProgress
jobProgress} -> Maybe JobProgress
jobProgress) (\s :: FraudsterRegistrationJob
s@FraudsterRegistrationJob' {} Maybe JobProgress
a -> FraudsterRegistrationJob
s {$sel:jobProgress:FraudsterRegistrationJob' :: Maybe JobProgress
jobProgress = Maybe JobProgress
a} :: FraudsterRegistrationJob)

-- | The output data config containing the S3 location where you want Voice
-- ID to write your job output file; you must also include a KMS Key ID in
-- order to encrypt the file.
fraudsterRegistrationJob_outputDataConfig :: Lens.Lens' FraudsterRegistrationJob (Prelude.Maybe OutputDataConfig)
fraudsterRegistrationJob_outputDataConfig :: (Maybe OutputDataConfig -> f (Maybe OutputDataConfig))
-> FraudsterRegistrationJob -> f FraudsterRegistrationJob
fraudsterRegistrationJob_outputDataConfig = (FraudsterRegistrationJob -> Maybe OutputDataConfig)
-> (FraudsterRegistrationJob
    -> Maybe OutputDataConfig -> FraudsterRegistrationJob)
-> Lens
     FraudsterRegistrationJob
     FraudsterRegistrationJob
     (Maybe OutputDataConfig)
     (Maybe OutputDataConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FraudsterRegistrationJob' {Maybe OutputDataConfig
outputDataConfig :: Maybe OutputDataConfig
$sel:outputDataConfig:FraudsterRegistrationJob' :: FraudsterRegistrationJob -> Maybe OutputDataConfig
outputDataConfig} -> Maybe OutputDataConfig
outputDataConfig) (\s :: FraudsterRegistrationJob
s@FraudsterRegistrationJob' {} Maybe OutputDataConfig
a -> FraudsterRegistrationJob
s {$sel:outputDataConfig:FraudsterRegistrationJob' :: Maybe OutputDataConfig
outputDataConfig = Maybe OutputDataConfig
a} :: FraudsterRegistrationJob)

-- | The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions
-- to access customer\'s buckets to read the input manifest file and write
-- the job output file.
fraudsterRegistrationJob_dataAccessRoleArn :: Lens.Lens' FraudsterRegistrationJob (Prelude.Maybe Prelude.Text)
fraudsterRegistrationJob_dataAccessRoleArn :: (Maybe Text -> f (Maybe Text))
-> FraudsterRegistrationJob -> f FraudsterRegistrationJob
fraudsterRegistrationJob_dataAccessRoleArn = (FraudsterRegistrationJob -> Maybe Text)
-> (FraudsterRegistrationJob
    -> Maybe Text -> FraudsterRegistrationJob)
-> Lens
     FraudsterRegistrationJob
     FraudsterRegistrationJob
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FraudsterRegistrationJob' {Maybe Text
dataAccessRoleArn :: Maybe Text
$sel:dataAccessRoleArn:FraudsterRegistrationJob' :: FraudsterRegistrationJob -> Maybe Text
dataAccessRoleArn} -> Maybe Text
dataAccessRoleArn) (\s :: FraudsterRegistrationJob
s@FraudsterRegistrationJob' {} Maybe Text
a -> FraudsterRegistrationJob
s {$sel:dataAccessRoleArn:FraudsterRegistrationJob' :: Maybe Text
dataAccessRoleArn = Maybe Text
a} :: FraudsterRegistrationJob)

-- | The identifier of the domain containing the fraudster registration job.
fraudsterRegistrationJob_domainId :: Lens.Lens' FraudsterRegistrationJob (Prelude.Maybe Prelude.Text)
fraudsterRegistrationJob_domainId :: (Maybe Text -> f (Maybe Text))
-> FraudsterRegistrationJob -> f FraudsterRegistrationJob
fraudsterRegistrationJob_domainId = (FraudsterRegistrationJob -> Maybe Text)
-> (FraudsterRegistrationJob
    -> Maybe Text -> FraudsterRegistrationJob)
-> Lens
     FraudsterRegistrationJob
     FraudsterRegistrationJob
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FraudsterRegistrationJob' {Maybe Text
domainId :: Maybe Text
$sel:domainId:FraudsterRegistrationJob' :: FraudsterRegistrationJob -> Maybe Text
domainId} -> Maybe Text
domainId) (\s :: FraudsterRegistrationJob
s@FraudsterRegistrationJob' {} Maybe Text
a -> FraudsterRegistrationJob
s {$sel:domainId:FraudsterRegistrationJob' :: Maybe Text
domainId = Maybe Text
a} :: FraudsterRegistrationJob)

-- | The current status of the fraudster registration job.
fraudsterRegistrationJob_jobStatus :: Lens.Lens' FraudsterRegistrationJob (Prelude.Maybe FraudsterRegistrationJobStatus)
fraudsterRegistrationJob_jobStatus :: (Maybe FraudsterRegistrationJobStatus
 -> f (Maybe FraudsterRegistrationJobStatus))
-> FraudsterRegistrationJob -> f FraudsterRegistrationJob
fraudsterRegistrationJob_jobStatus = (FraudsterRegistrationJob -> Maybe FraudsterRegistrationJobStatus)
-> (FraudsterRegistrationJob
    -> Maybe FraudsterRegistrationJobStatus
    -> FraudsterRegistrationJob)
-> Lens
     FraudsterRegistrationJob
     FraudsterRegistrationJob
     (Maybe FraudsterRegistrationJobStatus)
     (Maybe FraudsterRegistrationJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FraudsterRegistrationJob' {Maybe FraudsterRegistrationJobStatus
jobStatus :: Maybe FraudsterRegistrationJobStatus
$sel:jobStatus:FraudsterRegistrationJob' :: FraudsterRegistrationJob -> Maybe FraudsterRegistrationJobStatus
jobStatus} -> Maybe FraudsterRegistrationJobStatus
jobStatus) (\s :: FraudsterRegistrationJob
s@FraudsterRegistrationJob' {} Maybe FraudsterRegistrationJobStatus
a -> FraudsterRegistrationJob
s {$sel:jobStatus:FraudsterRegistrationJob' :: Maybe FraudsterRegistrationJobStatus
jobStatus = Maybe FraudsterRegistrationJobStatus
a} :: FraudsterRegistrationJob)

-- | The registration config containing details such as the action to take
-- when a duplicate fraudster is detected, and the similarity threshold to
-- use for detecting a duplicate fraudster.
fraudsterRegistrationJob_registrationConfig :: Lens.Lens' FraudsterRegistrationJob (Prelude.Maybe RegistrationConfig)
fraudsterRegistrationJob_registrationConfig :: (Maybe RegistrationConfig -> f (Maybe RegistrationConfig))
-> FraudsterRegistrationJob -> f FraudsterRegistrationJob
fraudsterRegistrationJob_registrationConfig = (FraudsterRegistrationJob -> Maybe RegistrationConfig)
-> (FraudsterRegistrationJob
    -> Maybe RegistrationConfig -> FraudsterRegistrationJob)
-> Lens
     FraudsterRegistrationJob
     FraudsterRegistrationJob
     (Maybe RegistrationConfig)
     (Maybe RegistrationConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FraudsterRegistrationJob' {Maybe RegistrationConfig
registrationConfig :: Maybe RegistrationConfig
$sel:registrationConfig:FraudsterRegistrationJob' :: FraudsterRegistrationJob -> Maybe RegistrationConfig
registrationConfig} -> Maybe RegistrationConfig
registrationConfig) (\s :: FraudsterRegistrationJob
s@FraudsterRegistrationJob' {} Maybe RegistrationConfig
a -> FraudsterRegistrationJob
s {$sel:registrationConfig:FraudsterRegistrationJob' :: Maybe RegistrationConfig
registrationConfig = Maybe RegistrationConfig
a} :: FraudsterRegistrationJob)

instance Core.FromJSON FraudsterRegistrationJob where
  parseJSON :: Value -> Parser FraudsterRegistrationJob
parseJSON =
    String
-> (Object -> Parser FraudsterRegistrationJob)
-> Value
-> Parser FraudsterRegistrationJob
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"FraudsterRegistrationJob"
      ( \Object
x ->
          Maybe FailureDetails
-> Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe InputDataConfig
-> Maybe JobProgress
-> Maybe OutputDataConfig
-> Maybe Text
-> Maybe Text
-> Maybe FraudsterRegistrationJobStatus
-> Maybe RegistrationConfig
-> FraudsterRegistrationJob
FraudsterRegistrationJob'
            (Maybe FailureDetails
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe (Sensitive Text)
 -> Maybe POSIX
 -> Maybe InputDataConfig
 -> Maybe JobProgress
 -> Maybe OutputDataConfig
 -> Maybe Text
 -> Maybe Text
 -> Maybe FraudsterRegistrationJobStatus
 -> Maybe RegistrationConfig
 -> FraudsterRegistrationJob)
-> Parser (Maybe FailureDetails)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe (Sensitive Text)
      -> Maybe POSIX
      -> Maybe InputDataConfig
      -> Maybe JobProgress
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe FraudsterRegistrationJobStatus
      -> Maybe RegistrationConfig
      -> FraudsterRegistrationJob)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe FailureDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FailureDetails")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe (Sensitive Text)
   -> Maybe POSIX
   -> Maybe InputDataConfig
   -> Maybe JobProgress
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe FraudsterRegistrationJobStatus
   -> Maybe RegistrationConfig
   -> FraudsterRegistrationJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe (Sensitive Text)
      -> Maybe POSIX
      -> Maybe InputDataConfig
      -> Maybe JobProgress
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe FraudsterRegistrationJobStatus
      -> Maybe RegistrationConfig
      -> FraudsterRegistrationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JobId")
            Parser
  (Maybe POSIX
   -> Maybe (Sensitive Text)
   -> Maybe POSIX
   -> Maybe InputDataConfig
   -> Maybe JobProgress
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe FraudsterRegistrationJobStatus
   -> Maybe RegistrationConfig
   -> FraudsterRegistrationJob)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe POSIX
      -> Maybe InputDataConfig
      -> Maybe JobProgress
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe FraudsterRegistrationJobStatus
      -> Maybe RegistrationConfig
      -> FraudsterRegistrationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedAt")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe POSIX
   -> Maybe InputDataConfig
   -> Maybe JobProgress
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe FraudsterRegistrationJobStatus
   -> Maybe RegistrationConfig
   -> FraudsterRegistrationJob)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe POSIX
      -> Maybe InputDataConfig
      -> Maybe JobProgress
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe FraudsterRegistrationJobStatus
      -> Maybe RegistrationConfig
      -> FraudsterRegistrationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JobName")
            Parser
  (Maybe POSIX
   -> Maybe InputDataConfig
   -> Maybe JobProgress
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe FraudsterRegistrationJobStatus
   -> Maybe RegistrationConfig
   -> FraudsterRegistrationJob)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe InputDataConfig
      -> Maybe JobProgress
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe FraudsterRegistrationJobStatus
      -> Maybe RegistrationConfig
      -> FraudsterRegistrationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EndedAt")
            Parser
  (Maybe InputDataConfig
   -> Maybe JobProgress
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe FraudsterRegistrationJobStatus
   -> Maybe RegistrationConfig
   -> FraudsterRegistrationJob)
-> Parser (Maybe InputDataConfig)
-> Parser
     (Maybe JobProgress
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe FraudsterRegistrationJobStatus
      -> Maybe RegistrationConfig
      -> FraudsterRegistrationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputDataConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputDataConfig")
            Parser
  (Maybe JobProgress
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe FraudsterRegistrationJobStatus
   -> Maybe RegistrationConfig
   -> FraudsterRegistrationJob)
-> Parser (Maybe JobProgress)
-> Parser
     (Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe FraudsterRegistrationJobStatus
      -> Maybe RegistrationConfig
      -> FraudsterRegistrationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobProgress)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JobProgress")
            Parser
  (Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe FraudsterRegistrationJobStatus
   -> Maybe RegistrationConfig
   -> FraudsterRegistrationJob)
-> Parser (Maybe OutputDataConfig)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe FraudsterRegistrationJobStatus
      -> Maybe RegistrationConfig
      -> FraudsterRegistrationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OutputDataConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutputDataConfig")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe FraudsterRegistrationJobStatus
   -> Maybe RegistrationConfig
   -> FraudsterRegistrationJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe FraudsterRegistrationJobStatus
      -> Maybe RegistrationConfig
      -> FraudsterRegistrationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DataAccessRoleArn")
            Parser
  (Maybe Text
   -> Maybe FraudsterRegistrationJobStatus
   -> Maybe RegistrationConfig
   -> FraudsterRegistrationJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe FraudsterRegistrationJobStatus
      -> Maybe RegistrationConfig -> FraudsterRegistrationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DomainId")
            Parser
  (Maybe FraudsterRegistrationJobStatus
   -> Maybe RegistrationConfig -> FraudsterRegistrationJob)
-> Parser (Maybe FraudsterRegistrationJobStatus)
-> Parser (Maybe RegistrationConfig -> FraudsterRegistrationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FraudsterRegistrationJobStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JobStatus")
            Parser (Maybe RegistrationConfig -> FraudsterRegistrationJob)
-> Parser (Maybe RegistrationConfig)
-> Parser FraudsterRegistrationJob
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RegistrationConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RegistrationConfig")
      )

instance Prelude.Hashable FraudsterRegistrationJob

instance Prelude.NFData FraudsterRegistrationJob