{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.LabelingJobForWorkteamSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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'
  { -- | 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,
    -- | The configured number of workers per data object.
    LabelingJobForWorkteamSummary -> Maybe Natural
numberOfHumanWorkersPerDataObject :: Prelude.Maybe Prelude.Natural,
    -- | 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 :: Data.POSIX
  }
  deriving (LabelingJobForWorkteamSummary
-> LabelingJobForWorkteamSummary -> Bool
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]
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
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.
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:
--
-- '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.
--
-- 'numberOfHumanWorkersPerDataObject', 'labelingJobForWorkteamSummary_numberOfHumanWorkersPerDataObject' - The configured number of workers per data object.
--
-- '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'
      { $sel:labelCounters:LabelingJobForWorkteamSummary' :: Maybe LabelCountersForWorkteam
labelCounters =
          forall a. Maybe a
Prelude.Nothing,
        $sel:labelingJobName:LabelingJobForWorkteamSummary' :: Maybe Text
labelingJobName = forall a. Maybe a
Prelude.Nothing,
        $sel:numberOfHumanWorkersPerDataObject:LabelingJobForWorkteamSummary' :: Maybe Natural
numberOfHumanWorkersPerDataObject =
          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 =
          forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_
      }

-- | Provides information about the progress of a labeling job.
labelingJobForWorkteamSummary_labelCounters :: Lens.Lens' LabelingJobForWorkteamSummary (Prelude.Maybe LabelCountersForWorkteam)
labelingJobForWorkteamSummary_labelCounters :: Lens'
  LabelingJobForWorkteamSummary (Maybe LabelCountersForWorkteam)
labelingJobForWorkteamSummary_labelCounters = 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 :: Lens' LabelingJobForWorkteamSummary (Maybe Text)
labelingJobForWorkteamSummary_labelingJobName = 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)

-- | The configured number of workers per data object.
labelingJobForWorkteamSummary_numberOfHumanWorkersPerDataObject :: Lens.Lens' LabelingJobForWorkteamSummary (Prelude.Maybe Prelude.Natural)
labelingJobForWorkteamSummary_numberOfHumanWorkersPerDataObject :: Lens' LabelingJobForWorkteamSummary (Maybe Natural)
labelingJobForWorkteamSummary_numberOfHumanWorkersPerDataObject = 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)

-- | 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 :: Lens' LabelingJobForWorkteamSummary Text
labelingJobForWorkteamSummary_jobReferenceCode = 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 :: Lens' LabelingJobForWorkteamSummary Text
labelingJobForWorkteamSummary_workRequesterAccountId = 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 :: Lens' LabelingJobForWorkteamSummary UTCTime
labelingJobForWorkteamSummary_creationTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

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

instance
  Prelude.Hashable
    LabelingJobForWorkteamSummary
  where
  hashWithSalt :: Int -> LabelingJobForWorkteamSummary -> Int
hashWithSalt Int
_salt LabelingJobForWorkteamSummary' {Maybe Natural
Maybe Text
Maybe LabelCountersForWorkteam
Text
POSIX
creationTime :: POSIX
workRequesterAccountId :: Text
jobReferenceCode :: Text
numberOfHumanWorkersPerDataObject :: Maybe Natural
labelingJobName :: Maybe Text
labelCounters :: Maybe LabelCountersForWorkteam
$sel:creationTime:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> POSIX
$sel:workRequesterAccountId:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> Text
$sel:jobReferenceCode:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> Text
$sel:numberOfHumanWorkersPerDataObject:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> Maybe Natural
$sel:labelingJobName:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> Maybe Text
$sel:labelCounters:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> Maybe LabelCountersForWorkteam
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LabelCountersForWorkteam
labelCounters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
labelingJobName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
numberOfHumanWorkersPerDataObject
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
jobReferenceCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
workRequesterAccountId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
creationTime

instance Prelude.NFData LabelingJobForWorkteamSummary where
  rnf :: LabelingJobForWorkteamSummary -> ()
rnf LabelingJobForWorkteamSummary' {Maybe Natural
Maybe Text
Maybe LabelCountersForWorkteam
Text
POSIX
creationTime :: POSIX
workRequesterAccountId :: Text
jobReferenceCode :: Text
numberOfHumanWorkersPerDataObject :: Maybe Natural
labelingJobName :: Maybe Text
labelCounters :: Maybe LabelCountersForWorkteam
$sel:creationTime:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> POSIX
$sel:workRequesterAccountId:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> Text
$sel:jobReferenceCode:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> Text
$sel:numberOfHumanWorkersPerDataObject:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> Maybe Natural
$sel:labelingJobName:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> Maybe Text
$sel:labelCounters:LabelingJobForWorkteamSummary' :: LabelingJobForWorkteamSummary -> Maybe LabelCountersForWorkteam
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe LabelCountersForWorkteam
labelCounters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
labelingJobName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
numberOfHumanWorkersPerDataObject
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
jobReferenceCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
workRequesterAccountId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
creationTime