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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Provides counts for human-labeled tasks in the labeling job.
--
-- /See:/ 'newLabelCountersForWorkteam' smart constructor.
data LabelCountersForWorkteam = LabelCountersForWorkteam'
  { -- | The total number of data objects that need to be labeled by a human
    -- worker.
    LabelCountersForWorkteam -> Maybe Natural
pendingHuman :: Prelude.Maybe Prelude.Natural,
    -- | The total number of tasks in the labeling job.
    LabelCountersForWorkteam -> Maybe Natural
total :: Prelude.Maybe Prelude.Natural,
    -- | The total number of data objects labeled by a human worker.
    LabelCountersForWorkteam -> Maybe Natural
humanLabeled :: Prelude.Maybe Prelude.Natural
  }
  deriving (LabelCountersForWorkteam -> LabelCountersForWorkteam -> Bool
(LabelCountersForWorkteam -> LabelCountersForWorkteam -> Bool)
-> (LabelCountersForWorkteam -> LabelCountersForWorkteam -> Bool)
-> Eq LabelCountersForWorkteam
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LabelCountersForWorkteam -> LabelCountersForWorkteam -> Bool
$c/= :: LabelCountersForWorkteam -> LabelCountersForWorkteam -> Bool
== :: LabelCountersForWorkteam -> LabelCountersForWorkteam -> Bool
$c== :: LabelCountersForWorkteam -> LabelCountersForWorkteam -> Bool
Prelude.Eq, ReadPrec [LabelCountersForWorkteam]
ReadPrec LabelCountersForWorkteam
Int -> ReadS LabelCountersForWorkteam
ReadS [LabelCountersForWorkteam]
(Int -> ReadS LabelCountersForWorkteam)
-> ReadS [LabelCountersForWorkteam]
-> ReadPrec LabelCountersForWorkteam
-> ReadPrec [LabelCountersForWorkteam]
-> Read LabelCountersForWorkteam
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LabelCountersForWorkteam]
$creadListPrec :: ReadPrec [LabelCountersForWorkteam]
readPrec :: ReadPrec LabelCountersForWorkteam
$creadPrec :: ReadPrec LabelCountersForWorkteam
readList :: ReadS [LabelCountersForWorkteam]
$creadList :: ReadS [LabelCountersForWorkteam]
readsPrec :: Int -> ReadS LabelCountersForWorkteam
$creadsPrec :: Int -> ReadS LabelCountersForWorkteam
Prelude.Read, Int -> LabelCountersForWorkteam -> ShowS
[LabelCountersForWorkteam] -> ShowS
LabelCountersForWorkteam -> String
(Int -> LabelCountersForWorkteam -> ShowS)
-> (LabelCountersForWorkteam -> String)
-> ([LabelCountersForWorkteam] -> ShowS)
-> Show LabelCountersForWorkteam
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LabelCountersForWorkteam] -> ShowS
$cshowList :: [LabelCountersForWorkteam] -> ShowS
show :: LabelCountersForWorkteam -> String
$cshow :: LabelCountersForWorkteam -> String
showsPrec :: Int -> LabelCountersForWorkteam -> ShowS
$cshowsPrec :: Int -> LabelCountersForWorkteam -> ShowS
Prelude.Show, (forall x.
 LabelCountersForWorkteam -> Rep LabelCountersForWorkteam x)
-> (forall x.
    Rep LabelCountersForWorkteam x -> LabelCountersForWorkteam)
-> Generic LabelCountersForWorkteam
forall x.
Rep LabelCountersForWorkteam x -> LabelCountersForWorkteam
forall x.
LabelCountersForWorkteam -> Rep LabelCountersForWorkteam x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LabelCountersForWorkteam x -> LabelCountersForWorkteam
$cfrom :: forall x.
LabelCountersForWorkteam -> Rep LabelCountersForWorkteam x
Prelude.Generic)

-- |
-- Create a value of 'LabelCountersForWorkteam' 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:
--
-- 'pendingHuman', 'labelCountersForWorkteam_pendingHuman' - The total number of data objects that need to be labeled by a human
-- worker.
--
-- 'total', 'labelCountersForWorkteam_total' - The total number of tasks in the labeling job.
--
-- 'humanLabeled', 'labelCountersForWorkteam_humanLabeled' - The total number of data objects labeled by a human worker.
newLabelCountersForWorkteam ::
  LabelCountersForWorkteam
newLabelCountersForWorkteam :: LabelCountersForWorkteam
newLabelCountersForWorkteam =
  LabelCountersForWorkteam' :: Maybe Natural
