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