{-# 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.DeployedImage where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DeployedImage = DeployedImage'
{
DeployedImage -> Maybe Text
resolvedImage :: Prelude.Maybe Prelude.Text,
DeployedImage -> Maybe Text
specifiedImage :: Prelude.Maybe Prelude.Text,
DeployedImage -> Maybe POSIX
resolutionTime :: Prelude.Maybe Core.POSIX
}
deriving (DeployedImage -> DeployedImage -> Bool
(DeployedImage -> DeployedImage -> Bool)
-> (DeployedImage -> DeployedImage -> Bool) -> Eq DeployedImage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeployedImage -> DeployedImage -> Bool
$c/= :: DeployedImage -> DeployedImage -> Bool
== :: DeployedImage -> DeployedImage -> Bool
$c== :: DeployedImage -> DeployedImage -> Bool
Prelude.Eq, ReadPrec [DeployedImage]
ReadPrec DeployedImage
Int -> ReadS DeployedImage
ReadS [DeployedImage]
(Int -> ReadS DeployedImage)
-> ReadS [DeployedImage]
-> ReadPrec DeployedImage
-> ReadPrec [DeployedImage]
-> Read DeployedImage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeployedImage]
$creadListPrec :: ReadPrec [DeployedImage]
readPrec :: ReadPrec DeployedImage
$creadPrec :: ReadPrec DeployedImage
readList :: ReadS [DeployedImage]
$creadList :: ReadS [DeployedImage]
readsPrec :: Int -> ReadS DeployedImage
$creadsPrec :: Int -> ReadS DeployedImage
Prelude.Read, Int -> DeployedImage -> ShowS
[DeployedImage] -> ShowS
DeployedImage -> String
(Int -> DeployedImage -> ShowS)
-> (DeployedImage -> String)
-> ([DeployedImage] -> ShowS)
-> Show DeployedImage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeployedImage] -> ShowS
$cshowList :: [DeployedImage] -> ShowS
show :: DeployedImage -> String
$cshow :: DeployedImage -> String
showsPrec :: Int -> DeployedImage -> ShowS
$cshowsPrec :: Int -> DeployedImage -> ShowS
Prelude.Show, (forall x. DeployedImage -> Rep DeployedImage x)
-> (forall x. Rep DeployedImage x -> DeployedImage)
-> Generic DeployedImage
forall x. Rep DeployedImage x -> DeployedImage
forall x. DeployedImage -> Rep DeployedImage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeployedImage x -> DeployedImage
$cfrom :: forall x. DeployedImage -> Rep DeployedImage x
Prelude.Generic)
newDeployedImage ::
DeployedImage
newDeployedImage :: DeployedImage
newDeployedImage =
DeployedImage' :: Maybe Text -> Maybe Text -> Maybe POSIX -> DeployedImage
DeployedImage'
{ $sel:resolvedImage:DeployedImage' :: Maybe Text
resolvedImage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:specifiedImage:DeployedImage' :: Maybe Text
specifiedImage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resolutionTime:DeployedImage' :: Maybe POSIX
resolutionTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
deployedImage_resolvedImage :: Lens.Lens' DeployedImage (Prelude.Maybe Prelude.Text)
deployedImage_resolvedImage :: (Maybe Text -> f (Maybe Text)) -> DeployedImage -> f DeployedImage
deployedImage_resolvedImage = (DeployedImage -> Maybe Text)
-> (DeployedImage -> Maybe Text -> DeployedImage)
-> Lens DeployedImage DeployedImage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeployedImage' {Maybe Text
resolvedImage :: Maybe Text
$sel:resolvedImage:DeployedImage' :: DeployedImage -> Maybe Text
resolvedImage} -> Maybe Text
resolvedImage) (\s :: DeployedImage
s@DeployedImage' {} Maybe Text
a -> DeployedImage
s {$sel:resolvedImage:DeployedImage' :: Maybe Text
resolvedImage = Maybe Text
a} :: DeployedImage)
deployedImage_specifiedImage :: Lens.Lens' DeployedImage (Prelude.Maybe Prelude.Text)
deployedImage_specifiedImage :: (Maybe Text -> f (Maybe Text)) -> DeployedImage -> f DeployedImage
deployedImage_specifiedImage = (DeployedImage -> Maybe Text)
-> (DeployedImage -> Maybe Text -> DeployedImage)
-> Lens DeployedImage DeployedImage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeployedImage' {Maybe Text
specifiedImage :: Maybe Text
$sel:specifiedImage:DeployedImage' :: DeployedImage -> Maybe Text
specifiedImage} -> Maybe Text
specifiedImage) (\s :: DeployedImage
s@DeployedImage' {} Maybe Text
a -> DeployedImage
s {$sel:specifiedImage:DeployedImage' :: Maybe Text
specifiedImage = Maybe Text
a} :: DeployedImage)
deployedImage_resolutionTime :: Lens.Lens' DeployedImage (Prelude.Maybe Prelude.UTCTime)
deployedImage_resolutionTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeployedImage -> f DeployedImage
deployedImage_resolutionTime = (DeployedImage -> Maybe POSIX)
-> (DeployedImage -> Maybe POSIX -> DeployedImage)
-> Lens DeployedImage DeployedImage (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeployedImage' {Maybe POSIX
resolutionTime :: Maybe POSIX
$sel:resolutionTime:DeployedImage' :: DeployedImage -> Maybe POSIX
resolutionTime} -> Maybe POSIX
resolutionTime) (\s :: DeployedImage
s@DeployedImage' {} Maybe POSIX
a -> DeployedImage
s {$sel:resolutionTime:DeployedImage' :: Maybe POSIX
resolutionTime = Maybe POSIX
a} :: DeployedImage) ((Maybe POSIX -> f (Maybe POSIX))
-> DeployedImage -> f DeployedImage)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeployedImage
-> f DeployedImage
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
instance Core.FromJSON DeployedImage where
parseJSON :: Value -> Parser DeployedImage
parseJSON =
String
-> (Object -> Parser DeployedImage)
-> Value
-> Parser DeployedImage
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DeployedImage"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe POSIX -> DeployedImage
DeployedImage'
(Maybe Text -> Maybe Text -> Maybe POSIX -> DeployedImage)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> DeployedImage)
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
"ResolvedImage")
Parser (Maybe Text -> Maybe POSIX -> DeployedImage)
-> Parser (Maybe Text) -> Parser (Maybe POSIX -> DeployedImage)
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
"SpecifiedImage")
Parser (Maybe POSIX -> DeployedImage)
-> Parser (Maybe POSIX) -> Parser DeployedImage
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
"ResolutionTime")
)
instance Prelude.Hashable DeployedImage
instance Prelude.NFData DeployedImage