{-# 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.SageMaker.Types.LabelingJobSummary
-- 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.SageMaker.Types.LabelingJobSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.LabelCounters
import Amazonka.SageMaker.Types.LabelingJobInputConfig
import Amazonka.SageMaker.Types.LabelingJobOutput
import Amazonka.SageMaker.Types.LabelingJobStatus

-- | Provides summary information about a labeling job.
--
-- /See:/ 'newLabelingJobSummary' smart constructor.
data LabelingJobSummary = LabelingJobSummary'
  { -- | If the @LabelingJobStatus@ field is @Failed@, this field contains a
    -- description of the error.
    LabelingJobSummary -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the Lambda function used to
    -- consolidate the annotations from individual workers into a label for a
    -- data object. For more information, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/sms-annotation-consolidation.html Annotation Consolidation>.
    LabelingJobSummary -> Maybe Text
annotationConsolidationLambdaArn :: Prelude.Maybe Prelude.Text,
    -- | Input configuration for the labeling job.
    LabelingJobSummary -> Maybe LabelingJobInputConfig
inputConfig :: Prelude.Maybe LabelingJobInputConfig,
    -- | The location of the output produced by the labeling job.
    LabelingJobSummary -> Maybe LabelingJobOutput
labelingJobOutput :: Prelude.Maybe LabelingJobOutput,
    -- | The name of the labeling job.
    LabelingJobSummary -> Text
labelingJobName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) assigned to the labeling job when it was
    -- created.
    LabelingJobSummary -> Text
labelingJobArn :: Prelude.Text,
    -- | The date and time that the job was created (timestamp).
    LabelingJobSummary -> POSIX
creationTime :: Core.POSIX,
    -- | The date and time that the job was last modified (timestamp).
    LabelingJobSummary -> POSIX
lastModifiedTime :: Core.POSIX,
    -- | The current status of the labeling job.
    LabelingJobSummary -> LabelingJobStatus
labelingJobStatus :: LabelingJobStatus,
    -- | Counts showing the progress of the labeling job.
    LabelingJobSummary -> LabelCounters
labelCounters :: LabelCounters,
    -- | The Amazon Resource Name (ARN) of the work team assigned to the job.
    LabelingJobSummary -> Text
workteamArn :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of a Lambda function. The function is run
    -- before each data object is sent to a worker.
    LabelingJobSummary -> Text
preHumanTaskLambdaArn :: Prelude.Text
  }
  deriving (LabelingJobSummary -> LabelingJobSummary -> Bool
(LabelingJobSummary -> LabelingJobSummary -> Bool)
-> (LabelingJobSummary -> LabelingJobSummary -> Bool)
-> Eq LabelingJobSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LabelingJobSummary -> LabelingJobSummary -> Bool
$c/= :: LabelingJobSummary -> LabelingJobSummary -> Bool
== :: LabelingJobSummary -> LabelingJobSummary -> Bool
$c== :: LabelingJobSummary -> LabelingJobSummary -> Bool
Prelude.Eq, ReadPrec [LabelingJobSummary]
ReadPrec LabelingJobSummary
Int -> ReadS LabelingJobSummary
ReadS [LabelingJobSummary]
(Int -> ReadS LabelingJobSummary)
-> ReadS [LabelingJobSummary]
-> ReadPrec LabelingJobSummary
-> ReadPrec [LabelingJobSummary]
-> Read LabelingJobSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LabelingJobSummary]
$creadListPrec :: ReadPrec [LabelingJobSummary]
readPrec :: ReadPrec LabelingJobSummary
$creadPrec :: ReadPrec LabelingJobSummary
readList :: ReadS [LabelingJobSummary]
$creadList :: ReadS [LabelingJobSummary]
readsPrec :: Int -> ReadS LabelingJobSummary
$creadsPrec :: Int -> ReadS LabelingJobSummary
Prelude.Read, Int -> LabelingJobSummary -> ShowS
[LabelingJobSummary] -> ShowS
LabelingJobSummary -> String
(Int -> LabelingJobSummary -> ShowS)
-> (LabelingJobSummary -> String)
-> ([LabelingJobSummary] -> ShowS)
-> Show LabelingJobSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LabelingJobSummary] -> ShowS
$cshowList :: [LabelingJobSummary] -> ShowS
show :: LabelingJobSummary -> String
$cshow :: LabelingJobSummary -> String
showsPrec :: Int -> LabelingJobSummary -> ShowS
$cshowsPrec :: Int -> LabelingJobSummary -> ShowS
Prelude.Show, (forall x. LabelingJobSummary -> Rep LabelingJobSummary x)
-> (forall x. Rep LabelingJobSummary x -> LabelingJobSummary)
-> Generic LabelingJobSummary
forall x. Rep LabelingJobSummary x -> LabelingJobSummary
forall x. LabelingJobSummary -> Rep LabelingJobSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LabelingJobSummary x -> LabelingJobSummary
$cfrom :: forall x. LabelingJobSummary -> Rep LabelingJobSummary x
Prelude.Generic)

