{-# 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.ProvisioningTemplateSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProvisioningTemplateSummary = ProvisioningTemplateSummary'
{
ProvisioningTemplateSummary -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
ProvisioningTemplateSummary -> Maybe Text
templateName :: Prelude.Maybe Prelude.Text,
ProvisioningTemplateSummary -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
ProvisioningTemplateSummary -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
ProvisioningTemplateSummary -> Maybe Text
templateArn :: Prelude.Maybe Prelude.Text,
ProvisioningTemplateSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (ProvisioningTemplateSummary -> ProvisioningTemplateSummary -> Bool
(ProvisioningTemplateSummary
-> ProvisioningTemplateSummary -> Bool)
-> (ProvisioningTemplateSummary
-> ProvisioningTemplateSummary -> Bool)
-> Eq ProvisioningTemplateSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProvisioningTemplateSummary -> ProvisioningTemplateSummary -> Bool
$c/= :: ProvisioningTemplateSummary -> ProvisioningTemplateSummary -> Bool
== :: ProvisioningTemplateSummary -> ProvisioningTemplateSummary -> Bool
$c== :: ProvisioningTemplateSummary -> ProvisioningTemplateSummary -> Bool
Prelude.Eq, ReadPrec [ProvisioningTemplateSummary]
ReadPrec ProvisioningTemplateSummary
Int -> ReadS ProvisioningTemplateSummary
ReadS [ProvisioningTemplateSummary]
(Int -> ReadS ProvisioningTemplateSummary)
-> ReadS [ProvisioningTemplateSummary]
-> ReadPrec ProvisioningTemplateSummary
-> ReadPrec [ProvisioningTemplateSummary]
-> Read ProvisioningTemplateSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProvisioningTemplateSummary]
$creadListPrec :: ReadPrec [ProvisioningTemplateSummary]
readPrec :: ReadPrec ProvisioningTemplateSummary
$creadPrec :: ReadPrec ProvisioningTemplateSummary
readList :: ReadS [ProvisioningTemplateSummary]
$creadList :: ReadS [ProvisioningTemplateSummary]
readsPrec :: Int -> ReadS ProvisioningTemplateSummary
$creadsPrec :: Int -> ReadS ProvisioningTemplateSummary
Prelude.Read, Int -> ProvisioningTemplateSummary -> ShowS
[ProvisioningTemplateSummary] -> ShowS
ProvisioningTemplateSummary -> String
(Int -> ProvisioningTemplateSummary -> ShowS)
-> (ProvisioningTemplateSummary -> String)
-> ([ProvisioningTemplateSummary] -> ShowS)
-> Show ProvisioningTemplateSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProvisioningTemplateSummary] -> ShowS
$cshowList :: [ProvisioningTemplateSummary] -> ShowS
show :: ProvisioningTemplateSummary -> String
$cshow :: ProvisioningTemplateSummary -> String
showsPrec :: Int -> ProvisioningTemplateSummary -> ShowS
$cshowsPrec :: Int -> ProvisioningTemplateSummary -> ShowS
Prelude.Show, (forall x.
ProvisioningTemplateSummary -> Rep ProvisioningTemplateSummary x)
-> (forall x.
Rep ProvisioningTemplateSummary x -> ProvisioningTemplateSummary)
-> Generic ProvisioningTemplateSummary
forall x.
Rep ProvisioningTemplateSummary x -> ProvisioningTemplateSummary
forall x.
ProvisioningTemplateSummary -> Rep ProvisioningTemplateSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProvisioningTemplateSummary x -> ProvisioningTemplateSummary
$cfrom :: forall x.
ProvisioningTemplateSummary -> Rep ProvisioningTemplateSummary x
Prelude.Generic)
newProvisioningTemplateSummary ::
ProvisioningTemplateSummary
newProvisioningTemplateSummary :: ProvisioningTemplateSummary
newProvisioningTemplateSummary =
ProvisioningTemplateSummary' :: Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ProvisioningTemplateSummary
ProvisioningTemplateSummary'
{ $sel:lastModifiedDate:ProvisioningTemplateSummary' :: Maybe POSIX
lastModifiedDate =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:templateName:ProvisioningTemplateSummary' :: Maybe Text
templateName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enabled:ProvisioningTemplateSummary' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:ProvisioningTemplateSummary' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:templateArn:ProvisioningTemplateSummary' :: Maybe Text
templateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:ProvisioningTemplateSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
provisioningTemplateSummary_lastModifiedDate :: Lens.Lens' ProvisioningTemplateSummary (Prelude.Maybe Prelude.UTCTime)
provisioningTemplateSummary_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProvisioningTemplateSummary -> f ProvisioningTemplateSummary
provisioningTemplateSummary_lastModifiedDate = (ProvisioningTemplateSummary -> Maybe POSIX)
-> (ProvisioningTemplateSummary
-> Maybe POSIX -> ProvisioningTemplateSummary)
-> Lens
ProvisioningTemplateSummary
ProvisioningTemplateSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningTemplateSummary' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:ProvisioningTemplateSummary' :: ProvisioningTemplateSummary -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: ProvisioningTemplateSummary
s@ProvisioningTemplateSummary' {} Maybe POSIX
a -> ProvisioningTemplateSummary
s {$sel:lastModifiedDate:ProvisioningTemplateSummary' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: ProvisioningTemplateSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> ProvisioningTemplateSummary -> f ProvisioningTemplateSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProvisioningTemplateSummary
-> f ProvisioningTemplateSummary
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
provisioningTemplateSummary_templateName :: Lens.Lens' ProvisioningTemplateSummary (Prelude.Maybe Prelude.Text)
provisioningTemplateSummary_templateName :: (Maybe Text -> f (Maybe Text))
-> ProvisioningTemplateSummary -> f ProvisioningTemplateSummary
provisioningTemplateSummary_templateName = (ProvisioningTemplateSummary -> Maybe Text)
-> (ProvisioningTemplateSummary
-> Maybe Text -> ProvisioningTemplateSummary)
-> Lens
ProvisioningTemplateSummary
ProvisioningTemplateSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningTemplateSummary' {Maybe Text
templateName :: Maybe Text
$sel:templateName:ProvisioningTemplateSummary' :: ProvisioningTemplateSummary -> Maybe Text
templateName} -> Maybe Text
templateName) (\s :: ProvisioningTemplateSummary
s@ProvisioningTemplateSummary' {} Maybe Text
a -> ProvisioningTemplateSummary
s {$sel:templateName:ProvisioningTemplateSummary' :: Maybe Text
templateName = Maybe Text
a} :: ProvisioningTemplateSummary)
provisioningTemplateSummary_enabled :: Lens.Lens' ProvisioningTemplateSummary (Prelude.Maybe Prelude.Bool)
provisioningTemplateSummary_enabled :: (Maybe Bool -> f (Maybe Bool))
-> ProvisioningTemplateSummary -> f ProvisioningTemplateSummary
provisioningTemplateSummary_enabled = (ProvisioningTemplateSummary -> Maybe Bool)
-> (ProvisioningTemplateSummary
-> Maybe Bool -> ProvisioningTemplateSummary)
-> Lens
ProvisioningTemplateSummary
ProvisioningTemplateSummary
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningTemplateSummary' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:ProvisioningTemplateSummary' :: ProvisioningTemplateSummary -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: ProvisioningTemplateSummary
s@ProvisioningTemplateSummary' {} Maybe Bool
a -> ProvisioningTemplateSummary
s {$sel:enabled:ProvisioningTemplateSummary' :: Maybe Bool
enabled = Maybe Bool
a} :: ProvisioningTemplateSummary)
provisioningTemplateSummary_creationDate :: Lens.Lens' ProvisioningTemplateSummary (Prelude.Maybe Prelude.UTCTime)
provisioningTemplateSummary_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProvisioningTemplateSummary -> f ProvisioningTemplateSummary
provisioningTemplateSummary_creationDate = (ProvisioningTemplateSummary -> Maybe POSIX)
-> (ProvisioningTemplateSummary
-> Maybe POSIX -> ProvisioningTemplateSummary)
-> Lens
ProvisioningTemplateSummary
ProvisioningTemplateSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningTemplateSummary' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:ProvisioningTemplateSummary' :: ProvisioningTemplateSummary -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: ProvisioningTemplateSummary
s@ProvisioningTemplateSummary' {} Maybe POSIX
a -> ProvisioningTemplateSummary
s {$sel:creationDate:ProvisioningTemplateSummary' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: ProvisioningTemplateSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> ProvisioningTemplateSummary -> f ProvisioningTemplateSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProvisioningTemplateSummary
-> f ProvisioningTemplateSummary
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
provisioningTemplateSummary_templateArn :: Lens.Lens' ProvisioningTemplateSummary (Prelude.Maybe Prelude.Text)
provisioningTemplateSummary_templateArn :: (Maybe Text -> f (Maybe Text))
-> ProvisioningTemplateSummary -> f ProvisioningTemplateSummary
provisioningTemplateSummary_templateArn = (ProvisioningTemplateSummary -> Maybe Text)
-> (ProvisioningTemplateSummary
-> Maybe Text -> ProvisioningTemplateSummary)
-> Lens
ProvisioningTemplateSummary
ProvisioningTemplateSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningTemplateSummary' {Maybe Text
templateArn :: Maybe Text
$sel:templateArn:ProvisioningTemplateSummary' :: ProvisioningTemplateSummary -> Maybe Text
templateArn} -> Maybe Text
templateArn) (\s :: ProvisioningTemplateSummary
s@ProvisioningTemplateSummary' {} Maybe Text
a -> ProvisioningTemplateSummary
s {$sel:templateArn:ProvisioningTemplateSummary' :: Maybe Text
templateArn = Maybe Text
a} :: ProvisioningTemplateSummary)
provisioningTemplateSummary_description :: Lens.Lens' ProvisioningTemplateSummary (Prelude.Maybe Prelude.Text)
provisioningTemplateSummary_description :: (Maybe Text -> f (Maybe Text))
-> ProvisioningTemplateSummary -> f ProvisioningTemplateSummary
provisioningTemplateSummary_description = (ProvisioningTemplateSummary -> Maybe Text)
-> (ProvisioningTemplateSummary
-> Maybe Text -> ProvisioningTemplateSummary)
-> Lens
ProvisioningTemplateSummary
ProvisioningTemplateSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningTemplateSummary' {Maybe Text
description :: Maybe Text
$sel:description:ProvisioningTemplateSummary' :: ProvisioningTemplateSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: ProvisioningTemplateSummary
s@ProvisioningTemplateSummary' {} Maybe Text
a -> ProvisioningTemplateSummary
s {$sel:description:ProvisioningTemplateSummary' :: Maybe Text
description = Maybe Text
a} :: ProvisioningTemplateSummary)
instance Core.FromJSON ProvisioningTemplateSummary where
parseJSON :: Value -> Parser ProvisioningTemplateSummary
parseJSON =
String
-> (Object -> Parser ProvisioningTemplateSummary)
-> Value
-> Parser ProvisioningTemplateSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ProvisioningTemplateSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ProvisioningTemplateSummary
ProvisioningTemplateSummary'
(Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ProvisioningTemplateSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ProvisioningTemplateSummary)
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
"lastModifiedDate")
Parser
(Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ProvisioningTemplateSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ProvisioningTemplateSummary)
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
"templateName")
Parser
(Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ProvisioningTemplateSummary)
-> Parser (Maybe Bool)
-> Parser
(Maybe POSIX
-> Maybe Text -> Maybe Text -> ProvisioningTemplateSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"enabled")
Parser
(Maybe POSIX
-> Maybe Text -> Maybe Text -> ProvisioningTemplateSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> Maybe Text -> ProvisioningTemplateSummary)
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
"creationDate")
Parser (Maybe Text -> Maybe Text -> ProvisioningTemplateSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ProvisioningTemplateSummary)
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
"templateArn")
Parser (Maybe Text -> ProvisioningTemplateSummary)
-> Parser (Maybe Text) -> Parser ProvisioningTemplateSummary
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 ProvisioningTemplateSummary
instance Prelude.NFData ProvisioningTemplateSummary