{-# 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.TrainingJobStatusCounters where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TrainingJobStatusCounters = TrainingJobStatusCounters'
{
TrainingJobStatusCounters -> Maybe Natural
stopped :: Prelude.Maybe Prelude.Natural,
TrainingJobStatusCounters -> Maybe Natural
retryableError :: Prelude.Maybe Prelude.Natural,
TrainingJobStatusCounters -> Maybe Natural
inProgress :: Prelude.Maybe Prelude.Natural,
TrainingJobStatusCounters -> Maybe Natural
nonRetryableError :: Prelude.Maybe Prelude.Natural,
TrainingJobStatusCounters -> Maybe Natural
completed :: Prelude.Maybe Prelude.Natural
}
deriving (TrainingJobStatusCounters -> TrainingJobStatusCounters -> Bool
(TrainingJobStatusCounters -> TrainingJobStatusCounters -> Bool)
-> (TrainingJobStatusCounters -> TrainingJobStatusCounters -> Bool)
-> Eq TrainingJobStatusCounters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrainingJobStatusCounters -> TrainingJobStatusCounters -> Bool
$c/= :: TrainingJobStatusCounters -> TrainingJobStatusCounters -> Bool
== :: TrainingJobStatusCounters -> TrainingJobStatusCounters -> Bool
$c== :: TrainingJobStatusCounters -> TrainingJobStatusCounters -> Bool
Prelude.Eq, ReadPrec [TrainingJobStatusCounters]
ReadPrec TrainingJobStatusCounters
Int -> ReadS TrainingJobStatusCounters
ReadS [TrainingJobStatusCounters]
(Int -> ReadS TrainingJobStatusCounters)
-> ReadS [TrainingJobStatusCounters]
-> ReadPrec TrainingJobStatusCounters
-> ReadPrec [TrainingJobStatusCounters]
-> Read TrainingJobStatusCounters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrainingJobStatusCounters]
$creadListPrec :: ReadPrec [TrainingJobStatusCounters]
readPrec :: ReadPrec TrainingJobStatusCounters
$creadPrec :: ReadPrec TrainingJobStatusCounters
readList :: ReadS [TrainingJobStatusCounters]
$creadList :: ReadS [TrainingJobStatusCounters]
readsPrec :: Int -> ReadS TrainingJobStatusCounters
$creadsPrec :: Int -> ReadS TrainingJobStatusCounters
Prelude.Read, Int -> TrainingJobStatusCounters -> ShowS
[TrainingJobStatusCounters] -> ShowS
TrainingJobStatusCounters -> String
(Int -> TrainingJobStatusCounters -> ShowS)
-> (TrainingJobStatusCounters -> String)
-> ([TrainingJobStatusCounters] -> ShowS)
-> Show TrainingJobStatusCounters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrainingJobStatusCounters] -> ShowS
$cshowList :: [TrainingJobStatusCounters] -> ShowS
show :: TrainingJobStatusCounters -> String
$cshow :: TrainingJobStatusCounters -> String
showsPrec :: Int -> TrainingJobStatusCounters -> ShowS
$cshowsPrec :: Int -> TrainingJobStatusCounters -> ShowS
Prelude.Show, (forall x.
TrainingJobStatusCounters -> Rep TrainingJobStatusCounters x)
-> (forall x.
Rep TrainingJobStatusCounters x -> TrainingJobStatusCounters)
-> Generic TrainingJobStatusCounters
forall x.
Rep TrainingJobStatusCounters x -> TrainingJobStatusCounters
forall x.
TrainingJobStatusCounters -> Rep TrainingJobStatusCounters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TrainingJobStatusCounters x -> TrainingJobStatusCounters
$cfrom :: forall x.
TrainingJobStatusCounters -> Rep TrainingJobStatusCounters x
Prelude.Generic)
newTrainingJobStatusCounters ::
TrainingJobStatusCounters
newTrainingJobStatusCounters :: TrainingJobStatusCounters
newTrainingJobStatusCounters =
TrainingJobStatusCounters' :: Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> TrainingJobStatusCounters
TrainingJobStatusCounters'
{ $sel:stopped:TrainingJobStatusCounters' :: Maybe Natural
stopped =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:retryableError:TrainingJobStatusCounters' :: Maybe Natural
retryableError = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:inProgress:TrainingJobStatusCounters' :: Maybe Natural
inProgress = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:nonRetryableError:TrainingJobStatusCounters' :: Maybe Natural
nonRetryableError = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:completed:TrainingJobStatusCounters' :: Maybe Natural
completed = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
trainingJobStatusCounters_stopped :: Lens.Lens' TrainingJobStatusCounters (Prelude.Maybe Prelude.Natural)
trainingJobStatusCounters_stopped :: (Maybe Natural -> f (Maybe Natural))
-> TrainingJobStatusCounters -> f TrainingJobStatusCounters
trainingJobStatusCounters_stopped = (TrainingJobStatusCounters -> Maybe Natural)
-> (TrainingJobStatusCounters
-> Maybe Natural -> TrainingJobStatusCounters)
-> Lens
TrainingJobStatusCounters
TrainingJobStatusCounters
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrainingJobStatusCounters' {Maybe Natural
stopped :: Maybe Natural
$sel:stopped:TrainingJobStatusCounters' :: TrainingJobStatusCounters -> Maybe Natural
stopped} -> Maybe Natural
stopped) (\s :: TrainingJobStatusCounters
s@TrainingJobStatusCounters' {} Maybe Natural
a -> TrainingJobStatusCounters
s {$sel:stopped:TrainingJobStatusCounters' :: Maybe Natural
stopped = Maybe Natural
a} :: TrainingJobStatusCounters)
trainingJobStatusCounters_retryableError :: Lens.Lens' TrainingJobStatusCounters (Prelude.Maybe Prelude.Natural)
trainingJobStatusCounters_retryableError :: (Maybe Natural -> f (Maybe Natural))
-> TrainingJobStatusCounters -> f TrainingJobStatusCounters
trainingJobStatusCounters_retryableError = (TrainingJobStatusCounters -> Maybe Natural)
-> (TrainingJobStatusCounters
-> Maybe Natural -> TrainingJobStatusCounters)
-> Lens
TrainingJobStatusCounters
TrainingJobStatusCounters
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrainingJobStatusCounters' {Maybe Natural
retryableError :: Maybe Natural
$sel:retryableError:TrainingJobStatusCounters' :: TrainingJobStatusCounters -> Maybe Natural
retryableError} -> Maybe Natural
retryableError) (\s :: TrainingJobStatusCounters
s@TrainingJobStatusCounters' {} Maybe Natural
a -> TrainingJobStatusCounters
s {$sel:retryableError:TrainingJobStatusCounters' :: Maybe Natural
retryableError = Maybe Natural
a} :: TrainingJobStatusCounters)
trainingJobStatusCounters_inProgress :: Lens.Lens' TrainingJobStatusCounters (Prelude.Maybe Prelude.Natural)
trainingJobStatusCounters_inProgress :: (Maybe Natural -> f (Maybe Natural))
-> TrainingJobStatusCounters -> f TrainingJobStatusCounters
trainingJobStatusCounters_inProgress = (TrainingJobStatusCounters -> Maybe Natural)
-> (TrainingJobStatusCounters
-> Maybe Natural -> TrainingJobStatusCounters)
-> Lens
TrainingJobStatusCounters
TrainingJobStatusCounters
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrainingJobStatusCounters' {Maybe Natural
inProgress :: Maybe Natural
$sel:inProgress:TrainingJobStatusCounters' :: TrainingJobStatusCounters -> Maybe Natural
inProgress} -> Maybe Natural
inProgress) (\s :: TrainingJobStatusCounters
s@TrainingJobStatusCounters' {} Maybe Natural
a -> TrainingJobStatusCounters
s {$sel:inProgress:TrainingJobStatusCounters' :: Maybe Natural
inProgress = Maybe Natural
a} :: TrainingJobStatusCounters)
trainingJobStatusCounters_nonRetryableError :: Lens.Lens' TrainingJobStatusCounters (Prelude.Maybe Prelude.Natural)
trainingJobStatusCounters_nonRetryableError :: (Maybe Natural -> f (Maybe Natural))
-> TrainingJobStatusCounters -> f TrainingJobStatusCounters
trainingJobStatusCounters_nonRetryableError = (TrainingJobStatusCounters -> Maybe Natural)
-> (TrainingJobStatusCounters
-> Maybe Natural -> TrainingJobStatusCounters)
-> Lens
TrainingJobStatusCounters
TrainingJobStatusCounters
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrainingJobStatusCounters' {Maybe Natural
nonRetryableError :: Maybe Natural
$sel:nonRetryableError:TrainingJobStatusCounters' :: TrainingJobStatusCounters -> Maybe Natural
nonRetryableError} -> Maybe Natural
nonRetryableError) (\s :: TrainingJobStatusCounters
s@TrainingJobStatusCounters' {} Maybe Natural
a -> TrainingJobStatusCounters
s {$sel:nonRetryableError:TrainingJobStatusCounters' :: Maybe Natural
nonRetryableError = Maybe Natural
a} :: TrainingJobStatusCounters)
trainingJobStatusCounters_completed :: Lens.Lens' TrainingJobStatusCounters (Prelude.Maybe Prelude.Natural)
trainingJobStatusCounters_completed :: (Maybe Natural -> f (Maybe Natural))
-> TrainingJobStatusCounters -> f TrainingJobStatusCounters
trainingJobStatusCounters_completed = (TrainingJobStatusCounters -> Maybe Natural)
-> (TrainingJobStatusCounters
-> Maybe Natural -> TrainingJobStatusCounters)
-> Lens
TrainingJobStatusCounters
TrainingJobStatusCounters
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrainingJobStatusCounters' {Maybe Natural
completed :: Maybe Natural
$sel:completed:TrainingJobStatusCounters' :: TrainingJobStatusCounters -> Maybe Natural
completed} -> Maybe Natural
completed) (\s :: TrainingJobStatusCounters
s@TrainingJobStatusCounters' {} Maybe Natural
a -> TrainingJobStatusCounters
s {$sel:completed:TrainingJobStatusCounters' :: Maybe Natural
completed = Maybe Natural
a} :: TrainingJobStatusCounters)
instance Core.FromJSON TrainingJobStatusCounters where
parseJSON :: Value -> Parser TrainingJobStatusCounters
parseJSON =
String
-> (Object -> Parser TrainingJobStatusCounters)
-> Value
-> Parser TrainingJobStatusCounters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TrainingJobStatusCounters"
( \Object
x ->
Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> TrainingJobStatusCounters
TrainingJobStatusCounters'
(Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> TrainingJobStatusCounters)
-> Parser (Maybe Natural)
-> Parser
(Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> TrainingJobStatusCounters)
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
"Stopped")
Parser
(Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> TrainingJobStatusCounters)
-> Parser (Maybe Natural)
-> Parser
(Maybe Natural
-> Maybe Natural -> Maybe Natural -> TrainingJobStatusCounters)
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
"RetryableError")
Parser
(Maybe Natural
-> Maybe Natural -> Maybe Natural -> TrainingJobStatusCounters)
-> Parser (Maybe Natural)
-> Parser
(Maybe Natural -> Maybe Natural -> TrainingJobStatusCounters)
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
"InProgress")
Parser
(Maybe Natural -> Maybe Natural -> TrainingJobStatusCounters)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> TrainingJobStatusCounters)
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
"NonRetryableError")
Parser (Maybe Natural -> TrainingJobStatusCounters)
-> Parser (Maybe Natural) -> Parser TrainingJobStatusCounters
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
"Completed")
)
instance Prelude.Hashable TrainingJobStatusCounters
instance Prelude.NFData TrainingJobStatusCounters