-- |
-- Create a value of 'LabelingJobSummary' 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:
--
-- 'failureReason', 'labelingJobSummary_failureReason' - If the @LabelingJobStatus@ field is @Failed@, this field contains a
-- description of the error.
--
-- 'annotationConsolidationLambdaArn', 'labelingJobSummary_annotationConsolidationLambdaArn' - The Amazon Resource Name (ARN) of the Lambda function used to
-- consolidate the annotations from individual workers into a label for a
-- data object. For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/sms-annotation-consolidation.html Annotation Consolidation>.
--
-- 'inputConfig', 'labelingJobSummary_inputConfig' - Input configuration for the labeling job.
--
-- 'labelingJobOutput', 'labelingJobSummary_labelingJobOutput' - The location of the output produced by the labeling job.
--
-- 'labelingJobName', 'labelingJobSummary_labelingJobName' - The name of the labeling job.
--
-- 'labelingJobArn', 'labelingJobSummary_labelingJobArn' - The Amazon Resource Name (ARN) assigned to the labeling job when it was
-- created.
--
-- 'creationTime', 'labelingJobSummary_creationTime' - The date and time that the job was created (timestamp).
--
-- 'lastModifiedTime', 'labelingJobSummary_lastModifiedTime' - The date and time that the job was last modified (timestamp).
--
-- 'labelingJobStatus', 'labelingJobSummary_labelingJobStatus' - The current status of the labeling job.
--
-- 'labelCounters', 'labelingJobSummary_labelCounters' - Counts showing the progress of the labeling job.
--
-- 'workteamArn', 'labelingJobSummary_workteamArn' - The Amazon Resource Name (ARN) of the work team assigned to the job.
--
-- 'preHumanTaskLambdaArn', 'labelingJobSummary_preHumanTaskLambdaArn' - The Amazon Resource Name (ARN) of a Lambda function. The function is run
-- before each data object is sent to a worker.
newLabelingJobSummary ::
  -- | 'labelingJobName'
  Prelude.Text ->
  -- | 'labelingJobArn'
  Prelude.Text ->
  -- | 'creationTime'
  Prelude.UTCTime ->
  -- | 'lastModifiedTime'
  Prelude.UTCTime ->
  -- | 'labelingJobStatus'
  LabelingJobStatus ->
  -- | 'labelCounters'
  LabelCounters ->
  -- | 'workteamArn'
  Prelude.Text ->
  -- | 'preHumanTaskLambdaArn'
  Prelude.Text ->
  LabelingJobSummary
newLabelingJobSummary :: Text
-> Text
-> UTCTime
-> UTCTime
-> LabelingJobStatus
-> LabelCounters
-> Text
-> Text
-> LabelingJobSummary
newLabelingJobSummary
  Text
pLabelingJobName_
  Text
pLabelingJobArn_
  UTCTime
pCreationTime_
  UTCTime
pLastModifiedTime_
  LabelingJobStatus
pLabelingJobStatus_
  LabelCounters
pLabelCounters_
  Text
pWorkteamArn_
  Text
pPreHumanTaskLambdaArn_ =
    LabelingJobSummary' :: Maybe Text
