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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.LabelCountersForWorkteam

-- | Provides summary information for a work team.
--
-- /See:/ 'newLabelingJobForWorkteamSummary' smart constructor.
data LabelingJobForWorkteamSummary = LabelingJobForWorkteamSummary'
  { -- | The configured number of workers per data object.
    LabelingJobForWorkteamSummary -> Maybe Natural
numberOfHumanWorkersPerDataObject :: Prelude.Maybe Prelude.Natural,
    -- | Provides information about the progress of a labeling job.
    LabelingJobForWorkteamSummary -> Maybe LabelCountersForWorkteam
labelCounters :: Prelude.Maybe LabelCountersForWorkteam,
    -- | The name of the labeling job that the work team is assigned to.
    LabelingJobForWorkteamSummary -> Maybe Text
labelingJobName :: Prelude.Maybe Prelude.Text,
    -- | A unique identifier for a labeling job. You can use this to refer to a
    -- specific labeling job.
    LabelingJobForWorkteamSummary -> Text
jobReferenceCode :: Prelude.Text,
    -- | The Amazon Web Services account ID of the account used to start the
    -- labeling job.
    LabelingJobForWorkteamSummary -> Text
workRequesterAccountId :: Prelude.Text,
    -- | The date and time that the labeling job was created.
    LabelingJobForWorkteamSummary -> POSIX
creationTime :: Core.POSIX
  }
  deriving (LabelingJobForWorkteamSummary
-> LabelingJobForWorkteamSummary -> Bool
(LabelingJobForWorkteamSummary
 -> LabelingJobForWorkteamSummary -> Bool)
-> (LabelingJobForWorkteamSummary
    -> LabelingJobForWorkteamSummary -> Bool)
-> Eq LabelingJobForWorkteamSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LabelingJobForWorkteamSummary
-> LabelingJobForWorkteamSummary -> Bool
$c/= :: LabelingJobForWorkteamSummary
-> LabelingJobForWorkteamSummary -> Bool
== :: LabelingJobForWorkteamSummary
-> LabelingJobForWorkteamSummary -> Bool
$c== :: LabelingJobForWorkteamSummary
-> LabelingJobForWorkteamSummary -> Bool
Prelude.Eq, ReadPrec [LabelingJobForWorkteamSummary]
ReadPrec LabelingJobForWorkteamSummary
Int -> ReadS LabelingJobForWorkteamSummary
ReadS [LabelingJobForWorkteamSummary]
(Int -> ReadS LabelingJobForWorkteamSummary)
-> ReadS [LabelingJobForWorkteamSummary]
-> ReadPrec LabelingJobForWorkteamSummary
-> ReadPrec [LabelingJobForWorkteamSummary]
-> Read LabelingJobForWorkteamSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LabelingJobForWorkteamSummary]
$creadListPrec :: ReadPrec [LabelingJobForWorkteamSummary]
readPrec :: ReadPrec LabelingJobForWorkteamSummary
$creadPrec :: ReadPrec LabelingJobForWorkteamSummary
readList :: ReadS [LabelingJobForWorkteamSummary]
$creadList :: ReadS [LabelingJobForWorkteamSummary]
readsPrec :: Int -> ReadS LabelingJobForWorkteamSummary
$creadsPrec :: Int -> ReadS LabelingJobForWorkteamSummary
Prelude.Read, Int -> LabelingJobForWorkteamSummary -> ShowS
[LabelingJobForWorkteamSummary] -> ShowS
LabelingJobForWorkteamSummary -> String
(Int -> LabelingJobForWorkteamSummary -> ShowS)
-> (LabelingJobForWorkteamSummary -> String)
-> ([LabelingJobForWorkteamSummary] -> ShowS)
-> Show LabelingJobForWorkteamSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LabelingJobForWorkteamSummary] -> ShowS
$cshowList :: [LabelingJobForWorkteamSummary] -> ShowS
show :: LabelingJobForWorkteamSummary -> String
$cshow :: LabelingJobForWorkteamSummary -> String
showsPrec :: Int -> LabelingJobForWorkteamSummary -> ShowS
$cshowsPrec :: Int -> LabelingJobForWorkteamSummary -> ShowS
Prelude.Show, (forall x.
 LabelingJobForWorkteamSummary
 -> Rep LabelingJobForWorkteamSummary x)
-> (forall x.
    Rep LabelingJobForWorkteamSummary x
    -> LabelingJobForWorkteamSummary)
