{-# 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.ResourceChangeDetail where
import Amazonka.CloudFormation.Types.ChangeSource
import Amazonka.CloudFormation.Types.EvaluationType
import Amazonka.CloudFormation.Types.ResourceTargetDefinition
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 ResourceChangeDetail = ResourceChangeDetail'
{
ResourceChangeDetail -> Maybe Text
causingEntity :: Prelude.Maybe Prelude.Text,
ResourceChangeDetail -> Maybe ChangeSource
changeSource :: Prelude.Maybe ChangeSource,
ResourceChangeDetail -> Maybe EvaluationType
evaluation :: Prelude.Maybe EvaluationType,
ResourceChangeDetail -> Maybe ResourceTargetDefinition
target :: Prelude.Maybe ResourceTargetDefinition
}
deriving (ResourceChangeDetail -> ResourceChangeDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceChangeDetail -> ResourceChangeDetail -> Bool
$c/= :: ResourceChangeDetail -> ResourceChangeDetail -> Bool
== :: ResourceChangeDetail -> ResourceChangeDetail -> Bool
$c== :: ResourceChangeDetail -> ResourceChangeDetail -> Bool
Prelude.Eq, ReadPrec [ResourceChangeDetail]
ReadPrec ResourceChangeDetail
Int -> ReadS ResourceChangeDetail
ReadS [ResourceChangeDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResourceChangeDetail]
$creadListPrec :: ReadPrec [ResourceChangeDetail]
readPrec :: ReadPrec ResourceChangeDetail
$creadPrec :: ReadPrec ResourceChangeDetail
readList :: ReadS [ResourceChangeDetail]
$creadList :: ReadS [ResourceChangeDetail]
readsPrec :: Int -> ReadS ResourceChangeDetail
$creadsPrec :: Int -> ReadS ResourceChangeDetail
Prelude.Read, Int -> ResourceChangeDetail -> ShowS
[ResourceChangeDetail] -> ShowS
ResourceChangeDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResourceChangeDetail] -> ShowS
$cshowList :: [ResourceChangeDetail] -> ShowS
show :: ResourceChangeDetail -> String
$cshow :: ResourceChangeDetail -> String
showsPrec :: Int -> ResourceChangeDetail -> ShowS
$cshowsPrec :: Int -> ResourceChangeDetail -> ShowS
Prelude.Show, forall x. Rep ResourceChangeDetail x -> ResourceChangeDetail
forall x. ResourceChangeDetail -> Rep ResourceChangeDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResourceChangeDetail x -> ResourceChangeDetail
$cfrom :: forall x. ResourceChangeDetail -> Rep ResourceChangeDetail x
Prelude.Generic)
newResourceChangeDetail ::
ResourceChangeDetail
newResourceChangeDetail :: ResourceChangeDetail
newResourceChangeDetail =
ResourceChangeDetail'
{ $sel:causingEntity:ResourceChangeDetail' :: Maybe Text
causingEntity =
forall a. Maybe a
Prelude.Nothing,
$sel:changeSource:ResourceChangeDetail' :: Maybe ChangeSource
changeSource = forall a. Maybe a
Prelude.Nothing,
$sel:evaluation:ResourceChangeDetail' :: Maybe EvaluationType
evaluation = forall a. Maybe a
Prelude.Nothing,
$sel:target:ResourceChangeDetail' :: Maybe ResourceTargetDefinition
target = forall a. Maybe a
Prelude.Nothing
}
resourceChangeDetail_causingEntity :: Lens.Lens' ResourceChangeDetail (Prelude.Maybe Prelude.Text)
resourceChangeDetail_causingEntity :: Lens' ResourceChangeDetail (Maybe Text)
resourceChangeDetail_causingEntity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceChangeDetail' {Maybe Text
causingEntity :: Maybe Text
$sel:causingEntity:ResourceChangeDetail' :: ResourceChangeDetail -> Maybe Text
causingEntity} -> Maybe Text
causingEntity) (\s :: ResourceChangeDetail
s@ResourceChangeDetail' {} Maybe Text
a -> ResourceChangeDetail
s {$sel:causingEntity:ResourceChangeDetail' :: Maybe Text
causingEntity = Maybe Text
a} :: ResourceChangeDetail)
resourceChangeDetail_changeSource :: Lens.Lens' ResourceChangeDetail (Prelude.Maybe ChangeSource)
resourceChangeDetail_changeSource :: Lens' ResourceChangeDetail (Maybe ChangeSource)
resourceChangeDetail_changeSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceChangeDetail' {Maybe ChangeSource
changeSource :: Maybe ChangeSource
$sel:changeSource:ResourceChangeDetail' :: ResourceChangeDetail -> Maybe ChangeSource
changeSource} -> Maybe ChangeSource
changeSource) (\s :: ResourceChangeDetail
s@ResourceChangeDetail' {} Maybe ChangeSource
a -> ResourceChangeDetail
s {$sel:changeSource:ResourceChangeDetail' :: Maybe ChangeSource
changeSource = Maybe ChangeSource
a} :: ResourceChangeDetail)
resourceChangeDetail_evaluation :: Lens.Lens' ResourceChangeDetail (Prelude.Maybe EvaluationType)
resourceChangeDetail_evaluation :: Lens' ResourceChangeDetail (Maybe EvaluationType)
resourceChangeDetail_evaluation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceChangeDetail' {Maybe EvaluationType
evaluation :: Maybe EvaluationType
$sel:evaluation:ResourceChangeDetail' :: ResourceChangeDetail -> Maybe EvaluationType
evaluation} -> Maybe EvaluationType
evaluation) (\s :: ResourceChangeDetail
s@ResourceChangeDetail' {} Maybe EvaluationType
a -> ResourceChangeDetail
s {$sel:evaluation:ResourceChangeDetail' :: Maybe EvaluationType
evaluation = Maybe EvaluationType
a} :: ResourceChangeDetail)
resourceChangeDetail_target :: Lens.Lens' ResourceChangeDetail (Prelude.Maybe ResourceTargetDefinition)
resourceChangeDetail_target :: Lens' ResourceChangeDetail (Maybe ResourceTargetDefinition)
resourceChangeDetail_target = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceChangeDetail' {Maybe ResourceTargetDefinition
target :: Maybe ResourceTargetDefinition
$sel:target:ResourceChangeDetail' :: ResourceChangeDetail -> Maybe ResourceTargetDefinition
target} -> Maybe ResourceTargetDefinition
target) (\s :: ResourceChangeDetail
s@ResourceChangeDetail' {} Maybe ResourceTargetDefinition
a -> ResourceChangeDetail
s {$sel:target:ResourceChangeDetail' :: Maybe ResourceTargetDefinition
target = Maybe ResourceTargetDefinition
a} :: ResourceChangeDetail)
instance Data.FromXML ResourceChangeDetail where
parseXML :: [Node] -> Either String ResourceChangeDetail
parseXML [Node]
x =
Maybe Text
-> Maybe ChangeSource
-> Maybe EvaluationType
-> Maybe ResourceTargetDefinition
-> ResourceChangeDetail
ResourceChangeDetail'
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
"CausingEntity")
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
"ChangeSource")
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
"Evaluation")
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
"Target")
instance Prelude.Hashable ResourceChangeDetail where
hashWithSalt :: Int -> ResourceChangeDetail -> Int
hashWithSalt Int
_salt ResourceChangeDetail' {Maybe Text
Maybe ChangeSource
Maybe EvaluationType
Maybe ResourceTargetDefinition
target :: Maybe ResourceTargetDefinition
evaluation :: Maybe EvaluationType
changeSource :: Maybe ChangeSource
causingEntity :: Maybe Text
$sel:target:ResourceChangeDetail' :: ResourceChangeDetail -> Maybe ResourceTargetDefinition
$sel:evaluation:ResourceChangeDetail' :: ResourceChangeDetail -> Maybe EvaluationType
$sel:changeSource:ResourceChangeDetail' :: ResourceChangeDetail -> Maybe ChangeSource
$sel:causingEntity:ResourceChangeDetail' :: ResourceChangeDetail -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
causingEntity
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ChangeSource
changeSource
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EvaluationType
evaluation
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ResourceTargetDefinition
target
instance Prelude.NFData ResourceChangeDetail where
rnf :: ResourceChangeDetail -> ()
rnf ResourceChangeDetail' {Maybe Text
Maybe ChangeSource
Maybe EvaluationType
Maybe ResourceTargetDefinition
target :: Maybe ResourceTargetDefinition
evaluation :: Maybe EvaluationType
changeSource :: Maybe ChangeSource
causingEntity :: Maybe Text
$sel:target:ResourceChangeDetail' :: ResourceChangeDetail -> Maybe ResourceTargetDefinition
$sel:evaluation:ResourceChangeDetail' :: ResourceChangeDetail -> Maybe EvaluationType
$sel:changeSource:ResourceChangeDetail' :: ResourceChangeDetail -> Maybe ChangeSource
$sel:causingEntity:ResourceChangeDetail' :: ResourceChangeDetail -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
causingEntity
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ChangeSource
changeSource
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EvaluationType
evaluation
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ResourceTargetDefinition
target