{-# 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.SpeakerEnrollmentJob
-- 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.SpeakerEnrollmentJob where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.VoiceId.Types.EnrollmentConfig
import Amazonka.VoiceId.Types.FailureDetails
import Amazonka.VoiceId.Types.InputDataConfig
import Amazonka.VoiceId.Types.JobProgress
import Amazonka.VoiceId.Types.OutputDataConfig
import Amazonka.VoiceId.Types.SpeakerEnrollmentJobStatus

-- | Contains all the information about a speaker enrollment job.
--
-- /See:/ 'newSpeakerEnrollmentJob' smart constructor.
data SpeakerEnrollmentJob = SpeakerEnrollmentJob'
  { -- | 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.
    SpeakerEnrollmentJob -> Maybe FailureDetails
failureDetails :: Prelude.Maybe FailureDetails,
    -- | The service-generated identifier for the speaker enrollment job.
    SpeakerEnrollmentJob -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | A timestamp showing the creation of the speaker enrollment job.
    SpeakerEnrollmentJob -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The client-provided name for the speaker enrollment job.
    SpeakerEnrollmentJob -> Maybe (Sensitive Text)
jobName :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | A timestamp showing when the speaker enrollment job ended.
    SpeakerEnrollmentJob -> Maybe POSIX
endedAt :: Prelude.Maybe Core.POSIX,
    -- | The configuration that defines the action to take when the speaker is
    -- already enrolled in Voice ID, and the @FraudDetectionConfig@ to use.
    SpeakerEnrollmentJob -> Maybe EnrollmentConfig
enrollmentConfig :: Prelude.Maybe EnrollmentConfig,
    -- | The input data config containing an S3 URI for the input manifest file
    -- that contains the list of speaker enrollment job requests.
    SpeakerEnrollmentJob -> Maybe InputDataConfig
inputDataConfig :: Prelude.Maybe InputDataConfig,
    -- | Provides details on job progress. This field shows the completed
    -- percentage of registration requests listed in the input file.
    SpeakerEnrollmentJob -> Maybe JobProgress
jobProgress :: Prelude.Maybe JobProgress,
    -- | The output data config containing the S3 location where Voice ID writes
    -- the job output file; you must also include a KMS Key ID to encrypt the
    -- file.
    SpeakerEnrollmentJob -> 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.
    SpeakerEnrollmentJob -> Maybe Text
dataAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the domain that contains the speaker enrollment job.
    SpeakerEnrollmentJob -> Maybe Text
domainId :: Prelude.Maybe Prelude.Text,
    -- | The current status of the speaker enrollment job.
    SpeakerEnrollmentJob -> Maybe SpeakerEnrollmentJobStatus
jobStatus :: Prelude.Maybe SpeakerEnrollmentJobStatus
  }
  deriving (SpeakerEnrollmentJob -> SpeakerEnrollmentJob -> Bool
(SpeakerEnrollmentJob -> SpeakerEnrollmentJob -> Bool)
-> (SpeakerEnrollmentJob -> SpeakerEnrollmentJob -> Bool)
-> Eq SpeakerEnrollmentJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SpeakerEnrollmentJob -> SpeakerEnrollmentJob -> Bool
$c/= :: SpeakerEnrollmentJob -> SpeakerEnrollmentJob -> Bool
== :: SpeakerEnrollmentJob -> SpeakerEnrollmentJob -> Bool
$c== :: SpeakerEnrollmentJob -> SpeakerEnrollmentJob -> Bool
Prelude.Eq, Int -> SpeakerEnrollmentJob -> ShowS
[SpeakerEnrollmentJob] -> ShowS
SpeakerEnrollmentJob -> String
(Int -> SpeakerEnrollmentJob -> ShowS)
-> (SpeakerEnrollmentJob -> String)
-> ([SpeakerEnrollmentJob] -> ShowS)
-> Show SpeakerEnrollmentJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SpeakerEnrollmentJob] -> ShowS
$cshowList :: [SpeakerEnrollmentJob] -> ShowS
show :: SpeakerEnrollmentJob -> String
$cshow :: SpeakerEnrollmentJob -> String
showsPrec :: Int -> SpeakerEnrollmentJob -> ShowS
$cshowsPrec :: Int -> SpeakerEnrollmentJob -> ShowS
Prelude.Show, (forall x. SpeakerEnrollmentJob -> Rep SpeakerEnrollmentJob x)
-> (forall x. Rep SpeakerEnrollmentJob x -> SpeakerEnrollmentJob)
-> Generic SpeakerEnrollmentJob
forall x. Rep SpeakerEnrollmentJob x -> SpeakerEnrollmentJob
forall x. SpeakerEnrollmentJob -> Rep SpeakerEnrollmentJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SpeakerEnrollmentJob x -> SpeakerEnrollmentJob
$cfrom :: forall x. SpeakerEnrollmentJob -> Rep SpeakerEnrollmentJob x
Prelude.Generic)

