{-# 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.ContextSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.ContextSource
data ContextSummary = ContextSummary'
{
ContextSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
ContextSummary -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
ContextSummary -> Maybe Text
contextType :: Prelude.Maybe Prelude.Text,
ContextSummary -> Maybe Text
contextArn :: Prelude.Maybe Prelude.Text,
ContextSummary -> Maybe ContextSource
source :: Prelude.Maybe ContextSource,
ContextSummary -> Maybe Text
contextName :: Prelude.Maybe Prelude.Text
}
deriving (ContextSummary -> ContextSummary -> Bool
(ContextSummary -> ContextSummary -> Bool)
-> (ContextSummary -> ContextSummary -> Bool) -> Eq ContextSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContextSummary -> ContextSummary -> Bool
$c/= :: ContextSummary -> ContextSummary -> Bool
== :: ContextSummary -> ContextSummary -> Bool
$c== :: ContextSummary -> ContextSummary -> Bool
Prelude.Eq, ReadPrec [ContextSummary]
ReadPrec ContextSummary
Int -> ReadS ContextSummary
ReadS [ContextSummary]
(Int -> ReadS ContextSummary)
-> ReadS [ContextSummary]
-> ReadPrec ContextSummary
-> ReadPrec [ContextSummary]
-> Read ContextSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContextSummary]
$creadListPrec :: ReadPrec [ContextSummary]
readPrec :: ReadPrec ContextSummary
$creadPrec :: ReadPrec ContextSummary
readList :: ReadS [ContextSummary]
$creadList :: ReadS [ContextSummary]
readsPrec :: Int -> ReadS ContextSummary
$creadsPrec :: Int -> ReadS ContextSummary
Prelude.Read, Int -> ContextSummary -> ShowS
[ContextSummary] -> ShowS
ContextSummary -> String
(Int -> ContextSummary -> ShowS)
-> (ContextSummary -> String)
-> ([ContextSummary] -> ShowS)
-> Show ContextSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContextSummary] -> ShowS
$cshowList :: [ContextSummary] -> ShowS
show :: ContextSummary -> String
$cshow :: ContextSummary -> String
showsPrec :: Int -> ContextSummary -> ShowS
$cshowsPrec :: Int -> ContextSummary -> ShowS
Prelude.Show, (forall x. ContextSummary -> Rep ContextSummary x)
-> (forall x. Rep ContextSummary x -> ContextSummary)
-> Generic ContextSummary
forall x. Rep ContextSummary x -> ContextSummary
forall x. ContextSummary -> Rep ContextSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContextSummary x -> ContextSummary
$cfrom :: forall x. ContextSummary -> Rep ContextSummary x
Prelude.Generic)
newContextSummary ::
ContextSummary
newContextSummary :: ContextSummary
newContextSummary =
ContextSummary' :: Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ContextSource
-> Maybe Text
-> ContextSummary
ContextSummary'
{ $sel:creationTime:ContextSummary' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedTime:ContextSummary' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:contextType:ContextSummary' :: Maybe Text
contextType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:contextArn:ContextSummary' :: Maybe Text
contextArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:source:ContextSummary' :: Maybe ContextSource
source = Maybe ContextSource
forall a. Maybe a
Prelude.Nothing,
$sel:contextName:ContextSummary' :: Maybe Text
contextName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
contextSummary_creationTime :: Lens.Lens' ContextSummary (Prelude.Maybe Prelude.UTCTime)
contextSummary_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ContextSummary -> f ContextSummary
contextSummary_creationTime = (ContextSummary -> Maybe POSIX)
-> (ContextSummary -> Maybe POSIX -> ContextSummary)
-> Lens ContextSummary ContextSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContextSummary' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:ContextSummary' :: ContextSummary -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: ContextSummary
s@ContextSummary' {} Maybe POSIX
a -> ContextSummary
s {$sel:creationTime:ContextSummary' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: ContextSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> ContextSummary -> f ContextSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ContextSummary
-> f ContextSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
contextSummary_lastModifiedTime :: Lens.Lens' ContextSummary (Prelude.Maybe Prelude.UTCTime)
contextSummary_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ContextSummary -> f ContextSummary
contextSummary_lastModifiedTime = (ContextSummary -> Maybe POSIX)
-> (ContextSummary -> Maybe POSIX -> ContextSummary)
-> Lens ContextSummary ContextSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContextSummary' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:ContextSummary' :: ContextSummary -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: ContextSummary
s@ContextSummary' {} Maybe POSIX
a -> ContextSummary
s {$sel:lastModifiedTime:ContextSummary' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: ContextSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> ContextSummary -> f ContextSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ContextSummary
-> f ContextSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
contextSummary_contextType :: Lens.Lens' ContextSummary (Prelude.Maybe Prelude.Text)
contextSummary_contextType :: (Maybe Text -> f (Maybe Text))
-> ContextSummary -> f ContextSummary
contextSummary_contextType = (ContextSummary -> Maybe Text)
-> (ContextSummary -> Maybe Text -> ContextSummary)
-> Lens ContextSummary ContextSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContextSummary' {Maybe Text
contextType :: Maybe Text
$sel:contextType:ContextSummary' :: ContextSummary -> Maybe Text
contextType} -> Maybe Text
contextType) (\s :: ContextSummary
s@ContextSummary' {} Maybe Text
a -> ContextSummary
s {$sel:contextType:ContextSummary' :: Maybe Text
contextType = Maybe Text
a} :: ContextSummary)
contextSummary_contextArn :: Lens.Lens' ContextSummary (Prelude.Maybe Prelude.Text)
contextSummary_contextArn :: (Maybe Text -> f (Maybe Text))
-> ContextSummary -> f ContextSummary
contextSummary_contextArn = (ContextSummary -> Maybe Text)
-> (ContextSummary -> Maybe Text -> ContextSummary)
-> Lens ContextSummary ContextSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContextSummary' {Maybe Text
contextArn :: Maybe Text
$sel:contextArn:ContextSummary' :: ContextSummary -> Maybe Text
contextArn} -> Maybe Text
contextArn) (\s :: ContextSummary
s@ContextSummary' {} Maybe Text
a -> ContextSummary
s {$sel:contextArn:ContextSummary' :: Maybe Text
contextArn = Maybe Text
a} :: ContextSummary)
contextSummary_source :: Lens.Lens' ContextSummary (Prelude.Maybe ContextSource)
contextSummary_source :: (Maybe ContextSource -> f (Maybe ContextSource))
-> ContextSummary -> f ContextSummary
contextSummary_source = (ContextSummary -> Maybe ContextSource)
-> (ContextSummary -> Maybe ContextSource -> ContextSummary)
-> Lens
ContextSummary
ContextSummary
(Maybe ContextSource)
(Maybe ContextSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContextSummary' {Maybe ContextSource
source :: Maybe ContextSource
$sel:source:ContextSummary' :: ContextSummary -> Maybe ContextSource
source} -> Maybe ContextSource
source) (\s :: ContextSummary
s@ContextSummary' {} Maybe ContextSource
a -> ContextSummary
s {$sel:source:ContextSummary' :: Maybe ContextSource
source = Maybe ContextSource
a} :: ContextSummary)
contextSummary_contextName :: Lens.Lens' ContextSummary (Prelude.Maybe Prelude.Text)
contextSummary_contextName :: (Maybe Text -> f (Maybe Text))
-> ContextSummary -> f ContextSummary
contextSummary_contextName = (ContextSummary -> Maybe Text)
-> (ContextSummary -> Maybe Text -> ContextSummary)
-> Lens ContextSummary ContextSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContextSummary' {Maybe Text
contextName :: Maybe Text
$sel:contextName:ContextSummary' :: ContextSummary -> Maybe Text
contextName} -> Maybe Text
contextName) (\s :: ContextSummary
s@ContextSummary' {} Maybe Text
a -> ContextSummary
s {$sel:contextName:ContextSummary' :: Maybe Text
contextName = Maybe Text
a} :: ContextSummary)
instance Core.FromJSON ContextSummary where
parseJSON :: Value -> Parser ContextSummary
parseJSON =
String
-> (Object -> Parser ContextSummary)
-> Value
-> Parser ContextSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ContextSummary"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ContextSource
-> Maybe Text
-> ContextSummary
ContextSummary'
(Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ContextSource
-> Maybe Text
-> ContextSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ContextSource
-> Maybe Text
-> ContextSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ContextSource
-> Maybe Text
-> ContextSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe ContextSource
-> Maybe Text
-> ContextSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastModifiedTime")
Parser
(Maybe Text
-> Maybe Text
-> Maybe ContextSource
-> Maybe Text
-> ContextSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe ContextSource -> Maybe Text -> ContextSummary)
forall (f :: * -> *) a b. Applicative f => 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
"ContextType")
Parser
(Maybe Text -> Maybe ContextSource -> Maybe Text -> ContextSummary)
-> Parser (Maybe Text)
-> Parser (Maybe ContextSource -> Maybe Text -> ContextSummary)
forall (f :: * -> *) a b. Applicative f => 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
"ContextArn")
Parser (Maybe ContextSource -> Maybe Text -> ContextSummary)
-> Parser (Maybe ContextSource)
-> Parser (Maybe Text -> ContextSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ContextSource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Source")
Parser (Maybe Text -> ContextSummary)
-> Parser (Maybe Text) -> Parser ContextSummary
forall (f :: * -> *) a b. Applicative f => 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
"ContextName")
)
instance Prelude.Hashable ContextSummary
instance Prelude.NFData ContextSummary