-> Maybe Text
-> Maybe LabelingJobInputConfig
-> Maybe LabelingJobOutput
-> Text
-> Text
-> POSIX
-> POSIX
-> LabelingJobStatus
-> LabelCounters
-> Text
-> Text
-> LabelingJobSummary
LabelingJobSummary'
      { $sel:failureReason:LabelingJobSummary' :: Maybe Text
failureReason =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:annotationConsolidationLambdaArn:LabelingJobSummary' :: Maybe Text
annotationConsolidationLambdaArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:inputConfig:LabelingJobSummary' :: Maybe LabelingJobInputConfig
inputConfig = Maybe LabelingJobInputConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:labelingJobOutput:LabelingJobSummary' :: Maybe LabelingJobOutput
labelingJobOutput = Maybe LabelingJobOutput
forall a. Maybe a
Prelude.Nothing,
        $sel:labelingJobName:LabelingJobSummary' :: Text
labelingJobName = Text
pLabelingJobName_,
        $sel:labelingJobArn:LabelingJobSummary' :: Text
labelingJobArn = Text
pLabelingJobArn_,
        $sel:creationTime:LabelingJobSummary' :: POSIX
creationTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_,
        $sel:lastModifiedTime:LabelingJobSummary' :: POSIX
lastModifiedTime =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastModifiedTime_,
        $sel:labelingJobStatus:LabelingJobSummary' :: LabelingJobStatus
labelingJobStatus = LabelingJobStatus
pLabelingJobStatus_,
        $sel:labelCounters:LabelingJobSummary' :: LabelCounters
labelCounters = LabelCounters
pLabelCounters_,
        $sel:workteamArn:LabelingJobSummary' :: Text
workteamArn = Text
pWorkteamArn_,
        $sel:preHumanTaskLambdaArn:LabelingJobSummary' :: Text
preHumanTaskLambdaArn = Text
pPreHumanTaskLambdaArn_
      }

-- | If the @LabelingJobStatus@ field is @Failed@, this field contains a
-- description of the error.
labelingJobSummary_failureReason :: Lens.Lens' LabelingJobSummary (Prelude.Maybe Prelude.Text)
labelingJobSummary_failureReason :: (Maybe Text -> f (Maybe Text))
-> LabelingJobSummary -> f LabelingJobSummary
labelingJobSummary_failureReason = (LabelingJobSummary -> Maybe Text)
-> (LabelingJobSummary -> Maybe Text -> LabelingJobSummary)
-> Lens
     LabelingJobSummary LabelingJobSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobSummary' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:LabelingJobSummary' :: LabelingJobSummary -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: LabelingJobSummary
s@LabelingJobSummary' {} Maybe Text
a -> LabelingJobSummary
s {$sel:failureReason:LabelingJobSummary' :: Maybe Text
failureReason = Maybe Text
a} :: LabelingJobSummary)

-- | The Amazon Resource Name (ARN) of the Lambda function used to
-- consolidate the annotations from individual workers into a label for a
-- data object. For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/sms-annotation-consolidation.html Annotation Consolidation>.
labelingJobSummary_annotationConsolidationLambdaArn :: Lens.Lens' LabelingJobSummary (Prelude.Maybe Prelude.Text)
labelingJobSummary_annotationConsolidationLambdaArn :: (Maybe Text -> f (Maybe Text))
-> LabelingJobSummary -> f LabelingJobSummary
labelingJobSummary_annotationConsolidationLambdaArn = (LabelingJobSummary -> Maybe Text)
-> (LabelingJobSummary -> Maybe Text -> LabelingJobSummary)
-> Lens
     LabelingJobSummary LabelingJobSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobSummary' {Maybe Text
annotationConsolidationLambdaArn :: Maybe Text
$sel:annotationConsolidationLambdaArn:LabelingJobSummary' :: LabelingJobSummary -> Maybe Text
annotationConsolidationLambdaArn} -> Maybe Text
annotationConsolidationLambdaArn) (\s :: LabelingJobSummary
s@LabelingJobSummary' {} Maybe Text
a -> LabelingJobSummary
s {$sel:annotationConsolidationLambdaArn:LabelingJobSummary' :: Maybe Text
annotationConsolidationLambdaArn = Maybe Text
a} :: LabelingJobSummary)

