{-# 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 #-}
module Amazonka.SageMaker.Types.LabelCounters where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LabelCounters = LabelCounters'
{
LabelCounters -> Maybe Natural
machineLabeled :: Prelude.Maybe Prelude.Natural,
LabelCounters -> Maybe Natural
totalLabeled :: Prelude.Maybe Prelude.Natural,
LabelCounters -> Maybe Natural
failedNonRetryableError :: Prelude.Maybe Prelude.Natural,
LabelCounters -> Maybe Natural
unlabeled :: Prelude.Maybe Prelude.Natural,
LabelCounters -> Maybe Natural
humanLabeled :: Prelude.Maybe Prelude.Natural
}
deriving (LabelCounters -> LabelCounters -> Bool
(LabelCounters -> LabelCounters -> Bool)
-> (LabelCounters -> LabelCounters -> Bool) -> Eq LabelCounters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LabelCounters -> LabelCounters -> Bool
$c/= :: LabelCounters -> LabelCounters -> Bool
== :: LabelCounters -> LabelCounters -> Bool
$c== :: LabelCounters -> LabelCounters -> Bool
Prelude.Eq, ReadPrec [LabelCounters]
ReadPrec LabelCounters
Int -> ReadS LabelCounters
ReadS [LabelCounters]
(Int -> ReadS LabelCounters)
-> ReadS [LabelCounters]
-> ReadPrec LabelCounters
-> ReadPrec [LabelCounters]
-> Read LabelCounters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LabelCounters]
$creadListPrec :: ReadPrec [LabelCounters]
readPrec :: ReadPrec LabelCounters
$creadPrec :: ReadPrec LabelCounters
readList :: ReadS [LabelCounters]
$creadList :: ReadS [LabelCounters]
readsPrec :: Int -> ReadS LabelCounters
$creadsPrec :: Int -> ReadS LabelCounters
Prelude.Read, Int -> LabelCounters -> ShowS
[LabelCounters] -> ShowS
LabelCounters -> String
(Int -> LabelCounters -> ShowS)
-> (LabelCounters -> String)
-> ([LabelCounters] -> ShowS)
-> Show LabelCounters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LabelCounters] -> ShowS
$cshowList :: [LabelCounters] -> ShowS
show :: LabelCounters -> String
$cshow :: LabelCounters -> String
showsPrec :: Int -> LabelCounters -> ShowS
$cshowsPrec :: Int -> LabelCounters -> ShowS
Prelude.Show, (forall x. LabelCounters -> Rep LabelCounters x)
-> (forall x. Rep LabelCounters x -> LabelCounters)
-> Generic LabelCounters
forall x. Rep LabelCounters x -> LabelCounters
forall x. LabelCounters -> Rep LabelCounters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LabelCounters x -> LabelCounters
$cfrom :: forall x. LabelCounters -> Rep LabelCounters x
Prelude.Generic)
newLabelCounters ::
LabelCounters
newLabelCounters :: LabelCounters
newLabelCounters =
LabelCounters' :: Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> LabelCounters
LabelCounters'
{ $sel:machineLabeled:LabelCounters' :: Maybe Natural
machineLabeled = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:totalLabeled:LabelCounters' :: Maybe Natural
totalLabeled = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:failedNonRetryableError:LabelCounters' :: Maybe Natural
failedNonRetryableError = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:unlabeled:LabelCounters' :: Maybe Natural
unlabeled = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:humanLabeled:LabelCounters' :: Maybe Natural
humanLabeled = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
labelCounters_machineLabeled :: Lens.Lens' LabelCounters (Prelude.Maybe Prelude.Natural)
labelCounters_machineLabeled :: (Maybe Natural -> f (Maybe Natural))
-> LabelCounters -> f LabelCounters
labelCounters_machineLabeled = (LabelCounters -> Maybe Natural)
-> (LabelCounters -> Maybe Natural -> LabelCounters)
-> Lens LabelCounters LabelCounters (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelCounters' {Maybe Natural
machineLabeled :: Maybe Natural
$sel:machineLabeled:LabelCounters' :: LabelCounters -> Maybe Natural
machineLabeled} -> Maybe Natural
machineLabeled) (\s :: LabelCounters
s@LabelCounters' {} Maybe Natural
a -> LabelCounters
s {$sel:machineLabeled:LabelCounters' :: Maybe Natural
machineLabeled = Maybe Natural
a} :: LabelCounters)
labelCounters_totalLabeled :: Lens.Lens' LabelCounters (Prelude.Maybe Prelude.Natural)
labelCounters_totalLabeled :: (Maybe Natural -> f (Maybe Natural))
-> LabelCounters -> f LabelCounters
labelCounters_totalLabeled = (LabelCounters -> Maybe Natural)
-> (LabelCounters -> Maybe Natural -> LabelCounters)
-> Lens LabelCounters LabelCounters (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelCounters' {Maybe Natural
totalLabeled :: Maybe Natural
$sel:totalLabeled:LabelCounters' :: LabelCounters -> Maybe Natural
totalLabeled} -> Maybe Natural
totalLabeled) (\s :: LabelCounters
s@LabelCounters' {} Maybe Natural
a -> LabelCounters
s {$sel:totalLabeled:LabelCounters' :: Maybe Natural
totalLabeled = Maybe Natural
a} :: LabelCounters)
labelCounters_failedNonRetryableError :: Lens.Lens' LabelCounters (Prelude.Maybe Prelude.Natural)
labelCounters_failedNonRetryableError :: (Maybe Natural -> f (Maybe Natural))
-> LabelCounters -> f LabelCounters
labelCounters_failedNonRetryableError = (LabelCounters -> Maybe Natural)
-> (LabelCounters -> Maybe Natural -> LabelCounters)
-> Lens LabelCounters LabelCounters (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelCounters' {Maybe Natural
failedNonRetryableError :: Maybe Natural
$sel:failedNonRetryableError:LabelCounters' :: LabelCounters -> Maybe Natural
failedNonRetryableError} -> Maybe Natural
failedNonRetryableError) (\s :: LabelCounters
s@LabelCounters' {} Maybe Natural
a -> LabelCounters
s {$sel:failedNonRetryableError:LabelCounters' :: Maybe Natural
failedNonRetryableError = Maybe Natural
a} :: LabelCounters)
labelCounters_unlabeled :: Lens.Lens' LabelCounters (Prelude.Maybe Prelude.Natural)
labelCounters_unlabeled :: (Maybe Natural -> f (Maybe Natural))
-> LabelCounters -> f LabelCounters
labelCounters_unlabeled = (LabelCounters -> Maybe Natural)
-> (LabelCounters -> Maybe Natural -> LabelCounters)
-> Lens LabelCounters LabelCounters (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelCounters' {Maybe Natural
unlabeled :: Maybe Natural
$sel:unlabeled:LabelCounters' :: LabelCounters -> Maybe Natural
unlabeled} -> Maybe Natural
unlabeled) (\s :: LabelCounters
s@LabelCounters' {} Maybe Natural
a -> LabelCounters
s {$sel:unlabeled:LabelCounters' :: Maybe Natural
unlabeled = Maybe Natural
a} :: LabelCounters)
labelCounters_humanLabeled :: Lens.Lens' LabelCounters (Prelude.Maybe Prelude.Natural)
labelCounters_humanLabeled :: (Maybe Natural -> f (Maybe Natural))
-> LabelCounters -> f LabelCounters
labelCounters_humanLabeled = (LabelCounters -> Maybe Natural)
-> (LabelCounters -> Maybe Natural -> LabelCounters)
-> Lens LabelCounters LabelCounters (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelCounters' {Maybe Natural
humanLabeled :: Maybe Natural
$sel:humanLabeled:LabelCounters' :: LabelCounters -> Maybe Natural
humanLabeled} -> Maybe Natural
humanLabeled) (\s :: LabelCounters
s@LabelCounters' {} Maybe Natural
a -> LabelCounters
s {$sel:humanLabeled:LabelCounters' :: Maybe Natural
humanLabeled = Maybe Natural
a} :: LabelCounters)
instance Core.FromJSON LabelCounters where
parseJSON :: Value -> Parser LabelCounters
parseJSON =
String
-> (Object -> Parser LabelCounters)
-> Value
-> Parser LabelCounters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LabelCounters"
( \Object
x ->
Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> LabelCounters
LabelCounters'
(Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> LabelCounters)
-> Parser (Maybe Natural)
-> Parser
(Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> LabelCounters)
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
"MachineLabeled")
Parser
(Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> LabelCounters)
-> Parser (Maybe Natural)
-> Parser
(Maybe Natural -> Maybe Natural -> Maybe Natural -> LabelCounters)
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
"TotalLabeled")
Parser
(Maybe Natural -> Maybe Natural -> Maybe Natural -> LabelCounters)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> Maybe Natural -> LabelCounters)
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
"FailedNonRetryableError")
Parser (Maybe Natural -> Maybe Natural -> LabelCounters)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> LabelCounters)
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
"Unlabeled")
Parser (Maybe Natural -> LabelCounters)
-> Parser (Maybe Natural) -> Parser LabelCounters
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 LabelCounters
instance Prelude.NFData LabelCounters