{-# 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.Lens as Lens
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
(ResourceChangeDetail -> ResourceChangeDetail -> Bool)
-> (ResourceChangeDetail -> ResourceChangeDetail -> Bool)
-> Eq ResourceChangeDetail
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]
(Int -> ReadS ResourceChangeDetail)
-> ReadS [ResourceChangeDetail]
-> ReadPrec ResourceChangeDetail
-> ReadPrec [ResourceChangeDetail]
-> Read 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
(Int -> ResourceChangeDetail -> ShowS)
-> (ResourceChangeDetail -> String)
-> ([ResourceChangeDetail] -> ShowS)
-> Show ResourceChangeDetail
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. ResourceChangeDetail -> Rep ResourceChangeDetail x)
-> (forall x. Rep ResourceChangeDetail x -> ResourceChangeDetail)
-> Generic ResourceChangeDetail
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' :: Maybe Text
-> Maybe ChangeSource
-> Maybe EvaluationType
-> Maybe ResourceTargetDefinition
-> ResourceChangeDetail
ResourceChangeDetail'
{ $sel:causingEntity:ResourceChangeDetail' :: Maybe Text
causingEntity =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:changeSource:ResourceChangeDetail' :: Maybe ChangeSource
changeSource = Maybe ChangeSource
forall a. Maybe a
Prelude.Nothing,
$sel:evaluation:ResourceChangeDetail' :: Maybe EvaluationType
evaluation = Maybe EvaluationType
forall a. Maybe a
Prelude.Nothing,
$sel:target:ResourceChangeDetail' :: Maybe ResourceTargetDefinition
target = Maybe ResourceTargetDefinition
forall a. Maybe a
Prelude.Nothing
}
resourceChangeDetail_causingEntity :: Lens.Lens' ResourceChangeDetail (Prelude.Maybe Prelude.Text)
resourceChangeDetail_causingEntity :: (Maybe Text -> f (Maybe Text))
-> ResourceChangeDetail -> f ResourceChangeDetail
resourceChangeDetail_causingEntity = (ResourceChangeDetail -> Maybe Text)
-> (ResourceChangeDetail -> Maybe Text -> ResourceChangeDetail)
-> Lens
ResourceChangeDetail ResourceChangeDetail (Maybe Text) (Maybe Text)
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 :: (Maybe ChangeSource -> f (Maybe ChangeSource))
-> ResourceChangeDetail -> f ResourceChangeDetail
resourceChangeDetail_changeSource = (ResourceChangeDetail -> Maybe ChangeSource)
-> (ResourceChangeDetail
-> Maybe ChangeSource -> ResourceChangeDetail)
-> Lens
ResourceChangeDetail
ResourceChangeDetail
(Maybe ChangeSource)
(Maybe 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 :: (Maybe EvaluationType -> f (Maybe EvaluationType))
-> ResourceChangeDetail -> f ResourceChangeDetail
resourceChangeDetail_evaluation = (ResourceChangeDetail -> Maybe EvaluationType)
-> (ResourceChangeDetail
-> Maybe EvaluationType -> ResourceChangeDetail)
-> Lens
ResourceChangeDetail
ResourceChangeDetail
(Maybe EvaluationType)
(Maybe EvaluationType)
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 :: (Maybe ResourceTargetDefinition
-> f (Maybe ResourceTargetDefinition))
-> ResourceChangeDetail -> f ResourceChangeDetail
resourceChangeDetail_target = (ResourceChangeDetail -> Maybe ResourceTargetDefinition)
-> (ResourceChangeDetail
-> Maybe ResourceTargetDefinition -> ResourceChangeDetail)
-> Lens
ResourceChangeDetail
ResourceChangeDetail
(Maybe ResourceTargetDefinition)
(Maybe ResourceTargetDefinition)
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 Core.FromXML ResourceChangeDetail where
parseXML :: [Node] -> Either String ResourceChangeDetail
parseXML [Node]
x =
Maybe Text
-> Maybe ChangeSource
-> Maybe EvaluationType
-> Maybe ResourceTargetDefinition
-> ResourceChangeDetail
ResourceChangeDetail'
(Maybe Text
-> Maybe ChangeSource
-> Maybe EvaluationType
-> Maybe ResourceTargetDefinition
-> ResourceChangeDetail)
-> Either String (Maybe Text)
-> Either
String
(Maybe ChangeSource
-> Maybe EvaluationType
-> Maybe ResourceTargetDefinition
-> ResourceChangeDetail)
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
"CausingEntity")
Either
String
(Maybe ChangeSource
-> Maybe EvaluationType
-> Maybe ResourceTargetDefinition
-> ResourceChangeDetail)
-> Either String (Maybe ChangeSource)
-> Either
String
(Maybe EvaluationType
-> Maybe ResourceTargetDefinition -> ResourceChangeDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ChangeSource)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ChangeSource")
Either
String
(Maybe EvaluationType
-> Maybe ResourceTargetDefinition -> ResourceChangeDetail)
-> Either String (Maybe EvaluationType)
-> Either
String (Maybe ResourceTargetDefinition -> ResourceChangeDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe EvaluationType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Evaluation")
Either
String (Maybe ResourceTargetDefinition -> ResourceChangeDetail)
-> Either String (Maybe ResourceTargetDefinition)
-> Either String ResourceChangeDetail
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ResourceTargetDefinition)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Target")
instance Prelude.Hashable ResourceChangeDetail
instance Prelude.NFData ResourceChangeDetail