-- | Input configuration for the labeling job.
labelingJobSummary_inputConfig :: Lens.Lens' LabelingJobSummary (Prelude.Maybe LabelingJobInputConfig)
labelingJobSummary_inputConfig :: (Maybe LabelingJobInputConfig -> f (Maybe LabelingJobInputConfig))
-> LabelingJobSummary -> f LabelingJobSummary
labelingJobSummary_inputConfig = (LabelingJobSummary -> Maybe LabelingJobInputConfig)
-> (LabelingJobSummary
    -> Maybe LabelingJobInputConfig -> LabelingJobSummary)
-> Lens
     LabelingJobSummary
     LabelingJobSummary
     (Maybe LabelingJobInputConfig)
     (Maybe LabelingJobInputConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobSummary' {Maybe LabelingJobInputConfig
inputConfig :: Maybe LabelingJobInputConfig
$sel:inputConfig:LabelingJobSummary' :: LabelingJobSummary -> Maybe LabelingJobInputConfig
inputConfig} -> Maybe LabelingJobInputConfig
inputConfig) (\s :: LabelingJobSummary
s@LabelingJobSummary' {} Maybe LabelingJobInputConfig
a -> LabelingJobSummary
s {$sel:inputConfig:LabelingJobSummary' :: Maybe LabelingJobInputConfig
inputConfig = Maybe LabelingJobInputConfig
a} :: LabelingJobSummary)

-- | The location of the output produced by the labeling job.
labelingJobSummary_labelingJobOutput :: Lens.Lens' LabelingJobSummary (Prelude.Maybe LabelingJobOutput)
labelingJobSummary_labelingJobOutput :: (Maybe LabelingJobOutput -> f (Maybe LabelingJobOutput))
-> LabelingJobSummary -> f LabelingJobSummary
labelingJobSummary_labelingJobOutput = (LabelingJobSummary -> Maybe LabelingJobOutput)
-> (LabelingJobSummary
    -> Maybe LabelingJobOutput -> LabelingJobSummary)
-> Lens
     LabelingJobSummary
     LabelingJobSummary
     (Maybe LabelingJobOutput)
     (Maybe LabelingJobOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobSummary' {Maybe LabelingJobOutput
labelingJobOutput :: Maybe LabelingJobOutput
$sel:labelingJobOutput:LabelingJobSummary' :: LabelingJobSummary -> Maybe LabelingJobOutput
labelingJobOutput} -> Maybe LabelingJobOutput
labelingJobOutput) (\s :: LabelingJobSummary
s@LabelingJobSummary' {} Maybe LabelingJobOutput
a -> LabelingJobSummary
s {$sel:labelingJobOutput:LabelingJobSummary' :: Maybe LabelingJobOutput
labelingJobOutput = Maybe LabelingJobOutput
a} :: LabelingJobSummary)

-- | The name of the labeling job.
labelingJobSummary_labelingJobName :: Lens.Lens' LabelingJobSummary Prelude.Text
labelingJobSummary_labelingJobName :: (Text -> f Text) -> LabelingJobSummary -> f LabelingJobSummary
labelingJobSummary_labelingJobName = (LabelingJobSummary -> Text)
-> (LabelingJobSummary -> Text -> LabelingJobSummary)
-> Lens LabelingJobSummary LabelingJobSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobSummary' {Text
labelingJobName :: Text
$sel:labelingJobName:LabelingJobSummary' :: LabelingJobSummary -> Text
labelingJobName} -> Text
labelingJobName) (\s :: LabelingJobSummary
s@LabelingJobSummary' {} Text
a -> LabelingJobSummary
s {$sel:labelingJobName:LabelingJobSummary' :: Text
labelingJobName = Text
a} :: LabelingJobSummary)

