{-# 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.IoT.Types.JobTemplateSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data JobTemplateSummary = JobTemplateSummary'
{
JobTemplateSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
JobTemplateSummary -> Maybe Text
jobTemplateId :: Prelude.Maybe Prelude.Text,
JobTemplateSummary -> Maybe Text
jobTemplateArn :: Prelude.Maybe Prelude.Text,
JobTemplateSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (JobTemplateSummary -> JobTemplateSummary -> Bool
(JobTemplateSummary -> JobTemplateSummary -> Bool)
-> (JobTemplateSummary -> JobTemplateSummary -> Bool)
-> Eq JobTemplateSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobTemplateSummary -> JobTemplateSummary -> Bool
$c/= :: JobTemplateSummary -> JobTemplateSummary -> Bool
== :: JobTemplateSummary -> JobTemplateSummary -> Bool
$c== :: JobTemplateSummary -> JobTemplateSummary -> Bool
Prelude.Eq, ReadPrec [JobTemplateSummary]
ReadPrec JobTemplateSummary
Int -> ReadS JobTemplateSummary
ReadS [JobTemplateSummary]
(Int -> ReadS JobTemplateSummary)
-> ReadS [JobTemplateSummary]
-> ReadPrec JobTemplateSummary
-> ReadPrec [JobTemplateSummary]
-> Read JobTemplateSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JobTemplateSummary]
$creadListPrec :: ReadPrec [JobTemplateSummary]
readPrec :: ReadPrec JobTemplateSummary
$creadPrec :: ReadPrec JobTemplateSummary
readList :: ReadS [JobTemplateSummary]
$creadList :: ReadS [JobTemplateSummary]
readsPrec :: Int -> ReadS JobTemplateSummary
$creadsPrec :: Int -> ReadS JobTemplateSummary
Prelude.Read, Int -> JobTemplateSummary -> ShowS
[JobTemplateSummary] -> ShowS
JobTemplateSummary -> String
(Int -> JobTemplateSummary -> ShowS)
-> (JobTemplateSummary -> String)
-> ([JobTemplateSummary] -> ShowS)
-> Show JobTemplateSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobTemplateSummary] -> ShowS
$cshowList :: [JobTemplateSummary] -> ShowS
show :: JobTemplateSummary -> String
$cshow :: JobTemplateSummary -> String
showsPrec :: Int -> JobTemplateSummary -> ShowS
$cshowsPrec :: Int -> JobTemplateSummary -> ShowS
Prelude.Show, (forall x. JobTemplateSummary -> Rep JobTemplateSummary x)
-> (forall x. Rep JobTemplateSummary x -> JobTemplateSummary)
-> Generic JobTemplateSummary
forall x. Rep JobTemplateSummary x -> JobTemplateSummary
forall x. JobTemplateSummary -> Rep JobTemplateSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobTemplateSummary x -> JobTemplateSummary
$cfrom :: forall x. JobTemplateSummary -> Rep JobTemplateSummary x
Prelude.Generic)
newJobTemplateSummary ::
JobTemplateSummary
newJobTemplateSummary :: JobTemplateSummary
newJobTemplateSummary =
JobTemplateSummary' :: Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe Text -> JobTemplateSummary
JobTemplateSummary'
{ $sel:createdAt:JobTemplateSummary' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:jobTemplateId:JobTemplateSummary' :: Maybe Text
jobTemplateId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobTemplateArn:JobTemplateSummary' :: Maybe Text
jobTemplateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:JobTemplateSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
jobTemplateSummary_createdAt :: Lens.Lens' JobTemplateSummary (Prelude.Maybe Prelude.UTCTime)
jobTemplateSummary_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> JobTemplateSummary -> f JobTemplateSummary
jobTemplateSummary_createdAt = (JobTemplateSummary -> Maybe POSIX)
-> (JobTemplateSummary -> Maybe POSIX -> JobTemplateSummary)
-> Lens
JobTemplateSummary JobTemplateSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:JobTemplateSummary' :: JobTemplateSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: JobTemplateSummary
s@JobTemplateSummary' {} Maybe POSIX
a -> JobTemplateSummary
s {$sel:createdAt:JobTemplateSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: JobTemplateSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> JobTemplateSummary -> f JobTemplateSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> JobTemplateSummary
-> f JobTemplateSummary
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
jobTemplateSummary_jobTemplateId :: Lens.Lens' JobTemplateSummary (Prelude.Maybe Prelude.Text)
jobTemplateSummary_jobTemplateId :: (Maybe Text -> f (Maybe Text))
-> JobTemplateSummary -> f JobTemplateSummary
jobTemplateSummary_jobTemplateId = (JobTemplateSummary -> Maybe Text)
-> (JobTemplateSummary -> Maybe Text -> JobTemplateSummary)
-> Lens
JobTemplateSummary JobTemplateSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSummary' {Maybe Text
jobTemplateId :: Maybe Text
$sel:jobTemplateId:JobTemplateSummary' :: JobTemplateSummary -> Maybe Text
jobTemplateId} -> Maybe Text
jobTemplateId) (\s :: JobTemplateSummary
s@JobTemplateSummary' {} Maybe Text
a -> JobTemplateSummary
s {$sel:jobTemplateId:JobTemplateSummary' :: Maybe Text
jobTemplateId = Maybe Text
a} :: JobTemplateSummary)
jobTemplateSummary_jobTemplateArn :: Lens.Lens' JobTemplateSummary (Prelude.Maybe Prelude.Text)
jobTemplateSummary_jobTemplateArn :: (Maybe Text -> f (Maybe Text))
-> JobTemplateSummary -> f JobTemplateSummary
jobTemplateSummary_jobTemplateArn = (JobTemplateSummary -> Maybe Text)
-> (JobTemplateSummary -> Maybe Text -> JobTemplateSummary)
-> Lens
JobTemplateSummary JobTemplateSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSummary' {Maybe Text
jobTemplateArn :: Maybe Text
$sel:jobTemplateArn:JobTemplateSummary' :: JobTemplateSummary -> Maybe Text
jobTemplateArn} -> Maybe Text
jobTemplateArn) (\s :: JobTemplateSummary
s@JobTemplateSummary' {} Maybe Text
a -> JobTemplateSummary
s {$sel:jobTemplateArn:JobTemplateSummary' :: Maybe Text
jobTemplateArn = Maybe Text
a} :: JobTemplateSummary)
jobTemplateSummary_description :: Lens.Lens' JobTemplateSummary (Prelude.Maybe Prelude.Text)
jobTemplateSummary_description :: (Maybe Text -> f (Maybe Text))
-> JobTemplateSummary -> f JobTemplateSummary
jobTemplateSummary_description = (JobTemplateSummary -> Maybe Text)
-> (JobTemplateSummary -> Maybe Text -> JobTemplateSummary)
-> Lens
JobTemplateSummary JobTemplateSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSummary' {Maybe Text
description :: Maybe Text
$sel:description:JobTemplateSummary' :: JobTemplateSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: JobTemplateSummary
s@JobTemplateSummary' {} Maybe Text
a -> JobTemplateSummary
s {$sel:description:JobTemplateSummary' :: Maybe Text
description = Maybe Text
a} :: JobTemplateSummary)
instance Core.FromJSON JobTemplateSummary where
parseJSON :: Value -> Parser JobTemplateSummary
parseJSON =
String
-> (Object -> Parser JobTemplateSummary)
-> Value
-> Parser JobTemplateSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"JobTemplateSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe Text -> JobTemplateSummary
JobTemplateSummary'
(Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe Text -> JobTemplateSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> JobTemplateSummary)
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
"createdAt")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> JobTemplateSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> JobTemplateSummary)
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
"jobTemplateId")
Parser (Maybe Text -> Maybe Text -> JobTemplateSummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> JobTemplateSummary)
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
"jobTemplateArn")
Parser (Maybe Text -> JobTemplateSummary)
-> Parser (Maybe Text) -> Parser JobTemplateSummary
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
"description")
)
instance Prelude.Hashable JobTemplateSummary
instance Prelude.NFData JobTemplateSummary