{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data TrainingJobStatusCounters = TrainingJobStatusCounters'
{
TrainingJobStatusCounters -> Maybe Natural
completed :: Prelude.Maybe Prelude.Natural,
TrainingJobStatusCounters -> Maybe Natural
inProgress :: Prelude.Maybe Prelude.Natural,
TrainingJobStatusCounters -> Maybe Natural
nonRetryableError :: Prelude.Maybe Prelude.Natural,
TrainingJobStatusCounters -> Maybe Natural
retryableError :: Prelude.Maybe Prelude.Natural,
TrainingJobStatusCounters -> Maybe Natural
stopped :: Prelude.Maybe Prelude.Natural
}
deriving (TrainingJobStatusCounters -> TrainingJobStatusCounters -> Bool
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]
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
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.
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'
{ $sel:completed:TrainingJobStatusCounters' :: Maybe Natural
completed =
forall a. Maybe a
Prelude.Nothing,
$sel:inProgress:TrainingJobStatusCounters' :: Maybe Natural
inProgress = forall a. Maybe a
Prelude.Nothing,
$sel:nonRetryableError:TrainingJobStatusCounters' :: Maybe Natural
nonRetryableError = forall a. Maybe a
Prelude.Nothing,
$sel:retryableError:TrainingJobStatusCounters' :: Maybe Natural
retryableError = forall a. Maybe a
Prelude.Nothing,
$sel:stopped:TrainingJobStatusCounters' :: Maybe Natural
stopped = forall a. Maybe a
Prelude.Nothing
}
trainingJobStatusCounters_completed :: Lens.Lens' TrainingJobStatusCounters (Prelude.Maybe Prelude.Natural)
trainingJobStatusCounters_completed :: Lens' TrainingJobStatusCounters (Maybe Natural)
trainingJobStatusCounters_completed = 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)
trainingJobStatusCounters_inProgress :: Lens.Lens' TrainingJobStatusCounters (Prelude.Maybe Prelude.Natural)
trainingJobStatusCounters_inProgress :: Lens' TrainingJobStatusCounters (Maybe Natural)
trainingJobStatusCounters_inProgress = 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 :: Lens' TrainingJobStatusCounters (Maybe Natural)
trainingJobStatusCounters_nonRetryableError = 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_retryableError :: Lens.Lens' TrainingJobStatusCounters (Prelude.Maybe Prelude.Natural)
trainingJobStatusCounters_retryableError :: Lens' TrainingJobStatusCounters (Maybe Natural)
trainingJobStatusCounters_retryableError = 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_stopped :: Lens.Lens' TrainingJobStatusCounters (Prelude.Maybe Prelude.Natural)
trainingJobStatusCounters_stopped :: Lens' TrainingJobStatusCounters (Maybe Natural)
trainingJobStatusCounters_stopped = 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)
instance Data.FromJSON TrainingJobStatusCounters where
parseJSON :: Value -> Parser TrainingJobStatusCounters
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TrainingJobStatusCounters"
( \Object
x ->
Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> TrainingJobStatusCounters
TrainingJobStatusCounters'
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
"Completed")
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
"InProgress")
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
"NonRetryableError")
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
"RetryableError")
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
"Stopped")
)
instance Prelude.Hashable TrainingJobStatusCounters where
hashWithSalt :: Int -> TrainingJobStatusCounters -> Int
hashWithSalt Int
_salt TrainingJobStatusCounters' {Maybe Natural
stopped :: Maybe Natural
retryableError :: Maybe Natural
nonRetryableError :: Maybe Natural
inProgress :: Maybe Natural
completed :: Maybe Natural
$sel:stopped:TrainingJobStatusCounters' :: TrainingJobStatusCounters -> Maybe Natural
$sel:retryableError:TrainingJobStatusCounters' :: TrainingJobStatusCounters -> Maybe Natural
$sel:nonRetryableError:TrainingJobStatusCounters' :: TrainingJobStatusCounters -> Maybe Natural
$sel:inProgress:TrainingJobStatusCounters' :: TrainingJobStatusCounters -> Maybe Natural
$sel:completed:TrainingJobStatusCounters' :: TrainingJobStatusCounters -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
completed
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
inProgress
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
nonRetryableError
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
retryableError
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
stopped
instance Prelude.NFData TrainingJobStatusCounters where
rnf :: TrainingJobStatusCounters -> ()
rnf TrainingJobStatusCounters' {Maybe Natural
stopped :: Maybe Natural
retryableError :: Maybe Natural
nonRetryableError :: Maybe Natural
inProgress :: Maybe Natural
completed :: Maybe Natural
$sel:stopped:TrainingJobStatusCounters' :: TrainingJobStatusCounters -> Maybe Natural
$sel:retryableError:TrainingJobStatusCounters' :: TrainingJobStatusCounters -> Maybe Natural
$sel:nonRetryableError:TrainingJobStatusCounters' :: TrainingJobStatusCounters -> Maybe Natural
$sel:inProgress:TrainingJobStatusCounters' :: TrainingJobStatusCounters -> Maybe Natural
$sel:completed:TrainingJobStatusCounters' :: TrainingJobStatusCounters -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
completed
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
inProgress
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
nonRetryableError
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
retryableError
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
stopped