{-# 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.CloudFormation.Types.StackResourceDriftInformation where
import Amazonka.CloudFormation.Types.StackResourceDriftStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data StackResourceDriftInformation = StackResourceDriftInformation'
{
StackResourceDriftInformation -> Maybe ISO8601
lastCheckTimestamp :: Prelude.Maybe Core.ISO8601,
StackResourceDriftInformation -> StackResourceDriftStatus
stackResourceDriftStatus :: StackResourceDriftStatus
}
deriving (StackResourceDriftInformation
-> StackResourceDriftInformation -> Bool
(StackResourceDriftInformation
-> StackResourceDriftInformation -> Bool)
-> (StackResourceDriftInformation
-> StackResourceDriftInformation -> Bool)
-> Eq StackResourceDriftInformation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StackResourceDriftInformation
-> StackResourceDriftInformation -> Bool
$c/= :: StackResourceDriftInformation
-> StackResourceDriftInformation -> Bool
== :: StackResourceDriftInformation
-> StackResourceDriftInformation -> Bool
$c== :: StackResourceDriftInformation
-> StackResourceDriftInformation -> Bool
Prelude.Eq, ReadPrec [StackResourceDriftInformation]
ReadPrec StackResourceDriftInformation
Int -> ReadS StackResourceDriftInformation
ReadS [StackResourceDriftInformation]
(Int -> ReadS StackResourceDriftInformation)
-> ReadS [StackResourceDriftInformation]
-> ReadPrec StackResourceDriftInformation
-> ReadPrec [StackResourceDriftInformation]
-> Read StackResourceDriftInformation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StackResourceDriftInformation]
$creadListPrec :: ReadPrec [StackResourceDriftInformation]
readPrec :: ReadPrec StackResourceDriftInformation
$creadPrec :: ReadPrec StackResourceDriftInformation
readList :: ReadS [StackResourceDriftInformation]
$creadList :: ReadS [StackResourceDriftInformation]
readsPrec :: Int -> ReadS StackResourceDriftInformation
$creadsPrec :: Int -> ReadS StackResourceDriftInformation
Prelude.Read, Int -> StackResourceDriftInformation -> ShowS
[StackResourceDriftInformation] -> ShowS
StackResourceDriftInformation -> String
(Int -> StackResourceDriftInformation -> ShowS)
-> (StackResourceDriftInformation -> String)
-> ([StackResourceDriftInformation] -> ShowS)
-> Show StackResourceDriftInformation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StackResourceDriftInformation] -> ShowS
$cshowList :: [StackResourceDriftInformation] -> ShowS
show :: StackResourceDriftInformation -> String
$cshow :: StackResourceDriftInformation -> String
showsPrec :: Int -> StackResourceDriftInformation -> ShowS
$cshowsPrec :: Int -> StackResourceDriftInformation -> ShowS
Prelude.Show, (forall x.
StackResourceDriftInformation
-> Rep StackResourceDriftInformation x)
-> (forall x.
Rep StackResourceDriftInformation x
-> StackResourceDriftInformation)
-> Generic StackResourceDriftInformation
forall x.
Rep StackResourceDriftInformation x
-> StackResourceDriftInformation
forall x.
StackResourceDriftInformation
-> Rep StackResourceDriftInformation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StackResourceDriftInformation x
-> StackResourceDriftInformation
$cfrom :: forall x.
StackResourceDriftInformation
-> Rep StackResourceDriftInformation x
Prelude.Generic)
newStackResourceDriftInformation ::
StackResourceDriftStatus ->
StackResourceDriftInformation
newStackResourceDriftInformation :: StackResourceDriftStatus -> StackResourceDriftInformation
newStackResourceDriftInformation
StackResourceDriftStatus
pStackResourceDriftStatus_ =
StackResourceDriftInformation' :: Maybe ISO8601
-> StackResourceDriftStatus -> StackResourceDriftInformation
StackResourceDriftInformation'
{ $sel:lastCheckTimestamp:StackResourceDriftInformation' :: Maybe ISO8601
lastCheckTimestamp =
Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:stackResourceDriftStatus:StackResourceDriftInformation' :: StackResourceDriftStatus
stackResourceDriftStatus =
StackResourceDriftStatus
pStackResourceDriftStatus_
}
stackResourceDriftInformation_lastCheckTimestamp :: Lens.Lens' StackResourceDriftInformation (Prelude.Maybe Prelude.UTCTime)
stackResourceDriftInformation_lastCheckTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StackResourceDriftInformation -> f StackResourceDriftInformation
stackResourceDriftInformation_lastCheckTimestamp = (StackResourceDriftInformation -> Maybe ISO8601)
-> (StackResourceDriftInformation
-> Maybe ISO8601 -> StackResourceDriftInformation)
-> Lens
StackResourceDriftInformation
StackResourceDriftInformation
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResourceDriftInformation' {Maybe ISO8601
lastCheckTimestamp :: Maybe ISO8601
$sel:lastCheckTimestamp:StackResourceDriftInformation' :: StackResourceDriftInformation -> Maybe ISO8601
lastCheckTimestamp} -> Maybe ISO8601
lastCheckTimestamp) (\s :: StackResourceDriftInformation
s@StackResourceDriftInformation' {} Maybe ISO8601
a -> StackResourceDriftInformation
s {$sel:lastCheckTimestamp:StackResourceDriftInformation' :: Maybe ISO8601
lastCheckTimestamp = Maybe ISO8601
a} :: StackResourceDriftInformation) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> StackResourceDriftInformation
-> f StackResourceDriftInformation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StackResourceDriftInformation
-> f StackResourceDriftInformation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
(Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
stackResourceDriftInformation_stackResourceDriftStatus :: Lens.Lens' StackResourceDriftInformation StackResourceDriftStatus
stackResourceDriftInformation_stackResourceDriftStatus :: (StackResourceDriftStatus -> f StackResourceDriftStatus)
-> StackResourceDriftInformation -> f StackResourceDriftInformation
stackResourceDriftInformation_stackResourceDriftStatus = (StackResourceDriftInformation -> StackResourceDriftStatus)
-> (StackResourceDriftInformation
-> StackResourceDriftStatus -> StackResourceDriftInformation)
-> Lens
StackResourceDriftInformation
StackResourceDriftInformation
StackResourceDriftStatus
StackResourceDriftStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResourceDriftInformation' {StackResourceDriftStatus
stackResourceDriftStatus :: StackResourceDriftStatus
$sel:stackResourceDriftStatus:StackResourceDriftInformation' :: StackResourceDriftInformation -> StackResourceDriftStatus
stackResourceDriftStatus} -> StackResourceDriftStatus
stackResourceDriftStatus) (\s :: StackResourceDriftInformation
s@StackResourceDriftInformation' {} StackResourceDriftStatus
a -> StackResourceDriftInformation
s {$sel:stackResourceDriftStatus:StackResourceDriftInformation' :: StackResourceDriftStatus
stackResourceDriftStatus = StackResourceDriftStatus
a} :: StackResourceDriftInformation)
instance Core.FromXML StackResourceDriftInformation where
parseXML :: [Node] -> Either String StackResourceDriftInformation
parseXML [Node]
x =
Maybe ISO8601
-> StackResourceDriftStatus -> StackResourceDriftInformation
StackResourceDriftInformation'
(Maybe ISO8601
-> StackResourceDriftStatus -> StackResourceDriftInformation)
-> Either String (Maybe ISO8601)
-> Either
String (StackResourceDriftStatus -> StackResourceDriftInformation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LastCheckTimestamp")
Either
String (StackResourceDriftStatus -> StackResourceDriftInformation)
-> Either String StackResourceDriftStatus
-> Either String StackResourceDriftInformation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String StackResourceDriftStatus
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"StackResourceDriftStatus")
instance
Prelude.Hashable
StackResourceDriftInformation
instance Prelude.NFData StackResourceDriftInformation