{-# 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.StackResourceSummary where
import Amazonka.CloudFormation.Types.ModuleInfo
import Amazonka.CloudFormation.Types.ResourceStatus
import Amazonka.CloudFormation.Types.StackResourceDriftInformationSummary
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data StackResourceSummary = StackResourceSummary'
{
StackResourceSummary -> Maybe Text
physicalResourceId :: Prelude.Maybe Prelude.Text,
StackResourceSummary -> Maybe Text
resourceStatusReason :: Prelude.Maybe Prelude.Text,
StackResourceSummary -> Maybe StackResourceDriftInformationSummary
driftInformation :: Prelude.Maybe StackResourceDriftInformationSummary,
StackResourceSummary -> Maybe ModuleInfo
moduleInfo :: Prelude.Maybe ModuleInfo,
StackResourceSummary -> Text
logicalResourceId :: Prelude.Text,
StackResourceSummary -> Text
resourceType :: Prelude.Text,
StackResourceSummary -> ISO8601
lastUpdatedTimestamp :: Core.ISO8601,
StackResourceSummary -> ResourceStatus
resourceStatus :: ResourceStatus
}
deriving (StackResourceSummary -> StackResourceSummary -> Bool
(StackResourceSummary -> StackResourceSummary -> Bool)
-> (StackResourceSummary -> StackResourceSummary -> Bool)
-> Eq StackResourceSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StackResourceSummary -> StackResourceSummary -> Bool
$c/= :: StackResourceSummary -> StackResourceSummary -> Bool
== :: StackResourceSummary -> StackResourceSummary -> Bool
$c== :: StackResourceSummary -> StackResourceSummary -> Bool
Prelude.Eq, ReadPrec [StackResourceSummary]
ReadPrec StackResourceSummary
Int -> ReadS StackResourceSummary
ReadS [StackResourceSummary]
(Int -> ReadS StackResourceSummary)
-> ReadS [StackResourceSummary]
-> ReadPrec StackResourceSummary
-> ReadPrec [StackResourceSummary]
-> Read StackResourceSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StackResourceSummary]
$creadListPrec :: ReadPrec [StackResourceSummary]
readPrec :: ReadPrec StackResourceSummary
$creadPrec :: ReadPrec StackResourceSummary
readList :: ReadS [StackResourceSummary]
$creadList :: ReadS [StackResourceSummary]
readsPrec :: Int -> ReadS StackResourceSummary
$creadsPrec :: Int -> ReadS StackResourceSummary
Prelude.Read, Int -> StackResourceSummary -> ShowS
[StackResourceSummary] -> ShowS
StackResourceSummary -> String
(Int -> StackResourceSummary -> ShowS)
-> (StackResourceSummary -> String)
-> ([StackResourceSummary] -> ShowS)
-> Show StackResourceSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StackResourceSummary] -> ShowS
$cshowList :: [StackResourceSummary] -> ShowS
show :: StackResourceSummary -> String
$cshow :: StackResourceSummary -> String
showsPrec :: Int -> StackResourceSummary -> ShowS
$cshowsPrec :: Int -> StackResourceSummary -> ShowS
Prelude.Show, (forall x. StackResourceSummary -> Rep StackResourceSummary x)
-> (forall x. Rep StackResourceSummary x -> StackResourceSummary)
-> Generic StackResourceSummary
forall x. Rep StackResourceSummary x -> StackResourceSummary
forall x. StackResourceSummary -> Rep StackResourceSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StackResourceSummary x -> StackResourceSummary
$cfrom :: forall x. StackResourceSummary -> Rep StackResourceSummary x
Prelude.Generic)
newStackResourceSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
ResourceStatus ->
StackResourceSummary
newStackResourceSummary :: Text -> Text -> UTCTime -> ResourceStatus -> StackResourceSummary
newStackResourceSummary
Text
pLogicalResourceId_
Text
pResourceType_
UTCTime
pLastUpdatedTimestamp_
ResourceStatus
pResourceStatus_ =
StackResourceSummary' :: Maybe Text
-> Maybe Text
-> Maybe StackResourceDriftInformationSummary
-> Maybe ModuleInfo
-> Text
-> Text
-> ISO8601
-> ResourceStatus
-> StackResourceSummary
StackResourceSummary'
{ $sel:physicalResourceId:StackResourceSummary' :: Maybe Text
physicalResourceId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceStatusReason:StackResourceSummary' :: Maybe Text
resourceStatusReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:driftInformation:StackResourceSummary' :: Maybe StackResourceDriftInformationSummary
driftInformation = Maybe StackResourceDriftInformationSummary
forall a. Maybe a
Prelude.Nothing,
$sel:moduleInfo:StackResourceSummary' :: Maybe ModuleInfo
moduleInfo = Maybe ModuleInfo
forall a. Maybe a
Prelude.Nothing,
$sel:logicalResourceId:StackResourceSummary' :: Text
logicalResourceId = Text
pLogicalResourceId_,
$sel:resourceType:StackResourceSummary' :: Text
resourceType = Text
pResourceType_,
$sel:lastUpdatedTimestamp:StackResourceSummary' :: ISO8601
lastUpdatedTimestamp =
Tagged UTCTime (Identity UTCTime)
-> Tagged ISO8601 (Identity ISO8601)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged ISO8601 (Identity ISO8601))
-> UTCTime -> ISO8601
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastUpdatedTimestamp_,
$sel:resourceStatus:StackResourceSummary' :: ResourceStatus
resourceStatus = ResourceStatus
pResourceStatus_
}
stackResourceSummary_physicalResourceId :: Lens.Lens' StackResourceSummary (Prelude.Maybe Prelude.Text)
stackResourceSummary_physicalResourceId :: (Maybe Text -> f (Maybe Text))
-> StackResourceSummary -> f StackResourceSummary
stackResourceSummary_physicalResourceId = (StackResourceSummary -> Maybe Text)
-> (StackResourceSummary -> Maybe Text -> StackResourceSummary)
-> Lens
StackResourceSummary StackResourceSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResourceSummary' {Maybe Text
physicalResourceId :: Maybe Text
$sel:physicalResourceId:StackResourceSummary' :: StackResourceSummary -> Maybe Text
physicalResourceId} -> Maybe Text
physicalResourceId) (\s :: StackResourceSummary
s@StackResourceSummary' {} Maybe Text
a -> StackResourceSummary
s {$sel:physicalResourceId:StackResourceSummary' :: Maybe Text
physicalResourceId = Maybe Text
a} :: StackResourceSummary)
stackResourceSummary_resourceStatusReason :: Lens.Lens' StackResourceSummary (Prelude.Maybe Prelude.Text)
stackResourceSummary_resourceStatusReason :: (Maybe Text -> f (Maybe Text))
-> StackResourceSummary -> f StackResourceSummary
stackResourceSummary_resourceStatusReason = (StackResourceSummary -> Maybe Text)
-> (StackResourceSummary -> Maybe Text -> StackResourceSummary)
-> Lens
StackResourceSummary StackResourceSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResourceSummary' {Maybe Text
resourceStatusReason :: Maybe Text
$sel:resourceStatusReason:StackResourceSummary' :: StackResourceSummary -> Maybe Text
resourceStatusReason} -> Maybe Text
resourceStatusReason) (\s :: StackResourceSummary
s@StackResourceSummary' {} Maybe Text
a -> StackResourceSummary
s {$sel:resourceStatusReason:StackResourceSummary' :: Maybe Text
resourceStatusReason = Maybe Text
a} :: StackResourceSummary)
stackResourceSummary_driftInformation :: Lens.Lens' StackResourceSummary (Prelude.Maybe StackResourceDriftInformationSummary)
stackResourceSummary_driftInformation :: (Maybe StackResourceDriftInformationSummary
-> f (Maybe StackResourceDriftInformationSummary))
-> StackResourceSummary -> f StackResourceSummary
stackResourceSummary_driftInformation = (StackResourceSummary
-> Maybe StackResourceDriftInformationSummary)
-> (StackResourceSummary
-> Maybe StackResourceDriftInformationSummary
-> StackResourceSummary)
-> Lens
StackResourceSummary
StackResourceSummary
(Maybe StackResourceDriftInformationSummary)
(Maybe StackResourceDriftInformationSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResourceSummary' {Maybe StackResourceDriftInformationSummary
driftInformation :: Maybe StackResourceDriftInformationSummary
$sel:driftInformation:StackResourceSummary' :: StackResourceSummary -> Maybe StackResourceDriftInformationSummary
driftInformation} -> Maybe StackResourceDriftInformationSummary
driftInformation) (\s :: StackResourceSummary
s@StackResourceSummary' {} Maybe StackResourceDriftInformationSummary
a -> StackResourceSummary
s {$sel:driftInformation:StackResourceSummary' :: Maybe StackResourceDriftInformationSummary
driftInformation = Maybe StackResourceDriftInformationSummary
a} :: StackResourceSummary)
stackResourceSummary_moduleInfo :: Lens.Lens' StackResourceSummary (Prelude.Maybe ModuleInfo)
stackResourceSummary_moduleInfo :: (Maybe ModuleInfo -> f (Maybe ModuleInfo))
-> StackResourceSummary -> f StackResourceSummary
stackResourceSummary_moduleInfo = (StackResourceSummary -> Maybe ModuleInfo)
-> (StackResourceSummary
-> Maybe ModuleInfo -> StackResourceSummary)
-> Lens
StackResourceSummary
StackResourceSummary
(Maybe ModuleInfo)
(Maybe ModuleInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResourceSummary' {Maybe ModuleInfo
moduleInfo :: Maybe ModuleInfo
$sel:moduleInfo:StackResourceSummary' :: StackResourceSummary -> Maybe ModuleInfo
moduleInfo} -> Maybe ModuleInfo
moduleInfo) (\s :: StackResourceSummary
s@StackResourceSummary' {} Maybe ModuleInfo
a -> StackResourceSummary
s {$sel:moduleInfo:StackResourceSummary' :: Maybe ModuleInfo
moduleInfo = Maybe ModuleInfo
a} :: StackResourceSummary)
stackResourceSummary_logicalResourceId :: Lens.Lens' StackResourceSummary Prelude.Text
stackResourceSummary_logicalResourceId :: (Text -> f Text) -> StackResourceSummary -> f StackResourceSummary
stackResourceSummary_logicalResourceId = (StackResourceSummary -> Text)
-> (StackResourceSummary -> Text -> StackResourceSummary)
-> Lens StackResourceSummary StackResourceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResourceSummary' {Text
logicalResourceId :: Text
$sel:logicalResourceId:StackResourceSummary' :: StackResourceSummary -> Text
logicalResourceId} -> Text
logicalResourceId) (\s :: StackResourceSummary
s@StackResourceSummary' {} Text
a -> StackResourceSummary
s {$sel:logicalResourceId:StackResourceSummary' :: Text
logicalResourceId = Text
a} :: StackResourceSummary)
stackResourceSummary_resourceType :: Lens.Lens' StackResourceSummary Prelude.Text
stackResourceSummary_resourceType :: (Text -> f Text) -> StackResourceSummary -> f StackResourceSummary
stackResourceSummary_resourceType = (StackResourceSummary -> Text)
-> (StackResourceSummary -> Text -> StackResourceSummary)
-> Lens StackResourceSummary StackResourceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResourceSummary' {Text
resourceType :: Text
$sel:resourceType:StackResourceSummary' :: StackResourceSummary -> Text
resourceType} -> Text
resourceType) (\s :: StackResourceSummary
s@StackResourceSummary' {} Text
a -> StackResourceSummary
s {$sel:resourceType:StackResourceSummary' :: Text
resourceType = Text
a} :: StackResourceSummary)
stackResourceSummary_lastUpdatedTimestamp :: Lens.Lens' StackResourceSummary Prelude.UTCTime
stackResourceSummary_lastUpdatedTimestamp :: (UTCTime -> f UTCTime)
-> StackResourceSummary -> f StackResourceSummary
stackResourceSummary_lastUpdatedTimestamp = (StackResourceSummary -> ISO8601)
-> (StackResourceSummary -> ISO8601 -> StackResourceSummary)
-> Lens StackResourceSummary StackResourceSummary ISO8601 ISO8601
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResourceSummary' {ISO8601
lastUpdatedTimestamp :: ISO8601
$sel:lastUpdatedTimestamp:StackResourceSummary' :: StackResourceSummary -> ISO8601
lastUpdatedTimestamp} -> ISO8601
lastUpdatedTimestamp) (\s :: StackResourceSummary
s@StackResourceSummary' {} ISO8601
a -> StackResourceSummary
s {$sel:lastUpdatedTimestamp:StackResourceSummary' :: ISO8601
lastUpdatedTimestamp = ISO8601
a} :: StackResourceSummary) ((ISO8601 -> f ISO8601)
-> StackResourceSummary -> f StackResourceSummary)
-> ((UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601)
-> (UTCTime -> f UTCTime)
-> StackResourceSummary
-> f StackResourceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
stackResourceSummary_resourceStatus :: Lens.Lens' StackResourceSummary ResourceStatus
stackResourceSummary_resourceStatus :: (ResourceStatus -> f ResourceStatus)
-> StackResourceSummary -> f StackResourceSummary
stackResourceSummary_resourceStatus = (StackResourceSummary -> ResourceStatus)
-> (StackResourceSummary -> ResourceStatus -> StackResourceSummary)
-> Lens
StackResourceSummary
StackResourceSummary
ResourceStatus
ResourceStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResourceSummary' {ResourceStatus
resourceStatus :: ResourceStatus
$sel:resourceStatus:StackResourceSummary' :: StackResourceSummary -> ResourceStatus
resourceStatus} -> ResourceStatus
resourceStatus) (\s :: StackResourceSummary
s@StackResourceSummary' {} ResourceStatus
a -> StackResourceSummary
s {$sel:resourceStatus:StackResourceSummary' :: ResourceStatus
resourceStatus = ResourceStatus
a} :: StackResourceSummary)
instance Core.FromXML StackResourceSummary where
parseXML :: [Node] -> Either String StackResourceSummary
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe StackResourceDriftInformationSummary
-> Maybe ModuleInfo
-> Text
-> Text
-> ISO8601
-> ResourceStatus
-> StackResourceSummary
StackResourceSummary'
(Maybe Text
-> Maybe Text
-> Maybe StackResourceDriftInformationSummary
-> Maybe ModuleInfo
-> Text
-> Text
-> ISO8601
-> ResourceStatus
-> StackResourceSummary)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe StackResourceDriftInformationSummary
-> Maybe ModuleInfo
-> Text
-> Text
-> ISO8601
-> ResourceStatus
-> StackResourceSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PhysicalResourceId")
Either
String
(Maybe Text
-> Maybe StackResourceDriftInformationSummary
-> Maybe ModuleInfo
-> Text
-> Text
-> ISO8601
-> ResourceStatus
-> StackResourceSummary)
-> Either String (Maybe Text)
-> Either
String
(Maybe StackResourceDriftInformationSummary
-> Maybe ModuleInfo
-> Text
-> Text
-> ISO8601
-> ResourceStatus
-> StackResourceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ResourceStatusReason")
Either
String
(Maybe StackResourceDriftInformationSummary
-> Maybe ModuleInfo
-> Text
-> Text
-> ISO8601
-> ResourceStatus
-> StackResourceSummary)
-> Either String (Maybe StackResourceDriftInformationSummary)
-> Either
String
(Maybe ModuleInfo
-> Text
-> Text
-> ISO8601
-> ResourceStatus
-> StackResourceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node]
-> Text
-> Either String (Maybe StackResourceDriftInformationSummary)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DriftInformation")
Either
String
(Maybe ModuleInfo
-> Text
-> Text
-> ISO8601
-> ResourceStatus
-> StackResourceSummary)
-> Either String (Maybe ModuleInfo)
-> Either
String
(Text -> Text -> ISO8601 -> ResourceStatus -> StackResourceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ModuleInfo)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ModuleInfo")
Either
String
(Text -> Text -> ISO8601 -> ResourceStatus -> StackResourceSummary)
-> Either String Text
-> Either
String (Text -> ISO8601 -> ResourceStatus -> StackResourceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"LogicalResourceId")
Either
String (Text -> ISO8601 -> ResourceStatus -> StackResourceSummary)
-> Either String Text
-> Either
String (ISO8601 -> ResourceStatus -> StackResourceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ResourceType")
Either String (ISO8601 -> ResourceStatus -> StackResourceSummary)
-> Either String ISO8601
-> Either String (ResourceStatus -> StackResourceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String ISO8601
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"LastUpdatedTimestamp")
Either String (ResourceStatus -> StackResourceSummary)
-> Either String ResourceStatus
-> Either String StackResourceSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String ResourceStatus
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ResourceStatus")
instance Prelude.Hashable StackResourceSummary
instance Prelude.NFData StackResourceSummary