-- |
-- Create a value of 'SpeakerEnrollmentJob' 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', 'speakerEnrollmentJob_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', 'speakerEnrollmentJob_jobId' - The service-generated identifier for the speaker enrollment job.
--
-- 'createdAt', 'speakerEnrollmentJob_createdAt' - A timestamp showing the creation of the speaker enrollment job.
--
-- 'jobName', 'speakerEnrollmentJob_jobName' - The client-provided name for the speaker enrollment job.
--
-- 'endedAt', 'speakerEnrollmentJob_endedAt' - A timestamp showing when the speaker enrollment job ended.
--
-- 'enrollmentConfig', 'speakerEnrollmentJob_enrollmentConfig' - The configuration that defines the action to take when the speaker is
-- already enrolled in Voice ID, and the @FraudDetectionConfig@ to use.
--
-- 'inputDataConfig', 'speakerEnrollmentJob_inputDataConfig' - The input data config containing an S3 URI for the input manifest file
-- that contains the list of speaker enrollment job requests.
--
-- 'jobProgress', 'speakerEnrollmentJob_jobProgress' - Provides details on job progress. This field shows the completed
-- percentage of registration requests listed in the input file.
--
-- 'outputDataConfig', 'speakerEnrollmentJob_outputDataConfig' - The output data config containing the S3 location where Voice ID writes
-- the job output file; you must also include a KMS Key ID to encrypt the
-- file.
--
-- 'dataAccessRoleArn', 'speakerEnrollmentJob_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', 'speakerEnrollmentJob_domainId' - The identifier of the domain that contains the speaker enrollment job.
--
-- 'jobStatus', 'speakerEnrollmentJob_jobStatus' - The current status of the speaker enrollment job.
newSpeakerEnrollmentJob ::
  SpeakerEnrollmentJob
newSpeakerEnrollmentJob :: SpeakerEnrollmentJob
newSpeakerEnrollmentJob =
  SpeakerEnrollmentJob' :: Maybe FailureDetails
-> Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe EnrollmentConfig
-> Maybe InputDataConfig
-> Maybe JobProgress
-> Maybe OutputDataConfig
-> Maybe Text
-> Maybe Text
-> Maybe SpeakerEnrollmentJobStatus
-> SpeakerEnrollmentJob
SpeakerEnrollmentJob'
    { $sel:failureDetails:SpeakerEnrollmentJob' :: Maybe FailureDetails
failureDetails =
        Maybe FailureDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:SpeakerEnrollmentJob' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:SpeakerEnrollmentJob' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:jobName:SpeakerEnrollmentJob' :: Maybe (Sensitive Text)
jobName = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:endedAt:SpeakerEnrollmentJob' :: Maybe POSIX
endedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:enrollmentConfig:SpeakerEnrollmentJob' :: Maybe EnrollmentConfig
enrollmentConfig = Maybe EnrollmentConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:inputDataConfig:SpeakerEnrollmentJob' :: Maybe InputDataConfig
inputDataConfig = Maybe InputDataConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:jobProgress:SpeakerEnrollmentJob' :: Maybe JobProgress
jobProgress = Maybe JobProgress
forall a. Maybe a
Prelude.Nothing,
      $sel:outputDataConfig:SpeakerEnrollmentJob' :: Maybe OutputDataConfig
outputDataConfig = Maybe OutputDataConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:dataAccessRoleArn:SpeakerEnrollmentJob' :: Maybe Text
dataAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:domainId:SpeakerEnrollmentJob' :: Maybe Text
domainId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:SpeakerEnrollmentJob' :: Maybe SpeakerEnrollmentJobStatus
jobStatus = Maybe SpeakerEnrollmentJobStatus
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.
speakerEnrollmentJob_failureDetails :: Lens.Lens' SpeakerEnrollmentJob (Prelude.Maybe FailureDetails)
speakerEnrollmentJob_failureDetails :: (Maybe FailureDetails -> f (Maybe FailureDetails))
-> SpeakerEnrollmentJob -> f SpeakerEnrollmentJob
speakerEnrollmentJob_failureDetails = (SpeakerEnrollmentJob -> Maybe FailureDetails)
-> (SpeakerEnrollmentJob
    -> Maybe FailureDetails -> SpeakerEnrollmentJob)
-> Lens
     SpeakerEnrollmentJob
     SpeakerEnrollmentJob
     (Maybe FailureDetails)
     (Maybe FailureDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerEnrollmentJob' {Maybe FailureDetails
failureDetails :: Maybe FailureDetails
$sel:failureDetails:SpeakerEnrollmentJob' :: SpeakerEnrollmentJob -> Maybe FailureDetails
failureDetails} -> Maybe FailureDetails
failureDetails) (\s :: SpeakerEnrollmentJob
s@SpeakerEnrollmentJob' {} Maybe FailureDetails
a -> SpeakerEnrollmentJob
s {$sel:failureDetails:SpeakerEnrollmentJob' :: Maybe FailureDetails
failureDetails = Maybe FailureDetails
a} :: SpeakerEnrollmentJob)

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