-- | The Amazon Resource Name (ARN) assigned to the labeling job when it was
-- created.
labelingJobSummary_labelingJobArn :: Lens.Lens' LabelingJobSummary Prelude.Text
labelingJobSummary_labelingJobArn :: (Text -> f Text) -> LabelingJobSummary -> f LabelingJobSummary
labelingJobSummary_labelingJobArn = (LabelingJobSummary -> Text)
-> (LabelingJobSummary -> Text -> LabelingJobSummary)
-> Lens LabelingJobSummary LabelingJobSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobSummary' {Text
labelingJobArn :: Text
$sel:labelingJobArn:LabelingJobSummary' :: LabelingJobSummary -> Text
labelingJobArn} -> Text
labelingJobArn) (\s :: LabelingJobSummary
s@LabelingJobSummary' {} Text
a -> LabelingJobSummary
s {$sel:labelingJobArn:LabelingJobSummary' :: Text
labelingJobArn = Text
a} :: LabelingJobSummary)

-- | The date and time that the job was created (timestamp).
labelingJobSummary_creationTime :: Lens.Lens' LabelingJobSummary Prelude.UTCTime
labelingJobSummary_creationTime :: (UTCTime -> f UTCTime)
-> LabelingJobSummary -> f LabelingJobSummary
labelingJobSummary_creationTime = (LabelingJobSummary -> POSIX)
-> (LabelingJobSummary -> POSIX -> LabelingJobSummary)
-> Lens LabelingJobSummary LabelingJobSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobSummary' {POSIX
creationTime :: POSIX
$sel:creationTime:LabelingJobSummary' :: LabelingJobSummary -> POSIX
creationTime} -> POSIX
creationTime) (\s :: LabelingJobSummary
s@LabelingJobSummary' {} POSIX
a -> LabelingJobSummary
s {$sel:creationTime:LabelingJobSummary' :: POSIX
creationTime = POSIX
a} :: LabelingJobSummary) ((POSIX -> f POSIX) -> LabelingJobSummary -> f LabelingJobSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> LabelingJobSummary
-> f LabelingJobSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The date and time that the job was last modified (timestamp).
labelingJobSummary_lastModifiedTime :: Lens.Lens' LabelingJobSummary Prelude.UTCTime
labelingJobSummary_lastModifiedTime :: (UTCTime -> f UTCTime)
-> LabelingJobSummary -> f LabelingJobSummary
labelingJobSummary_lastModifiedTime = (LabelingJobSummary -> POSIX)
-> (LabelingJobSummary -> POSIX -> LabelingJobSummary)
-> Lens LabelingJobSummary LabelingJobSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobSummary' {POSIX
lastModifiedTime :: POSIX
$sel:lastModifiedTime:LabelingJobSummary' :: LabelingJobSummary -> POSIX
lastModifiedTime} -> POSIX
lastModifiedTime) (\s :: LabelingJobSummary
s@LabelingJobSummary' {} POSIX
a -> LabelingJobSummary
s {$sel:lastModifiedTime:LabelingJobSummary' :: POSIX
lastModifiedTime = POSIX
a} :: LabelingJobSummary) ((POSIX -> f POSIX) -> LabelingJobSummary -> f LabelingJobSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> LabelingJobSummary
-> f LabelingJobSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The current status of the labeling job.
labelingJobSummary_labelingJobStatus :: Lens.Lens' LabelingJobSummary LabelingJobStatus
labelingJobSummary_labelingJobStatus :: (LabelingJobStatus -> f LabelingJobStatus)
-> LabelingJobSummary -> f LabelingJobSummary
labelingJobSummary_labelingJobStatus = (LabelingJobSummary -> LabelingJobStatus)
-> (LabelingJobSummary -> LabelingJobStatus -> LabelingJobSummary)
-> Lens
     LabelingJobSummary
     LabelingJobSummary
     LabelingJobStatus
     LabelingJobStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobSummary' {LabelingJobStatus
labelingJobStatus :: LabelingJobStatus
$sel:labelingJobStatus:LabelingJobSummary' :: LabelingJobSummary -> LabelingJobStatus
labelingJobStatus} -> LabelingJobStatus
labelingJobStatus) (\s :: LabelingJobSummary
s@LabelingJobSummary' {} LabelingJobStatus
a -> LabelingJobSummary
s {$sel:labelingJobStatus:LabelingJobSummary' :: LabelingJobStatus
labelingJobStatus = LabelingJobStatus
a} :: LabelingJobSummary)

