{-# 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.SpeakerEnrollmentJobSummary
-- 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.SpeakerEnrollmentJobSummary 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.JobProgress
import Amazonka.VoiceId.Types.SpeakerEnrollmentJobStatus

-- | Contains a summary of information about a speaker enrollment job.
--
-- /See:/ 'newSpeakerEnrollmentJobSummary' smart constructor.
data SpeakerEnrollmentJobSummary = SpeakerEnrollmentJobSummary'
  { -- | 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.
    SpeakerEnrollmentJobSummary -> Maybe FailureDetails
failureDetails :: Prelude.Maybe FailureDetails,
    -- | The service-generated identifier for the speaker enrollment job.
    SpeakerEnrollmentJobSummary -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | A timestamp showing the creation time of the speaker enrollment job.
    SpeakerEnrollmentJobSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The client-provided name for the speaker enrollment job.
    SpeakerEnrollmentJobSummary -> Maybe (Sensitive Text)
jobName :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | A timestamp showing when the speaker enrollment job ended.
    SpeakerEnrollmentJobSummary -> Maybe POSIX
endedAt :: Prelude.Maybe Core.POSIX,
    -- | Provides details regarding job progress. This field shows the completed
    -- percentage of enrollment requests listed in the input file.
    SpeakerEnrollmentJobSummary -> Maybe JobProgress
jobProgress :: Prelude.Maybe JobProgress,
    -- | The identifier of the domain that contains the speaker enrollment job.
    SpeakerEnrollmentJobSummary -> Maybe Text
domainId :: Prelude.Maybe Prelude.Text,
    -- | The current status of the speaker enrollment job.
    SpeakerEnrollmentJobSummary -> Maybe SpeakerEnrollmentJobStatus
jobStatus :: Prelude.Maybe SpeakerEnrollmentJobStatus
  }
  deriving (SpeakerEnrollmentJobSummary -> SpeakerEnrollmentJobSummary -> Bool
(SpeakerEnrollmentJobSummary
 -> SpeakerEnrollmentJobSummary -> Bool)
-> (SpeakerEnrollmentJobSummary
    -> SpeakerEnrollmentJobSummary -> Bool)
-> Eq SpeakerEnrollmentJobSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SpeakerEnrollmentJobSummary -> SpeakerEnrollmentJobSummary -> Bool
$c/= :: SpeakerEnrollmentJobSummary -> SpeakerEnrollmentJobSummary -> Bool
== :: SpeakerEnrollmentJobSummary -> SpeakerEnrollmentJobSummary -> Bool
$c== :: SpeakerEnrollmentJobSummary -> SpeakerEnrollmentJobSummary -> Bool
Prelude.Eq, Int -> SpeakerEnrollmentJobSummary -> ShowS
[SpeakerEnrollmentJobSummary] -> ShowS
SpeakerEnrollmentJobSummary -> String
(Int -> SpeakerEnrollmentJobSummary -> ShowS)
-> (SpeakerEnrollmentJobSummary -> String)
-> ([SpeakerEnrollmentJobSummary] -> ShowS)
-> Show SpeakerEnrollmentJobSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SpeakerEnrollmentJobSummary] -> ShowS
$cshowList :: [SpeakerEnrollmentJobSummary] -> ShowS
show :: SpeakerEnrollmentJobSummary -> String
$cshow :: SpeakerEnrollmentJobSummary -> String
showsPrec :: Int -> SpeakerEnrollmentJobSummary -> ShowS
$cshowsPrec :: Int -> SpeakerEnrollmentJobSummary -> ShowS
Prelude.Show, (forall x.
 SpeakerEnrollmentJobSummary -> Rep SpeakerEnrollmentJobSummary x)
-> (forall x.
    Rep SpeakerEnrollmentJobSummary x -> SpeakerEnrollmentJobSummary)
-> Generic SpeakerEnrollmentJobSummary
forall x.
Rep SpeakerEnrollmentJobSummary x -> SpeakerEnrollmentJobSummary
forall x.
SpeakerEnrollmentJobSummary -> Rep SpeakerEnrollmentJobSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SpeakerEnrollmentJobSummary x -> SpeakerEnrollmentJobSummary
$cfrom :: forall x.
SpeakerEnrollmentJobSummary -> Rep SpeakerEnrollmentJobSummary x
Prelude.Generic)

