{-# 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.DeviceFleetSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DeviceFleetSummary = DeviceFleetSummary'
{
DeviceFleetSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
DeviceFleetSummary -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
DeviceFleetSummary -> Text
deviceFleetArn :: Prelude.Text,
DeviceFleetSummary -> Text
deviceFleetName :: Prelude.Text
}
deriving (DeviceFleetSummary -> DeviceFleetSummary -> Bool
(DeviceFleetSummary -> DeviceFleetSummary -> Bool)
-> (DeviceFleetSummary -> DeviceFleetSummary -> Bool)
-> Eq DeviceFleetSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceFleetSummary -> DeviceFleetSummary -> Bool
$c/= :: DeviceFleetSummary -> DeviceFleetSummary -> Bool
== :: DeviceFleetSummary -> DeviceFleetSummary -> Bool
$c== :: DeviceFleetSummary -> DeviceFleetSummary -> Bool
Prelude.Eq, ReadPrec [DeviceFleetSummary]
ReadPrec DeviceFleetSummary
Int -> ReadS DeviceFleetSummary
ReadS [DeviceFleetSummary]
(Int -> ReadS DeviceFleetSummary)
-> ReadS [DeviceFleetSummary]
-> ReadPrec DeviceFleetSummary
-> ReadPrec [DeviceFleetSummary]
-> Read DeviceFleetSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeviceFleetSummary]
$creadListPrec :: ReadPrec [DeviceFleetSummary]
readPrec :: ReadPrec DeviceFleetSummary
$creadPrec :: ReadPrec DeviceFleetSummary
readList :: ReadS [DeviceFleetSummary]
$creadList :: ReadS [DeviceFleetSummary]
readsPrec :: Int -> ReadS DeviceFleetSummary
$creadsPrec :: Int -> ReadS DeviceFleetSummary
Prelude.Read, Int -> DeviceFleetSummary -> ShowS
[DeviceFleetSummary] -> ShowS
DeviceFleetSummary -> String
(Int -> DeviceFleetSummary -> ShowS)
-> (DeviceFleetSummary -> String)
-> ([DeviceFleetSummary] -> ShowS)
-> Show DeviceFleetSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeviceFleetSummary] -> ShowS
$cshowList :: [DeviceFleetSummary] -> ShowS
show :: DeviceFleetSummary -> String
$cshow :: DeviceFleetSummary -> String
showsPrec :: Int -> DeviceFleetSummary -> ShowS
$cshowsPrec :: Int -> DeviceFleetSummary -> ShowS
Prelude.Show, (forall x. DeviceFleetSummary -> Rep DeviceFleetSummary x)
-> (forall x. Rep DeviceFleetSummary x -> DeviceFleetSummary)
-> Generic DeviceFleetSummary
forall x. Rep DeviceFleetSummary x -> DeviceFleetSummary
forall x. DeviceFleetSummary -> Rep DeviceFleetSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeviceFleetSummary x -> DeviceFleetSummary
$cfrom :: forall x. DeviceFleetSummary -> Rep DeviceFleetSummary x
Prelude.Generic)
newDeviceFleetSummary ::
Prelude.Text ->
Prelude.Text ->
DeviceFleetSummary
newDeviceFleetSummary :: Text -> Text -> DeviceFleetSummary
newDeviceFleetSummary
Text
pDeviceFleetArn_
Text
pDeviceFleetName_ =
DeviceFleetSummary' :: Maybe POSIX -> Maybe POSIX -> Text -> Text -> DeviceFleetSummary
DeviceFleetSummary'
{ $sel:creationTime:DeviceFleetSummary' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedTime:DeviceFleetSummary' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:deviceFleetArn:DeviceFleetSummary' :: Text
deviceFleetArn = Text
pDeviceFleetArn_,
$sel:deviceFleetName:DeviceFleetSummary' :: Text
deviceFleetName = Text
pDeviceFleetName_
}
deviceFleetSummary_creationTime :: Lens.Lens' DeviceFleetSummary (Prelude.Maybe Prelude.UTCTime)
deviceFleetSummary_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeviceFleetSummary -> f DeviceFleetSummary
deviceFleetSummary_creationTime = (DeviceFleetSummary -> Maybe POSIX)
-> (DeviceFleetSummary -> Maybe POSIX -> DeviceFleetSummary)
-> Lens
DeviceFleetSummary DeviceFleetSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceFleetSummary' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DeviceFleetSummary' :: DeviceFleetSummary -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DeviceFleetSummary
s@DeviceFleetSummary' {} Maybe POSIX
a -> DeviceFleetSummary
s {$sel:creationTime:DeviceFleetSummary' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DeviceFleetSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> DeviceFleetSummary -> f DeviceFleetSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeviceFleetSummary
-> f DeviceFleetSummary
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
deviceFleetSummary_lastModifiedTime :: Lens.Lens' DeviceFleetSummary (Prelude.Maybe Prelude.UTCTime)
deviceFleetSummary_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeviceFleetSummary -> f DeviceFleetSummary
deviceFleetSummary_lastModifiedTime = (DeviceFleetSummary -> Maybe POSIX)
-> (DeviceFleetSummary -> Maybe POSIX -> DeviceFleetSummary)
-> Lens
DeviceFleetSummary DeviceFleetSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceFleetSummary' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:DeviceFleetSummary' :: DeviceFleetSummary -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: DeviceFleetSummary
s@DeviceFleetSummary' {} Maybe POSIX
a -> DeviceFleetSummary
s {$sel:lastModifiedTime:DeviceFleetSummary' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: DeviceFleetSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> DeviceFleetSummary -> f DeviceFleetSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeviceFleetSummary
-> f DeviceFleetSummary
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
deviceFleetSummary_deviceFleetArn :: Lens.Lens' DeviceFleetSummary Prelude.Text
deviceFleetSummary_deviceFleetArn :: (Text -> f Text) -> DeviceFleetSummary -> f DeviceFleetSummary
deviceFleetSummary_deviceFleetArn = (DeviceFleetSummary -> Text)
-> (DeviceFleetSummary -> Text -> DeviceFleetSummary)
-> Lens DeviceFleetSummary DeviceFleetSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceFleetSummary' {Text
deviceFleetArn :: Text
$sel:deviceFleetArn:DeviceFleetSummary' :: DeviceFleetSummary -> Text
deviceFleetArn} -> Text
deviceFleetArn) (\s :: DeviceFleetSummary
s@DeviceFleetSummary' {} Text
a -> DeviceFleetSummary
s {$sel:deviceFleetArn:DeviceFleetSummary' :: Text
deviceFleetArn = Text
a} :: DeviceFleetSummary)
deviceFleetSummary_deviceFleetName :: Lens.Lens' DeviceFleetSummary Prelude.Text
deviceFleetSummary_deviceFleetName :: (Text -> f Text) -> DeviceFleetSummary -> f DeviceFleetSummary
deviceFleetSummary_deviceFleetName = (DeviceFleetSummary -> Text)
-> (DeviceFleetSummary -> Text -> DeviceFleetSummary)
-> Lens DeviceFleetSummary DeviceFleetSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceFleetSummary' {Text
deviceFleetName :: Text
$sel:deviceFleetName:DeviceFleetSummary' :: DeviceFleetSummary -> Text
deviceFleetName} -> Text
deviceFleetName) (\s :: DeviceFleetSummary
s@DeviceFleetSummary' {} Text
a -> DeviceFleetSummary
s {$sel:deviceFleetName:DeviceFleetSummary' :: Text
deviceFleetName = Text
a} :: DeviceFleetSummary)
instance Core.FromJSON DeviceFleetSummary where
parseJSON :: Value -> Parser DeviceFleetSummary
parseJSON =
String
-> (Object -> Parser DeviceFleetSummary)
-> Value
-> Parser DeviceFleetSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DeviceFleetSummary"
( \Object
x ->
Maybe POSIX -> Maybe POSIX -> Text -> Text -> DeviceFleetSummary
DeviceFleetSummary'
(Maybe POSIX -> Maybe POSIX -> Text -> Text -> DeviceFleetSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> Text -> Text -> DeviceFleetSummary)
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 -> Text -> Text -> DeviceFleetSummary)
-> Parser (Maybe POSIX)
-> Parser (Text -> Text -> DeviceFleetSummary)
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 (Text -> Text -> DeviceFleetSummary)
-> Parser Text -> Parser (Text -> DeviceFleetSummary)
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
"DeviceFleetArn")
Parser (Text -> DeviceFleetSummary)
-> Parser Text -> Parser DeviceFleetSummary
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
"DeviceFleetName")
)
instance Prelude.Hashable DeviceFleetSummary
instance Prelude.NFData DeviceFleetSummary