{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data StackResourceSummary = StackResourceSummary'
{
StackResourceSummary -> Maybe StackResourceDriftInformationSummary
driftInformation :: Prelude.Maybe StackResourceDriftInformationSummary,
StackResourceSummary -> Maybe ModuleInfo
moduleInfo :: Prelude.Maybe ModuleInfo,
StackResourceSummary -> Maybe Text
physicalResourceId :: Prelude.Maybe Prelude.Text,
StackResourceSummary -> Maybe Text
resourceStatusReason :: Prelude.Maybe Prelude.Text,
StackResourceSummary -> Text
logicalResourceId :: Prelude.Text,
StackResourceSummary -> Text
resourceType :: Prelude.Text,
StackResourceSummary -> ISO8601
lastUpdatedTimestamp :: Data.ISO8601,
StackResourceSummary -> ResourceStatus
resourceStatus :: ResourceStatus
}
deriving (StackResourceSummary -> StackResourceSummary -> Bool
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]
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
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. 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'
{ $sel:driftInformation:StackResourceSummary' :: Maybe StackResourceDriftInformationSummary
driftInformation =
forall a. Maybe a
Prelude.Nothing,
$sel:moduleInfo:StackResourceSummary' :: Maybe ModuleInfo
moduleInfo = forall a. Maybe a
Prelude.Nothing,
$sel:physicalResourceId:StackResourceSummary' :: Maybe Text
physicalResourceId = forall a. Maybe a
Prelude.Nothing,
$sel:resourceStatusReason:StackResourceSummary' :: Maybe Text
resourceStatusReason = 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 =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastUpdatedTimestamp_,
$sel:resourceStatus:StackResourceSummary' :: ResourceStatus
resourceStatus = ResourceStatus
pResourceStatus_
}
stackResourceSummary_driftInformation :: Lens.Lens' StackResourceSummary (Prelude.Maybe StackResourceDriftInformationSummary)
stackResourceSummary_driftInformation :: Lens'
StackResourceSummary (Maybe StackResourceDriftInformationSummary)
stackResourceSummary_driftInformation = 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 :: Lens' StackResourceSummary (Maybe ModuleInfo)
stackResourceSummary_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_physicalResourceId :: Lens.Lens' StackResourceSummary (Prelude.Maybe Prelude.Text)
stackResourceSummary_physicalResourceId :: Lens' StackResourceSummary (Maybe Text)
stackResourceSummary_physicalResourceId = 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 :: Lens' StackResourceSummary (Maybe Text)
stackResourceSummary_resourceStatusReason = 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_logicalResourceId :: Lens.Lens' StackResourceSummary Prelude.Text
stackResourceSummary_logicalResourceId :: Lens' StackResourceSummary Text
stackResourceSummary_logicalResourceId = 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 :: Lens' StackResourceSummary Text
stackResourceSummary_resourceType = 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 :: Lens' StackResourceSummary UTCTime
stackResourceSummary_lastUpdatedTimestamp = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
stackResourceSummary_resourceStatus :: Lens.Lens' StackResourceSummary ResourceStatus
stackResourceSummary_resourceStatus :: Lens' StackResourceSummary ResourceStatus
stackResourceSummary_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 Data.FromXML StackResourceSummary where
parseXML :: [Node] -> Either String StackResourceSummary
parseXML [Node]
x =
Maybe StackResourceDriftInformationSummary
-> Maybe ModuleInfo
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> ISO8601
-> ResourceStatus
-> StackResourceSummary
StackResourceSummary'
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
"DriftInformation")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ModuleInfo")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"PhysicalResourceId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ResourceStatusReason")
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
"LogicalResourceId")
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
"ResourceType")
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
"LastUpdatedTimestamp")
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
"ResourceStatus")
instance Prelude.Hashable StackResourceSummary where
hashWithSalt :: Int -> StackResourceSummary -> Int
hashWithSalt Int
_salt StackResourceSummary' {Maybe Text
Maybe ModuleInfo
Maybe StackResourceDriftInformationSummary
Text
ISO8601
ResourceStatus
resourceStatus :: ResourceStatus
lastUpdatedTimestamp :: ISO8601
resourceType :: Text
logicalResourceId :: Text
resourceStatusReason :: Maybe Text
physicalResourceId :: Maybe Text
moduleInfo :: Maybe ModuleInfo
driftInformation :: Maybe StackResourceDriftInformationSummary
$sel:resourceStatus:StackResourceSummary' :: StackResourceSummary -> ResourceStatus
$sel:lastUpdatedTimestamp:StackResourceSummary' :: StackResourceSummary -> ISO8601
$sel:resourceType:StackResourceSummary' :: StackResourceSummary -> Text
$sel:logicalResourceId:StackResourceSummary' :: StackResourceSummary -> Text
$sel:resourceStatusReason:StackResourceSummary' :: StackResourceSummary -> Maybe Text
$sel:physicalResourceId:StackResourceSummary' :: StackResourceSummary -> Maybe Text
$sel:moduleInfo:StackResourceSummary' :: StackResourceSummary -> Maybe ModuleInfo
$sel:driftInformation:StackResourceSummary' :: StackResourceSummary -> Maybe StackResourceDriftInformationSummary
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StackResourceDriftInformationSummary
driftInformation
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ModuleInfo
moduleInfo
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
physicalResourceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceStatusReason
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
logicalResourceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
lastUpdatedTimestamp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ResourceStatus
resourceStatus
instance Prelude.NFData StackResourceSummary where
rnf :: StackResourceSummary -> ()
rnf StackResourceSummary' {Maybe Text
Maybe ModuleInfo
Maybe StackResourceDriftInformationSummary
Text
ISO8601
ResourceStatus
resourceStatus :: ResourceStatus
lastUpdatedTimestamp :: ISO8601
resourceType :: Text
logicalResourceId :: Text
resourceStatusReason :: Maybe Text
physicalResourceId :: Maybe Text
moduleInfo :: Maybe ModuleInfo
driftInformation :: Maybe StackResourceDriftInformationSummary
$sel:resourceStatus:StackResourceSummary' :: StackResourceSummary -> ResourceStatus
$sel:lastUpdatedTimestamp:StackResourceSummary' :: StackResourceSummary -> ISO8601
$sel:resourceType:StackResourceSummary' :: StackResourceSummary -> Text
$sel:logicalResourceId:StackResourceSummary' :: StackResourceSummary -> Text
$sel:resourceStatusReason:StackResourceSummary' :: StackResourceSummary -> Maybe Text
$sel:physicalResourceId:StackResourceSummary' :: StackResourceSummary -> Maybe Text
$sel:moduleInfo:StackResourceSummary' :: StackResourceSummary -> Maybe ModuleInfo
$sel:driftInformation:StackResourceSummary' :: StackResourceSummary -> Maybe StackResourceDriftInformationSummary
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe StackResourceDriftInformationSummary
driftInformation
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ModuleInfo
moduleInfo
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
physicalResourceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceStatusReason
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
logicalResourceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
resourceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
lastUpdatedTimestamp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ResourceStatus
resourceStatus