-> Maybe Natural -> Maybe Natural -> LabelCountersForWorkteam
LabelCountersForWorkteam'
    { $sel:pendingHuman:LabelCountersForWorkteam' :: Maybe Natural
pendingHuman =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:total:LabelCountersForWorkteam' :: Maybe Natural
total = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:humanLabeled:LabelCountersForWorkteam' :: Maybe Natural
humanLabeled = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The total number of data objects that need to be labeled by a human
-- worker.
labelCountersForWorkteam_pendingHuman :: Lens.Lens' LabelCountersForWorkteam (Prelude.Maybe Prelude.Natural)
labelCountersForWorkteam_pendingHuman :: (Maybe Natural -> f (Maybe Natural))
-> LabelCountersForWorkteam -> f LabelCountersForWorkteam
labelCountersForWorkteam_pendingHuman = (LabelCountersForWorkteam -> Maybe Natural)
-> (LabelCountersForWorkteam
    -> Maybe Natural -> LabelCountersForWorkteam)
-> Lens
     LabelCountersForWorkteam
     LabelCountersForWorkteam
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelCountersForWorkteam' {Maybe Natural
pendingHuman :: Maybe Natural
$sel:pendingHuman:LabelCountersForWorkteam' :: LabelCountersForWorkteam -> Maybe Natural
pendingHuman} -> Maybe Natural
pendingHuman) (\s :: LabelCountersForWorkteam
s@LabelCountersForWorkteam' {} Maybe Natural
a -> LabelCountersForWorkteam
s {$sel:pendingHuman:LabelCountersForWorkteam' :: Maybe Natural
pendingHuman = Maybe Natural
a} :: LabelCountersForWorkteam)

-- | The total number of tasks in the labeling job.
labelCountersForWorkteam_total :: Lens.Lens' LabelCountersForWorkteam (Prelude.Maybe Prelude.Natural)
labelCountersForWorkteam_total :: (Maybe Natural -> f (Maybe Natural))
-> LabelCountersForWorkteam -> f LabelCountersForWorkteam
labelCountersForWorkteam_total = (LabelCountersForWorkteam -> Maybe Natural)
-> (LabelCountersForWorkteam
    -> Maybe Natural -> LabelCountersForWorkteam)
-> Lens
     LabelCountersForWorkteam
     LabelCountersForWorkteam
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelCountersForWorkteam' {Maybe Natural
total :: Maybe Natural
$sel:total:LabelCountersForWorkteam' :: LabelCountersForWorkteam -> Maybe Natural
total} -> Maybe Natural
total) (\s :: LabelCountersForWorkteam
s@LabelCountersForWorkteam' {} Maybe Natural
a -> LabelCountersForWorkteam
s {$sel:total:LabelCountersForWorkteam' :: Maybe Natural
total = Maybe Natural
a} :: LabelCountersForWorkteam)

-- | The total number of data objects labeled by a human worker.
labelCountersForWorkteam_humanLabeled :: Lens.Lens' LabelCountersForWorkteam (Prelude.Maybe Prelude.Natural)
labelCountersForWorkteam_humanLabeled :: (Maybe Natural -> f (Maybe Natural))
-> LabelCountersForWorkteam -> f LabelCountersForWorkteam
labelCountersForWorkteam_humanLabeled = (LabelCountersForWorkteam -> Maybe Natural)
-> (LabelCountersForWorkteam
    -> Maybe Natural -> LabelCountersForWorkteam)
-> Lens
     LabelCountersForWorkteam
     LabelCountersForWorkteam
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelCountersForWorkteam' {Maybe Natural
humanLabeled :: Maybe Natural
$sel:humanLabeled:LabelCountersForWorkteam' :: LabelCountersForWorkteam -> Maybe Natural
humanLabeled} -> Maybe Natural
humanLabeled) (\s :: LabelCountersForWorkteam
s@LabelCountersForWorkteam' {} Maybe Natural
a -> LabelCountersForWorkteam
s {$sel:humanLabeled:LabelCountersForWorkteam' :: Maybe Natural
humanLabeled = Maybe Natural
a} :: LabelCountersForWorkteam)

instance Core.FromJSON LabelCountersForWorkteam where
  parseJSON :: Value -> Parser LabelCountersForWorkteam
parseJSON =
    String
-> (Object -> Parser LabelCountersForWorkteam)
-> Value
-> Parser LabelCountersForWorkteam
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"LabelCountersForWorkteam"
      ( \Object
x ->
          Maybe Natural
-> Maybe Natural -> Maybe Natural -> LabelCountersForWorkteam
LabelCountersForWorkteam'
            (Maybe Natural
 -> Maybe Natural -> Maybe Natural -> LabelCountersForWorkteam)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural -> Maybe Natural -> LabelCountersForWorkteam)
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
"PendingHuman")
            Parser (Maybe Natural -> Maybe Natural -> LabelCountersForWorkteam)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> LabelCountersForWorkteam)
forall (f :: * -> *) a b. Applicative f => 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
"Total")
            Parser (Maybe Natural -> LabelCountersForWorkteam)
-> Parser (Maybe Natural) -> Parser LabelCountersForWorkteam
forall (f :: * -> *) a b. Applicative f => 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
"HumanLabeled")
      )

instance Prelude.Hashable LabelCountersForWorkteam

instance Prelude.NFData LabelCountersForWorkteam