-- |
-- Create a value of 'SpeakerEnrollmentJobSummary' 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', 'speakerEnrollmentJobSummary_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', 'speakerEnrollmentJobSummary_jobId' - The service-generated identifier for the speaker enrollment job.
--
-- 'createdAt', 'speakerEnrollmentJobSummary_createdAt' - A timestamp showing the creation time of the speaker enrollment job.
--
-- 'jobName', 'speakerEnrollmentJobSummary_jobName' - The client-provided name for the speaker enrollment job.
--
-- 'endedAt', 'speakerEnrollmentJobSummary_endedAt' - A timestamp showing when the speaker enrollment job ended.
--
-- 'jobProgress', 'speakerEnrollmentJobSummary_jobProgress' - Provides details regarding job progress. This field shows the completed
-- percentage of enrollment requests listed in the input file.
--
-- 'domainId', 'speakerEnrollmentJobSummary_domainId' - The identifier of the domain that contains the speaker enrollment job.
--
-- 'jobStatus', 'speakerEnrollmentJobSummary_jobStatus' - The current status of the speaker enrollment job.
newSpeakerEnrollmentJobSummary ::
  SpeakerEnrollmentJobSummary
newSpeakerEnrollmentJobSummary :: SpeakerEnrollmentJobSummary
newSpeakerEnrollmentJobSummary =
  SpeakerEnrollmentJobSummary' :: Maybe FailureDetails
-> Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe JobProgress
-> Maybe Text
-> Maybe SpeakerEnrollmentJobStatus
-> SpeakerEnrollmentJobSummary
SpeakerEnrollmentJobSummary'
    { $sel:failureDetails:SpeakerEnrollmentJobSummary' :: Maybe FailureDetails
failureDetails =
        Maybe FailureDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:SpeakerEnrollmentJobSummary' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:SpeakerEnrollmentJobSummary' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:jobName:SpeakerEnrollmentJobSummary' :: Maybe (Sensitive Text)
jobName = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:endedAt:SpeakerEnrollmentJobSummary' :: Maybe POSIX
endedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:jobProgress:SpeakerEnrollmentJobSummary' :: Maybe JobProgress
jobProgress = Maybe JobProgress
forall a. Maybe a
Prelude.Nothing,
      $sel:domainId:SpeakerEnrollmentJobSummary' :: Maybe Text
domainId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:SpeakerEnrollmentJobSummary' :: 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.
speakerEnrollmentJobSummary_failureDetails :: Lens.Lens' SpeakerEnrollmentJobSummary (Prelude.Maybe FailureDetails)
speakerEnrollmentJobSummary_failureDetails :: (Maybe FailureDetails -> f (Maybe FailureDetails))
-> SpeakerEnrollmentJobSummary -> f SpeakerEnrollmentJobSummary
speakerEnrollmentJobSummary_failureDetails = (SpeakerEnrollmentJobSummary -> Maybe FailureDetails)
-> (SpeakerEnrollmentJobSummary
    -> Maybe FailureDetails -> SpeakerEnrollmentJobSummary)
-> Lens
     SpeakerEnrollmentJobSummary
     SpeakerEnrollmentJobSummary
     (Maybe FailureDetails)
     (Maybe FailureDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerEnrollmentJobSummary' {Maybe FailureDetails
failureDetails :: Maybe FailureDetails
$sel:failureDetails:SpeakerEnrollmentJobSummary' :: SpeakerEnrollmentJobSummary -> Maybe FailureDetails
failureDetails} -> Maybe FailureDetails
failureDetails) (\s :: SpeakerEnrollmentJobSummary
s@SpeakerEnrollmentJobSummary' {} Maybe FailureDetails
a -> SpeakerEnrollmentJobSummary
s {$sel:failureDetails:SpeakerEnrollmentJobSummary' :: Maybe FailureDetails
failureDetails = Maybe FailureDetails
a} :: SpeakerEnrollmentJobSummary)

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