-> Generic LabelingJobForWorkteamSummary
forall x.
Rep LabelingJobForWorkteamSummary x
-> LabelingJobForWorkteamSummary
forall x.
LabelingJobForWorkteamSummary
-> Rep LabelingJobForWorkteamSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LabelingJobForWorkteamSummary x
-> LabelingJobForWorkteamSummary
$cfrom :: forall x.
LabelingJobForWorkteamSummary
-> Rep LabelingJobForWorkteamSummary x
Prelude.Generic)

-- |
-- Create a value of 'LabelingJobForWorkteamSummary' 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:
--
-- 'numberOfHumanWorkersPerDataObject', 'labelingJobForWorkteamSummary_numberOfHumanWorkersPerDataObject' - The configured number of workers per data object.
--
-- 'labelCounters', 'labelingJobForWorkteamSummary_labelCounters' - Provides information about the progress of a labeling job.
--
-- 'labelingJobName', 'labelingJobForWorkteamSummary_labelingJobName' - The name of the labeling job that the work team is assigned to.
--
-- 'jobReferenceCode', 'labelingJobForWorkteamSummary_jobReferenceCode' - A unique identifier for a labeling job. You can use this to refer to a
-- specific labeling job.
--
-- 'workRequesterAccountId', 'labelingJobForWorkteamSummary_workRequesterAccountId' - The Amazon Web Services account ID of the account used to start the
-- labeling job.
--
-- 'creationTime', 'labelingJobForWorkteamSummary_creationTime' - The date and time that the labeling job was created.
newLabelingJobForWorkteamSummary ::
  -- | 'jobReferenceCode'
  Prelude.Text ->
  -- | 'workRequesterAccountId'
  Prelude.Text ->
  -- | 'creationTime'
  Prelude.UTCTime ->
  LabelingJobForWorkteamSummary
newLabelingJobForWorkteamSummary :: Text -> Text -> UTCTime -> LabelingJobForWorkteamSummary
newLabelingJobForWorkteamSummary
  Text
pJobReferenceCode_
  Text
pWorkRequesterAccountId_
  UTCTime
pCreationTime_ =
    LabelingJobForWorkteamSummary' :: Maybe Natural
-> Maybe LabelCountersForWorkteam
-> Maybe Text
-> Text
-> Text
-> POSIX
-> LabelingJobForWorkteamSummary
LabelingJobForWorkteamSummary'
      { $sel:numberOfHumanWorkersPerDataObject:LabelingJobForWorkteamSummary' :: Maybe Natural
numberOfHumanWorkersPerDataObject =
          Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:labelCounters:LabelingJobForWorkteamSummary' :: Maybe LabelCountersForWorkteam
labelCounters = Maybe LabelCountersForWorkteam
forall a. Maybe a
Prelude.Nothing,
        $sel:labelingJobName:LabelingJobForWorkteamSummary' :: Maybe Text
labelingJobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:jobReferenceCode:LabelingJobForWorkteamSummary' :: Text
jobReferenceCode = Text
pJobReferenceCode_,
        $sel:workRequesterAccountId:LabelingJobForWorkteamSummary' :: Text
workRequesterAccountId =
          Text
pWorkRequesterAccountId_,
        $sel:creationTime:LabelingJobForWorkteamSummary' :: 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_
      }

-- | The configured number of workers per data object.
labelingJobForWorkteamSummary_numberOfHumanWorkersPerDataObject :: Lens.Lens' LabelingJobForWorkteamSummary (Prelude.Maybe Prelude.Natural)
labelingJobForWorkteamSummary_numberOfHumanWorkersPerDataObject :: (Maybe Natural -> f (Maybe Natural))
-> LabelingJobForWorkteamSummary -> f LabelingJobForWorkteamSummary
labelingJobForWorkteamSummary_numberOfHumanWorkersPerDataObject = (LabelingJobForWorkteamSummary -> Maybe Natural)
-> (LabelingJobForWorkteamSummary
    -> Maybe Natural -> LabelingJobForWorkteamSummary)
-> Lens
     LabelingJobForWorkteamSummary
     LabelingJobForWorkteamSummary
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobForWorkteamSummary' {Maybe Natural
numberOfHumanWorkersPerDataObject :: Maybe Natural
$sel:numberOfHumanWorkersPerDataObject:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> Maybe Natural
numberOfHumanWorkersPerDataObject} -> Maybe Natural
numberOfHumanWorkersPerDataObject) (\s :: LabelingJobForWorkteamSummary
s@LabelingJobForWorkteamSummary' {} Maybe Natural
a -> LabelingJobForWorkteamSummary
s {$sel:numberOfHumanWorkersPerDataObject:LabelingJobForWorkteamSummary' :: Maybe Natural
numberOfHumanWorkersPerDataObject = Maybe Natural
a} :: LabelingJobForWorkteamSummary)

