{-# 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.ModelCardSummary 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
import Amazonka.SageMaker.Types.ModelCardStatus
data ModelCardSummary = ModelCardSummary'
{
ModelCardSummary -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Data.POSIX,
ModelCardSummary -> Text
modelCardName :: Prelude.Text,
ModelCardSummary -> Text
modelCardArn :: Prelude.Text,
ModelCardSummary -> ModelCardStatus
modelCardStatus :: ModelCardStatus,
ModelCardSummary -> POSIX
creationTime :: Data.POSIX
}
deriving (ModelCardSummary -> ModelCardSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelCardSummary -> ModelCardSummary -> Bool
$c/= :: ModelCardSummary -> ModelCardSummary -> Bool
== :: ModelCardSummary -> ModelCardSummary -> Bool
$c== :: ModelCardSummary -> ModelCardSummary -> Bool
Prelude.Eq, ReadPrec [ModelCardSummary]
ReadPrec ModelCardSummary
Int -> ReadS ModelCardSummary
ReadS [ModelCardSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelCardSummary]
$creadListPrec :: ReadPrec [ModelCardSummary]
readPrec :: ReadPrec ModelCardSummary
$creadPrec :: ReadPrec ModelCardSummary
readList :: ReadS [ModelCardSummary]
$creadList :: ReadS [ModelCardSummary]
readsPrec :: Int -> ReadS ModelCardSummary
$creadsPrec :: Int -> ReadS ModelCardSummary
Prelude.Read, Int -> ModelCardSummary -> ShowS
[ModelCardSummary] -> ShowS
ModelCardSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelCardSummary] -> ShowS
$cshowList :: [ModelCardSummary] -> ShowS
show :: ModelCardSummary -> String
$cshow :: ModelCardSummary -> String
showsPrec :: Int -> ModelCardSummary -> ShowS
$cshowsPrec :: Int -> ModelCardSummary -> ShowS
Prelude.Show, forall x. Rep ModelCardSummary x -> ModelCardSummary
forall x. ModelCardSummary -> Rep ModelCardSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModelCardSummary x -> ModelCardSummary
$cfrom :: forall x. ModelCardSummary -> Rep ModelCardSummary x
Prelude.Generic)
newModelCardSummary ::
Prelude.Text ->
Prelude.Text ->
ModelCardStatus ->
Prelude.UTCTime ->
ModelCardSummary
newModelCardSummary :: Text -> Text -> ModelCardStatus -> UTCTime -> ModelCardSummary
newModelCardSummary
Text
pModelCardName_
Text
pModelCardArn_
ModelCardStatus
pModelCardStatus_
UTCTime
pCreationTime_ =
ModelCardSummary'
{ $sel:lastModifiedTime:ModelCardSummary' :: Maybe POSIX
lastModifiedTime =
forall a. Maybe a
Prelude.Nothing,
$sel:modelCardName:ModelCardSummary' :: Text
modelCardName = Text
pModelCardName_,
$sel:modelCardArn:ModelCardSummary' :: Text
modelCardArn = Text
pModelCardArn_,
$sel:modelCardStatus:ModelCardSummary' :: ModelCardStatus
modelCardStatus = ModelCardStatus
pModelCardStatus_,
$sel:creationTime:ModelCardSummary' :: POSIX
creationTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_
}
modelCardSummary_lastModifiedTime :: Lens.Lens' ModelCardSummary (Prelude.Maybe Prelude.UTCTime)
modelCardSummary_lastModifiedTime :: Lens' ModelCardSummary (Maybe UTCTime)
modelCardSummary_lastModifiedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCardSummary' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:ModelCardSummary' :: ModelCardSummary -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: ModelCardSummary
s@ModelCardSummary' {} Maybe POSIX
a -> ModelCardSummary
s {$sel:lastModifiedTime:ModelCardSummary' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: ModelCardSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
modelCardSummary_modelCardName :: Lens.Lens' ModelCardSummary Prelude.Text
modelCardSummary_modelCardName :: Lens' ModelCardSummary Text
modelCardSummary_modelCardName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCardSummary' {Text
modelCardName :: Text
$sel:modelCardName:ModelCardSummary' :: ModelCardSummary -> Text
modelCardName} -> Text
modelCardName) (\s :: ModelCardSummary
s@ModelCardSummary' {} Text
a -> ModelCardSummary
s {$sel:modelCardName:ModelCardSummary' :: Text
modelCardName = Text
a} :: ModelCardSummary)
modelCardSummary_modelCardArn :: Lens.Lens' ModelCardSummary Prelude.Text
modelCardSummary_modelCardArn :: Lens' ModelCardSummary Text
modelCardSummary_modelCardArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCardSummary' {Text
modelCardArn :: Text
$sel:modelCardArn:ModelCardSummary' :: ModelCardSummary -> Text
modelCardArn} -> Text
modelCardArn) (\s :: ModelCardSummary
s@ModelCardSummary' {} Text
a -> ModelCardSummary
s {$sel:modelCardArn:ModelCardSummary' :: Text
modelCardArn = Text
a} :: ModelCardSummary)
modelCardSummary_modelCardStatus :: Lens.Lens' ModelCardSummary ModelCardStatus
modelCardSummary_modelCardStatus :: Lens' ModelCardSummary ModelCardStatus
modelCardSummary_modelCardStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCardSummary' {ModelCardStatus
modelCardStatus :: ModelCardStatus
$sel:modelCardStatus:ModelCardSummary' :: ModelCardSummary -> ModelCardStatus
modelCardStatus} -> ModelCardStatus
modelCardStatus) (\s :: ModelCardSummary
s@ModelCardSummary' {} ModelCardStatus
a -> ModelCardSummary
s {$sel:modelCardStatus:ModelCardSummary' :: ModelCardStatus
modelCardStatus = ModelCardStatus
a} :: ModelCardSummary)
modelCardSummary_creationTime :: Lens.Lens' ModelCardSummary Prelude.UTCTime
modelCardSummary_creationTime :: Lens' ModelCardSummary UTCTime
modelCardSummary_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCardSummary' {POSIX
creationTime :: POSIX
$sel:creationTime:ModelCardSummary' :: ModelCardSummary -> POSIX
creationTime} -> POSIX
creationTime) (\s :: ModelCardSummary
s@ModelCardSummary' {} POSIX
a -> ModelCardSummary
s {$sel:creationTime:ModelCardSummary' :: POSIX
creationTime = POSIX
a} :: ModelCardSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON ModelCardSummary where
parseJSON :: Value -> Parser ModelCardSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ModelCardSummary"
( \Object
x ->
Maybe POSIX
-> Text -> Text -> ModelCardStatus -> POSIX -> ModelCardSummary
ModelCardSummary'
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
"LastModifiedTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ModelCardName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ModelCardArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ModelCardStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"CreationTime")
)
instance Prelude.Hashable ModelCardSummary where
hashWithSalt :: Int -> ModelCardSummary -> Int
hashWithSalt Int
_salt ModelCardSummary' {Maybe POSIX
Text
POSIX
ModelCardStatus
creationTime :: POSIX
modelCardStatus :: ModelCardStatus
modelCardArn :: Text
modelCardName :: Text
lastModifiedTime :: Maybe POSIX
$sel:creationTime:ModelCardSummary' :: ModelCardSummary -> POSIX
$sel:modelCardStatus:ModelCardSummary' :: ModelCardSummary -> ModelCardStatus
$sel:modelCardArn:ModelCardSummary' :: ModelCardSummary -> Text
$sel:modelCardName:ModelCardSummary' :: ModelCardSummary -> Text
$sel:lastModifiedTime:ModelCardSummary' :: ModelCardSummary -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
modelCardName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
modelCardArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ModelCardStatus
modelCardStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
creationTime
instance Prelude.NFData ModelCardSummary where
rnf :: ModelCardSummary -> ()
rnf ModelCardSummary' {Maybe POSIX
Text
POSIX
ModelCardStatus
creationTime :: POSIX
modelCardStatus :: ModelCardStatus
modelCardArn :: Text
modelCardName :: Text
lastModifiedTime :: Maybe POSIX
$sel:creationTime:ModelCardSummary' :: ModelCardSummary -> POSIX
$sel:modelCardStatus:ModelCardSummary' :: ModelCardSummary -> ModelCardStatus
$sel:modelCardArn:ModelCardSummary' :: ModelCardSummary -> Text
$sel:modelCardName:ModelCardSummary' :: ModelCardSummary -> Text
$sel:lastModifiedTime:ModelCardSummary' :: ModelCardSummary -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
modelCardName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
modelCardArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ModelCardStatus
modelCardStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
creationTime