{-# 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.IoTThingsGraph.Types.SystemTemplateSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SystemTemplateSummary = SystemTemplateSummary'
{
SystemTemplateSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
SystemTemplateSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
SystemTemplateSummary -> Maybe Integer
revisionNumber :: Prelude.Maybe Prelude.Integer,
SystemTemplateSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text
}
deriving (SystemTemplateSummary -> SystemTemplateSummary -> Bool
(SystemTemplateSummary -> SystemTemplateSummary -> Bool)
-> (SystemTemplateSummary -> SystemTemplateSummary -> Bool)
-> Eq SystemTemplateSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SystemTemplateSummary -> SystemTemplateSummary -> Bool
$c/= :: SystemTemplateSummary -> SystemTemplateSummary -> Bool
== :: SystemTemplateSummary -> SystemTemplateSummary -> Bool
$c== :: SystemTemplateSummary -> SystemTemplateSummary -> Bool
Prelude.Eq, ReadPrec [SystemTemplateSummary]
ReadPrec SystemTemplateSummary
Int -> ReadS SystemTemplateSummary
ReadS [SystemTemplateSummary]
(Int -> ReadS SystemTemplateSummary)
-> ReadS [SystemTemplateSummary]
-> ReadPrec SystemTemplateSummary
-> ReadPrec [SystemTemplateSummary]
-> Read SystemTemplateSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SystemTemplateSummary]
$creadListPrec :: ReadPrec [SystemTemplateSummary]
readPrec :: ReadPrec SystemTemplateSummary
$creadPrec :: ReadPrec SystemTemplateSummary
readList :: ReadS [SystemTemplateSummary]
$creadList :: ReadS [SystemTemplateSummary]
readsPrec :: Int -> ReadS SystemTemplateSummary
$creadsPrec :: Int -> ReadS SystemTemplateSummary
Prelude.Read, Int -> SystemTemplateSummary -> ShowS
[SystemTemplateSummary] -> ShowS
SystemTemplateSummary -> String
(Int -> SystemTemplateSummary -> ShowS)
-> (SystemTemplateSummary -> String)
-> ([SystemTemplateSummary] -> ShowS)
-> Show SystemTemplateSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SystemTemplateSummary] -> ShowS
$cshowList :: [SystemTemplateSummary] -> ShowS
show :: SystemTemplateSummary -> String
$cshow :: SystemTemplateSummary -> String
showsPrec :: Int -> SystemTemplateSummary -> ShowS
$cshowsPrec :: Int -> SystemTemplateSummary -> ShowS
Prelude.Show, (forall x. SystemTemplateSummary -> Rep SystemTemplateSummary x)
-> (forall x. Rep SystemTemplateSummary x -> SystemTemplateSummary)
-> Generic SystemTemplateSummary
forall x. Rep SystemTemplateSummary x -> SystemTemplateSummary
forall x. SystemTemplateSummary -> Rep SystemTemplateSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SystemTemplateSummary x -> SystemTemplateSummary
$cfrom :: forall x. SystemTemplateSummary -> Rep SystemTemplateSummary x
Prelude.Generic)
newSystemTemplateSummary ::
SystemTemplateSummary
newSystemTemplateSummary :: SystemTemplateSummary
newSystemTemplateSummary =
SystemTemplateSummary' :: Maybe Text
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> SystemTemplateSummary
SystemTemplateSummary'
{ $sel:arn:SystemTemplateSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:SystemTemplateSummary' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:revisionNumber:SystemTemplateSummary' :: Maybe Integer
revisionNumber = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:id:SystemTemplateSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
systemTemplateSummary_arn :: Lens.Lens' SystemTemplateSummary (Prelude.Maybe Prelude.Text)
systemTemplateSummary_arn :: (Maybe Text -> f (Maybe Text))
-> SystemTemplateSummary -> f SystemTemplateSummary
systemTemplateSummary_arn = (SystemTemplateSummary -> Maybe Text)
-> (SystemTemplateSummary -> Maybe Text -> SystemTemplateSummary)
-> Lens
SystemTemplateSummary
SystemTemplateSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SystemTemplateSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:SystemTemplateSummary' :: SystemTemplateSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: SystemTemplateSummary
s@SystemTemplateSummary' {} Maybe Text
a -> SystemTemplateSummary
s {$sel:arn:SystemTemplateSummary' :: Maybe Text
arn = Maybe Text
a} :: SystemTemplateSummary)
systemTemplateSummary_createdAt :: Lens.Lens' SystemTemplateSummary (Prelude.Maybe Prelude.UTCTime)
systemTemplateSummary_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SystemTemplateSummary -> f SystemTemplateSummary
systemTemplateSummary_createdAt = (SystemTemplateSummary -> Maybe POSIX)
-> (SystemTemplateSummary -> Maybe POSIX -> SystemTemplateSummary)
-> Lens
SystemTemplateSummary
SystemTemplateSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SystemTemplateSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:SystemTemplateSummary' :: SystemTemplateSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: SystemTemplateSummary
s@SystemTemplateSummary' {} Maybe POSIX
a -> SystemTemplateSummary
s {$sel:createdAt:SystemTemplateSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: SystemTemplateSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> SystemTemplateSummary -> f SystemTemplateSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SystemTemplateSummary
-> f SystemTemplateSummary
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
systemTemplateSummary_revisionNumber :: Lens.Lens' SystemTemplateSummary (Prelude.Maybe Prelude.Integer)
systemTemplateSummary_revisionNumber :: (Maybe Integer -> f (Maybe Integer))
-> SystemTemplateSummary -> f SystemTemplateSummary
systemTemplateSummary_revisionNumber = (SystemTemplateSummary -> Maybe Integer)
-> (SystemTemplateSummary
-> Maybe Integer -> SystemTemplateSummary)
-> Lens
SystemTemplateSummary
SystemTemplateSummary
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SystemTemplateSummary' {Maybe Integer
revisionNumber :: Maybe Integer
$sel:revisionNumber:SystemTemplateSummary' :: SystemTemplateSummary -> Maybe Integer
revisionNumber} -> Maybe Integer
revisionNumber) (\s :: SystemTemplateSummary
s@SystemTemplateSummary' {} Maybe Integer
a -> SystemTemplateSummary
s {$sel:revisionNumber:SystemTemplateSummary' :: Maybe Integer
revisionNumber = Maybe Integer
a} :: SystemTemplateSummary)
systemTemplateSummary_id :: Lens.Lens' SystemTemplateSummary (Prelude.Maybe Prelude.Text)
systemTemplateSummary_id :: (Maybe Text -> f (Maybe Text))
-> SystemTemplateSummary -> f SystemTemplateSummary
systemTemplateSummary_id = (SystemTemplateSummary -> Maybe Text)
-> (SystemTemplateSummary -> Maybe Text -> SystemTemplateSummary)
-> Lens
SystemTemplateSummary
SystemTemplateSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SystemTemplateSummary' {Maybe Text
id :: Maybe Text
$sel:id:SystemTemplateSummary' :: SystemTemplateSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: SystemTemplateSummary
s@SystemTemplateSummary' {} Maybe Text
a -> SystemTemplateSummary
s {$sel:id:SystemTemplateSummary' :: Maybe Text
id = Maybe Text
a} :: SystemTemplateSummary)
instance Core.FromJSON SystemTemplateSummary where
parseJSON :: Value -> Parser SystemTemplateSummary
parseJSON =
String
-> (Object -> Parser SystemTemplateSummary)
-> Value
-> Parser SystemTemplateSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SystemTemplateSummary"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> SystemTemplateSummary
SystemTemplateSummary'
(Maybe Text
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> SystemTemplateSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Integer -> Maybe Text -> SystemTemplateSummary)
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
"arn")
Parser
(Maybe POSIX
-> Maybe Integer -> Maybe Text -> SystemTemplateSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe Integer -> Maybe Text -> SystemTemplateSummary)
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
"createdAt")
Parser (Maybe Integer -> Maybe Text -> SystemTemplateSummary)
-> Parser (Maybe Integer)
-> Parser (Maybe Text -> SystemTemplateSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"revisionNumber")
Parser (Maybe Text -> SystemTemplateSummary)
-> Parser (Maybe Text) -> Parser SystemTemplateSummary
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
"id")
)
instance Prelude.Hashable SystemTemplateSummary
instance Prelude.NFData SystemTemplateSummary