-- | Provides information about the progress of a labeling job.
labelingJobForWorkteamSummary_labelCounters :: Lens.Lens' LabelingJobForWorkteamSummary (Prelude.Maybe LabelCountersForWorkteam)
labelingJobForWorkteamSummary_labelCounters :: (Maybe LabelCountersForWorkteam
 -> f (Maybe LabelCountersForWorkteam))
-> LabelingJobForWorkteamSummary -> f LabelingJobForWorkteamSummary
labelingJobForWorkteamSummary_labelCounters = (LabelingJobForWorkteamSummary -> Maybe LabelCountersForWorkteam)
-> (LabelingJobForWorkteamSummary
    -> Maybe LabelCountersForWorkteam -> LabelingJobForWorkteamSummary)
-> Lens
     LabelingJobForWorkteamSummary
     LabelingJobForWorkteamSummary
     (Maybe LabelCountersForWorkteam)
     (Maybe LabelCountersForWorkteam)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobForWorkteamSummary' {Maybe LabelCountersForWorkteam
labelCounters :: Maybe LabelCountersForWorkteam
$sel:labelCounters:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> Maybe LabelCountersForWorkteam
labelCounters} -> Maybe LabelCountersForWorkteam
labelCounters) (\s :: LabelingJobForWorkteamSummary
s@LabelingJobForWorkteamSummary' {} Maybe LabelCountersForWorkteam
a -> LabelingJobForWorkteamSummary
s {$sel:labelCounters:LabelingJobForWorkteamSummary' :: Maybe LabelCountersForWorkteam
labelCounters = Maybe LabelCountersForWorkteam
a} :: LabelingJobForWorkteamSummary)

-- | The name of the labeling job that the work team is assigned to.
labelingJobForWorkteamSummary_labelingJobName :: Lens.Lens' LabelingJobForWorkteamSummary (Prelude.Maybe Prelude.Text)
labelingJobForWorkteamSummary_labelingJobName :: (Maybe Text -> f (Maybe Text))
-> LabelingJobForWorkteamSummary -> f LabelingJobForWorkteamSummary
labelingJobForWorkteamSummary_labelingJobName = (LabelingJobForWorkteamSummary -> Maybe Text)
-> (LabelingJobForWorkteamSummary
    -> Maybe Text -> LabelingJobForWorkteamSummary)
-> Lens
     LabelingJobForWorkteamSummary
     LabelingJobForWorkteamSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobForWorkteamSummary' {Maybe Text
labelingJobName :: Maybe Text
$sel:labelingJobName:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> Maybe Text
labelingJobName} -> Maybe Text
labelingJobName) (\s :: LabelingJobForWorkteamSummary
s@LabelingJobForWorkteamSummary' {} Maybe Text
a -> LabelingJobForWorkteamSummary
s {$sel:labelingJobName:LabelingJobForWorkteamSummary' :: Maybe Text
labelingJobName = Maybe Text
a} :: LabelingJobForWorkteamSummary)

-- | A unique identifier for a labeling job. You can use this to refer to a
-- specific labeling job.
labelingJobForWorkteamSummary_jobReferenceCode :: Lens.Lens' LabelingJobForWorkteamSummary Prelude.Text
labelingJobForWorkteamSummary_jobReferenceCode :: (Text -> f Text)
-> LabelingJobForWorkteamSummary -> f LabelingJobForWorkteamSummary
labelingJobForWorkteamSummary_jobReferenceCode = (LabelingJobForWorkteamSummary -> Text)
-> (LabelingJobForWorkteamSummary
    -> Text -> LabelingJobForWorkteamSummary)
-> Lens
     LabelingJobForWorkteamSummary
     LabelingJobForWorkteamSummary
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobForWorkteamSummary' {Text
jobReferenceCode :: Text
$sel:jobReferenceCode:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> Text
jobReferenceCode} -> Text
jobReferenceCode) (\s :: LabelingJobForWorkteamSummary
s@LabelingJobForWorkteamSummary' {} Text
a -> LabelingJobForWorkteamSummary
s {$sel:jobReferenceCode:LabelingJobForWorkteamSummary' :: Text
jobReferenceCode = Text
a} :: LabelingJobForWorkteamSummary)

-- | The Amazon Web Services account ID of the account used to start the
-- labeling job.
labelingJobForWorkteamSummary_workRequesterAccountId :: Lens.Lens' LabelingJobForWorkteamSummary Prelude.Text
labelingJobForWorkteamSummary_workRequesterAccountId :: (Text -> f Text)
-> LabelingJobForWorkteamSummary -> f LabelingJobForWorkteamSummary
labelingJobForWorkteamSummary_workRequesterAccountId = (LabelingJobForWorkteamSummary -> Text)
-> (LabelingJobForWorkteamSummary
    -> Text -> LabelingJobForWorkteamSummary)