-- | A timestamp showing the creation of the speaker enrollment job.
speakerEnrollmentJob_createdAt :: Lens.Lens' SpeakerEnrollmentJob (Prelude.Maybe Prelude.UTCTime)
speakerEnrollmentJob_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SpeakerEnrollmentJob -> f SpeakerEnrollmentJob
speakerEnrollmentJob_createdAt = (SpeakerEnrollmentJob -> Maybe POSIX)
-> (SpeakerEnrollmentJob -> Maybe POSIX -> SpeakerEnrollmentJob)
-> Lens
     SpeakerEnrollmentJob
     SpeakerEnrollmentJob
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerEnrollmentJob' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:SpeakerEnrollmentJob' :: SpeakerEnrollmentJob -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: SpeakerEnrollmentJob
s@SpeakerEnrollmentJob' {} Maybe POSIX
a -> SpeakerEnrollmentJob
s {$sel:createdAt:SpeakerEnrollmentJob' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: SpeakerEnrollmentJob) ((Maybe POSIX -> f (Maybe POSIX))
 -> SpeakerEnrollmentJob -> f SpeakerEnrollmentJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SpeakerEnrollmentJob
-> f SpeakerEnrollmentJob
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-provided name for the speaker enrollment job.
speakerEnrollmentJob_jobName :: Lens.Lens' SpeakerEnrollmentJob (Prelude.Maybe Prelude.Text)
speakerEnrollmentJob_jobName :: (Maybe Text -> f (Maybe Text))
-> SpeakerEnrollmentJob -> f SpeakerEnrollmentJob
speakerEnrollmentJob_jobName = (SpeakerEnrollmentJob -> Maybe (Sensitive Text))
-> (SpeakerEnrollmentJob
    -> Maybe (Sensitive Text) -> SpeakerEnrollmentJob)
-> Lens
     SpeakerEnrollmentJob
     SpeakerEnrollmentJob
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerEnrollmentJob' {Maybe (Sensitive Text)
jobName :: Maybe (Sensitive Text)
$sel:jobName:SpeakerEnrollmentJob' :: SpeakerEnrollmentJob -> Maybe (Sensitive Text)
jobName} -> Maybe (Sensitive Text)
jobName) (\s :: SpeakerEnrollmentJob
s@SpeakerEnrollmentJob' {} Maybe (Sensitive Text)
a -> SpeakerEnrollmentJob
s {$sel:jobName:SpeakerEnrollmentJob' :: Maybe (Sensitive Text)
jobName = Maybe (Sensitive Text)
a} :: SpeakerEnrollmentJob) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> SpeakerEnrollmentJob -> f SpeakerEnrollmentJob)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> SpeakerEnrollmentJob
-> f SpeakerEnrollmentJob
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 speaker enrollment job ended.
speakerEnrollmentJob_endedAt :: Lens.Lens' SpeakerEnrollmentJob (Prelude.Maybe Prelude.UTCTime)
speakerEnrollmentJob_endedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SpeakerEnrollmentJob -> f SpeakerEnrollmentJob
speakerEnrollmentJob_endedAt = (SpeakerEnrollmentJob -> Maybe POSIX)
-> (SpeakerEnrollmentJob -> Maybe POSIX -> SpeakerEnrollmentJob)
-> Lens
     SpeakerEnrollmentJob
     SpeakerEnrollmentJob
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerEnrollmentJob' {Maybe POSIX
endedAt :: Maybe POSIX
$sel:endedAt:SpeakerEnrollmentJob' :: SpeakerEnrollmentJob -> Maybe POSIX
endedAt} -> Maybe POSIX
endedAt) (\s :: SpeakerEnrollmentJob
s@SpeakerEnrollmentJob' {} Maybe POSIX
a -> SpeakerEnrollmentJob
s {$sel:endedAt:SpeakerEnrollmentJob' :: Maybe POSIX
endedAt = Maybe POSIX
a} :: SpeakerEnrollmentJob) ((Maybe POSIX -> f (Maybe POSIX))
 -> SpeakerEnrollmentJob -> f SpeakerEnrollmentJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SpeakerEnrollmentJob
-> f SpeakerEnrollmentJob
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 configuration that defines the action to take when the speaker is
-- already enrolled in Voice ID, and the @FraudDetectionConfig@ to use.
speakerEnrollmentJob_enrollmentConfig :: Lens.Lens' SpeakerEnrollmentJob (Prelude.Maybe EnrollmentConfig)
speakerEnrollmentJob_enrollmentConfig :: (Maybe EnrollmentConfig -> f (Maybe EnrollmentConfig))
-> SpeakerEnrollmentJob -> f SpeakerEnrollmentJob
speakerEnrollmentJob_enrollmentConfig = (SpeakerEnrollmentJob -> Maybe EnrollmentConfig)
-> (SpeakerEnrollmentJob
    -> Maybe EnrollmentConfig -> SpeakerEnrollmentJob)
-> Lens
     SpeakerEnrollmentJob
     SpeakerEnrollmentJob
     (Maybe EnrollmentConfig)
     (Maybe EnrollmentConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerEnrollmentJob' {Maybe EnrollmentConfig
enrollmentConfig :: Maybe EnrollmentConfig
$sel:enrollmentConfig:SpeakerEnrollmentJob' :: SpeakerEnrollmentJob -> Maybe EnrollmentConfig
enrollmentConfig} -> Maybe EnrollmentConfig
enrollmentConfig) (\s :: SpeakerEnrollmentJob
s@SpeakerEnrollmentJob' {} Maybe EnrollmentConfig
a -> SpeakerEnrollmentJob
s {$sel:enrollmentConfig:SpeakerEnrollmentJob' :: Maybe EnrollmentConfig
enrollmentConfig = Maybe EnrollmentConfig
a} :: SpeakerEnrollmentJob)

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

