{-# 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.Panorama.Types.NodeFromTemplateJob where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Panorama.Types.NodeFromTemplateJobStatus
import Amazonka.Panorama.Types.TemplateType
import qualified Amazonka.Prelude as Prelude
data NodeFromTemplateJob = NodeFromTemplateJob'
{
NodeFromTemplateJob -> Maybe NodeFromTemplateJobStatus
status :: Prelude.Maybe NodeFromTemplateJobStatus,
NodeFromTemplateJob -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
NodeFromTemplateJob -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
NodeFromTemplateJob -> Maybe TemplateType
templateType :: Prelude.Maybe TemplateType,
NodeFromTemplateJob -> Maybe Text
nodeName :: Prelude.Maybe Prelude.Text,
NodeFromTemplateJob -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text
}
deriving (NodeFromTemplateJob -> NodeFromTemplateJob -> Bool
(NodeFromTemplateJob -> NodeFromTemplateJob -> Bool)
-> (NodeFromTemplateJob -> NodeFromTemplateJob -> Bool)
-> Eq NodeFromTemplateJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NodeFromTemplateJob -> NodeFromTemplateJob -> Bool
$c/= :: NodeFromTemplateJob -> NodeFromTemplateJob -> Bool
== :: NodeFromTemplateJob -> NodeFromTemplateJob -> Bool
$c== :: NodeFromTemplateJob -> NodeFromTemplateJob -> Bool
Prelude.Eq, ReadPrec [NodeFromTemplateJob]
ReadPrec NodeFromTemplateJob
Int -> ReadS NodeFromTemplateJob
ReadS [NodeFromTemplateJob]
(Int -> ReadS NodeFromTemplateJob)
-> ReadS [NodeFromTemplateJob]
-> ReadPrec NodeFromTemplateJob
-> ReadPrec [NodeFromTemplateJob]
-> Read NodeFromTemplateJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NodeFromTemplateJob]
$creadListPrec :: ReadPrec [NodeFromTemplateJob]
readPrec :: ReadPrec NodeFromTemplateJob
$creadPrec :: ReadPrec NodeFromTemplateJob
readList :: ReadS [NodeFromTemplateJob]
$creadList :: ReadS [NodeFromTemplateJob]
readsPrec :: Int -> ReadS NodeFromTemplateJob
$creadsPrec :: Int -> ReadS NodeFromTemplateJob
Prelude.Read, Int -> NodeFromTemplateJob -> ShowS
[NodeFromTemplateJob] -> ShowS
NodeFromTemplateJob -> String
(Int -> NodeFromTemplateJob -> ShowS)
-> (NodeFromTemplateJob -> String)
-> ([NodeFromTemplateJob] -> ShowS)
-> Show NodeFromTemplateJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NodeFromTemplateJob] -> ShowS
$cshowList :: [NodeFromTemplateJob] -> ShowS
show :: NodeFromTemplateJob -> String
$cshow :: NodeFromTemplateJob -> String
showsPrec :: Int -> NodeFromTemplateJob -> ShowS
$cshowsPrec :: Int -> NodeFromTemplateJob -> ShowS
Prelude.Show, (forall x. NodeFromTemplateJob -> Rep NodeFromTemplateJob x)
-> (forall x. Rep NodeFromTemplateJob x -> NodeFromTemplateJob)
-> Generic NodeFromTemplateJob
forall x. Rep NodeFromTemplateJob x -> NodeFromTemplateJob
forall x. NodeFromTemplateJob -> Rep NodeFromTemplateJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NodeFromTemplateJob x -> NodeFromTemplateJob
$cfrom :: forall x. NodeFromTemplateJob -> Rep NodeFromTemplateJob x
Prelude.Generic)
newNodeFromTemplateJob ::
NodeFromTemplateJob
newNodeFromTemplateJob :: NodeFromTemplateJob
newNodeFromTemplateJob =
NodeFromTemplateJob' :: Maybe NodeFromTemplateJobStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe TemplateType
-> Maybe Text
-> Maybe Text
-> NodeFromTemplateJob
NodeFromTemplateJob'
{ $sel:status:NodeFromTemplateJob' :: Maybe NodeFromTemplateJobStatus
status = Maybe NodeFromTemplateJobStatus
forall a. Maybe a
Prelude.Nothing,
$sel:jobId:NodeFromTemplateJob' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:NodeFromTemplateJob' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:templateType:NodeFromTemplateJob' :: Maybe TemplateType
templateType = Maybe TemplateType
forall a. Maybe a
Prelude.Nothing,
$sel:nodeName:NodeFromTemplateJob' :: Maybe Text
nodeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statusMessage:NodeFromTemplateJob' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
nodeFromTemplateJob_status :: Lens.Lens' NodeFromTemplateJob (Prelude.Maybe NodeFromTemplateJobStatus)
nodeFromTemplateJob_status :: (Maybe NodeFromTemplateJobStatus
-> f (Maybe NodeFromTemplateJobStatus))
-> NodeFromTemplateJob -> f NodeFromTemplateJob
nodeFromTemplateJob_status = (NodeFromTemplateJob -> Maybe NodeFromTemplateJobStatus)
-> (NodeFromTemplateJob
-> Maybe NodeFromTemplateJobStatus -> NodeFromTemplateJob)
-> Lens
NodeFromTemplateJob
NodeFromTemplateJob
(Maybe NodeFromTemplateJobStatus)
(Maybe NodeFromTemplateJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeFromTemplateJob' {Maybe NodeFromTemplateJobStatus
status :: Maybe NodeFromTemplateJobStatus
$sel:status:NodeFromTemplateJob' :: NodeFromTemplateJob -> Maybe NodeFromTemplateJobStatus
status} -> Maybe NodeFromTemplateJobStatus
status) (\s :: NodeFromTemplateJob
s@NodeFromTemplateJob' {} Maybe NodeFromTemplateJobStatus
a -> NodeFromTemplateJob
s {$sel:status:NodeFromTemplateJob' :: Maybe NodeFromTemplateJobStatus
status = Maybe NodeFromTemplateJobStatus
a} :: NodeFromTemplateJob)
nodeFromTemplateJob_jobId :: Lens.Lens' NodeFromTemplateJob (Prelude.Maybe Prelude.Text)
nodeFromTemplateJob_jobId :: (Maybe Text -> f (Maybe Text))
-> NodeFromTemplateJob -> f NodeFromTemplateJob
nodeFromTemplateJob_jobId = (NodeFromTemplateJob -> Maybe Text)
-> (NodeFromTemplateJob -> Maybe Text -> NodeFromTemplateJob)
-> Lens
NodeFromTemplateJob NodeFromTemplateJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeFromTemplateJob' {Maybe Text
jobId :: Maybe Text
$sel:jobId:NodeFromTemplateJob' :: NodeFromTemplateJob -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: NodeFromTemplateJob
s@NodeFromTemplateJob' {} Maybe Text
a -> NodeFromTemplateJob
s {$sel:jobId:NodeFromTemplateJob' :: Maybe Text
jobId = Maybe Text
a} :: NodeFromTemplateJob)
nodeFromTemplateJob_createdTime :: Lens.Lens' NodeFromTemplateJob (Prelude.Maybe Prelude.UTCTime)
nodeFromTemplateJob_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> NodeFromTemplateJob -> f NodeFromTemplateJob
nodeFromTemplateJob_createdTime = (NodeFromTemplateJob -> Maybe POSIX)
-> (NodeFromTemplateJob -> Maybe POSIX -> NodeFromTemplateJob)
-> Lens
NodeFromTemplateJob NodeFromTemplateJob (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeFromTemplateJob' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:NodeFromTemplateJob' :: NodeFromTemplateJob -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: NodeFromTemplateJob
s@NodeFromTemplateJob' {} Maybe POSIX
a -> NodeFromTemplateJob
s {$sel:createdTime:NodeFromTemplateJob' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: NodeFromTemplateJob) ((Maybe POSIX -> f (Maybe POSIX))
-> NodeFromTemplateJob -> f NodeFromTemplateJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> NodeFromTemplateJob
-> f NodeFromTemplateJob
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
nodeFromTemplateJob_templateType :: Lens.Lens' NodeFromTemplateJob (Prelude.Maybe TemplateType)
nodeFromTemplateJob_templateType :: (Maybe TemplateType -> f (Maybe TemplateType))
-> NodeFromTemplateJob -> f NodeFromTemplateJob
nodeFromTemplateJob_templateType = (NodeFromTemplateJob -> Maybe TemplateType)
-> (NodeFromTemplateJob
-> Maybe TemplateType -> NodeFromTemplateJob)
-> Lens
NodeFromTemplateJob
NodeFromTemplateJob
(Maybe TemplateType)
(Maybe TemplateType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeFromTemplateJob' {Maybe TemplateType
templateType :: Maybe TemplateType
$sel:templateType:NodeFromTemplateJob' :: NodeFromTemplateJob -> Maybe TemplateType
templateType} -> Maybe TemplateType
templateType) (\s :: NodeFromTemplateJob
s@NodeFromTemplateJob' {} Maybe TemplateType
a -> NodeFromTemplateJob
s {$sel:templateType:NodeFromTemplateJob' :: Maybe TemplateType
templateType = Maybe TemplateType
a} :: NodeFromTemplateJob)
nodeFromTemplateJob_nodeName :: Lens.Lens' NodeFromTemplateJob (Prelude.Maybe Prelude.Text)
nodeFromTemplateJob_nodeName :: (Maybe Text -> f (Maybe Text))
-> NodeFromTemplateJob -> f NodeFromTemplateJob
nodeFromTemplateJob_nodeName = (NodeFromTemplateJob -> Maybe Text)
-> (NodeFromTemplateJob -> Maybe Text -> NodeFromTemplateJob)
-> Lens
NodeFromTemplateJob NodeFromTemplateJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeFromTemplateJob' {Maybe Text
nodeName :: Maybe Text
$sel:nodeName:NodeFromTemplateJob' :: NodeFromTemplateJob -> Maybe Text
nodeName} -> Maybe Text
nodeName) (\s :: NodeFromTemplateJob
s@NodeFromTemplateJob' {} Maybe Text
a -> NodeFromTemplateJob
s {$sel:nodeName:NodeFromTemplateJob' :: Maybe Text
nodeName = Maybe Text
a} :: NodeFromTemplateJob)
nodeFromTemplateJob_statusMessage :: Lens.Lens' NodeFromTemplateJob (Prelude.Maybe Prelude.Text)
nodeFromTemplateJob_statusMessage :: (Maybe Text -> f (Maybe Text))
-> NodeFromTemplateJob -> f NodeFromTemplateJob
nodeFromTemplateJob_statusMessage = (NodeFromTemplateJob -> Maybe Text)
-> (NodeFromTemplateJob -> Maybe Text -> NodeFromTemplateJob)
-> Lens
NodeFromTemplateJob NodeFromTemplateJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeFromTemplateJob' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:NodeFromTemplateJob' :: NodeFromTemplateJob -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: NodeFromTemplateJob
s@NodeFromTemplateJob' {} Maybe Text
a -> NodeFromTemplateJob
s {$sel:statusMessage:NodeFromTemplateJob' :: Maybe Text
statusMessage = Maybe Text
a} :: NodeFromTemplateJob)
instance Core.FromJSON NodeFromTemplateJob where
parseJSON :: Value -> Parser NodeFromTemplateJob
parseJSON =
String
-> (Object -> Parser NodeFromTemplateJob)
-> Value
-> Parser NodeFromTemplateJob
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NodeFromTemplateJob"
( \Object
x ->
Maybe NodeFromTemplateJobStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe TemplateType
-> Maybe Text
-> Maybe Text
-> NodeFromTemplateJob
NodeFromTemplateJob'
(Maybe NodeFromTemplateJobStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe TemplateType
-> Maybe Text
-> Maybe Text
-> NodeFromTemplateJob)
-> Parser (Maybe NodeFromTemplateJobStatus)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe TemplateType
-> Maybe Text
-> Maybe Text
-> NodeFromTemplateJob)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe NodeFromTemplateJobStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe TemplateType
-> Maybe Text
-> Maybe Text
-> NodeFromTemplateJob)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe TemplateType
-> Maybe Text
-> Maybe Text
-> NodeFromTemplateJob)
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
"JobId")
Parser
(Maybe POSIX
-> Maybe TemplateType
-> Maybe Text
-> Maybe Text
-> NodeFromTemplateJob)
-> Parser (Maybe POSIX)
-> Parser
(Maybe TemplateType
-> Maybe Text -> Maybe Text -> NodeFromTemplateJob)
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
"CreatedTime")
Parser
(Maybe TemplateType
-> Maybe Text -> Maybe Text -> NodeFromTemplateJob)
-> Parser (Maybe TemplateType)
-> Parser (Maybe Text -> Maybe Text -> NodeFromTemplateJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TemplateType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TemplateType")
Parser (Maybe Text -> Maybe Text -> NodeFromTemplateJob)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> NodeFromTemplateJob)
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
"NodeName")
Parser (Maybe Text -> NodeFromTemplateJob)
-> Parser (Maybe Text) -> Parser NodeFromTemplateJob
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
"StatusMessage")
)
instance Prelude.Hashable NodeFromTemplateJob
instance Prelude.NFData NodeFromTemplateJob