-> Lens
     LabelingJobForWorkteamSummary
     LabelingJobForWorkteamSummary
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobForWorkteamSummary' {Text
workRequesterAccountId :: Text
$sel:workRequesterAccountId:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> Text
workRequesterAccountId} -> Text
workRequesterAccountId) (\s :: LabelingJobForWorkteamSummary
s@LabelingJobForWorkteamSummary' {} Text
a -> LabelingJobForWorkteamSummary
s {$sel:workRequesterAccountId:LabelingJobForWorkteamSummary' :: Text
workRequesterAccountId = Text
a} :: LabelingJobForWorkteamSummary)

-- | The date and time that the labeling job was created.
labelingJobForWorkteamSummary_creationTime :: Lens.Lens' LabelingJobForWorkteamSummary Prelude.UTCTime
labelingJobForWorkteamSummary_creationTime :: (UTCTime -> f UTCTime)
-> LabelingJobForWorkteamSummary -> f LabelingJobForWorkteamSummary
labelingJobForWorkteamSummary_creationTime = (LabelingJobForWorkteamSummary -> POSIX)
-> (LabelingJobForWorkteamSummary
    -> POSIX -> LabelingJobForWorkteamSummary)
-> Lens
     LabelingJobForWorkteamSummary
     LabelingJobForWorkteamSummary
     POSIX
     POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobForWorkteamSummary' {POSIX
creationTime :: POSIX
$sel:creationTime:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> POSIX
creationTime} -> POSIX
creationTime) (\s :: LabelingJobForWorkteamSummary
s@LabelingJobForWorkteamSummary' {} POSIX
a -> LabelingJobForWorkteamSummary
s {$sel:creationTime:LabelingJobForWorkteamSummary' :: POSIX
creationTime = POSIX
a} :: LabelingJobForWorkteamSummary) ((POSIX -> f POSIX)
 -> LabelingJobForWorkteamSummary
 -> f LabelingJobForWorkteamSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> LabelingJobForWorkteamSummary
-> f LabelingJobForWorkteamSummary
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

instance Core.FromJSON LabelingJobForWorkteamSummary where
  parseJSON :: Value -> Parser LabelingJobForWorkteamSummary
parseJSON =
    String
-> (Object -> Parser LabelingJobForWorkteamSummary)
-> Value
-> Parser LabelingJobForWorkteamSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"LabelingJobForWorkteamSummary"
      ( \Object
x ->
          Maybe Natural
-> Maybe LabelCountersForWorkteam
-> Maybe Text
-> Text
-> Text
-> POSIX
-> LabelingJobForWorkteamSummary
LabelingJobForWorkteamSummary'
            (Maybe Natural
 -> Maybe LabelCountersForWorkteam
 -> Maybe Text
 -> Text
 -> Text
 -> POSIX
 -> LabelingJobForWorkteamSummary)
-> Parser (Maybe Natural)
-> Parser
     (Maybe LabelCountersForWorkteam
      -> Maybe Text
      -> Text
      -> Text
      -> POSIX
      -> LabelingJobForWorkteamSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NumberOfHumanWorkersPerDataObject")
            Parser
  (Maybe LabelCountersForWorkteam
   -> Maybe Text
   -> Text
   -> Text
   -> POSIX
   -> LabelingJobForWorkteamSummary)
-> Parser (Maybe LabelCountersForWorkteam)
-> Parser
     (Maybe Text
      -> Text -> Text -> POSIX -> LabelingJobForWorkteamSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LabelCountersForWorkteam)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LabelCounters")
            Parser
  (Maybe Text
   -> Text -> Text -> POSIX -> LabelingJobForWorkteamSummary)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> POSIX -> LabelingJobForWorkteamSummary)
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
"LabelingJobName")
            Parser (Text -> Text -> POSIX -> LabelingJobForWorkteamSummary)
-> Parser Text
-> Parser (Text -> POSIX -> LabelingJobForWorkteamSummary)
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
"JobReferenceCode")
            Parser (Text -> POSIX -> LabelingJobForWorkteamSummary)
-> Parser Text -> Parser (POSIX -> LabelingJobForWorkteamSummary)
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
"WorkRequesterAccountId")
            Parser (POSIX -> LabelingJobForWorkteamSummary)
-> Parser POSIX -> Parser LabelingJobForWorkteamSummary
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")
      )

instance
  Prelude.Hashable
    LabelingJobForWorkteamSummary

instance Prelude.NFData LabelingJobForWorkteamSummary