-- | Provides details on job progress. This field shows the completed
-- percentage of registration requests listed in the input file.
speakerEnrollmentJob_jobProgress :: Lens.Lens' SpeakerEnrollmentJob (Prelude.Maybe JobProgress)
speakerEnrollmentJob_jobProgress :: (Maybe JobProgress -> f (Maybe JobProgress))
-> SpeakerEnrollmentJob -> f SpeakerEnrollmentJob
speakerEnrollmentJob_jobProgress = (SpeakerEnrollmentJob -> Maybe JobProgress)
-> (SpeakerEnrollmentJob
    -> Maybe JobProgress -> SpeakerEnrollmentJob)
-> Lens
     SpeakerEnrollmentJob
     SpeakerEnrollmentJob
     (Maybe JobProgress)
     (Maybe JobProgress)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerEnrollmentJob' {Maybe JobProgress
jobProgress :: Maybe JobProgress
$sel:jobProgress:SpeakerEnrollmentJob' :: SpeakerEnrollmentJob -> Maybe JobProgress
jobProgress} -> Maybe JobProgress
jobProgress) (\s :: SpeakerEnrollmentJob
s@SpeakerEnrollmentJob' {} Maybe JobProgress
a -> SpeakerEnrollmentJob
s {$sel:jobProgress:SpeakerEnrollmentJob' :: Maybe JobProgress
jobProgress = Maybe JobProgress
a} :: SpeakerEnrollmentJob)

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

