{-# 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.AlgorithmSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.AlgorithmStatus
data AlgorithmSummary = AlgorithmSummary'
{
AlgorithmSummary -> Maybe Text
algorithmDescription :: Prelude.Maybe Prelude.Text,
AlgorithmSummary -> Text
algorithmName :: Prelude.Text,
AlgorithmSummary -> Text
algorithmArn :: Prelude.Text,
AlgorithmSummary -> POSIX
creationTime :: Core.POSIX,
AlgorithmSummary -> AlgorithmStatus
algorithmStatus :: AlgorithmStatus
}
deriving (AlgorithmSummary -> AlgorithmSummary -> Bool
(AlgorithmSummary -> AlgorithmSummary -> Bool)
-> (AlgorithmSummary -> AlgorithmSummary -> Bool)
-> Eq AlgorithmSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AlgorithmSummary -> AlgorithmSummary -> Bool
$c/= :: AlgorithmSummary -> AlgorithmSummary -> Bool
== :: AlgorithmSummary -> AlgorithmSummary -> Bool
$c== :: AlgorithmSummary -> AlgorithmSummary -> Bool
Prelude.Eq, ReadPrec [AlgorithmSummary]
ReadPrec AlgorithmSummary
Int -> ReadS AlgorithmSummary
ReadS [AlgorithmSummary]
(Int -> ReadS AlgorithmSummary)
-> ReadS [AlgorithmSummary]
-> ReadPrec AlgorithmSummary
-> ReadPrec [AlgorithmSummary]
-> Read AlgorithmSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AlgorithmSummary]
$creadListPrec :: ReadPrec [AlgorithmSummary]
readPrec :: ReadPrec AlgorithmSummary
$creadPrec :: ReadPrec AlgorithmSummary
readList :: ReadS [AlgorithmSummary]
$creadList :: ReadS [AlgorithmSummary]
readsPrec :: Int -> ReadS AlgorithmSummary
$creadsPrec :: Int -> ReadS AlgorithmSummary
Prelude.Read, Int -> AlgorithmSummary -> ShowS
[AlgorithmSummary] -> ShowS
AlgorithmSummary -> String
(Int -> AlgorithmSummary -> ShowS)
-> (AlgorithmSummary -> String)
-> ([AlgorithmSummary] -> ShowS)
-> Show AlgorithmSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AlgorithmSummary] -> ShowS
$cshowList :: [AlgorithmSummary] -> ShowS
show :: AlgorithmSummary -> String
$cshow :: AlgorithmSummary -> String
showsPrec :: Int -> AlgorithmSummary -> ShowS
$cshowsPrec :: Int -> AlgorithmSummary -> ShowS
Prelude.Show, (forall x. AlgorithmSummary -> Rep AlgorithmSummary x)
-> (forall x. Rep AlgorithmSummary x -> AlgorithmSummary)
-> Generic AlgorithmSummary
forall x. Rep AlgorithmSummary x -> AlgorithmSummary
forall x. AlgorithmSummary -> Rep AlgorithmSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AlgorithmSummary x -> AlgorithmSummary
$cfrom :: forall x. AlgorithmSummary -> Rep AlgorithmSummary x
Prelude.Generic)
newAlgorithmSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
AlgorithmStatus ->
AlgorithmSummary
newAlgorithmSummary :: Text -> Text -> UTCTime -> AlgorithmStatus -> AlgorithmSummary
newAlgorithmSummary
Text
pAlgorithmName_
Text
pAlgorithmArn_
UTCTime
pCreationTime_
AlgorithmStatus
pAlgorithmStatus_ =
AlgorithmSummary' :: Maybe Text
-> Text -> Text -> POSIX -> AlgorithmStatus -> AlgorithmSummary
AlgorithmSummary'
{ $sel:algorithmDescription:AlgorithmSummary' :: Maybe Text
algorithmDescription =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:algorithmName:AlgorithmSummary' :: Text
algorithmName = Text
pAlgorithmName_,
$sel:algorithmArn:AlgorithmSummary' :: Text
algorithmArn = Text
pAlgorithmArn_,
$sel:creationTime:AlgorithmSummary' :: POSIX
creationTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_,
$sel:algorithmStatus:AlgorithmSummary' :: AlgorithmStatus
algorithmStatus = AlgorithmStatus
pAlgorithmStatus_
}
algorithmSummary_algorithmDescription :: Lens.Lens' AlgorithmSummary (Prelude.Maybe Prelude.Text)
algorithmSummary_algorithmDescription :: (Maybe Text -> f (Maybe Text))
-> AlgorithmSummary -> f AlgorithmSummary
algorithmSummary_algorithmDescription = (AlgorithmSummary -> Maybe Text)
-> (AlgorithmSummary -> Maybe Text -> AlgorithmSummary)
-> Lens AlgorithmSummary AlgorithmSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AlgorithmSummary' {Maybe Text
algorithmDescription :: Maybe Text
$sel:algorithmDescription:AlgorithmSummary' :: AlgorithmSummary -> Maybe Text
algorithmDescription} -> Maybe Text
algorithmDescription) (\s :: AlgorithmSummary
s@AlgorithmSummary' {} Maybe Text
a -> AlgorithmSummary
s {$sel:algorithmDescription:AlgorithmSummary' :: Maybe Text
algorithmDescription = Maybe Text
a} :: AlgorithmSummary)
algorithmSummary_algorithmName :: Lens.Lens' AlgorithmSummary Prelude.Text
algorithmSummary_algorithmName :: (Text -> f Text) -> AlgorithmSummary -> f AlgorithmSummary
algorithmSummary_algorithmName = (AlgorithmSummary -> Text)
-> (AlgorithmSummary -> Text -> AlgorithmSummary)
-> Lens AlgorithmSummary AlgorithmSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AlgorithmSummary' {Text
algorithmName :: Text
$sel:algorithmName:AlgorithmSummary' :: AlgorithmSummary -> Text
algorithmName} -> Text
algorithmName) (\s :: AlgorithmSummary
s@AlgorithmSummary' {} Text
a -> AlgorithmSummary
s {$sel:algorithmName:AlgorithmSummary' :: Text
algorithmName = Text
a} :: AlgorithmSummary)
algorithmSummary_algorithmArn :: Lens.Lens' AlgorithmSummary Prelude.Text
algorithmSummary_algorithmArn :: (Text -> f Text) -> AlgorithmSummary -> f AlgorithmSummary
algorithmSummary_algorithmArn = (AlgorithmSummary -> Text)
-> (AlgorithmSummary -> Text -> AlgorithmSummary)
-> Lens AlgorithmSummary AlgorithmSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AlgorithmSummary' {Text
algorithmArn :: Text
$sel:algorithmArn:AlgorithmSummary' :: AlgorithmSummary -> Text
algorithmArn} -> Text
algorithmArn) (\s :: AlgorithmSummary
s@AlgorithmSummary' {} Text
a -> AlgorithmSummary
s {$sel:algorithmArn:AlgorithmSummary' :: Text
algorithmArn = Text
a} :: AlgorithmSummary)
algorithmSummary_creationTime :: Lens.Lens' AlgorithmSummary Prelude.UTCTime
algorithmSummary_creationTime :: (UTCTime -> f UTCTime) -> AlgorithmSummary -> f AlgorithmSummary
algorithmSummary_creationTime = (AlgorithmSummary -> POSIX)
-> (AlgorithmSummary -> POSIX -> AlgorithmSummary)
-> Lens AlgorithmSummary AlgorithmSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AlgorithmSummary' {POSIX
creationTime :: POSIX
$sel:creationTime:AlgorithmSummary' :: AlgorithmSummary -> POSIX
creationTime} -> POSIX
creationTime) (\s :: AlgorithmSummary
s@AlgorithmSummary' {} POSIX
a -> AlgorithmSummary
s {$sel:creationTime:AlgorithmSummary' :: POSIX
creationTime = POSIX
a} :: AlgorithmSummary) ((POSIX -> f POSIX) -> AlgorithmSummary -> f AlgorithmSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> AlgorithmSummary
-> f AlgorithmSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
algorithmSummary_algorithmStatus :: Lens.Lens' AlgorithmSummary AlgorithmStatus
algorithmSummary_algorithmStatus :: (AlgorithmStatus -> f AlgorithmStatus)
-> AlgorithmSummary -> f AlgorithmSummary
algorithmSummary_algorithmStatus = (AlgorithmSummary -> AlgorithmStatus)
-> (AlgorithmSummary -> AlgorithmStatus -> AlgorithmSummary)
-> Lens
AlgorithmSummary AlgorithmSummary AlgorithmStatus AlgorithmStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AlgorithmSummary' {AlgorithmStatus
algorithmStatus :: AlgorithmStatus
$sel:algorithmStatus:AlgorithmSummary' :: AlgorithmSummary -> AlgorithmStatus
algorithmStatus} -> AlgorithmStatus
algorithmStatus) (\s :: AlgorithmSummary
s@AlgorithmSummary' {} AlgorithmStatus
a -> AlgorithmSummary
s {$sel:algorithmStatus:AlgorithmSummary' :: AlgorithmStatus
algorithmStatus = AlgorithmStatus
a} :: AlgorithmSummary)
instance Core.FromJSON AlgorithmSummary where
parseJSON :: Value -> Parser AlgorithmSummary
parseJSON =
String
-> (Object -> Parser AlgorithmSummary)
-> Value
-> Parser AlgorithmSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AlgorithmSummary"
( \Object
x ->
Maybe Text
-> Text -> Text -> POSIX -> AlgorithmStatus -> AlgorithmSummary
AlgorithmSummary'
(Maybe Text
-> Text -> Text -> POSIX -> AlgorithmStatus -> AlgorithmSummary)
-> Parser (Maybe Text)
-> Parser
(Text -> Text -> POSIX -> AlgorithmStatus -> AlgorithmSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AlgorithmDescription")
Parser
(Text -> Text -> POSIX -> AlgorithmStatus -> AlgorithmSummary)
-> Parser Text
-> Parser (Text -> POSIX -> AlgorithmStatus -> AlgorithmSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"AlgorithmName")
Parser (Text -> POSIX -> AlgorithmStatus -> AlgorithmSummary)
-> Parser Text
-> Parser (POSIX -> AlgorithmStatus -> AlgorithmSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"AlgorithmArn")
Parser (POSIX -> AlgorithmStatus -> AlgorithmSummary)
-> Parser POSIX -> Parser (AlgorithmStatus -> AlgorithmSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreationTime")
Parser (AlgorithmStatus -> AlgorithmSummary)
-> Parser AlgorithmStatus -> Parser AlgorithmSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser AlgorithmStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"AlgorithmStatus")
)
instance Prelude.Hashable AlgorithmSummary
instance Prelude.NFData AlgorithmSummary