-- | A timestamp showing the creation time of the speaker enrollment job.
speakerEnrollmentJobSummary_createdAt :: Lens.Lens' SpeakerEnrollmentJobSummary (Prelude.Maybe Prelude.UTCTime)
speakerEnrollmentJobSummary_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SpeakerEnrollmentJobSummary -> f SpeakerEnrollmentJobSummary
speakerEnrollmentJobSummary_createdAt = (SpeakerEnrollmentJobSummary -> Maybe POSIX)
-> (SpeakerEnrollmentJobSummary
    -> Maybe POSIX -> SpeakerEnrollmentJobSummary)
-> Lens
     SpeakerEnrollmentJobSummary
     SpeakerEnrollmentJobSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerEnrollmentJobSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:SpeakerEnrollmentJobSummary' :: SpeakerEnrollmentJobSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: SpeakerEnrollmentJobSummary
s@SpeakerEnrollmentJobSummary' {} Maybe POSIX
a -> SpeakerEnrollmentJobSummary
s {$sel:createdAt:SpeakerEnrollmentJobSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: SpeakerEnrollmentJobSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> SpeakerEnrollmentJobSummary -> f SpeakerEnrollmentJobSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SpeakerEnrollmentJobSummary
-> f SpeakerEnrollmentJobSummary
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.
speakerEnrollmentJobSummary_jobName :: Lens.Lens' SpeakerEnrollmentJobSummary (Prelude.Maybe Prelude.Text)
speakerEnrollmentJobSummary_jobName :: (Maybe Text -> f (Maybe Text))
-> SpeakerEnrollmentJobSummary -> f SpeakerEnrollmentJobSummary
speakerEnrollmentJobSummary_jobName = (SpeakerEnrollmentJobSummary -> Maybe (Sensitive Text))
-> (SpeakerEnrollmentJobSummary
    -> Maybe (Sensitive Text) -> SpeakerEnrollmentJobSummary)
-> Lens
     SpeakerEnrollmentJobSummary
     SpeakerEnrollmentJobSummary
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerEnrollmentJobSummary' {Maybe (Sensitive Text)
jobName :: Maybe (Sensitive Text)
$sel:jobName:SpeakerEnrollmentJobSummary' :: SpeakerEnrollmentJobSummary -> Maybe (Sensitive Text)
jobName} -> Maybe (Sensitive Text)
jobName) (\s :: SpeakerEnrollmentJobSummary
s@SpeakerEnrollmentJobSummary' {} Maybe (Sensitive Text)
a -> SpeakerEnrollmentJobSummary
s {$sel:jobName:SpeakerEnrollmentJobSummary' :: Maybe (Sensitive Text)
jobName = Maybe (Sensitive Text)
a} :: SpeakerEnrollmentJobSummary) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> SpeakerEnrollmentJobSummary -> f SpeakerEnrollmentJobSummary)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> SpeakerEnrollmentJobSummary
-> f SpeakerEnrollmentJobSummary
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.
speakerEnrollmentJobSummary_endedAt :: Lens.Lens' SpeakerEnrollmentJobSummary (Prelude.Maybe Prelude.UTCTime)
speakerEnrollmentJobSummary_endedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SpeakerEnrollmentJobSummary -> f SpeakerEnrollmentJobSummary
speakerEnrollmentJobSummary_endedAt = (SpeakerEnrollmentJobSummary -> Maybe POSIX)
-> (SpeakerEnrollmentJobSummary
    -> Maybe POSIX -> SpeakerEnrollmentJobSummary)