-- | 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.
speakerEnrollmentJob_dataAccessRoleArn :: Lens.Lens' SpeakerEnrollmentJob (Prelude.Maybe Prelude.Text)
speakerEnrollmentJob_dataAccessRoleArn :: (Maybe Text -> f (Maybe Text))
-> SpeakerEnrollmentJob -> f SpeakerEnrollmentJob
speakerEnrollmentJob_dataAccessRoleArn = (SpeakerEnrollmentJob -> Maybe Text)
-> (SpeakerEnrollmentJob -> Maybe Text -> SpeakerEnrollmentJob)
-> Lens
     SpeakerEnrollmentJob SpeakerEnrollmentJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerEnrollmentJob' {Maybe Text
dataAccessRoleArn :: Maybe Text
$sel:dataAccessRoleArn:SpeakerEnrollmentJob' :: SpeakerEnrollmentJob -> Maybe Text
dataAccessRoleArn} -> Maybe Text
dataAccessRoleArn) (\s :: SpeakerEnrollmentJob
s@SpeakerEnrollmentJob' {} Maybe Text
a -> SpeakerEnrollmentJob
s {$sel:dataAccessRoleArn:SpeakerEnrollmentJob' :: Maybe Text
dataAccessRoleArn = Maybe Text
a} :: SpeakerEnrollmentJob)

-- | The identifier of the domain that contains the speaker enrollment job.
speakerEnrollmentJob_domainId :: Lens.Lens' SpeakerEnrollmentJob (Prelude.Maybe Prelude.Text)
speakerEnrollmentJob_domainId :: (Maybe Text -> f (Maybe Text))
-> SpeakerEnrollmentJob -> f SpeakerEnrollmentJob
speakerEnrollmentJob_domainId = (SpeakerEnrollmentJob -> Maybe Text)
-> (SpeakerEnrollmentJob -> Maybe Text -> SpeakerEnrollmentJob)
-> Lens
     SpeakerEnrollmentJob SpeakerEnrollmentJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerEnrollmentJob' {Maybe Text
domainId :: Maybe Text
$sel:domainId:SpeakerEnrollmentJob' :: SpeakerEnrollmentJob -> Maybe Text
domainId} -> Maybe Text
domainId) (\s :: SpeakerEnrollmentJob
s@SpeakerEnrollmentJob' {} Maybe Text
a -> SpeakerEnrollmentJob
s {$sel:domainId:SpeakerEnrollmentJob' :: Maybe Text
domainId = Maybe Text
a} :: SpeakerEnrollmentJob)

-- | The current status of the speaker enrollment job.
speakerEnrollmentJob_jobStatus :: Lens.Lens' SpeakerEnrollmentJob (Prelude.Maybe SpeakerEnrollmentJobStatus)
speakerEnrollmentJob_jobStatus :: (Maybe SpeakerEnrollmentJobStatus
 -> f (Maybe SpeakerEnrollmentJobStatus))
-> SpeakerEnrollmentJob -> f SpeakerEnrollmentJob
speakerEnrollmentJob_jobStatus = (SpeakerEnrollmentJob -> Maybe SpeakerEnrollmentJobStatus)
-> (SpeakerEnrollmentJob
    -> Maybe SpeakerEnrollmentJobStatus -> SpeakerEnrollmentJob)
-> Lens
     SpeakerEnrollmentJob
     SpeakerEnrollmentJob
     (Maybe SpeakerEnrollmentJobStatus)
     (Maybe SpeakerEnrollmentJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerEnrollmentJob' {Maybe SpeakerEnrollmentJobStatus
jobStatus :: Maybe SpeakerEnrollmentJobStatus
$sel:jobStatus:SpeakerEnrollmentJob' :: SpeakerEnrollmentJob -> Maybe SpeakerEnrollmentJobStatus
jobStatus} -> Maybe SpeakerEnrollmentJobStatus
jobStatus) (\s :: SpeakerEnrollmentJob
s@SpeakerEnrollmentJob' {} Maybe SpeakerEnrollmentJobStatus
a -> SpeakerEnrollmentJob
s {$sel:jobStatus:SpeakerEnrollmentJob' :: Maybe SpeakerEnrollmentJobStatus
jobStatus = Maybe SpeakerEnrollmentJobStatus
a} :: SpeakerEnrollmentJob)

instance Core.FromJSON SpeakerEnrollmentJob where
  parseJSON :: Value -> Parser SpeakerEnrollmentJob
parseJSON =
    String
