{-# 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.IAM.Types.ResourceSpecificResult where
import qualified Amazonka.Core as Core
import Amazonka.IAM.Types.PermissionsBoundaryDecisionDetail
import Amazonka.IAM.Types.PolicyEvaluationDecisionType
import Amazonka.IAM.Types.Statement
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ResourceSpecificResult = ResourceSpecificResult'
{
ResourceSpecificResult -> Maybe [Statement]
matchedStatements :: Prelude.Maybe [Statement],
ResourceSpecificResult
-> Maybe (HashMap Text PolicyEvaluationDecisionType)
evalDecisionDetails :: Prelude.Maybe (Prelude.HashMap Prelude.Text PolicyEvaluationDecisionType),
ResourceSpecificResult -> Maybe [Text]
missingContextValues :: Prelude.Maybe [Prelude.Text],
ResourceSpecificResult -> Maybe PermissionsBoundaryDecisionDetail
permissionsBoundaryDecisionDetail :: Prelude.Maybe PermissionsBoundaryDecisionDetail,
ResourceSpecificResult -> Text
evalResourceName :: Prelude.Text,
ResourceSpecificResult -> PolicyEvaluationDecisionType
evalResourceDecision :: PolicyEvaluationDecisionType
}
deriving (ResourceSpecificResult -> ResourceSpecificResult -> Bool
(ResourceSpecificResult -> ResourceSpecificResult -> Bool)
-> (ResourceSpecificResult -> ResourceSpecificResult -> Bool)
-> Eq ResourceSpecificResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceSpecificResult -> ResourceSpecificResult -> Bool
$c/= :: ResourceSpecificResult -> ResourceSpecificResult -> Bool
== :: ResourceSpecificResult -> ResourceSpecificResult -> Bool
$c== :: ResourceSpecificResult -> ResourceSpecificResult -> Bool
Prelude.Eq, ReadPrec [ResourceSpecificResult]
ReadPrec ResourceSpecificResult
Int -> ReadS ResourceSpecificResult
ReadS [ResourceSpecificResult]
(Int -> ReadS ResourceSpecificResult)
-> ReadS [ResourceSpecificResult]
-> ReadPrec ResourceSpecificResult
-> ReadPrec [ResourceSpecificResult]
-> Read ResourceSpecificResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResourceSpecificResult]
$creadListPrec :: ReadPrec [ResourceSpecificResult]
readPrec :: ReadPrec ResourceSpecificResult
$creadPrec :: ReadPrec ResourceSpecificResult
readList :: ReadS [ResourceSpecificResult]
$creadList :: ReadS [ResourceSpecificResult]
readsPrec :: Int -> ReadS ResourceSpecificResult
$creadsPrec :: Int -> ReadS ResourceSpecificResult
Prelude.Read, Int -> ResourceSpecificResult -> ShowS
[ResourceSpecificResult] -> ShowS
ResourceSpecificResult -> String
(Int -> ResourceSpecificResult -> ShowS)
-> (ResourceSpecificResult -> String)
-> ([ResourceSpecificResult] -> ShowS)
-> Show ResourceSpecificResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResourceSpecificResult] -> ShowS
$cshowList :: [ResourceSpecificResult] -> ShowS
show :: ResourceSpecificResult -> String
$cshow :: ResourceSpecificResult -> String
showsPrec :: Int -> ResourceSpecificResult -> ShowS
$cshowsPrec :: Int -> ResourceSpecificResult -> ShowS
Prelude.Show, (forall x. ResourceSpecificResult -> Rep ResourceSpecificResult x)
-> (forall x.
Rep ResourceSpecificResult x -> ResourceSpecificResult)
-> Generic ResourceSpecificResult
forall x. Rep ResourceSpecificResult x -> ResourceSpecificResult
forall x. ResourceSpecificResult -> Rep ResourceSpecificResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResourceSpecificResult x -> ResourceSpecificResult
$cfrom :: forall x. ResourceSpecificResult -> Rep ResourceSpecificResult x
Prelude.Generic)
newResourceSpecificResult ::
Prelude.Text ->
PolicyEvaluationDecisionType ->
ResourceSpecificResult
newResourceSpecificResult :: Text -> PolicyEvaluationDecisionType -> ResourceSpecificResult
newResourceSpecificResult
Text
pEvalResourceName_
PolicyEvaluationDecisionType
pEvalResourceDecision_ =
ResourceSpecificResult' :: Maybe [Statement]
-> Maybe (HashMap Text PolicyEvaluationDecisionType)
-> Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> ResourceSpecificResult
ResourceSpecificResult'
{ $sel:matchedStatements:ResourceSpecificResult' :: Maybe [Statement]
matchedStatements =
Maybe [Statement]
forall a. Maybe a
Prelude.Nothing,
$sel:evalDecisionDetails:ResourceSpecificResult' :: Maybe (HashMap Text PolicyEvaluationDecisionType)
evalDecisionDetails = Maybe (HashMap Text PolicyEvaluationDecisionType)
forall a. Maybe a
Prelude.Nothing,
$sel:missingContextValues:ResourceSpecificResult' :: Maybe [Text]
missingContextValues = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:permissionsBoundaryDecisionDetail:ResourceSpecificResult' :: Maybe PermissionsBoundaryDecisionDetail
permissionsBoundaryDecisionDetail = Maybe PermissionsBoundaryDecisionDetail
forall a. Maybe a
Prelude.Nothing,
$sel:evalResourceName:ResourceSpecificResult' :: Text
evalResourceName = Text
pEvalResourceName_,
$sel:evalResourceDecision:ResourceSpecificResult' :: PolicyEvaluationDecisionType
evalResourceDecision = PolicyEvaluationDecisionType
pEvalResourceDecision_
}
resourceSpecificResult_matchedStatements :: Lens.Lens' ResourceSpecificResult (Prelude.Maybe [Statement])
resourceSpecificResult_matchedStatements :: (Maybe [Statement] -> f (Maybe [Statement]))
-> ResourceSpecificResult -> f ResourceSpecificResult
resourceSpecificResult_matchedStatements = (ResourceSpecificResult -> Maybe [Statement])
-> (ResourceSpecificResult
-> Maybe [Statement] -> ResourceSpecificResult)
-> Lens
ResourceSpecificResult
ResourceSpecificResult
(Maybe [Statement])
(Maybe [Statement])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSpecificResult' {Maybe [Statement]
matchedStatements :: Maybe [Statement]
$sel:matchedStatements:ResourceSpecificResult' :: ResourceSpecificResult -> Maybe [Statement]
matchedStatements} -> Maybe [Statement]
matchedStatements) (\s :: ResourceSpecificResult
s@ResourceSpecificResult' {} Maybe [Statement]
a -> ResourceSpecificResult
s {$sel:matchedStatements:ResourceSpecificResult' :: Maybe [Statement]
matchedStatements = Maybe [Statement]
a} :: ResourceSpecificResult) ((Maybe [Statement] -> f (Maybe [Statement]))
-> ResourceSpecificResult -> f ResourceSpecificResult)
-> ((Maybe [Statement] -> f (Maybe [Statement]))
-> Maybe [Statement] -> f (Maybe [Statement]))
-> (Maybe [Statement] -> f (Maybe [Statement]))
-> ResourceSpecificResult
-> f ResourceSpecificResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Statement] [Statement] [Statement] [Statement]
-> Iso
(Maybe [Statement])
(Maybe [Statement])
(Maybe [Statement])
(Maybe [Statement])
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 [Statement] [Statement] [Statement] [Statement]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
resourceSpecificResult_evalDecisionDetails :: Lens.Lens' ResourceSpecificResult (Prelude.Maybe (Prelude.HashMap Prelude.Text PolicyEvaluationDecisionType))
resourceSpecificResult_evalDecisionDetails :: (Maybe (HashMap Text PolicyEvaluationDecisionType)
-> f (Maybe (HashMap Text PolicyEvaluationDecisionType)))
-> ResourceSpecificResult -> f ResourceSpecificResult
resourceSpecificResult_evalDecisionDetails = (ResourceSpecificResult
-> Maybe (HashMap Text PolicyEvaluationDecisionType))
-> (ResourceSpecificResult
-> Maybe (HashMap Text PolicyEvaluationDecisionType)
-> ResourceSpecificResult)
-> Lens
ResourceSpecificResult
ResourceSpecificResult
(Maybe (HashMap Text PolicyEvaluationDecisionType))
(Maybe (HashMap Text PolicyEvaluationDecisionType))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSpecificResult' {Maybe (HashMap Text PolicyEvaluationDecisionType)
evalDecisionDetails :: Maybe (HashMap Text PolicyEvaluationDecisionType)
$sel:evalDecisionDetails:ResourceSpecificResult' :: ResourceSpecificResult
-> Maybe (HashMap Text PolicyEvaluationDecisionType)
evalDecisionDetails} -> Maybe (HashMap Text PolicyEvaluationDecisionType)
evalDecisionDetails) (\s :: ResourceSpecificResult
s@ResourceSpecificResult' {} Maybe (HashMap Text PolicyEvaluationDecisionType)
a -> ResourceSpecificResult
s {$sel:evalDecisionDetails:ResourceSpecificResult' :: Maybe (HashMap Text PolicyEvaluationDecisionType)
evalDecisionDetails = Maybe (HashMap Text PolicyEvaluationDecisionType)
a} :: ResourceSpecificResult) ((Maybe (HashMap Text PolicyEvaluationDecisionType)
-> f (Maybe (HashMap Text PolicyEvaluationDecisionType)))
-> ResourceSpecificResult -> f ResourceSpecificResult)
-> ((Maybe (HashMap Text PolicyEvaluationDecisionType)
-> f (Maybe (HashMap Text PolicyEvaluationDecisionType)))
-> Maybe (HashMap Text PolicyEvaluationDecisionType)
-> f (Maybe (HashMap Text PolicyEvaluationDecisionType)))
-> (Maybe (HashMap Text PolicyEvaluationDecisionType)
-> f (Maybe (HashMap Text PolicyEvaluationDecisionType)))
-> ResourceSpecificResult
-> f ResourceSpecificResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text PolicyEvaluationDecisionType)
(HashMap Text PolicyEvaluationDecisionType)
(HashMap Text PolicyEvaluationDecisionType)
(HashMap Text PolicyEvaluationDecisionType)
-> Iso
(Maybe (HashMap Text PolicyEvaluationDecisionType))
(Maybe (HashMap Text PolicyEvaluationDecisionType))
(Maybe (HashMap Text PolicyEvaluationDecisionType))
(Maybe (HashMap Text PolicyEvaluationDecisionType))
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
(HashMap Text PolicyEvaluationDecisionType)
(HashMap Text PolicyEvaluationDecisionType)
(HashMap Text PolicyEvaluationDecisionType)
(HashMap Text PolicyEvaluationDecisionType)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
resourceSpecificResult_missingContextValues :: Lens.Lens' ResourceSpecificResult (Prelude.Maybe [Prelude.Text])
resourceSpecificResult_missingContextValues :: (Maybe [Text] -> f (Maybe [Text]))
-> ResourceSpecificResult -> f ResourceSpecificResult
resourceSpecificResult_missingContextValues = (ResourceSpecificResult -> Maybe [Text])
-> (ResourceSpecificResult
-> Maybe [Text] -> ResourceSpecificResult)
-> Lens
ResourceSpecificResult
ResourceSpecificResult
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSpecificResult' {Maybe [Text]
missingContextValues :: Maybe [Text]
$sel:missingContextValues:ResourceSpecificResult' :: ResourceSpecificResult -> Maybe [Text]
missingContextValues} -> Maybe [Text]
missingContextValues) (\s :: ResourceSpecificResult
s@ResourceSpecificResult' {} Maybe [Text]
a -> ResourceSpecificResult
s {$sel:missingContextValues:ResourceSpecificResult' :: Maybe [Text]
missingContextValues = Maybe [Text]
a} :: ResourceSpecificResult) ((Maybe [Text] -> f (Maybe [Text]))
-> ResourceSpecificResult -> f ResourceSpecificResult)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ResourceSpecificResult
-> f ResourceSpecificResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
resourceSpecificResult_permissionsBoundaryDecisionDetail :: Lens.Lens' ResourceSpecificResult (Prelude.Maybe PermissionsBoundaryDecisionDetail)
resourceSpecificResult_permissionsBoundaryDecisionDetail :: (Maybe PermissionsBoundaryDecisionDetail
-> f (Maybe PermissionsBoundaryDecisionDetail))
-> ResourceSpecificResult -> f ResourceSpecificResult
resourceSpecificResult_permissionsBoundaryDecisionDetail = (ResourceSpecificResult -> Maybe PermissionsBoundaryDecisionDetail)
-> (ResourceSpecificResult
-> Maybe PermissionsBoundaryDecisionDetail
-> ResourceSpecificResult)
-> Lens
ResourceSpecificResult
ResourceSpecificResult
(Maybe PermissionsBoundaryDecisionDetail)
(Maybe PermissionsBoundaryDecisionDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSpecificResult' {Maybe PermissionsBoundaryDecisionDetail
permissionsBoundaryDecisionDetail :: Maybe PermissionsBoundaryDecisionDetail
$sel:permissionsBoundaryDecisionDetail:ResourceSpecificResult' :: ResourceSpecificResult -> Maybe PermissionsBoundaryDecisionDetail
permissionsBoundaryDecisionDetail} -> Maybe PermissionsBoundaryDecisionDetail
permissionsBoundaryDecisionDetail) (\s :: ResourceSpecificResult
s@ResourceSpecificResult' {} Maybe PermissionsBoundaryDecisionDetail
a -> ResourceSpecificResult
s {$sel:permissionsBoundaryDecisionDetail:ResourceSpecificResult' :: Maybe PermissionsBoundaryDecisionDetail
permissionsBoundaryDecisionDetail = Maybe PermissionsBoundaryDecisionDetail
a} :: ResourceSpecificResult)
resourceSpecificResult_evalResourceName :: Lens.Lens' ResourceSpecificResult Prelude.Text
resourceSpecificResult_evalResourceName :: (Text -> f Text)
-> ResourceSpecificResult -> f ResourceSpecificResult
resourceSpecificResult_evalResourceName = (ResourceSpecificResult -> Text)
-> (ResourceSpecificResult -> Text -> ResourceSpecificResult)
-> Lens ResourceSpecificResult ResourceSpecificResult Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSpecificResult' {Text
evalResourceName :: Text
$sel:evalResourceName:ResourceSpecificResult' :: ResourceSpecificResult -> Text
evalResourceName} -> Text
evalResourceName) (\s :: ResourceSpecificResult
s@ResourceSpecificResult' {} Text
a -> ResourceSpecificResult
s {$sel:evalResourceName:ResourceSpecificResult' :: Text
evalResourceName = Text
a} :: ResourceSpecificResult)
resourceSpecificResult_evalResourceDecision :: Lens.Lens' ResourceSpecificResult PolicyEvaluationDecisionType
resourceSpecificResult_evalResourceDecision :: (PolicyEvaluationDecisionType -> f PolicyEvaluationDecisionType)
-> ResourceSpecificResult -> f ResourceSpecificResult
resourceSpecificResult_evalResourceDecision = (ResourceSpecificResult -> PolicyEvaluationDecisionType)
-> (ResourceSpecificResult
-> PolicyEvaluationDecisionType -> ResourceSpecificResult)
-> Lens
ResourceSpecificResult
ResourceSpecificResult
PolicyEvaluationDecisionType
PolicyEvaluationDecisionType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSpecificResult' {PolicyEvaluationDecisionType
evalResourceDecision :: PolicyEvaluationDecisionType
$sel:evalResourceDecision:ResourceSpecificResult' :: ResourceSpecificResult -> PolicyEvaluationDecisionType
evalResourceDecision} -> PolicyEvaluationDecisionType
evalResourceDecision) (\s :: ResourceSpecificResult
s@ResourceSpecificResult' {} PolicyEvaluationDecisionType
a -> ResourceSpecificResult
s {$sel:evalResourceDecision:ResourceSpecificResult' :: PolicyEvaluationDecisionType
evalResourceDecision = PolicyEvaluationDecisionType
a} :: ResourceSpecificResult)
instance Core.FromXML ResourceSpecificResult where
parseXML :: [Node] -> Either String ResourceSpecificResult
parseXML [Node]
x =
Maybe [Statement]
-> Maybe (HashMap Text PolicyEvaluationDecisionType)
-> Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> ResourceSpecificResult
ResourceSpecificResult'
(Maybe [Statement]
-> Maybe (HashMap Text PolicyEvaluationDecisionType)
-> Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> ResourceSpecificResult)
-> Either String (Maybe [Statement])
-> Either
String
(Maybe (HashMap Text PolicyEvaluationDecisionType)
-> Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> ResourceSpecificResult)
forall (f :: * -> *) a b. Functor 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
"MatchedStatements"
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 [Statement]))
-> Either String (Maybe [Statement])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Statement])
-> [Node] -> Either String (Maybe [Statement])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Statement]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either
String
(Maybe (HashMap Text PolicyEvaluationDecisionType)
-> Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> ResourceSpecificResult)
-> Either
String (Maybe (HashMap Text PolicyEvaluationDecisionType))
-> Either
String
(Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> ResourceSpecificResult)
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
"EvalDecisionDetails"
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 (HashMap Text PolicyEvaluationDecisionType)))
-> Either
String (Maybe (HashMap Text PolicyEvaluationDecisionType))
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node]
-> Either String (HashMap Text PolicyEvaluationDecisionType))
-> [Node]
-> Either
String (Maybe (HashMap Text PolicyEvaluationDecisionType))
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text
-> Text
-> Text
-> [Node]
-> Either String (HashMap Text PolicyEvaluationDecisionType)
forall k v.
(Eq k, Hashable k, FromText k, FromXML v) =>
Text -> Text -> Text -> [Node] -> Either String (HashMap k v)
Core.parseXMLMap Text
"entry" Text
"key" Text
"value")
)
Either
String
(Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> ResourceSpecificResult)
-> Either String (Maybe [Text])
-> Either
String
(Maybe PermissionsBoundaryDecisionDetail
-> Text -> PolicyEvaluationDecisionType -> ResourceSpecificResult)
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
"MissingContextValues"
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 [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either
String
(Maybe PermissionsBoundaryDecisionDetail
-> Text -> PolicyEvaluationDecisionType -> ResourceSpecificResult)
-> Either String (Maybe PermissionsBoundaryDecisionDetail)
-> Either
String
(Text -> PolicyEvaluationDecisionType -> ResourceSpecificResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node]
-> Text -> Either String (Maybe PermissionsBoundaryDecisionDetail)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PermissionsBoundaryDecisionDetail")
Either
String
(Text -> PolicyEvaluationDecisionType -> ResourceSpecificResult)
-> Either String Text
-> Either
String (PolicyEvaluationDecisionType -> ResourceSpecificResult)
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
"EvalResourceName")
Either
String (PolicyEvaluationDecisionType -> ResourceSpecificResult)
-> Either String PolicyEvaluationDecisionType
-> Either String ResourceSpecificResult
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String PolicyEvaluationDecisionType
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"EvalResourceDecision")
instance Prelude.Hashable ResourceSpecificResult
instance Prelude.NFData ResourceSpecificResult