{-# 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.EndpointSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.EndpointStatus
data EndpointSummary = EndpointSummary'
{
EndpointSummary -> Text
endpointName :: Prelude.Text,
EndpointSummary -> Text
endpointArn :: Prelude.Text,
EndpointSummary -> POSIX
creationTime :: Core.POSIX,
EndpointSummary -> POSIX
lastModifiedTime :: Core.POSIX,
EndpointSummary -> EndpointStatus
endpointStatus :: EndpointStatus
}
deriving (EndpointSummary -> EndpointSummary -> Bool
(EndpointSummary -> EndpointSummary -> Bool)
-> (EndpointSummary -> EndpointSummary -> Bool)
-> Eq EndpointSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EndpointSummary -> EndpointSummary -> Bool
$c/= :: EndpointSummary -> EndpointSummary -> Bool
== :: EndpointSummary -> EndpointSummary -> Bool
$c== :: EndpointSummary -> EndpointSummary -> Bool
Prelude.Eq, ReadPrec [EndpointSummary]
ReadPrec EndpointSummary
Int -> ReadS EndpointSummary
ReadS [EndpointSummary]
(Int -> ReadS EndpointSummary)
-> ReadS [EndpointSummary]
-> ReadPrec EndpointSummary
-> ReadPrec [EndpointSummary]
-> Read EndpointSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EndpointSummary]
$creadListPrec :: ReadPrec [EndpointSummary]
readPrec :: ReadPrec EndpointSummary
$creadPrec :: ReadPrec EndpointSummary
readList :: ReadS [EndpointSummary]
$creadList :: ReadS [EndpointSummary]
readsPrec :: Int -> ReadS EndpointSummary
$creadsPrec :: Int -> ReadS EndpointSummary
Prelude.Read, Int -> EndpointSummary -> ShowS
[EndpointSummary] -> ShowS
EndpointSummary -> String
(Int -> EndpointSummary -> ShowS)
-> (EndpointSummary -> String)
-> ([EndpointSummary] -> ShowS)
-> Show EndpointSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EndpointSummary] -> ShowS
$cshowList :: [EndpointSummary] -> ShowS
show :: EndpointSummary -> String
$cshow :: EndpointSummary -> String
showsPrec :: Int -> EndpointSummary -> ShowS
$cshowsPrec :: Int -> EndpointSummary -> ShowS
Prelude.Show, (forall x. EndpointSummary -> Rep EndpointSummary x)
-> (forall x. Rep EndpointSummary x -> EndpointSummary)
-> Generic EndpointSummary
forall x. Rep EndpointSummary x -> EndpointSummary
forall x. EndpointSummary -> Rep EndpointSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EndpointSummary x -> EndpointSummary
$cfrom :: forall x. EndpointSummary -> Rep EndpointSummary x
Prelude.Generic)
newEndpointSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
EndpointStatus ->
EndpointSummary
newEndpointSummary :: Text
-> Text -> UTCTime -> UTCTime -> EndpointStatus -> EndpointSummary
newEndpointSummary
Text
pEndpointName_
Text
pEndpointArn_
UTCTime
pCreationTime_
UTCTime
pLastModifiedTime_
EndpointStatus
pEndpointStatus_ =
EndpointSummary' :: Text -> Text -> POSIX -> POSIX -> EndpointStatus -> EndpointSummary
EndpointSummary'
{ $sel:endpointName:EndpointSummary' :: Text
endpointName = Text
pEndpointName_,
$sel:endpointArn:EndpointSummary' :: Text
endpointArn = Text
pEndpointArn_,
$sel:creationTime:EndpointSummary' :: 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:lastModifiedTime:EndpointSummary' :: POSIX
lastModifiedTime =
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
pLastModifiedTime_,
$sel:endpointStatus:EndpointSummary' :: EndpointStatus
endpointStatus = EndpointStatus
pEndpointStatus_
}
endpointSummary_endpointName :: Lens.Lens' EndpointSummary Prelude.Text
endpointSummary_endpointName :: (Text -> f Text) -> EndpointSummary -> f EndpointSummary
endpointSummary_endpointName = (EndpointSummary -> Text)
-> (EndpointSummary -> Text -> EndpointSummary)
-> Lens EndpointSummary EndpointSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSummary' {Text
endpointName :: Text
$sel:endpointName:EndpointSummary' :: EndpointSummary -> Text
endpointName} -> Text
endpointName) (\s :: EndpointSummary
s@EndpointSummary' {} Text
a -> EndpointSummary
s {$sel:endpointName:EndpointSummary' :: Text
endpointName = Text
a} :: EndpointSummary)
endpointSummary_endpointArn :: Lens.Lens' EndpointSummary Prelude.Text
endpointSummary_endpointArn :: (Text -> f Text) -> EndpointSummary -> f EndpointSummary
endpointSummary_endpointArn = (EndpointSummary -> Text)
-> (EndpointSummary -> Text -> EndpointSummary)
-> Lens EndpointSummary EndpointSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSummary' {Text
endpointArn :: Text
$sel:endpointArn:EndpointSummary' :: EndpointSummary -> Text
endpointArn} -> Text
endpointArn) (\s :: EndpointSummary
s@EndpointSummary' {} Text
a -> EndpointSummary
s {$sel:endpointArn:EndpointSummary' :: Text
endpointArn = Text
a} :: EndpointSummary)
endpointSummary_creationTime :: Lens.Lens' EndpointSummary Prelude.UTCTime
endpointSummary_creationTime :: (UTCTime -> f UTCTime) -> EndpointSummary -> f EndpointSummary
endpointSummary_creationTime = (EndpointSummary -> POSIX)
-> (EndpointSummary -> POSIX -> EndpointSummary)
-> Lens EndpointSummary EndpointSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSummary' {POSIX
creationTime :: POSIX
$sel:creationTime:EndpointSummary' :: EndpointSummary -> POSIX
creationTime} -> POSIX
creationTime) (\s :: EndpointSummary
s@EndpointSummary' {} POSIX
a -> EndpointSummary
s {$sel:creationTime:EndpointSummary' :: POSIX
creationTime = POSIX
a} :: EndpointSummary) ((POSIX -> f POSIX) -> EndpointSummary -> f EndpointSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EndpointSummary
-> f EndpointSummary
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
endpointSummary_lastModifiedTime :: Lens.Lens' EndpointSummary Prelude.UTCTime
endpointSummary_lastModifiedTime :: (UTCTime -> f UTCTime) -> EndpointSummary -> f EndpointSummary
endpointSummary_lastModifiedTime = (EndpointSummary -> POSIX)
-> (EndpointSummary -> POSIX -> EndpointSummary)
-> Lens EndpointSummary EndpointSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSummary' {POSIX
lastModifiedTime :: POSIX
$sel:lastModifiedTime:EndpointSummary' :: EndpointSummary -> POSIX
lastModifiedTime} -> POSIX
lastModifiedTime) (\s :: EndpointSummary
s@EndpointSummary' {} POSIX
a -> EndpointSummary
s {$sel:lastModifiedTime:EndpointSummary' :: POSIX
lastModifiedTime = POSIX
a} :: EndpointSummary) ((POSIX -> f POSIX) -> EndpointSummary -> f EndpointSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EndpointSummary
-> f EndpointSummary
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
endpointSummary_endpointStatus :: Lens.Lens' EndpointSummary EndpointStatus
endpointSummary_endpointStatus :: (EndpointStatus -> f EndpointStatus)
-> EndpointSummary -> f EndpointSummary
endpointSummary_endpointStatus = (EndpointSummary -> EndpointStatus)
-> (EndpointSummary -> EndpointStatus -> EndpointSummary)
-> Lens
EndpointSummary EndpointSummary EndpointStatus EndpointStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSummary' {EndpointStatus
endpointStatus :: EndpointStatus
$sel:endpointStatus:EndpointSummary' :: EndpointSummary -> EndpointStatus
endpointStatus} -> EndpointStatus
endpointStatus) (\s :: EndpointSummary
s@EndpointSummary' {} EndpointStatus
a -> EndpointSummary
s {$sel:endpointStatus:EndpointSummary' :: EndpointStatus
endpointStatus = EndpointStatus
a} :: EndpointSummary)
instance Core.FromJSON EndpointSummary where
parseJSON :: Value -> Parser EndpointSummary
parseJSON =
String
-> (Object -> Parser EndpointSummary)
-> Value
-> Parser EndpointSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EndpointSummary"
( \Object
x ->
Text -> Text -> POSIX -> POSIX -> EndpointStatus -> EndpointSummary
EndpointSummary'
(Text
-> Text -> POSIX -> POSIX -> EndpointStatus -> EndpointSummary)
-> Parser Text
-> Parser
(Text -> POSIX -> POSIX -> EndpointStatus -> EndpointSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"EndpointName")
Parser
(Text -> POSIX -> POSIX -> EndpointStatus -> EndpointSummary)
-> Parser Text
-> Parser (POSIX -> POSIX -> EndpointStatus -> EndpointSummary)
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
"EndpointArn")
Parser (POSIX -> POSIX -> EndpointStatus -> EndpointSummary)
-> Parser POSIX
-> Parser (POSIX -> EndpointStatus -> EndpointSummary)
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 (POSIX -> EndpointStatus -> EndpointSummary)
-> Parser POSIX -> Parser (EndpointStatus -> EndpointSummary)
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
"LastModifiedTime")
Parser (EndpointStatus -> EndpointSummary)
-> Parser EndpointStatus -> Parser EndpointSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser EndpointStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"EndpointStatus")
)
instance Prelude.Hashable EndpointSummary
instance Prelude.NFData EndpointSummary