-> Lens
     SpeakerEnrollmentJobSummary
     SpeakerEnrollmentJobSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerEnrollmentJobSummary' {Maybe POSIX
endedAt :: Maybe POSIX
$sel:endedAt:SpeakerEnrollmentJobSummary' :: SpeakerEnrollmentJobSummary -> Maybe POSIX
endedAt} -> Maybe POSIX
endedAt) (\s :: SpeakerEnrollmentJobSummary
s@SpeakerEnrollmentJobSummary' {} Maybe POSIX
a -> SpeakerEnrollmentJobSummary
s {$sel:endedAt:SpeakerEnrollmentJobSummary' :: Maybe POSIX
endedAt = Maybe POSIX
a} :: SpeakerEnrollmentJobSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> SpeakerEnrollmentJobSummary -> f SpeakerEnrollmentJobSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SpeakerEnrollmentJobSummary
-> f SpeakerEnrollmentJobSummary
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

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

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

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

instance Core.FromJSON SpeakerEnrollmentJobSummary where
  parseJSON :: Value -> Parser SpeakerEnrollmentJobSummary
parseJSON =
    String
-> (Object -> Parser SpeakerEnrollmentJobSummary)
-> Value
-> Parser SpeakerEnrollmentJobSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SpeakerEnrollmentJobSummary"
      ( \Object
x ->
          Maybe FailureDetails
-> Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe JobProgress
-> Maybe Text
-> Maybe SpeakerEnrollmentJobStatus
-> SpeakerEnrollmentJobSummary
SpeakerEnrollmentJobSummary'
            (Maybe FailureDetails
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe (Sensitive Text)
 -> Maybe POSIX
 -> Maybe JobProgress
 -> Maybe Text
 -> Maybe SpeakerEnrollmentJobStatus
 -> SpeakerEnrollmentJobSummary)
-> Parser (Maybe FailureDetails)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe (Sensitive Text)
      -> Maybe POSIX
      -> Maybe JobProgress
      -> Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus
      -> SpeakerEnrollmentJobSummary)
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 JobProgress
   -> Maybe Text
   -> Maybe SpeakerEnrollmentJobStatus
   -> SpeakerEnrollmentJobSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe (Sensitive Text)
      -> Maybe POSIX
      -> Maybe JobProgress
      -> Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus
      -> SpeakerEnrollmentJobSummary)
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 JobProgress
   -> Maybe Text
   -> Maybe SpeakerEnrollmentJobStatus
   -> SpeakerEnrollmentJobSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe POSIX
      -> Maybe JobProgress
      -> Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus
      -> SpeakerEnrollmentJobSummary)
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 JobProgress
   -> Maybe Text
   -> Maybe SpeakerEnrollmentJobStatus
   -> SpeakerEnrollmentJobSummary)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe POSIX
      -> Maybe JobProgress
      -> Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus
      -> SpeakerEnrollmentJobSummary)
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 JobProgress
   -> Maybe Text
   -> Maybe SpeakerEnrollmentJobStatus
   -> SpeakerEnrollmentJobSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe JobProgress
      -> Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus
      -> SpeakerEnrollmentJobSummary)
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 JobProgress
   -> Maybe Text
   -> Maybe SpeakerEnrollmentJobStatus
   -> SpeakerEnrollmentJobSummary)
-> Parser (Maybe JobProgress)
-> Parser
     (Maybe Text
      -> Maybe SpeakerEnrollmentJobStatus -> SpeakerEnrollmentJobSummary)
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 Text
   -> Maybe SpeakerEnrollmentJobStatus -> SpeakerEnrollmentJobSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe SpeakerEnrollmentJobStatus -> SpeakerEnrollmentJobSummary)
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 -> SpeakerEnrollmentJobSummary)
-> Parser (Maybe SpeakerEnrollmentJobStatus)
-> Parser SpeakerEnrollmentJobSummary
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 SpeakerEnrollmentJobSummary

instance Prelude.NFData SpeakerEnrollmentJobSummary