-> (Object -> Parser SpeakerEnrollmentJob)
-> Value
-> Parser SpeakerEnrollmentJob
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SpeakerEnrollmentJob"
      ( \Object
x ->
          Maybe FailureDetails
-> Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe EnrollmentConfig
-> Maybe InputDataConfig
-> Maybe JobProgress
-> Maybe OutputDataConfig
-> Maybe Text
-> Maybe Text
-> Maybe SpeakerEnrollmentJobStatus
-> SpeakerEnrollmentJob
SpeakerEnrollmentJob'
            (Maybe FailureDetails
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe (Sensitive Text)
 -> Maybe POSIX
 -> Maybe EnrollmentConfig
 -> Maybe InputDataConfig
 -> Maybe JobProgress
 -> Maybe OutputDataConfig
 -> Maybe Text
 -> Maybe Text
 -> Maybe SpeakerEnrollmentJobStatus
 -> SpeakerEnrollmentJob)
-> Parser (Maybe FailureDetails)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe (Sensitive Text)
      -> Maybe POSIX
      -> Maybe EnrollmentConfig
      -> Maybe InputDataConfig
      -> Maybe JobProgress
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus
      -> SpeakerEnrollmentJob)
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 EnrollmentConfig
   -> Maybe InputDataConfig
   -> Maybe JobProgress
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe SpeakerEnrollmentJobStatus
   -> SpeakerEnrollmentJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe (Sensitive Text)
      -> Maybe POSIX
      -> Maybe EnrollmentConfig
      -> Maybe InputDataConfig
      -> Maybe JobProgress
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus
      -> SpeakerEnrollmentJob)
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 EnrollmentConfig
   -> Maybe InputDataConfig
   -> Maybe JobProgress
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe SpeakerEnrollmentJobStatus
   -> SpeakerEnrollmentJob)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe POSIX
      -> Maybe EnrollmentConfig
      -> Maybe InputDataConfig
      -> Maybe JobProgress
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus
      -> SpeakerEnrollmentJob)
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 EnrollmentConfig
   -> Maybe InputDataConfig
   -> Maybe JobProgress
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe SpeakerEnrollmentJobStatus
   -> SpeakerEnrollmentJob)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe POSIX
      -> Maybe EnrollmentConfig
      -> Maybe InputDataConfig
      -> Maybe JobProgress
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus
      -> SpeakerEnrollmentJob)
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 EnrollmentConfig
   -> Maybe InputDataConfig
   -> Maybe JobProgress
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe SpeakerEnrollmentJobStatus
   -> SpeakerEnrollmentJob)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe EnrollmentConfig
      -> Maybe InputDataConfig
      -> Maybe JobProgress
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus
      -> SpeakerEnrollmentJob)
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 EnrollmentConfig
   -> Maybe InputDataConfig
   -> Maybe JobProgress
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe SpeakerEnrollmentJobStatus
   -> SpeakerEnrollmentJob)
-> Parser (Maybe EnrollmentConfig)
-> Parser
     (Maybe InputDataConfig
      -> Maybe JobProgress
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus
      -> SpeakerEnrollmentJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EnrollmentConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EnrollmentConfig")
            Parser
  (Maybe InputDataConfig
   -> Maybe JobProgress
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe SpeakerEnrollmentJobStatus
   -> SpeakerEnrollmentJob)
-> Parser (Maybe InputDataConfig)
-> Parser
     (Maybe JobProgress
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus
      -> SpeakerEnrollmentJob)
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 SpeakerEnrollmentJobStatus
   -> SpeakerEnrollmentJob)
-> Parser (Maybe JobProgress)
-> Parser
     (Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus
      -> SpeakerEnrollmentJob)
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 SpeakerEnrollmentJobStatus
   -> SpeakerEnrollmentJob)
-> Parser (Maybe OutputDataConfig)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus
      -> SpeakerEnrollmentJob)
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 SpeakerEnrollmentJobStatus
   -> SpeakerEnrollmentJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus -> SpeakerEnrollmentJob)
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 SpeakerEnrollmentJobStatus -> SpeakerEnrollmentJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe SpeakerEnrollmentJobStatus -> SpeakerEnrollmentJob)
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 SpeakerEnrollmentJobStatus -> SpeakerEnrollmentJob)
-> Parser (Maybe SpeakerEnrollmentJobStatus)
-> Parser SpeakerEnrollmentJob
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SpeakerEnrollmentJobStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JobStatus")
      )

instance Prelude.Hashable SpeakerEnrollmentJob

instance Prelude.NFData SpeakerEnrollmentJob