{-# 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.ResourceChange where
import Amazonka.CloudFormation.Types.ChangeAction
import Amazonka.CloudFormation.Types.ModuleInfo
import Amazonka.CloudFormation.Types.Replacement
import Amazonka.CloudFormation.Types.ResourceAttribute
import Amazonka.CloudFormation.Types.ResourceChangeDetail
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ResourceChange = ResourceChange'
{
ResourceChange -> Maybe Text
logicalResourceId :: Prelude.Maybe Prelude.Text,
ResourceChange -> Maybe Text
physicalResourceId :: Prelude.Maybe Prelude.Text,
ResourceChange -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
ResourceChange -> Maybe ChangeAction
action :: Prelude.Maybe ChangeAction,
ResourceChange -> Maybe Text
changeSetId :: Prelude.Maybe Prelude.Text,
ResourceChange -> Maybe ModuleInfo
moduleInfo :: Prelude.Maybe ModuleInfo,
ResourceChange -> Maybe [ResourceAttribute]
scope :: Prelude.Maybe [ResourceAttribute],
ResourceChange -> Maybe [ResourceChangeDetail]
details :: Prelude.Maybe [ResourceChangeDetail],
ResourceChange -> Maybe Replacement
replacement :: Prelude.Maybe Replacement
}
deriving (ResourceChange -> ResourceChange -> Bool
(ResourceChange -> ResourceChange -> Bool)
-> (ResourceChange -> ResourceChange -> Bool) -> Eq ResourceChange
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceChange -> ResourceChange -> Bool
$c/= :: ResourceChange -> ResourceChange -> Bool
== :: ResourceChange -> ResourceChange -> Bool
$c== :: ResourceChange -> ResourceChange -> Bool
Prelude.Eq, ReadPrec [ResourceChange]
ReadPrec ResourceChange
Int -> ReadS ResourceChange
ReadS [ResourceChange]
(Int -> ReadS ResourceChange)
-> ReadS [ResourceChange]
-> ReadPrec ResourceChange
-> ReadPrec [ResourceChange]
-> Read ResourceChange
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResourceChange]
$creadListPrec :: ReadPrec [ResourceChange]
readPrec :: ReadPrec ResourceChange
$creadPrec :: ReadPrec ResourceChange
readList :: ReadS [ResourceChange]
$creadList :: ReadS [ResourceChange]
readsPrec :: Int -> ReadS ResourceChange
$creadsPrec :: Int -> ReadS ResourceChange
Prelude.Read, Int -> ResourceChange -> ShowS
[ResourceChange] -> ShowS
ResourceChange -> String
(Int -> ResourceChange -> ShowS)
-> (ResourceChange -> String)
-> ([ResourceChange] -> ShowS)
-> Show ResourceChange
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResourceChange] -> ShowS
$cshowList :: [ResourceChange] -> ShowS
show :: ResourceChange -> String
$cshow :: ResourceChange -> String
showsPrec :: Int -> ResourceChange -> ShowS
$cshowsPrec :: Int -> ResourceChange -> ShowS
Prelude.Show, (forall x. ResourceChange -> Rep ResourceChange x)
-> (forall x. Rep ResourceChange x -> ResourceChange)
-> Generic ResourceChange
forall x. Rep ResourceChange x -> ResourceChange
forall x. ResourceChange -> Rep ResourceChange x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResourceChange x -> ResourceChange
$cfrom :: forall x. ResourceChange -> Rep ResourceChange x
Prelude.Generic)
newResourceChange ::
ResourceChange
newResourceChange :: ResourceChange
newResourceChange =
ResourceChange' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeAction
-> Maybe Text
-> Maybe ModuleInfo
-> Maybe [ResourceAttribute]
-> Maybe [ResourceChangeDetail]
-> Maybe Replacement
-> ResourceChange
ResourceChange'
{ $sel:logicalResourceId:ResourceChange' :: Maybe Text
logicalResourceId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:physicalResourceId:ResourceChange' :: Maybe Text
physicalResourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:ResourceChange' :: Maybe Text
resourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:action:ResourceChange' :: Maybe ChangeAction
action = Maybe ChangeAction
forall a. Maybe a
Prelude.Nothing,
$sel:changeSetId:ResourceChange' :: Maybe Text
changeSetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:moduleInfo:ResourceChange' :: Maybe ModuleInfo
moduleInfo = Maybe ModuleInfo
forall a. Maybe a
Prelude.Nothing,
$sel:scope:ResourceChange' :: Maybe [ResourceAttribute]
scope = Maybe [ResourceAttribute]
forall a. Maybe a
Prelude.Nothing,
$sel:details:ResourceChange' :: Maybe [ResourceChangeDetail]
details = Maybe [ResourceChangeDetail]
forall a. Maybe a
Prelude.Nothing,
$sel:replacement:ResourceChange' :: Maybe Replacement
replacement = Maybe Replacement
forall a. Maybe a
Prelude.Nothing
}
resourceChange_logicalResourceId :: Lens.Lens' ResourceChange (Prelude.Maybe Prelude.Text)
resourceChange_logicalResourceId :: (Maybe Text -> f (Maybe Text))
-> ResourceChange -> f ResourceChange
resourceChange_logicalResourceId = (ResourceChange -> Maybe Text)
-> (ResourceChange -> Maybe Text -> ResourceChange)
-> Lens ResourceChange ResourceChange (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceChange' {Maybe Text
logicalResourceId :: Maybe Text
$sel:logicalResourceId:ResourceChange' :: ResourceChange -> Maybe Text
logicalResourceId} -> Maybe Text
logicalResourceId) (\s :: ResourceChange
s@ResourceChange' {} Maybe Text
a -> ResourceChange
s {$sel:logicalResourceId:ResourceChange' :: Maybe Text
logicalResourceId = Maybe Text
a} :: ResourceChange)
resourceChange_physicalResourceId :: Lens.Lens' ResourceChange (Prelude.Maybe Prelude.Text)
resourceChange_physicalResourceId :: (Maybe Text -> f (Maybe Text))
-> ResourceChange -> f ResourceChange
resourceChange_physicalResourceId = (ResourceChange -> Maybe Text)
-> (ResourceChange -> Maybe Text -> ResourceChange)
-> Lens ResourceChange ResourceChange (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceChange' {Maybe Text
physicalResourceId :: Maybe Text
$sel:physicalResourceId:ResourceChange' :: ResourceChange -> Maybe Text
physicalResourceId} -> Maybe Text
physicalResourceId) (\s :: ResourceChange
s@ResourceChange' {} Maybe Text
a -> ResourceChange
s {$sel:physicalResourceId:ResourceChange' :: Maybe Text
physicalResourceId = Maybe Text
a} :: ResourceChange)
resourceChange_resourceType :: Lens.Lens' ResourceChange (Prelude.Maybe Prelude.Text)
resourceChange_resourceType :: (Maybe Text -> f (Maybe Text))
-> ResourceChange -> f ResourceChange
resourceChange_resourceType = (ResourceChange -> Maybe Text)
-> (ResourceChange -> Maybe Text -> ResourceChange)
-> Lens ResourceChange ResourceChange (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceChange' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:ResourceChange' :: ResourceChange -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: ResourceChange
s@ResourceChange' {} Maybe Text
a -> ResourceChange
s {$sel:resourceType:ResourceChange' :: Maybe Text
resourceType = Maybe Text
a} :: ResourceChange)
resourceChange_action :: Lens.Lens' ResourceChange (Prelude.Maybe ChangeAction)
resourceChange_action :: (Maybe ChangeAction -> f (Maybe ChangeAction))
-> ResourceChange -> f ResourceChange
resourceChange_action = (ResourceChange -> Maybe ChangeAction)
-> (ResourceChange -> Maybe ChangeAction -> ResourceChange)
-> Lens
ResourceChange
ResourceChange
(Maybe ChangeAction)
(Maybe ChangeAction)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceChange' {Maybe ChangeAction
action :: Maybe ChangeAction
$sel:action:ResourceChange' :: ResourceChange -> Maybe ChangeAction
action} -> Maybe ChangeAction
action) (\s :: ResourceChange
s@ResourceChange' {} Maybe ChangeAction
a -> ResourceChange
s {$sel:action:ResourceChange' :: Maybe ChangeAction
action = Maybe ChangeAction
a} :: ResourceChange)
resourceChange_changeSetId :: Lens.Lens' ResourceChange (Prelude.Maybe Prelude.Text)
resourceChange_changeSetId :: (Maybe Text -> f (Maybe Text))
-> ResourceChange -> f ResourceChange
resourceChange_changeSetId = (ResourceChange -> Maybe Text)
-> (ResourceChange -> Maybe Text -> ResourceChange)
-> Lens ResourceChange ResourceChange (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceChange' {Maybe Text
changeSetId :: Maybe Text
$sel:changeSetId:ResourceChange' :: ResourceChange -> Maybe Text
changeSetId} -> Maybe Text
changeSetId) (\s :: ResourceChange
s@ResourceChange' {} Maybe Text
a -> ResourceChange
s {$sel:changeSetId:ResourceChange' :: Maybe Text
changeSetId = Maybe Text
a} :: ResourceChange)
resourceChange_moduleInfo :: Lens.Lens' ResourceChange (Prelude.Maybe ModuleInfo)
resourceChange_moduleInfo :: (Maybe ModuleInfo -> f (Maybe ModuleInfo))
-> ResourceChange -> f ResourceChange
resourceChange_moduleInfo = (ResourceChange -> Maybe ModuleInfo)
-> (ResourceChange -> Maybe ModuleInfo -> ResourceChange)
-> Lens
ResourceChange ResourceChange (Maybe ModuleInfo) (Maybe ModuleInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceChange' {Maybe ModuleInfo
moduleInfo :: Maybe ModuleInfo
$sel:moduleInfo:ResourceChange' :: ResourceChange -> Maybe ModuleInfo
moduleInfo} -> Maybe ModuleInfo
moduleInfo) (\s :: ResourceChange
s@ResourceChange' {} Maybe ModuleInfo
a -> ResourceChange
s {$sel:moduleInfo:ResourceChange' :: Maybe ModuleInfo
moduleInfo = Maybe ModuleInfo
a} :: ResourceChange)
resourceChange_scope :: Lens.Lens' ResourceChange (Prelude.Maybe [ResourceAttribute])
resourceChange_scope :: (Maybe [ResourceAttribute] -> f (Maybe [ResourceAttribute]))
-> ResourceChange -> f ResourceChange
resourceChange_scope = (ResourceChange -> Maybe [ResourceAttribute])
-> (ResourceChange -> Maybe [ResourceAttribute] -> ResourceChange)
-> Lens
ResourceChange
ResourceChange
(Maybe [ResourceAttribute])
(Maybe [ResourceAttribute])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceChange' {Maybe [ResourceAttribute]
scope :: Maybe [ResourceAttribute]
$sel:scope:ResourceChange' :: ResourceChange -> Maybe [ResourceAttribute]
scope} -> Maybe [ResourceAttribute]
scope) (\s :: ResourceChange
s@ResourceChange' {} Maybe [ResourceAttribute]
a -> ResourceChange
s {$sel:scope:ResourceChange' :: Maybe [ResourceAttribute]
scope = Maybe [ResourceAttribute]
a} :: ResourceChange) ((Maybe [ResourceAttribute] -> f (Maybe [ResourceAttribute]))
-> ResourceChange -> f ResourceChange)
-> ((Maybe [ResourceAttribute] -> f (Maybe [ResourceAttribute]))
-> Maybe [ResourceAttribute] -> f (Maybe [ResourceAttribute]))
-> (Maybe [ResourceAttribute] -> f (Maybe [ResourceAttribute]))
-> ResourceChange
-> f ResourceChange
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ResourceAttribute]
[ResourceAttribute]
[ResourceAttribute]
[ResourceAttribute]
-> Iso
(Maybe [ResourceAttribute])
(Maybe [ResourceAttribute])
(Maybe [ResourceAttribute])
(Maybe [ResourceAttribute])
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 AnIso
[ResourceAttribute]
[ResourceAttribute]
[ResourceAttribute]
[ResourceAttribute]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
resourceChange_details :: Lens.Lens' ResourceChange (Prelude.Maybe [ResourceChangeDetail])
resourceChange_details :: (Maybe [ResourceChangeDetail] -> f (Maybe [ResourceChangeDetail]))
-> ResourceChange -> f ResourceChange
resourceChange_details = (ResourceChange -> Maybe [ResourceChangeDetail])
-> (ResourceChange
-> Maybe [ResourceChangeDetail] -> ResourceChange)
-> Lens
ResourceChange
ResourceChange
(Maybe [ResourceChangeDetail])
(Maybe [ResourceChangeDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceChange' {Maybe [ResourceChangeDetail]
details :: Maybe [ResourceChangeDetail]
$sel:details:ResourceChange' :: ResourceChange -> Maybe [ResourceChangeDetail]
details} -> Maybe [ResourceChangeDetail]
details) (\s :: ResourceChange
s@ResourceChange' {} Maybe [ResourceChangeDetail]
a -> ResourceChange
s {$sel:details:ResourceChange' :: Maybe [ResourceChangeDetail]
details = Maybe [ResourceChangeDetail]
a} :: ResourceChange) ((Maybe [ResourceChangeDetail] -> f (Maybe [ResourceChangeDetail]))
-> ResourceChange -> f ResourceChange)
-> ((Maybe [ResourceChangeDetail]
-> f (Maybe [ResourceChangeDetail]))
-> Maybe [ResourceChangeDetail]
-> f (Maybe [ResourceChangeDetail]))
-> (Maybe [ResourceChangeDetail]
-> f (Maybe [ResourceChangeDetail]))
-> ResourceChange
-> f ResourceChange
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ResourceChangeDetail]
[ResourceChangeDetail]
[ResourceChangeDetail]
[ResourceChangeDetail]
-> Iso
(Maybe [ResourceChangeDetail])
(Maybe [ResourceChangeDetail])
(Maybe [ResourceChangeDetail])
(Maybe [ResourceChangeDetail])
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 AnIso
[ResourceChangeDetail]
[ResourceChangeDetail]
[ResourceChangeDetail]
[ResourceChangeDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
resourceChange_replacement :: Lens.Lens' ResourceChange (Prelude.Maybe Replacement)
resourceChange_replacement :: (Maybe Replacement -> f (Maybe Replacement))
-> ResourceChange -> f ResourceChange
resourceChange_replacement = (ResourceChange -> Maybe Replacement)
-> (ResourceChange -> Maybe Replacement -> ResourceChange)
-> Lens
ResourceChange
ResourceChange
(Maybe Replacement)
(Maybe Replacement)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceChange' {Maybe Replacement
replacement :: Maybe Replacement
$sel:replacement:ResourceChange' :: ResourceChange -> Maybe Replacement
replacement} -> Maybe Replacement
replacement) (\s :: ResourceChange
s@ResourceChange' {} Maybe Replacement
a -> ResourceChange
s {$sel:replacement:ResourceChange' :: Maybe Replacement
replacement = Maybe Replacement
a} :: ResourceChange)
instance Core.FromXML ResourceChange where
parseXML :: [Node] -> Either String ResourceChange
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeAction
-> Maybe Text
-> Maybe ModuleInfo
-> Maybe [ResourceAttribute]
-> Maybe [ResourceChangeDetail]
-> Maybe Replacement
-> ResourceChange
ResourceChange'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeAction
-> Maybe Text
-> Maybe ModuleInfo
-> Maybe [ResourceAttribute]
-> Maybe [ResourceChangeDetail]
-> Maybe Replacement
-> ResourceChange)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe ChangeAction
-> Maybe Text
-> Maybe ModuleInfo
-> Maybe [ResourceAttribute]
-> Maybe [ResourceChangeDetail]
-> Maybe Replacement
-> ResourceChange)
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
"LogicalResourceId")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe ChangeAction
-> Maybe Text
-> Maybe ModuleInfo
-> Maybe [ResourceAttribute]
-> Maybe [ResourceChangeDetail]
-> Maybe Replacement
-> ResourceChange)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe ChangeAction
-> Maybe Text
-> Maybe ModuleInfo
-> Maybe [ResourceAttribute]
-> Maybe [ResourceChangeDetail]
-> Maybe Replacement
-> ResourceChange)
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
"PhysicalResourceId")
Either
String
(Maybe Text
-> Maybe ChangeAction
-> Maybe Text
-> Maybe ModuleInfo
-> Maybe [ResourceAttribute]
-> Maybe [ResourceChangeDetail]
-> Maybe Replacement
-> ResourceChange)
-> Either String (Maybe Text)
-> Either
String
(Maybe ChangeAction
-> Maybe Text
-> Maybe ModuleInfo
-> Maybe [ResourceAttribute]
-> Maybe [ResourceChangeDetail]
-> Maybe Replacement
-> ResourceChange)
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
"ResourceType")
Either
String
(Maybe ChangeAction
-> Maybe Text
-> Maybe ModuleInfo
-> Maybe [ResourceAttribute]
-> Maybe [ResourceChangeDetail]
-> Maybe Replacement
-> ResourceChange)
-> Either String (Maybe ChangeAction)
-> Either
String
(Maybe Text
-> Maybe ModuleInfo
-> Maybe [ResourceAttribute]
-> Maybe [ResourceChangeDetail]
-> Maybe Replacement
-> ResourceChange)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ChangeAction)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Action")
Either
String
(Maybe Text
-> Maybe ModuleInfo
-> Maybe [ResourceAttribute]
-> Maybe [ResourceChangeDetail]
-> Maybe Replacement
-> ResourceChange)
-> Either String (Maybe Text)
-> Either
String
(Maybe ModuleInfo
-> Maybe [ResourceAttribute]
-> Maybe [ResourceChangeDetail]
-> Maybe Replacement
-> ResourceChange)
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
"ChangeSetId")
Either
String
(Maybe ModuleInfo
-> Maybe [ResourceAttribute]
-> Maybe [ResourceChangeDetail]
-> Maybe Replacement
-> ResourceChange)
-> Either String (Maybe ModuleInfo)
-> Either
String
(Maybe [ResourceAttribute]
-> Maybe [ResourceChangeDetail]
-> Maybe Replacement
-> ResourceChange)
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
(Maybe [ResourceAttribute]
-> Maybe [ResourceChangeDetail]
-> Maybe Replacement
-> ResourceChange)
-> Either String (Maybe [ResourceAttribute])
-> Either
String
(Maybe [ResourceChangeDetail]
-> Maybe Replacement -> ResourceChange)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Scope" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [ResourceAttribute]))
-> Either String (Maybe [ResourceAttribute])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ResourceAttribute])
-> [Node] -> Either String (Maybe [ResourceAttribute])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [ResourceAttribute]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either
String
(Maybe [ResourceChangeDetail]
-> Maybe Replacement -> ResourceChange)
-> Either String (Maybe [ResourceChangeDetail])
-> Either String (Maybe Replacement -> ResourceChange)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Details" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [ResourceChangeDetail]))
-> Either String (Maybe [ResourceChangeDetail])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ResourceChangeDetail])
-> [Node] -> Either String (Maybe [ResourceChangeDetail])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [ResourceChangeDetail]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either String (Maybe Replacement -> ResourceChange)
-> Either String (Maybe Replacement)
-> Either String ResourceChange
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Replacement)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Replacement")
instance Prelude.Hashable ResourceChange
instance Prelude.NFData ResourceChange