-- | Counts showing the progress of the labeling job.
labelingJobSummary_labelCounters :: Lens.Lens' LabelingJobSummary LabelCounters
labelingJobSummary_labelCounters :: (LabelCounters -> f LabelCounters)
-> LabelingJobSummary -> f LabelingJobSummary
labelingJobSummary_labelCounters = (LabelingJobSummary -> LabelCounters)
-> (LabelingJobSummary -> LabelCounters -> LabelingJobSummary)
-> Lens
     LabelingJobSummary LabelingJobSummary LabelCounters LabelCounters
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobSummary' {LabelCounters
labelCounters :: LabelCounters
$sel:labelCounters:LabelingJobSummary' :: LabelingJobSummary -> LabelCounters
labelCounters} -> LabelCounters
labelCounters) (\s :: LabelingJobSummary
s@LabelingJobSummary' {} LabelCounters
a -> LabelingJobSummary
s {$sel:labelCounters:LabelingJobSummary' :: LabelCounters
labelCounters = LabelCounters
a} :: LabelingJobSummary)

-- | The Amazon Resource Name (ARN) of the work team assigned to the job.
labelingJobSummary_workteamArn :: Lens.Lens' LabelingJobSummary Prelude.Text
labelingJobSummary_workteamArn :: (Text -> f Text) -> LabelingJobSummary -> f LabelingJobSummary
labelingJobSummary_workteamArn = (LabelingJobSummary -> Text)
-> (LabelingJobSummary -> Text -> LabelingJobSummary)
-> Lens LabelingJobSummary LabelingJobSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobSummary' {Text
workteamArn :: Text
$sel:workteamArn:LabelingJobSummary' :: LabelingJobSummary -> Text
workteamArn} -> Text
workteamArn) (\s :: LabelingJobSummary
s@LabelingJobSummary' {} Text
a -> LabelingJobSummary
s {$sel:workteamArn:LabelingJobSummary' :: Text
workteamArn = Text
a} :: LabelingJobSummary)

-- | The Amazon Resource Name (ARN) of a Lambda function. The function is run
-- before each data object is sent to a worker.
labelingJobSummary_preHumanTaskLambdaArn :: Lens.Lens' LabelingJobSummary Prelude.Text
labelingJobSummary_preHumanTaskLambdaArn :: (Text -> f Text) -> LabelingJobSummary -> f LabelingJobSummary
labelingJobSummary_preHumanTaskLambdaArn = (LabelingJobSummary -> Text)
-> (LabelingJobSummary -> Text -> LabelingJobSummary)
-> Lens LabelingJobSummary LabelingJobSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobSummary' {Text
preHumanTaskLambdaArn :: Text
$sel:preHumanTaskLambdaArn:LabelingJobSummary' :: LabelingJobSummary -> Text
preHumanTaskLambdaArn} -> Text
preHumanTaskLambdaArn) (\s :: LabelingJobSummary
s@LabelingJobSummary' {} Text
a -> LabelingJobSummary
s {$sel:preHumanTaskLambdaArn:LabelingJobSummary' :: Text
preHumanTaskLambdaArn = Text
a} :: LabelingJobSummary)

instance Core.FromJSON LabelingJobSummary where
  parseJSON :: Value -> Parser LabelingJobSummary
parseJSON =
    String
-> (Object -> Parser LabelingJobSummary)
-> Value
-> Parser LabelingJobSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"LabelingJobSummary"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe LabelingJobInputConfig
-> Maybe LabelingJobOutput
-> Text
-> Text
-> POSIX
-> POSIX
-> LabelingJobStatus
-> LabelCounters
-> Text
-> Text
-> LabelingJobSummary
LabelingJobSummary'
            (Maybe Text
 -> Maybe Text
 -> Maybe LabelingJobInputConfig
 -> Maybe LabelingJobOutput
 -> Text
 -> Text
 -> POSIX
 -> POSIX
 -> LabelingJobStatus
 -> LabelCounters
 -> Text
 -> Text
 -> LabelingJobSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe LabelingJobInputConfig
      -> Maybe LabelingJobOutput
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> LabelingJobStatus
      -> LabelCounters
      -> Text
      -> Text
      -> LabelingJobSummary)
forall (f :: * -> *) a b. Functor 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
"FailureReason")
            Parser
  (Maybe Text
   -> Maybe LabelingJobInputConfig
   -> Maybe LabelingJobOutput
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> LabelingJobStatus
   -> LabelCounters
   -> Text
   -> Text
   -> LabelingJobSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe LabelingJobInputConfig
      -> Maybe LabelingJobOutput
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> LabelingJobStatus
      -> LabelCounters
      -> Text
      -> Text
      -> LabelingJobSummary)
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
"AnnotationConsolidationLambdaArn")
            Parser
  (Maybe LabelingJobInputConfig
   -> Maybe LabelingJobOutput
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> LabelingJobStatus
   -> LabelCounters
   -> Text
   -> Text
   -> LabelingJobSummary)
-> Parser (Maybe LabelingJobInputConfig)
-> Parser
     (Maybe LabelingJobOutput
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> LabelingJobStatus
      -> LabelCounters
      -> Text
      -> Text
      -> LabelingJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LabelingJobInputConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputConfig")
            Parser
  (Maybe LabelingJobOutput
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> LabelingJobStatus
   -> LabelCounters
   -> Text
   -> Text
   -> LabelingJobSummary)
-> Parser (Maybe LabelingJobOutput)
-> Parser
     (Text
      -> Text
      -> POSIX
      -> POSIX
      -> LabelingJobStatus
      -> LabelCounters
      -> Text
      -> Text
      -> LabelingJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LabelingJobOutput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LabelingJobOutput")
            Parser
  (Text
   -> Text
   -> POSIX
   -> POSIX
   -> LabelingJobStatus
   -> LabelCounters
   -> Text
   -> Text
   -> LabelingJobSummary)
-> Parser Text
-> Parser
     (Text
      -> POSIX
      -> POSIX
      -> LabelingJobStatus
      -> LabelCounters
      -> Text
      -> Text
      -> LabelingJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LabelingJobName")
            Parser
  (Text
   -> POSIX
   -> POSIX
   -> LabelingJobStatus
   -> LabelCounters
   -> Text
   -> Text
   -> LabelingJobSummary)
-> Parser Text
-> Parser
     (POSIX
      -> POSIX
      -> LabelingJobStatus
      -> LabelCounters
      -> Text
      -> Text
      -> LabelingJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LabelingJobArn")
            Parser
  (POSIX
   -> POSIX
   -> LabelingJobStatus
   -> LabelCounters
   -> Text
   -> Text
   -> LabelingJobSummary)
-> Parser POSIX
-> Parser
     (POSIX
      -> LabelingJobStatus
      -> LabelCounters
      -> Text
      -> Text
      -> LabelingJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreationTime")
            Parser
  (POSIX
   -> LabelingJobStatus
   -> LabelCounters
   -> Text
   -> Text
   -> LabelingJobSummary)
-> Parser POSIX
-> Parser
     (LabelingJobStatus
      -> LabelCounters -> Text -> Text -> LabelingJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LastModifiedTime")
            Parser
  (LabelingJobStatus
   -> LabelCounters -> Text -> Text -> LabelingJobSummary)
-> Parser LabelingJobStatus
-> Parser (LabelCounters -> Text -> Text -> LabelingJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser LabelingJobStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LabelingJobStatus")
            Parser (LabelCounters -> Text -> Text -> LabelingJobSummary)
-> Parser LabelCounters
-> Parser (Text -> Text -> LabelingJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser LabelCounters
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LabelCounters")
            Parser (Text -> Text -> LabelingJobSummary)
-> Parser Text -> Parser (Text -> LabelingJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"WorkteamArn")
            Parser (Text -> LabelingJobSummary)
-> Parser Text -> Parser LabelingJobSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"PreHumanTaskLambdaArn")
      )

instance Prelude.Hashable LabelingJobSummary

instance Prelude.NFData LabelingJobSummary